Re: signals connection



Axel wrote:
> 
> I didn' t understood the difference between g_signal_connect() and g_signal_connect_swapped() (even while reading the tutorial), could someone give me a clear explaination?
> BTW, i ask again if someone knows out to have a relief GtkMenuItem in a GTKMenuBar
> Thks

In the API reference it says:

"The instance on which the signal is emitted and data will be swapped
when calling the handler."

Hmmm... it seems to mean that the callback will be called like this:

c_handler(G_OBJECT(data), detail, (gpointer) instance);
	instead of
c_handler(G_OBJECT(instance), detail, (gpointer) data);

(I guess where detail is often something like GdkEvent)

	I can't think of a practical reason for having such a
function but if its there; theres a good chance that its
usefull for something ;-)

Cheers,
	-Tristan



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