diff options
author | Tim Janik <timj@gtk.org> | 2001-06-19 12:54:10 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 2001-06-19 12:54:10 +0000 |
commit | 5ebd1d022ac2fa4f32f4cdf218efd62c7ffaf323 (patch) | |
tree | 7591b5b7e706dde79cd2f8bd62f2eb98d0c3baa6 /gtk/gtksignal.c | |
parent | 07ddd35c5710631b349c4517b4be4705b4438d08 (diff) | |
download | gdk-pixbuf-5ebd1d022ac2fa4f32f4cdf218efd62c7ffaf323.tar.gz |
fix PROP_EVENTS.
Mon Jun 18 02:00:49 2001 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_get_property): fix PROP_EVENTS.
* gtk/Makefile.am:
* gtk/gtk.h: disabled GtkPacker compilation.
* gtk/gtkarg.[hc], gtk/gtkargcollector.c: got rid of these.
* gtk/gtknotebook.c:
* gtk/gtktable.c:
* gtk/gtkbox.c: ported this over to child properties.
* gtk/gtksettings.c: fetch class properties via
g_object_class_list_properties().
* gtk/gtkcontainer.[hc]: implemented child properties, got rid of the
child arg interface. use gobjectnotifyqueue.c for child property
notification.
* gtk/gtkwidget.[hc]: provide necessary means for container child
properties, i.e. ::child_notify signal,
gtk_widget_freeze_child_notify(),
gtk_widget_child_notify(),
gtk_widget_thaw_child_notify().
* tests/testgtk.c: removed inferior property handling code, for
property editing, a generic module should be used, and GLE
coincidentally fullfills that purpose.
* docs/reference/Makefile.am: disabled gtk docs building, gtk-doc
needs to be adapted to g_object_class_list_properties() before this
builds again.
Diffstat (limited to 'gtk/gtksignal.c')
-rw-r--r-- | gtk/gtksignal.c | 100 |
1 files changed, 1 insertions, 99 deletions
diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c index 8fdbf7fc2..1d98d9223 100644 --- a/gtk/gtksignal.c +++ b/gtk/gtksignal.c @@ -18,7 +18,6 @@ */ #include "gtksignal.h" -#include "gtkargcollector.c" #include "gtkmarshal.c" @@ -345,93 +344,6 @@ gtk_signal_emitv (GtkObject *object, g_value_unset (params + 0); } -static gboolean -gtk_signal_collect_args (GtkArg *args, - guint n_args, - const GtkType *arg_types, - GtkType return_type, - va_list var_args) -{ - register GtkArg *last_arg; - register gboolean failed = FALSE; - - for (last_arg = args + n_args; args < last_arg; args++) - { - register gchar *error; - - args->name = NULL; - args->type = *(arg_types++); - GTK_ARG_COLLECT_VALUE (args, - var_args, - error); - if (error) - { - failed = TRUE; - g_warning ("gtk_signal_collect_args(): %s", error); - g_free (error); - } - } - - args->type = return_type; - args->name = NULL; - - return_type = GTK_FUNDAMENTAL_TYPE (return_type); - if (return_type != G_TYPE_NONE) - { - if (return_type != 0) /* FIXME: check for IS_ARG */ - { - GTK_VALUE_POINTER (*args) = va_arg (var_args, gpointer); - - if (GTK_VALUE_POINTER (*args) == NULL) - { - failed = TRUE; - g_warning ("gtk_signal_collect_args(): invalid NULL pointer for return argument type `%s'", - gtk_type_name (args->type)); - } - } - else - { - failed = TRUE; - g_warning ("gtk_signal_collect_args(): unsupported return argument type `%s'", - gtk_type_name (args->type)); - } - } - else - GTK_VALUE_POINTER (*args) = NULL; - - return failed; -} - -#if 0 -void -gtk_signal_emit (GtkObject *object, - guint signal_id, - ...) -{ - GtkArg args[SIGNAL_MAX_PARAMS + 1]; - GSignalQuery query; - gboolean abort; - va_list var_args; - - g_return_if_fail (GTK_IS_OBJECT (object)); - - g_signal_query (signal_id, &query); - g_return_if_fail (query.signal_id != 0); - g_return_if_fail (query.n_params < SIGNAL_MAX_PARAMS); - - va_start (var_args, signal_id); - abort = gtk_signal_collect_args (args, - query.n_params, - query.param_types, - query.return_type, - var_args); - va_end (var_args); - - if (!abort) - gtk_signal_emitv (object, signal_id, args); -} -#endif - void gtk_signal_emit (GtkObject *object, guint signal_id, @@ -451,9 +363,7 @@ gtk_signal_emit_by_name (GtkObject *object, const gchar *name, ...) { - GtkArg args[SIGNAL_MAX_PARAMS + 1]; GSignalQuery query; - gboolean abort; va_list var_args; g_return_if_fail (GTK_IS_OBJECT (object)); @@ -461,18 +371,10 @@ gtk_signal_emit_by_name (GtkObject *object, g_signal_query (g_signal_lookup (name, GTK_OBJECT_TYPE (object)), &query); g_return_if_fail (query.signal_id != 0); - g_return_if_fail (query.n_params < SIGNAL_MAX_PARAMS); va_start (var_args, name); - abort = gtk_signal_collect_args (args, - query.n_params, - query.param_types, - query.return_type, - var_args); + g_signal_emit_valist (G_OBJECT (object), query.signal_id, 0, var_args); va_end (var_args); - - if (!abort) - gtk_signal_emitv (object, query.signal_id, args); } void |