forked from AuroraMiddleware/gtk
new function gtk_signal_handler_pending() returning the id of the next
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org> * 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.
This commit is contained in:
parent
13179d42a0
commit
2090cc650c
10
ChangeLog
10
ChangeLog
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -1,3 +1,11 @@
|
||||
Wed Feb 11 00:18:31 1998 Tim Janik <timj@gimp.org>
|
||||
|
||||
* 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 <timj@gimp.org>
|
||||
|
||||
* gtk/gtksignal.h:
|
||||
@ -553,7 +561,7 @@ Thu Jan 22 18:58:44 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
Thu Jan 22 02:32:06 1998 Scott Goehring <scott@poverty.bloomington.in.us>
|
||||
|
||||
* 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 <amundson@gimp.org>
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user