moved initial values in function default_xxx
git-svn-id: http://tint2.googlecode.com/svn/trunk@423 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
@@ -101,7 +101,7 @@ void draw (Area *a)
|
||||
a->pix = XCreatePixmap (server.dsp, server.root_win, a->width, a->height, server.depth);
|
||||
|
||||
// add layer of root pixmap (or clear pixmap if real_transparency==true)
|
||||
if (real_transparency)
|
||||
if (server.real_transparency)
|
||||
clear_pixmap(a->pix, 0 ,0, a->width, a->height);
|
||||
XCopyArea (server.dsp, ((Panel *)a->panel)->temp_pmap, a->pix, server.gc, a->posx, a->posy, a->width, a->height, 0, 0);
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
|
||||
#include "timer.h"
|
||||
|
||||
GSList* timeout_list = 0;
|
||||
GSList* timeout_list;
|
||||
struct timeval next_timeout;
|
||||
GHashTable* multi_timeouts;
|
||||
|
||||
|
||||
// functions and structs for multi timeouts
|
||||
@@ -45,6 +46,24 @@ struct _timeout {
|
||||
multi_timeout* multi_timeout;
|
||||
};
|
||||
|
||||
|
||||
void default_timeout()
|
||||
{
|
||||
timeout_list = 0;
|
||||
multi_timeouts = 0;
|
||||
}
|
||||
|
||||
void cleanup_timeout()
|
||||
{
|
||||
while (timeout_list) {
|
||||
timeout* t = timeout_list->data;
|
||||
if (t->multi_timeout)
|
||||
stop_multi_timeout(t);
|
||||
free(t);
|
||||
timeout_list = g_slist_remove(timeout_list, t);
|
||||
}
|
||||
}
|
||||
|
||||
void add_timeout_intern(int value_msec, int interval_msec, void(*_callback)(void*), void* arg, timeout* t);
|
||||
gint compare_timeouts(gconstpointer t1, gconstpointer t2);
|
||||
gint compare_timespecs(const struct timespec* t1, const struct timespec* t2);
|
||||
@@ -61,8 +80,6 @@ void callback_multi_timeout(void* mth);
|
||||
void remove_from_multi_timeout(timeout* t);
|
||||
void stop_multi_timeout(timeout* t);
|
||||
|
||||
GHashTable* multi_timeouts = 0;
|
||||
|
||||
/** Implementation notes for timeouts: The timeouts are kept in a GSList sorted by their
|
||||
* expiration time.
|
||||
* That means that update_next_timeout() only have to consider the first timeout in the list,
|
||||
@@ -156,18 +173,6 @@ void stop_timeout(timeout* t)
|
||||
}
|
||||
|
||||
|
||||
void stop_all_timeouts()
|
||||
{
|
||||
while (timeout_list) {
|
||||
timeout* t = timeout_list->data;
|
||||
if (t->multi_timeout)
|
||||
stop_multi_timeout(t);
|
||||
free(t);
|
||||
timeout_list = g_slist_remove(timeout_list, t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void add_timeout_intern(int value_msec, int interval_msec, void(*_callback)(), void* arg, timeout *t)
|
||||
{
|
||||
t->interval_msec = interval_msec;
|
||||
|
||||
@@ -36,6 +36,11 @@ typedef struct _timeout timeout;
|
||||
* integral multiple of the other.
|
||||
**/
|
||||
|
||||
/** default values **/
|
||||
void default_timeout();
|
||||
/** freed memory : stops all timeouts **/
|
||||
void cleanup_timeout();
|
||||
|
||||
/** installs a timeout with the first timeout of 'value_msec' and then a periodic timeout with
|
||||
* 'interval_msec'. '_callback' is the callback function when the timer reaches the timeout.
|
||||
* returns a pointer to the timeout, which is needed for stopping it again
|
||||
@@ -48,9 +53,6 @@ void change_timeout(timeout* t, int value_msec, int interval_msec, void (*_callb
|
||||
/** stops the timeout 't' **/
|
||||
void stop_timeout(timeout* t);
|
||||
|
||||
/** stops all timeouts **/
|
||||
void stop_all_timeouts();
|
||||
|
||||
/** update_next_timeout updates next_timeout to the value, when the next installed timeout will expire **/
|
||||
void update_next_timeout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user