[10668] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Signal and event management.

daemon@ATHENA.MIT.EDU (Owen Taylor)
Thu Dec 3 19:43:47 1998

To: gtk-list@redhat.com
From: Owen Taylor <otaylor@redhat.com>
Date: 03 Dec 1998 19:20:33 -0500
In-Reply-To: Karl Nelson's message of "Thu, 03 Dec 1998 12:59:55 -0800"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


Karl Nelson <kenelson@ece.ucdavis.edu> writes:

> Basically, ours is the opposite of your model where you wish to capture
> all events and signals.   We capture nothing unless the user instructs a
> connection to be made.  To do what you are describing, you may 
> want instead take over the event loop and then channel the 
> events to your signal dispatch system.  That why you get to 
> initate the events to the gtk+ system.  You can then
> reemit them to gtk+ for those events your system does not handle.  Then
> you would also have to describe the interactions of your system with
> signals emitted from gtk+ (such as button pressed).  (It is still 
> a lot of work!)

It should be pointed out that connecting to all signals on all
widgets, or even a large subset will badly hurt the performance of
GTK+. Signal emission in GTK+ is fairly complex and expensive process,
so, to make up for that, GTK+ is selective about emitting signals.

 - It only emits the signals that someone requests.
 - It bypasses most of the checks for signals if there are
   no signals connected to a widget.

Regards,
                                        Owen

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post