Re: return values of event handlers



>In event handlers, I assume the return value indicates whether the event 
>should be propagated to other handlers or not?

yes, but do notice that in GTK+ 1.2, the value never stops the default
handler from executing. so, for example, you can return TRUE on a
button_press_event, but a button widget will still respond to the
button_press_event even though you may think you have stopped the
signal emission. you've stopped it from reaching other handlers
connected with gtk_signal_connect(), but not the default handler.

i believe that owen has indicated that this behaviour will change in
GTK+ 2.0, so that returning TRUE really will stop the signal emission
completely.

--p




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