Re: signal emit functions
- From: Owen Taylor <otaylor redhat com>
- To: murrayc usa net
- Cc: gtk-devel-list <gtk-devel-list gnome org>, language-bindings gnome org
- Subject: Re: signal emit functions
- Date: 21 Sep 2001 17:16:29 -0400
murrayc t-online de (Murray Cumming) writes:
> Some signals have associated emit functions. For instance,
> GtkAdjustment::changed has gtk_adjustment_changed(). Do these functions
> *ever* do anything other than just emitting the signal? Or are they just
> syntactic sugar?
>
> This isn't important to most people - I'm just trying to simplify Gtk--.
This has been a peristant problem with Gtk-- I'm afraid.
Only a _tiny_ subset of GTK+ signals can be emitted directly.
These are the signals marked with the GTK_RUN_ACTION flag.
And emitting these signals directly is generally not useful either
because they are almost always meant for use by keybindings.
In every other case, the signals of an object are emitted
only when that object intends to.
That is, the changed() method of GtkAdjustment:
- Is documented (or should be documented) to cause ::changed
to be emitted.
- _Happens_ to do nothing else, currently.
But in no other other way is connected with the ::changed signal
as all. As far as the object system is concerned, it could just
as well cause the ::frobated signal to be emitted, or cause
the value of the adjustment be set to zero.
If a language binding maps signals directly into the objet namespace,
conflicts may occur that have to be resolved in some fashion,
but as far as GtkObject is concerned signals are in a completely
independent namespace from methods.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]