timer: Rename struct CallbackWrapper to CbWrapperData

This commit is contained in:
Florian Brosch
2017-12-11 21:38:08 -02:00
committed by Georges Basile Stavracas Neto
parent 1a98df6524
commit c942b19c18
+10 -10
View File
@@ -35,7 +35,7 @@ typedef struct _GcalTimer
} GcalTimer; } GcalTimer;
/* CallbackWrapper: /* CbWrapperData:
* @timer: The timer the callback applies to. * @timer: The timer the callback applies to.
* @callback: Original callback. * @callback: Original callback.
* @destroy_notify: Original user-data destroy function. * @destroy_notify: Original user-data destroy function.
@@ -50,16 +50,16 @@ typedef struct
GCalTimerFunc callback; GCalTimerFunc callback;
GDestroyNotify destroy_notify; GDestroyNotify destroy_notify;
gpointer data; gpointer data;
} CallbackWrapper; } CbWrapperData;
static void timer_func_destroy_notify_wrapper (CallbackWrapper *wrapper); static void timer_func_destroy_notify_wrapper (CbWrapperData *wrapper);
static gboolean timer_func_wrapper (CallbackWrapper *wrapper); static gboolean timer_func_wrapper (CbWrapperData *wrapper);
static gboolean timer_source_dispatch (GcalTimer *self, static gboolean timer_source_dispatch (GcalTimer *self,
GSourceFunc callback, GSourceFunc callback,
CallbackWrapper *user_data); CbWrapperData *user_data);
static void schedule_next (GcalTimer *self); static void schedule_next (GcalTimer *self);
@@ -70,7 +70,7 @@ static void timer_source_finalize (GcalTimer *self);
/*< private >*/ /*< private >*/
static void static void
timer_func_destroy_notify_wrapper (CallbackWrapper *wrapper) timer_func_destroy_notify_wrapper (CbWrapperData *wrapper)
{ {
g_return_if_fail (wrapper != NULL); g_return_if_fail (wrapper != NULL);
@@ -83,7 +83,7 @@ timer_func_destroy_notify_wrapper (CallbackWrapper *wrapper)
static gboolean static gboolean
timer_func_wrapper (CallbackWrapper *wrapper) timer_func_wrapper (CbWrapperData *wrapper)
{ {
g_return_val_if_fail (wrapper != NULL, G_SOURCE_REMOVE); g_return_val_if_fail (wrapper != NULL, G_SOURCE_REMOVE);
@@ -98,7 +98,7 @@ timer_func_wrapper (CallbackWrapper *wrapper)
static gboolean static gboolean
timer_source_dispatch (GcalTimer *self, timer_source_dispatch (GcalTimer *self,
GSourceFunc user_callback, GSourceFunc user_callback,
CallbackWrapper *user_data) CbWrapperData *user_data)
{ {
gboolean result = G_SOURCE_CONTINUE; gboolean result = G_SOURCE_CONTINUE;
@@ -314,12 +314,12 @@ gcal_timer_set_callback (GcalTimer *self,
gpointer data, gpointer data,
GDestroyNotify notify) GDestroyNotify notify)
{ {
CallbackWrapper *wrapper; /* owned */ CbWrapperData *wrapper; /* owned */
g_return_if_fail (self != NULL); g_return_if_fail (self != NULL);
g_return_if_fail (func != NULL); g_return_if_fail (func != NULL);
wrapper = g_new0 (CallbackWrapper, 1); wrapper = g_new0 (CbWrapperData, 1);
wrapper->timer = self; wrapper->timer = self;
wrapper->callback = func; wrapper->callback = func;
wrapper->destroy_notify = notify; wrapper->destroy_notify = notify;