public enum WlDataDeviceManagerDndAction extends Enum<WlDataDeviceManagerDndAction>
This is a bitmask of the available/preferred actions in a drag-and-drop operation.
In the compositor, the selected action is a result of matching the actions offered by the source and destination sides. "action" events with a "none" action will be sent to both source and destination if there is no match. All further checks will effectively happen on (source actions ∩ destination actions).
In addition, compositors may also pick different actions in reaction to key modifiers being pressed. One common design that is used in major toolkits (and the behavior recommended for compositors) is:
- If no modifiers are pressed, the first match (in bit order) will be used. - Pressing Shift selects "move", if enabled in the mask. - Pressing Control selects "copy", if enabled in the mask.
Behavior beyond that is considered implementation-dependent. Compositors may for example bind other modifiers (like Alt/Meta) or drags initiated with other buttons than BTN_LEFT to specific actions (e.g. "ask").
| Enum Constant and Description |
|---|
ASK
ask action
|
COPY
copy action
|
MOVE
move action
|
NONE
no action
|
| Modifier and Type | Field and Description |
|---|---|
int |
value |
| Modifier and Type | Method and Description |
|---|---|
static WlDataDeviceManagerDndAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WlDataDeviceManagerDndAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WlDataDeviceManagerDndAction NONE
public static final WlDataDeviceManagerDndAction COPY
public static final WlDataDeviceManagerDndAction MOVE
public static final WlDataDeviceManagerDndAction ASK
public static WlDataDeviceManagerDndAction[] values()
for (WlDataDeviceManagerDndAction c : WlDataDeviceManagerDndAction.values()) System.out.println(c);
public static WlDataDeviceManagerDndAction valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016. All rights reserved.