Enum Class DragAction

java.lang.Object
java.lang.Enum<DragAction>
org.gnome.gdk.DragAction
All Implemented Interfaces:
Serializable, Comparable<DragAction>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum DragAction extends Enum<DragAction> implements Enumeration
Used in GdkDrop and GdkDrag to indicate the actions that the destination can and should do with the dropped data.
  • Enum Constant Details

    • NONE

      public static final DragAction NONE
      No action.
      Since:
      4.20
    • COPY

      public static final DragAction COPY
      Copy the data.
    • MOVE

      public static final DragAction MOVE
      Move the data, i.e. first copy it, then delete it from the source using the DELETE target of the X selection protocol.
    • ASK

      public static final DragAction ASK
      Ask the user what to do with the data.
  • Method Details

    • values

      public static DragAction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DragAction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<DragAction> of(int flags)
      Create a new EnumSet<DragAction> for the provided bitfield
      Parameters:
      flags - the DragAction bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<DragAction> of(MemorySegment address)
      Create a new EnumSet<DragAction> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address
    • getType

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

      public boolean isUnique()

      Checks if this DragAction represents a single action or includes multiple actions.

      When this DragAction is GDK_ACTION_NONE - ie no action was given, TRUE is returned.

      Returns:
      true if exactly one action was given