Package org.gnome.gdk
Enum Class DragAction
- All Implemented Interfaces:
Serializable,Comparable<DragAction>,Constable,Enumeration
@Generated("io.github.jwharm.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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TypegetType()Get the GType of the DragAction classintgetValue()Get the numeric value of this enumbooleanisUnique()Checks if this DragAction represents a single action or includes multiple actions.static Set<DragAction> of(int flags) Create a newEnumSet<DragAction>for the provided bitfieldstatic Set<DragAction> of(MemorySegment address) Create a newEnumSet<DragAction>for the bitfield in the provided memory address.static DragActionReturns the enum constant of this class with the specified name.static DragAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
COPY
Copy the data. -
MOVE
Move the data, i.e. first copy it, then delete it from the source using the DELETE target of the X selection protocol. -
LINK
Add a link to the data. Note that this is only useful if source and destination agree on what it means, and is not supported on all platforms. -
ASK
Ask the user what to do with the data.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValuein interfaceEnumeration- Returns:
- the enum value
-
of
Create a newEnumSet<DragAction>for the provided bitfield- Parameters:
flags- the DragAction bitfield- Returns:
- the EnumSet for the provided bitfield
-
of
Create a newEnumSet<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
-
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,TRUEis returned.- Returns:
trueif exactly one action was given
-