Function

GObject-2.0GObjectsignal_connect_closure_by_id

  • Connects a closure to a signal for a particular object.

    If closure is a floating reference (see g_closure_sink()), this function takes ownership of closure.

    This function cannot fail. If the given signal name doesn’t exist, a critical warning is emitted. No validation is performed on the ‘detail’ string when specified in detailed_signal, other than a non-empty check.

    Refer to the signals documentation for more details.

    Parameters

    • instance: GObject.Object

      the instance to connect to.

    • signal_id: number

      the id of the signal.

    • detail: number

      the detail.

    • closure: Closure

      the closure to connect.

    • after: boolean

      whether the handler should be called before or after the default handler of the signal.

    Returns number

    the handler ID (always greater than 0)