re-enabled event watcher emission hooks.

Thu Mar  8 18:13:20 2001  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c: re-enabled event watcher emission hooks.
This commit is contained in:
Tim Janik 2001-03-08 17:13:11 +00:00 committed by Tim Janik
parent 06718ecfed
commit 73789e5aa7
9 changed files with 48 additions and 22 deletions

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -1,3 +1,7 @@
Thu Mar 8 18:13:20 2001 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: re-enabled event watcher emission hooks.
Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org> Thu Mar 8 16:51:21 2001 Tim Janik <timj@gtk.org>
* *.c: added accumulator data argument to g_signal_newc() * *.c: added accumulator data argument to g_signal_newc()

View File

@ -6220,15 +6220,14 @@ static gboolean event_watcher_enter_id = 0;
static gboolean event_watcher_leave_id = 0; static gboolean event_watcher_leave_id = 0;
static gboolean static gboolean
event_watcher (GtkObject *object, event_watcher (GSignalInvocationHint *ihint,
guint signal_id, guint n_param_values,
guint n_params, const GValue *param_values,
GtkArg *params,
gpointer data) gpointer data)
{ {
g_print ("Watch: \"%s\" emitted for %s\n", g_print ("Watch: \"%s\" emitted for %s\n",
gtk_signal_name (signal_id), gtk_signal_name (ihint->signal_id),
gtk_type_name (GTK_OBJECT_TYPE (object))); gtk_type_name (GTK_OBJECT_TYPE (g_value_get_object (param_values + 0))));
return TRUE; return TRUE;
} }
@ -6241,10 +6240,10 @@ event_watcher_down (void)
guint signal_id; guint signal_id;
signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET);
// gtk_signal_remove_emission_hook (signal_id, event_watcher_enter_id); g_signal_remove_emission_hook (signal_id, event_watcher_enter_id);
event_watcher_enter_id = 0; event_watcher_enter_id = 0;
signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET);
// gtk_signal_remove_emission_hook (signal_id, event_watcher_leave_id); g_signal_remove_emission_hook (signal_id, event_watcher_leave_id);
event_watcher_leave_id = 0; event_watcher_leave_id = 0;
} }
} }
@ -6259,9 +6258,9 @@ event_watcher_toggle (void)
guint signal_id; guint signal_id;
signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET);
// event_watcher_enter_id = gtk_signal_add_emission_hook (signal_id, event_watcher, NULL); event_watcher_enter_id = g_signal_add_emission_hook (signal_id, 0, event_watcher, NULL, NULL);
signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET);
// event_watcher_leave_id = gtk_signal_add_emission_hook (signal_id, event_watcher, NULL); event_watcher_leave_id = g_signal_add_emission_hook (signal_id, 0, event_watcher, NULL, NULL);
} }
} }

View File

@ -6220,15 +6220,14 @@ static gboolean event_watcher_enter_id = 0;
static gboolean event_watcher_leave_id = 0; static gboolean event_watcher_leave_id = 0;
static gboolean static gboolean
event_watcher (GtkObject *object, event_watcher (GSignalInvocationHint *ihint,
guint signal_id, guint n_param_values,
guint n_params, const GValue *param_values,
GtkArg *params,
gpointer data) gpointer data)
{ {
g_print ("Watch: \"%s\" emitted for %s\n", g_print ("Watch: \"%s\" emitted for %s\n",
gtk_signal_name (signal_id), gtk_signal_name (ihint->signal_id),
gtk_type_name (GTK_OBJECT_TYPE (object))); gtk_type_name (GTK_OBJECT_TYPE (g_value_get_object (param_values + 0))));
return TRUE; return TRUE;
} }
@ -6241,10 +6240,10 @@ event_watcher_down (void)
guint signal_id; guint signal_id;
signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET);
// gtk_signal_remove_emission_hook (signal_id, event_watcher_enter_id); g_signal_remove_emission_hook (signal_id, event_watcher_enter_id);
event_watcher_enter_id = 0; event_watcher_enter_id = 0;
signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET);
// gtk_signal_remove_emission_hook (signal_id, event_watcher_leave_id); g_signal_remove_emission_hook (signal_id, event_watcher_leave_id);
event_watcher_leave_id = 0; event_watcher_leave_id = 0;
} }
} }
@ -6259,9 +6258,9 @@ event_watcher_toggle (void)
guint signal_id; guint signal_id;
signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("enter_notify_event", GTK_TYPE_WIDGET);
// event_watcher_enter_id = gtk_signal_add_emission_hook (signal_id, event_watcher, NULL); event_watcher_enter_id = g_signal_add_emission_hook (signal_id, 0, event_watcher, NULL, NULL);
signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET); signal_id = gtk_signal_lookup ("leave_notify_event", GTK_TYPE_WIDGET);
// event_watcher_leave_id = gtk_signal_add_emission_hook (signal_id, event_watcher, NULL); event_watcher_leave_id = g_signal_add_emission_hook (signal_id, 0, event_watcher, NULL, NULL);
} }
} }