Re: signal problem



is there a way to prevent functions, such as gtk_widget_queue_draw, from
emitting a signal ?

Sure there is :-) Maybe there is a simpler way, but what I'd do would be to
write an own signal handling function, connect it to the signal using
gtk_signal_connect, for example:

int signal_id ;

...
signal_id = gtk_signal_connect(GTK_OBJECT(your_object), "signal_name",
        GTK_SIGNAL_FUNC(your_signal_handler), your_data) ;

Then you have the function your_signal_handler, of the form which depends
on the signal you are taking. This function has to handle the signal (note
that if you are doing something which will cause the signal to be emitted
again you have to disconnect your signal from your function first; see the
example in gtkeditable.html), and you can prevent further handling of the
signal (for example, by the built-in functions) by 

gtk_signal_emit_stop(GTK_OBJECT(your_object), signal_id) ;

or

gtk_signal_emit_stop_by_name(GTK_OBJECT(your_object), "signal_name") ;

See gtk-signals.html and gtkeditable.html for a useful example (in your
gtk doc directory :-) ).

j.

----)-\//-///-----------------------------------January-Weiner-3-------
Talking, talking, spinning a spell, pale skin of words that closes me in like 
a coffin. Not in a language that anyone any longer understands. Rushing, 
degenerate mutter of noises I send out before me wherever I creep...





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