SignalInvocationHintProtocol

public protocol SignalInvocationHintProtocol

The SignalInvocationHintProtocol protocol exposes the methods and properties of an underlying GSignalInvocationHint instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see SignalInvocationHint. Alternatively, use SignalInvocationHintRef as a lighweight, unowned reference if you already have an instance you just want to use.

The GSignalInvocationHint structure is used to pass on additional information to callbacks during a signal emission.

  • ptr

    Untyped pointer to the underlying GSignalInvocationHint instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer { get }
  • _ptr Default implementation

    Typed pointer to the underlying GSignalInvocationHint instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GSignalInvocationHint instance.

    Declaration

    Swift

    var _ptr: UnsafeMutablePointer<GSignalInvocationHint> { get }

SignalInvocationHint Record: SignalInvocationHintProtocol extension (methods and fields)

  • A predefined GSignalAccumulator for signals intended to be used as a hook for application code to provide a particular value. Usually only one such value is desired and multiple handlers for the same signal don’t make much sense (except for the case of the default handler defined in the class structure, in which case you will usually want the signal connection to override the class handler).

    This accumulator will use the return value from the first signal handler that is run as the return value for the signal and not run any further handlers (ie: the first handler “wins”).

    Declaration

    Swift

    func signalAccumulatorFirstWins(returnAccu return_accu: ValueProtocol, handlerReturn handler_return: ValueProtocol, dummy: UnsafeMutableRawPointer) -> Bool
  • A predefined GSignalAccumulator for signals that return a boolean values. The behavior that this accumulator gives is that a return of true stops the signal emission: no further callbacks will be invoked, while a return of false allows the emission to continue. The idea here is that a true return indicates that the callback handled the signal, and no further handling is needed.

    Declaration

    Swift

    func signalAccumulatorTrueHandled(returnAccu return_accu: ValueProtocol, handlerReturn handler_return: ValueProtocol, dummy: UnsafeMutableRawPointer) -> Bool
  • signalID Extension method

    The signal id of the signal invoking the callback

    Declaration

    Swift

    var signalID: Int { get set }
  • detail Extension method

    The detail passed on for this emission

    Declaration

    Swift

    var detail: GQuark { get set }
  • runType Extension method

    The stage the signal emission is currently in, this field will contain one of G_SIGNAL_RUN_FIRST, G_SIGNAL_RUN_LAST or G_SIGNAL_RUN_CLEANUP.

    Declaration

    Swift

    var runType: GSignalFlags { get set }