ioAddWatch

fun ioAddWatch(channel: IoChannel, priority: <Error class: unknown class>, condition: IoCondition, func: IoFunc): <Error class: unknown class>

Adds the #GIOChannel into the default main loop context with the given priority.

This internally creates a main loop source using g_io_create_watch() and attaches it to the main loop context with g_source_attach(). You can do these steps manually if you need greater control.

Return

the event source id

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