Re: Please explain five stages of signal emission(gobject).
- From: Gabriel de Perthuis <gabriel de-perthuis laposte net>
- To: DC A <adc4444 hotmail com>
- Cc: gtk-list gnome org
- Subject: Re: Please explain five stages of signal emission(gobject).
- Date: Wed, 13 Jul 2005 14:10:43 +0200
DC A a écrit :
> Hi! First of all i want to say I'm trying to learn gtk+2.0. And I got
> stuck at a section(GObject's signal api) where they mentioned that A
> signal emission consists of five stages which are:
>
>
> 1 - Invocation of the object method handler for G_SIGNAL_RUN_FIRST signals
> 2 - Invocation of normal user-provided signal handlers (after flag FALSE)
> 3 - Invocation of the object method handler for G_SIGNAL_RUN_LAST signals
> 4 - Invocation of user provided signal handlers, connected with an after
> flag of TRUE
> 5 - Invocation of the object method handler for G_SIGNAL_RUN_CLEANUP
> signals
>
>
> My questions are:
>
> 1)what is this 'after flag'?
You give it when adding a signal handler, it's an arg of
g_signal_connect. On the other hand, G_SIGNAL_RUN_FIRST and friends are
set when the signal is defined, with g_signal_new (in a class definition
in most cases).
> 2)Can anyone kindly give example and explain of a signal that goes
> through these five stages?
> 3) what is the difference between object method handler and
> user-provided signal handler?
The "object method handler" is the handler in the class vtable (so it's
class-level rather than object-level).
For most uses, you call g_signal_connect on a particular object.
If you want more detail, you can also see the gobject tutorial:
http://www.le-hacker.org/papers/gobject/ch03s02.htm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]