Re: difference between gtk_signal_connect and g_signal_connect



> what's the difference with g_signal_connect ?

In moving from GTK-1.2 to GTK-2.0, the GTK+ Signal API functions were
deprecated (and in some cases removed, I believe) in favor of their
counterparts in the GSignal system.

Quoting from the GTK-2.0 API docs:

"For future usage, direct use of the GSignal API is recommended, this
avoids significant performance hits where GtkArg structures have to be
converted into GValues. For language bindings, GSignal+GClosure provide a
much more flexible and convenient mechanism to hook into signal emissions
or install class default handlers, so the old GtkSignal API for language
bindings is not supported anymore.

[...]

For many of the removed functions, similar variants are available
in the g_signal_* namespace. The GSignal system performs emissions in a
slightly different manner than the old GtkSignal code. Signal handlers
that are connected to signal "foo" on object "bar" while "foo" is being
emitted, will not be called anymore during the emission they were
connected within.""

(http://developer.gnome.org/doc/API/2.0/gtk/gtk-changes-2-0.html)


~ellF~




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