mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 02:47:52 +02:00
gmain: add g_source_add_child_source and g_source_remove_child_source
This adds "child source" support to GSource. A child source behaves basically like a GPollFD; when you add a source to a context, all of its child sources are added with the same priority; when you destroy a source, all of its child sources are destroyed; and when a child source triggers, its parent source's dispatch function is run. Use cases include: - adding a GTimeoutSource to another source to cause the source to automatically trigger after a certain timeout. - wrapping an existing source type with a new type that has a different callback signature - creating a source that triggers based on different conditions at different times. https://bugzilla.gnome.org/show_bug.cgi?id=634239
This commit is contained in:
@@ -535,6 +535,8 @@ GSourceFunc
|
||||
g_source_set_callback_indirect
|
||||
g_source_add_poll
|
||||
g_source_remove_poll
|
||||
g_source_add_child_source
|
||||
g_source_remove_child_source
|
||||
g_source_get_time
|
||||
g_source_get_current_time
|
||||
g_source_remove
|
||||
|
Reference in New Issue
Block a user