Package org.gnome.gio
Interface MountOperation.ShowUnmountProgressCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
MountOperation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface MountOperation.ShowUnmountProgressCallback
extends FunctionPointer
Functional interface declaration of the
ShowUnmountProgressCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, long, long)
method.default void
upcall
(MemorySegment sourceMountOperation, MemorySegment message, long timeLeft, long bytesLeft) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).When unmounting or ejecting a volume, the kernel might need to flush pending data in its buffers to the volume stable storage, and this operation can take a considerable amount of time. This signal may be emitted several times as long as the unmount operation is outstanding, and then one last time when the operation is completed, with
bytesLeft
set to zero.Implementations of GMountOperation should handle this signal by showing an UI notification, and then dismiss it, or show another notification of completion, when
bytesLeft
reaches zero.If the message contains a line break, the first line should be presented as a heading. For example, it may be used as the primary text in a
GtkMessageDialog
. -
upcall
default void upcall(MemorySegment sourceMountOperation, MemorySegment message, long timeLeft, long bytesLeft) Theupcall
method is called from native code. The parameters are marshaled andrun(java.lang.String, long, long)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, long, long)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-