mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gsignal: Signal connection ids are always > 0 if successful
Note this explicitly so that people can rely on doing: if (mystruct->sigid > 0) g_signal_disconnect (mystruct->object, mystruct->sigid); https://bugzilla.gnome.org/show_bug.cgi?id=719809
This commit is contained in:
parent
b2bf13ccdd
commit
8f4dc7012e
@ -2256,7 +2256,7 @@ g_signal_get_invocation_hint (gpointer instance)
|
||||
*
|
||||
* Connects a closure to a signal for a particular object.
|
||||
*
|
||||
* Returns: the handler id
|
||||
* Returns: the handler id (always greater than 0 for successful connections)
|
||||
*/
|
||||
gulong
|
||||
g_signal_connect_closure_by_id (gpointer instance,
|
||||
@ -2315,7 +2315,7 @@ g_signal_connect_closure_by_id (gpointer instance,
|
||||
*
|
||||
* Connects a closure to a signal for a particular object.
|
||||
*
|
||||
* Returns: the handler id
|
||||
* Returns: the handler id (always greater than 0 for successful connections)
|
||||
*/
|
||||
gulong
|
||||
g_signal_connect_closure (gpointer instance,
|
||||
@ -2408,7 +2408,7 @@ node_check_deprecated (const SignalNode *node)
|
||||
* used. Specify @connect_flags if you need <literal>..._after()</literal> or
|
||||
* <literal>..._swapped()</literal> variants of this function.
|
||||
*
|
||||
* Returns: the handler id
|
||||
* Returns: the handler id (always greater than 0 for successful connections)
|
||||
*/
|
||||
gulong
|
||||
g_signal_connect_data (gpointer instance,
|
||||
|
@ -469,7 +469,7 @@ void g_signal_chain_from_overridden_handler (gpointer instance,
|
||||
*
|
||||
* The handler will be called before the default handler of the signal.
|
||||
*
|
||||
* Returns: the handler id
|
||||
* Returns: the handler id (always greater than 0 for successful connections)
|
||||
*/
|
||||
#define g_signal_connect(instance, detailed_signal, c_handler, data) \
|
||||
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0)
|
||||
@ -484,7 +484,7 @@ void g_signal_chain_from_overridden_handler (gpointer instance,
|
||||
*
|
||||
* The handler will be called after the default handler of the signal.
|
||||
*
|
||||
* Returns: the handler id
|
||||
* Returns: the handler id (always greater than 0 for successful connections)
|
||||
*/
|
||||
#define g_signal_connect_after(instance, detailed_signal, c_handler, data) \
|
||||
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_AFTER)
|
||||
@ -500,7 +500,7 @@ void g_signal_chain_from_overridden_handler (gpointer instance,
|
||||
* The instance on which the signal is emitted and @data will be swapped when
|
||||
* calling the handler.
|
||||
*
|
||||
* Returns: the handler id
|
||||
* Returns: the handler id (always greater than 0 for successful connections)
|
||||
*/
|
||||
#define g_signal_connect_swapped(instance, detailed_signal, c_handler, data) \
|
||||
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, G_CONNECT_SWAPPED)
|
||||
|
Loading…
Reference in New Issue
Block a user