Package org.gnome.glib
Interface SourceFuncsDispatchFunc
- 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 SourceFuncsDispatchFunc
extends FunctionPointer
Functional interface declaration of the
SourceFuncsDispatchFunc
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Dispatches the source callback.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment source, MemorySegment callback, MemorySegment userData) Theupcall
method is called from native code.
-
Method Details
-
run
Dispatches the source callback.Called to dispatch the event source, after it has returned
TRUE
in either its prepare or its check function, or if a ready time has been reached. The dispatch function receives a callback function and user data. The callback function may beNULL
if the source was never connected to a callback usingSource.setCallback(org.gnome.glib.SourceFunc)
. The dispatch function should call the callback function withuserData
and whatever additional parameters are needed for this type of event source. The return value of the dispatch function should beGLib.SOURCE_REMOVE
if the source should be removed orGLib.SOURCE_CONTINUE
to keep it. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.glib.Source)
is executed. -
toCallback
Creates a native function pointer to theupcall(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
-