Package org.gnome.gio
Interface AsyncReadyCallback
- 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 AsyncReadyCallback
extends FunctionPointer
Functional interface declaration of the
AsyncReadyCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(@Nullable GObject sourceObject, AsyncResult res, @Nullable MemorySegment data) Type definition for a function that will be called back when an asynchronous operation within GIO has been completed.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 voidupcall(MemorySegment sourceObject, MemorySegment res, MemorySegment data) Theupcallmethod is called from native code.
-
Method Details
-
run
Type definition for a function that will be called back when an asynchronous operation within GIO has been completed.GAsyncReadyCallbackcallbacks fromGTaskare guaranteed to be invoked in a later iteration of the thread-default main context (seeMainContext.pushThreadDefault()) where theGTaskwas created. All other users ofGAsyncReadyCallbackmust likewise call it asynchronously in a later iteration of the main context.The asynchronous operation is guaranteed to have held a reference to
sourceObjectfrom the time when the*_async()function was called, until after this callback returns. -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.gnome.gobject.GObject, org.gnome.gio.AsyncResult, 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)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-