Tell me, can multiple handlers be associated with a single widget signal?

I mean, is it correct:

g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(func_1), NULL); g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(func_2), NULL); 

    1 answer 1

    Of course, the code is correct.

    You can even rely on the handlers to be called in connection order.

    see signaling documentation

    • And where is this behavior described? I did not find something ... - user294535
    • the fact that you can attach several handlers to one signal - IMHO is a matter of course for the abstraction of the "signal" ... about the call order - there is a link: " The signal was provided in the order they were connected in. » - Fat-Zer