You may notice that
GtkWidgetClass contains two signal identifiers
in addition to function pointers. These are 0 by
default; otherwise, they indicate the signal to emit to
"activate" the widget, or to set its scroll
adjustments.
The activate_signal is
emitted when the user presses the space bar or Enter
key while the widget is focused; for buttons, it will
be the "clicked" signal,
for menu items, the
"activate" signal.
The
set_scroll_adjustments_signal is used by GtkScrolledWindow to set the
scroll adjustments used by the widget. GtkLayout,
GtkCList, and others have a signal to set the
scroll adjustments.
These two hacks are necessary because GTK+ 1.2 does not
support interfaces or multiple inheritance. (A future
version of GTK+ may support interfaces similar in
spirit to Java's interfaces.) Ideally, there would be
"GtkActivatable" and "GtkScrollable" base classes or
interfaces, and all widgets supporting these actions
would derive from them. Including the two signal IDs in
GtkWidgetClass is a
short-term workaround.