ioAddWatch
fn
uint ioAddWatch(glib.iochannel.IOChannel channel, int priority, glib.types.IOCondition condition, glib.types.IOFunc func)Adds the #GIOChannel into the default main loop context with the given priority.
This internally creates a main loop source using [glib.global.ioCreateWatch] and attaches it to the main loop context with [glib.source.Source.attach]. You can do these steps manually if you need greater control.
Parameters
channel | a #GIOChannel |
priority | the priority of the #GIOChannel source |
condition | the condition to watch for |
func | the function to call when the condition is satisfied |
Returns
the event source id