Re: Extra callback parameters
- From: Tristan Van Berkom <vantr touchtunes com>
- To: mrada catalina-inter net
- Cc: gtk-app-devel-list gnome org, rjshaw iprimus com au
- Subject: Re: Extra callback parameters
- Date: Wed, 22 Oct 2003 13:23:09 -0400
mrada wrote:
g_signal_connect(G_OBJECT(colbutton),"clicked",G_CALLBACK(colour_cb),cdata);
Where does one find the signal names, like "clicked", above?
A signal "belongs" to a class.
A signal is normaly created in the <libname>_<classname>_class_init();
function
(example gtk_button_class_init(); )
A class normaly has a source & a header file to define itself in the
file: <libname><classname>.[ch]
(example gtkbutton.c & gtkbutton.h)
So, seeing as "clicked" is a "signal" belonging to the "class" button
(the button class handles "button_press_event" and
"button_release_event" and
provides the "clicked" signal), you'll find the definition of the
button's "clicked"
signal in gtkbutton.c in the function gtk_button_class_init().
Furthermore, If I'm not mistaken, any amount of classes in gtk are
allowed to
create/define and "own" a signal with the same name so long as a parent
class
has not already declared a signal with that name.
Regards,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]