Re: [Re: [PATCH] GtkInputDialog signal parameter types]
- From: Owen Taylor <otaylor redhat com>
- To: Murray Cumming <murrayc usa net>
- Cc: Tim Janik <timj gtk org>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: [Re: [PATCH] GtkInputDialog signal parameter types]
- Date: 16 Oct 2001 11:40:02 -0400
Murray Cumming <murrayc usa net> writes:
> Tim Janik <timj gtk org> wrote:
> > On 15 Oct 2001, Murray Cumming wrote:
> >
> > > Here's a simple patch that creates the enable-device and enable-device
> signals
> > > with correct parameter types. I assume that the declaration of the
> default
> > > signal handler is the correct one.
> >
> > hum, i fail to see where these signals are being emitted, and they
> > don't contain the conventional function wrappers:
> >
> > void gtk_input_dialog_enable_device (GtkInputDialog *inputd,
> > GdkDevice *device);
> > void gtk_input_dialog_disable_device (GtkInputDialog *inputd,
> > GdkDevice *device);
> >
> > but aren't action signals either.
> > so i wonder whether:
> > - these signals are used anywhere in user code directly
> > (in which case the above wrappers should be added and
> > direct emission should be deprecated)
>
> Owne had previously told me that these types of functions are not necessarily
> just signal-emmiting functions. Can you confirm that methods with the same
> name as signals might do more than just emit the signal? It's relevant to the
> language bindings.
Wow, such confidence in my competence.
Look at say, the implementation of gtk_widget_show().
[ Or just in gtkwidget.c:
gtk_widget_hide()
gtk_widget_map()
gtk_widget_unmap(),
gtk_widget_realize()
gtk_widget_unrealize
gtk_widget_size_allocate(),
gtk_widget_mnemonic_activate(),
gtk_widget_grab_focus()
]
Functions with the same name as a signal are conventionally in some
some way related to the signal. They _very seldom_ only emit the
signal.
The correspondance between function name and signal name is
_not_ a feature of the GObject system, and any correct binding
for GTK+ must namespace signals and functions separately.
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]