mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 18:26:19 +01:00
gsignal: add g_signal_handlers_disconnect_by_data
Similar to g_signal_handlers_disconnect_by_func() but disconnects all functions that use the given user_data. https://bugzilla.gnome.org/show_bug.cgi?id=668269
This commit is contained in:
parent
41fbf42c3c
commit
cf48434867
@ -472,6 +472,21 @@ void g_signal_chain_from_overridden_handler (gpointer instance,
|
|||||||
g_signal_handlers_disconnect_matched ((instance), \
|
g_signal_handlers_disconnect_matched ((instance), \
|
||||||
(GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \
|
(GSignalMatchType) (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), \
|
||||||
0, 0, NULL, (func), (data))
|
0, 0, NULL, (func), (data))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_signal_handlers_disconnect_by_data:
|
||||||
|
* @instance: The instance to remove handlers from
|
||||||
|
* @data: the closure data of the handlers' closures
|
||||||
|
*
|
||||||
|
* Disconnects all handlers on an instance that match @data.
|
||||||
|
*
|
||||||
|
* Returns: The number of handlers that matched.
|
||||||
|
*
|
||||||
|
* Since: 2.32
|
||||||
|
*/
|
||||||
|
#define g_signal_handlers_disconnect_by_data(instance, data) \
|
||||||
|
g_signal_handlers_disconnect_matched ((instance), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, (data))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_signal_handlers_block_by_func:
|
* g_signal_handlers_block_by_func:
|
||||||
* @instance: The instance to block handlers from.
|
* @instance: The instance to block handlers from.
|
||||||
|
Loading…
Reference in New Issue
Block a user