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 TypeMethodDescriptionbooleanDispatches the source callback.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment source, MemorySegment callback, MemorySegment userData) Theupcallmethod is called from native code.
-
Method Details
-
run
Dispatches the source callback.Called to dispatch the event source, after it has returned
TRUEin 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 beNULLif the source was never connected to a callback usingSource.setCallback(org.gnome.glib.SourceFunc). The dispatch function should call the callback function withuserDataand whatever additional parameters are needed for this type of event source. The return value of the dispatch function should beGLib.SOURCE_REMOVEif the source should be removed orGLib.SOURCE_CONTINUEto keep it.- Since:
- 2.82
-
upcall
Theupcallmethod 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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-