Re: Signal and event management.




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



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