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 TypeMethodDescriptionvoid
run
(@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 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 void
upcall
(MemorySegment sourceObject, MemorySegment res, MemorySegment data) Theupcall
method is called from native code.
-
Method Details
-
run
void run(@Nullable @Nullable GObject sourceObject, AsyncResult res, @Nullable @Nullable MemorySegment data) Type definition for a function that will be called back when an asynchronous operation within GIO has been completed.GAsyncReadyCallback
callbacks fromGTask
are guaranteed to be invoked in a later iteration of the [thread-default main context][g-main-context-push-thread-default] where theGTask
was created. All other users ofGAsyncReadyCallback
must likewise call it asynchronously in a later iteration of the main context.The asynchronous operation is guaranteed to have held a reference to
sourceObject
from the time when the*_async()
function was called, until after this callback returns. -
upcall
Theupcall
method 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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-