]> Dogcows Code - chaz/openbox/commitdiff
prefix the Timer->ObTimer and TimeoutHandler->ObTimeoutHandler shitz
authorDana Jansens <danakj@orodu.net>
Thu, 10 Jul 2003 17:06:30 +0000 (17:06 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 10 Jul 2003 17:06:30 +0000 (17:06 +0000)
openbox/dock.c
openbox/dock.h
openbox/screen.c
openbox/timer.c
openbox/timer.h
plugins/keyboard/keyboard.c
plugins/menu/timed_menu.c

index da9bdd2a0dc4758c74d9806c9a6ec61ec7cce754..ccea0ad03428451d4c3eaa25c84858a058bc39f0 100644 (file)
@@ -518,7 +518,7 @@ void dock_hide(gboolean hide)
     } else {
         g_assert(!dock->hide_timer);
         dock->hide_timer = timer_start(config_dock_hide_timeout * 1000,
-                                       (TimeoutHandler)hide_timeout,
+                                       (ObTimeoutHandler)hide_timeout,
                                        NULL);
     }
 }
index aa18da8426c9b17f6c1f58aecfcf7154f0b90724..99cc01f3a962dd7e8d7549fd0bbeb11cc0780ce5 100644 (file)
@@ -28,7 +28,7 @@ struct _ObDock
     gint h;
 
     gboolean hidden;
-    Timer *hide_timer;
+    ObTimer *hide_timer;
 
     GList *dock_apps;
 };
index e2e141dd6d7e194943e25e0b59b50d4d879fe868..a83c5710ea529f2b3ad7ab79c419c3effaea8251 100644 (file)
@@ -46,7 +46,7 @@ static Window support_window = None;
 #ifdef USE_LIBSN
 static SnMonitorContext *sn_context;
 static int sn_busy_cnt;
-static Timer *sn_timer = NULL;
+static ObTimer *sn_timer = NULL;
 
 static void sn_event_func(SnMonitorEvent *event, void *data);
 #endif
index e459154465ce2e615b01e3d4cd424734b91b1952..b49f4dea6aa269954de2918d8650ddfec62ab034 100644 (file)
@@ -8,7 +8,7 @@ static GTimeVal now;
 static GTimeVal ret_wait;
 static GSList *timers; /* nearest timer is at the top */
 
-#define NEAREST_TIMEOUT (((Timer*)timers->data)->timeout)
+#define NEAREST_TIMEOUT (((ObTimer*)timers->data)->timeout)
 
 static long timecompare(GTimeVal *a, GTimeVal *b)
 {
@@ -19,11 +19,11 @@ static long timecompare(GTimeVal *a, GTimeVal *b)
     
 }
 
-static void insert_timer(Timer *self)
+static void insert_timer(ObTimer *self)
 {
     GSList *it;
     for (it = timers; it != NULL; it = it->next) {
-       Timer *t = it->data;
+       ObTimer *t = it->data;
         if (timecompare(&self->timeout, &t->timeout) <= 0) {
            timers = g_slist_insert_before(timers, it, self);
            break;
@@ -49,9 +49,9 @@ void timer_shutdown()
     timers = NULL;
 }
 
-Timer *timer_start(long delay, TimeoutHandler cb, void *data)
+ObTimer *timer_start(long delay, ObTimeoutHandler cb, void *data)
 {
-    Timer *self = g_new(Timer, 1);
+    ObTimer *self = g_new(ObTimer, 1);
     self->delay = delay;
     self->action = cb;
     self->data = data;
@@ -64,7 +64,7 @@ Timer *timer_start(long delay, TimeoutHandler cb, void *data)
     return self;
 }
 
-void timer_stop(Timer *self)
+void timer_stop(ObTimer *self)
 {
     self->del_me = TRUE;
 }
@@ -96,7 +96,7 @@ void timer_dispatch(GTimeVal **wait)
     g_get_current_time(&now);
 
     while (timers != NULL) {
-       Timer *curr = timers->data; /* get the top element */
+       ObTimer *curr = timers->data; /* get the top element */
        /* since timer_stop doesn't actually free the timer, we have to do our
           real freeing in here.
        */
index e50ffa8cf02f8db5a32b3d2ab5a4b642d1ca391b..549490c574be3fb221a3ab41726699d96735024f 100644 (file)
@@ -3,14 +3,17 @@
 
 #include <glib.h>
 
+typedef struct _ObTimer ObTimer;
+
 /*! Data type of Timer callback */
-typedef void (*TimeoutHandler)(void *data);
+typedef void (*ObTimeoutHandler)(void *data);
 
-typedef struct Timer {
+struct _ObTimer
+{
     /*! Microseconds between timer firings */
     long delay;
     /*! Callback for timer expiry */
-    TimeoutHandler action;
+    ObTimeoutHandler action;
     /*! Data sent to callback */
     void *data;
     /*! We overload the delete operator to just set this to true */
@@ -19,7 +22,7 @@ typedef struct Timer {
     GTimeVal last;
     /*! When this timer will next trigger */
     GTimeVal timeout;
-} Timer;
+};
 
 /*! Initializes the timer subsection */
 void timer_startup();
@@ -27,9 +30,9 @@ void timer_startup();
 void timer_shutdown();
 
 /* Creates a new timer with a given delay */
-Timer *timer_start(long delay, TimeoutHandler cb, void *data);
+ObTimer *timer_start(long delay, ObTimeoutHandler cb, void *data);
 /* Stops and frees a timer */
-void timer_stop(Timer *self);
+void timer_stop(ObTimer *self);
 
 /*! Dispatch all pending timers. Sets wait to the amount of time to wait for
   the next timer, or NULL if there are no timers to wait for */
index b1923af3680976201d9edcb3763d9c639512f995..0fc43e83e1d72c00554dfb4d3c135bee8e020fba 100644 (file)
@@ -80,7 +80,7 @@ KeyBindingTree *firstnode = NULL;
 
 static KeyBindingTree *curpos;
 static guint reset_key, reset_state;
-static Timer *chain_timer;
+static ObTimer *chain_timer;
 
 static void grab_for_window(Window win, gboolean grab)
 {
index 19a24f1474d8bba70702c7e858687dec607c4af4..e7665b5642049e49fea033090936472504c241bf 100644 (file)
@@ -26,7 +26,7 @@ typedef enum {
 
 typedef struct {
     Timed_Menu_Type type;
-    Timer *timer;
+    ObTimer *timer;
     char *command; /* for the PIPE */
     char *buf; /* buffer to hold partially read menu */
     unsigned long buflen; /* how many bytes are in the buffer */
This page took 0.037198 seconds and 4 git commands to generate.