DClosure.this

Create a new Closure that will call callback when it's invoked.

  1. this(GClosure* gClosure, bool ownedRef)
  2. this(T callback, bool swap)
    class DClosure
    this
    (
    T
    )
    (,
    bool swap = false
    )
    if (
    isCallable!T
    )

Parameters

callback T

a delegate or function to call when the DClosure is invoked.

swap bool

Should the first and last parameter passed to the callback be swapped. This is usefull when using the closure for a Signal, where the instance is the first parameter, but when using delegates it usually isn't used.

Meta