Re: GTK Signals documentation



On Tuesday 16 November 2004 01:07, Worik wrote:

I am  in desperation as I can find no place that describes what gtk
signals *mean*.

Eg: From the dev-book documentation

 > The "cursor-changed" signal
 > (snip)

But *when* is this signal emitted and *why*?  And not just this signals,
but all signals.

Signals are emitted whenever something happens or happened to an object. 
Usually, this is driven by some external event source like events from the 
windowing system: you click the mouse button over a button widget, and the 
"clicked" signal will be emitted on the GtkButton object instance in 
question. Signals don't _have_ to be related to external events though. There 
isn't a reason why you couldn't have a TamagotchiObject that emits a 
"feed-me" signal once in a while after a random amount of time. 

There are quite a few signals in the API docs that you're unlikely to ever 
need to use. Any signal that sounds like 'do-something' (e.g. 'change-foo', 
'move-bla', etc.) as opposed to 'foo-changed' or 'bla-moved' are most likely 
some sort of action signals - you can just ignore those (those = the former).

The most commonly used signals are usually well documented. Check out

  http://developer.gnome.org/doc/API/2.0/gtk/GtkButton.html#GtkButton-activate

and friends for example. If a signal is not documented (as in your example 
above), you either don't need it, or it's simply been "forgotten".

You'll usually find the important signals mentioned in the Gtk tutorial 
(www.gtk.org/tutorial), the various other Gtk-related tutorials, or the API 
docs.

I have no confidence I am using the correct signal handlers.

Unless you tell us what you want to do and what kind of signal you're looking 
for, we are unlikely to be able to point you in the right direction.

Cheers
 -Tim





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