Re: Signal emission question



Jeff Franks <jcf tpg com au> writes:

> Hi,
> 
> I just need to confirm something from a previous message some weeks
> ago about signal emission. I think I remeber Owen said the only
> signals a user would need to emit are those marked with the
> G_SIGNAL_ACTION flag set. From a grep search of the gtk directory
> these are:
> 
> 'focus_tab and select_page' from gtknotebook.c
> 
> 'move_slider' from gtkrange.c
> 
> 'activate_focus, actviate_default and move_focus' from gtkwindow.c.

Search for GTK_RUN_ACTION as well (the old name) and you'll 
find a lot more.. (73 by my count.)
 
> Are these the only signals a user would need to emit or can any signal
> be emitted. 

Only these signals _can_ be emitted, but actually, none of the
G_SIGNAL_ACTION, GTK_RUN_ACTION signals _need_ to be emitted.
They are virtually all signals used as "introspectable functions" for
key bindings, and would be useless to emit from an application.

(There are one or two exceptions to them all being for key binding
- e.g., menu_item::activate, but there are wrapper functions 
e.g., gtk_widget_activate() and those don't need to be emitted
from applications either.)

> Is signal emission intended primarily for writers of
> widgets rather than users of widget.

Signal emission is intended exclusively for the writers of
widgets.

Regards,
                                        Owen



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