Package org.gnome.gobject
Interface SignalAccumulator
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("io.github.jwharm.JavaGI")
public interface SignalAccumulator
extends FunctionPointer
Functional interface declaration of the
SignalAccumulator
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(SignalInvocationHint ihint, Value returnAccu, Value handlerReturn, @Nullable MemorySegment data) The signal accumulator is a special callback function that can be used to collect return values of the various callbacks that are called during a signal emission.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment ihint, MemorySegment returnAccu, MemorySegment handlerReturn, MemorySegment data) Theupcall
method is called from native code.
-
Method Details
-
run
boolean run(SignalInvocationHint ihint, Value returnAccu, Value handlerReturn, @Nullable @Nullable MemorySegment data) The signal accumulator is a special callback function that can be used to collect return values of the various callbacks that are called during a signal emission.The signal accumulator is specified at signal creation time, if it is left
null
, no accumulation of callback return values is performed. The return value of signal emissions is then the value returned by the last callback. -
upcall
default int upcall(MemorySegment ihint, MemorySegment returnAccu, MemorySegment handlerReturn, MemorySegment data) Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gobject.SignalInvocationHint, org.gnome.gobject.Value, org.gnome.gobject.Value, java.lang.foreign.MemorySegment)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-