Re: invalid unclassed pointer?
- From: Havoc Pennington <hp redhat com>
- To: Mark Leisher <mleisher crl nmsu edu>
- Cc: gtk-list gnome org
- Subject: Re: invalid unclassed pointer?
- Date: 23 Aug 2000 12:23:54 -0400
Mark Leisher <firstname.lastname@example.org> writes:
> Like one pair of functions (basically) to set/get values on an object, this is
> another area where Xt was designed correctly IMHO. In Xt, all callbacks have
> the same 4 parameters. In GTK terms the prototype would be:
> void (*callback)(GtkWidget *widget, GdkEvent *event,
> gpointer call_data, gpointer client_data);
This is totally broken though, because GdkEvent*event would just be
NULL most of the time, and there are many places in GTK where other
parameters are basically required.
> While coding, I find it convenient to have exactly the parameters I need for
> callbacks, but I have a hard time remembering the parameters required for the
> different callbacks. Even in my own widgets.
There aren't that many variants for commonly-used signals, and you can
always look it up.
The advantages of the GTK way are numerous; one of the more important
is that signals are also introspectable virtual functions.
] [Thread Prev