ioAddWatch

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 glib.iochannel.IOChannel

a #GIOChannel

priority int

the priority of the #GIOChannel source

condition glib.types.IOCondition

the condition to watch for

func glib.types.IOFunc

the function to call when the condition is satisfied

Return Value

Type: uint

the event source id