SignalInvocationHintProtocol
public protocol SignalInvocationHintProtocol
The GSignalInvocationHint
structure is used to pass on additional information
to callbacks during a signal emission.
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.
-
Untyped pointer to the underlying
GSignalInvocationHint
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
_ptr
Default implementationTyped 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 }
-
Required Initialiser for types conforming to
SignalInvocationHintProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
signalAccumulatorFirstWins(returnAccu:
Extension methodhandlerReturn: dummy: ) 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
@inlinable func signalAccumulatorFirstWins<ValueT>(returnAccu: ValueT, handlerReturn: ValueT, dummy: gpointer? = nil) -> Bool where ValueT : ValueProtocol
-
signalAccumulatorTrueHandled(returnAccu:
Extension methodhandlerReturn: dummy: ) A predefined
GSignalAccumulator
for signals that return a boolean values. The behavior that this accumulator gives is that a return oftrue
stops the signal emission: no further callbacks will be invoked, while a return offalse
allows the emission to continue. The idea here is that atrue
return indicates that the callback handled the signal, and no further handling is needed.Declaration
Swift
@inlinable func signalAccumulatorTrueHandled<ValueT>(returnAccu: ValueT, handlerReturn: ValueT, dummy: gpointer? = nil) -> Bool where ValueT : ValueProtocol
-
signalID
Extension methodThe signal id of the signal invoking the callback
Declaration
Swift
@inlinable var signalID: guint { get set }
-
detail
Extension methodThe detail passed on for this emission
Declaration
Swift
@inlinable var detail: GQuark { get set }
-
runType
Extension methodThe stage the signal emission is currently in, this field will contain one of
G_SIGNAL_RUN_FIRST
,G_SIGNAL_RUN_LAST
orG_SIGNAL_RUN_CLEANUP
andG_SIGNAL_ACCUMULATOR_FIRST_RUN
.G_SIGNAL_ACCUMULATOR_FIRST_RUN
is only set for the first run of the accumulator function for a signal emission.Declaration
Swift
@inlinable var runType: GLibObject.SignalFlags { get set }