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 TypeMethodDescriptionvoidEmitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, long, long)method.default voidupcall(MemorySegment sourceMountOperation, MemorySegment message, long timeLeft, long bytesLeft) Theupcallmethod 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
bytesLeftset 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
bytesLeftreaches 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.- Since:
- 2.34
-
upcall
default void upcall(MemorySegment sourceMountOperation, MemorySegment message, long timeLeft, long bytesLeft) Theupcallmethod 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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-