GLib.io_add_watch
Description: Reference for GLib.io_add_watch

### Function

# GLibio_add_watch

since: 2.0

#### Declaration

    guint
    g_io_add_watch (
      GIOChannel* channel,
      GIOCondition condition,
      GIOFunc func,
      gpointer user_data
    )

#### Description

Adds the `GIOChannel` into the default main loop context with the default priority.

Available since: 2.0

This function is not directly available to language bindings.

The implementation of this method is provided by `g_io_add_watch_full()` in language bindings

#### Parameters

`channel`

  Type: `GIOChannel`

  A `GIOChannel`.

  The data is owned by the caller of the function.

`condition`

  Type: `GIOCondition`

  The condition to watch for.

`func`

  Type: `GIOFunc`

  The function to call when the condition is satisfied.

`user_data`

  Type: `gpointer`

  User data to pass to `func`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `guint`

The event source id.