Re: Second draft (was Re: defs files)
- From: Havoc Pennington <hp redhat com>
- To: gtk-devel-list redhat com
- Cc: kenelson sequoia ece ucdavis edu
- Subject: Re: Second draft (was Re: defs files)
- Date: 20 Jan 2000 19:09:10 -0500
Karl Nelson <kenelson@ece.ucdavis.edu> writes:
> Just to audit one widget, only clicked is GTK_RUN_ACTION, yet
> pressed, released, clicked, enter, and leave are all callable and
> have emit functions. Therefore, the rule is so inconsistently
> applied (at least for that widget) that the wrapper will not know what
> how to wrap and relate the signal functions to the emitting
> functions.
>
You misunderstand - GTK_RUN_ACTION means you can emit the signal
"bare" with no preparation or de-preparation. i.e., with
gtk_signal_emit().
If a signal is not GTK_RUN_ACTION, the only way to emit it is via
provided functions, if available. Functions are not always provided,
and may have side effects other than emitting the signal.
For example gtk_entry_set_text() will emit the "changed" signal, and
is one of the few ways to emit that signal, you can't just emit
"changed" from user code. I don't think there's a function to emit it.
gtk_widget_show() eventually results in a "mapped" signal, but it's a
bit complex how that signal is arrived at.
On the other hand gtk_button_pressed() is just a trivial wrapper.
And gtk_button_clicked() is superfluous since you could
gtk_signal_emit() in that case.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]