Class MountOperation

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class MountOperation extends MountOperation

Asks the user for passwords and other information required to mount a volume.

GtkMountOperation is needed when mounting volumes: It is an implementation of GMountOperation that can be used with GIO functions for mounting volumes such as File#mountEnclosingVolume, File#mountMountable, Volume#mount, Mount#unmountWithOperation and others.

When necessary, GtkMountOperation shows dialogs to let the user enter passwords, ask questions or show processes blocking unmount.

  • Constructor Details

    • MountOperation

      public MountOperation(MemorySegment address)
      Create a MountOperation instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • MountOperation

      public MountOperation(@Nullable Window parent)
      Creates a new GtkMountOperation.
      Parameters:
      parent - transient parent of the window
    • MountOperation

      public MountOperation()
      Create a new MountOperation.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the MountOperation class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected MountOperation asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class MountOperation
      Returns:
      the instance as if it were its parent type
    • getDisplay

      public Display getDisplay()
      Gets the display on which windows of the GtkMountOperation will be shown.
      Returns:
      the display on which windows of this MountOperation are shown
    • getParent

      public @Nullable Window getParent()
      Gets the transient parent used by the GtkMountOperation.
      Returns:
      the transient parent for windows shown by this MountOperation
    • isShowing

      public boolean isShowing()
      Returns whether the GtkMountOperation is currently displaying a window.
      Returns:
      true if this MountOperation is currently displaying a window
    • setDisplay

      public void setDisplay(Display display)
      Sets the display to show windows of the GtkMountOperation on.
      Parameters:
      display - a GdkDisplay
    • setParent

      public void setParent(@Nullable Window parent)
      Sets the transient parent for windows shown by the GtkMountOperation.
      Parameters:
      parent - transient parent of the window
    • builder

      public static MountOperation.Builder<? extends MountOperation.Builder> builder()
      A MountOperation.Builder object constructs a MountOperation with the specified properties. Use the various set...() methods to set properties, and finish construction with MountOperation.Builder.build().
      Returns:
      the builder object