Re: [Re: [Re: [PATCH] GtkInputDialog signal parameter types]]



Owen Taylor <otaylor redhat com> wrote:
> 
> 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.

I have complete confidence in you, but I know that I'm capable of
misunderstanding.

> 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.

Thankyou for the repeat clarification. In the last couple of days I made the
change to gtkmm-1.3 to wrap these functions and the same-name signals
completely separately, and It's nice to have this email to point to when I
have to justify the change later.



Murray Cumming
murrayc usa net
www.murrayc.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]