diff --git a/ChangeLog b/ChangeLog index 2565d72961..191f117bae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2565d72961..191f117bae 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2565d72961..191f117bae 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2565d72961..191f117bae 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2565d72961..191f117bae 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2565d72961..191f117bae 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2565d72961..191f117bae 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Feb 11 00:18:31 1998 Tim Janik + + * gtk/gtksignal.h: + * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning + the id of the next handler pending for that signal or 0. + put struct GtkHandler back into gtksignal.c along with + gtk_signal_get_handlers. + Tue Feb 10 07:12:07 1998 Tim Janik * gtk/gtksignal.h: @@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena Thu Jan 22 02:32:06 1998 Scott Goehring - * gtk/Makefile.am: Fixed the called to runelisp to use $(SHELL). + * gtk/Makefile.am: Fixed the call to runelisp to use $(SHELL). (Cannot rely on the script having execute permissions.) Wed Jan 21 17:29:54 CST 1998 Shawn T. Amundson diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c index e9d3a854dc..ec115bf1b9 100644 --- a/gtk/gtksignal.c +++ b/gtk/gtksignal.c @@ -28,6 +28,7 @@ typedef struct _GtkSignal GtkSignal; typedef struct _GtkSignalInfo GtkSignalInfo; +typedef struct _GtkHandler GtkHandler; typedef struct _GtkHandlerInfo GtkHandlerInfo; typedef struct _GtkEmission GtkEmission; @@ -52,6 +53,22 @@ struct _GtkSignal gint nparams; }; +struct _GtkHandler +{ + guint id : 28; + guint blocked : 1; + guint object_signal : 1; + guint after : 1; + guint no_marshal : 1; + guint16 ref_count; + guint16 signal_type; + GtkSignalFunc func; + gpointer func_data; + GtkSignalDestroy destroy_func; + GtkHandler *prev; + GtkHandler *next; +}; + struct _GtkHandlerInfo { GtkObject *object; @@ -87,6 +104,8 @@ static void gtk_signal_handler_insert (GtkObject *object, static void gtk_signal_real_emit (GtkObject *object, gint signal_type, va_list args); +static GtkHandler* gtk_signal_get_handlers (GtkObject *object, + gint signal_type); static gint gtk_signal_connect_by_type (GtkObject *object, gint signal_type, gint object_signal, @@ -1052,7 +1071,7 @@ done: gtk_object_unref (object); } -GtkHandler* +static GtkHandler* gtk_signal_get_handlers (GtkObject *object, gint signal_type) { @@ -1073,6 +1092,36 @@ gtk_signal_get_handlers (GtkObject *object, return NULL; } +guint +gtk_signal_handler_pending (GtkObject *object, + gint signal_type, + gboolean may_be_blocked) +{ + GtkHandler *handlers; + guint handler_id; + + g_return_val_if_fail (object != NULL, 0); + g_return_val_if_fail (signal_type >= 1, 0); + + handlers = gtk_signal_get_handlers (object, signal_type); + + handler_id = 0; + while (handlers && handlers->signal_type == signal_type) + { + if (handlers->id > 0 && + (may_be_blocked || + !handlers->blocked)) + { + handler_id = handlers->id; + break; + } + + handlers = handlers->next; + } + + return handler_id; +} + static gint gtk_signal_connect_by_type (GtkObject *object, gint signal_type, diff --git a/gtk/gtksignal.h b/gtk/gtksignal.h index e6c66f031e..2212d8bb33 100644 --- a/gtk/gtksignal.h +++ b/gtk/gtksignal.h @@ -45,7 +45,6 @@ typedef void (*GtkSignalMarshal) (GtkObject *object, typedef void (*GtkSignalDestroy) (gpointer data); typedef struct _GtkSignalQuery GtkSignalQuery; -typedef struct _GtkHandler GtkHandler; struct _GtkSignalQuery { @@ -58,22 +57,6 @@ struct _GtkSignalQuery const GtkType *params; }; -struct _GtkHandler -{ - guint id : 28; - guint blocked : 1; - guint object_signal : 1; - guint after : 1; - guint no_marshal : 1; - guint16 ref_count; - guint16 signal_type; - GtkSignalFunc func; - gpointer func_data; - GtkSignalDestroy destroy_func; - GtkHandler *prev; - GtkHandler *next; -}; - gint gtk_signal_new (const gchar *name, GtkSignalRunType run_type, gint object_type, @@ -148,6 +131,9 @@ void gtk_signal_handler_unblock (GtkObject *object, gint anid); void gtk_signal_handler_unblock_by_data (GtkObject *object, gpointer data); +guint gtk_signal_handler_pending (GtkObject *object, + gint signal_type, + gboolean may_be_blocked); void gtk_signal_handlers_destroy (GtkObject *object); void gtk_signal_default_marshaller (GtkObject *object, GtkSignalFunc func, @@ -162,9 +148,6 @@ void gtk_signal_set_funcs (GtkSignalMarshal marshal_func, */ GtkSignalQuery* gtk_signal_query (gint signal_num); -GtkHandler* gtk_signal_get_handlers (GtkObject *object, - gint signal_type); - #ifdef __cplusplus }