### Function

# GObject source_set_closure

since: 2.0

#### Declaration

    void
    g_source_set_closure (
      GSource* source,
      GClosure* closure
    )

#### Description

Set the callback for a source as a `GClosure`.

If the source is not one of the standard GLib types, the `closure_callback` and `closure_marshal` fields of the `GSourceFuncs` structure must have been filled in with pointers to appropriate functions.

Available since: 2.0

#### Parameters

`source`

  Type: `GSource`

  The source.

  The data is owned by the caller of the function.

`closure`

  Type: `GClosure`

  A `GClosure`.

  The data is owned by the caller of the function.