Signals.connect

Connects a callback to a signal for a particular object.

The handler will be called before the default handler of the signal.

  1. gulong connect(ObjectG instance, string detailedSignal, T callback, ConnectFlags connectFlags)
    struct Signals
    static
    gulong
    connect
    (
    T
    )
    (,,,
    ConnectFlags connectFlags = cast(ConnectFlags)0
    )
    if (
    isCallable!T &&
    !is(T == GCallback)
    )
  2. gulong connect(ObjectG instanc, string detailedSignal, GCallback cHandler, void* data)

Parameters

instance ObjectG

the instance to connect to.

detailedSignal string

a string of the form "signal-name::detail".

callback T

the callback to connect.

connectFlags ConnectFlags

a combination of ConnectFlags.

Return Value

Type: gulong

the handler ID, of type gulong (always greater than 0 for successful connections)