Re: gtk_signal_emit vs gtk_signal_emit_by_name



Gary Benson <gary inauspicious org> writes:
On Sat, 16 Mar 2002, Gary Benson wrote:

Can anyone enlighten me as to why some widgets build a big table of their 
signals and then emit them with gtk_signal_emit whereas others just use 
gtk_signal_emit_by_name. Is it a performance vs convenience thing?

Actually, I think I just answered my own question. The big table of 
signals has to be created, and if you just created it then you may as well 
emit the signals from there. If you are 'faking' a signal from another 
object then you don't have access to your table and must reference the 
signal by name.


It's just a performance issue; it avoids a hash lookup to emit the
signal by ID instead of name.

Havoc



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