pub struct WlDataDeviceManagerDndAction(pub u32);Expand description
drag and drop actions
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”).
Tuple Fields§
§0: u32Implementations§
Source§impl WlDataDeviceManagerDndAction
impl WlDataDeviceManagerDndAction
pub const fn empty() -> Self
pub const fn is_empty(self) -> bool
pub const fn contains(self, other: Self) -> bool
pub const fn intersects(self, other: Self) -> bool
pub const fn insert(&mut self, other: Self)
pub const fn remove(&mut self, other: Self)
pub const fn toggle(&mut self, other: Self)
pub const fn set(&mut self, other: Self, value: bool)
pub const fn intersection(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
pub const fn complement(self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
pub const fn all_known() -> Self
Trait Implementations§
Source§impl BitAndAssign for WlDataDeviceManagerDndAction
impl BitAndAssign for WlDataDeviceManagerDndAction
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOr for WlDataDeviceManagerDndAction
impl BitOr for WlDataDeviceManagerDndAction
Source§impl BitOrAssign for WlDataDeviceManagerDndAction
impl BitOrAssign for WlDataDeviceManagerDndAction
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXorAssign for WlDataDeviceManagerDndAction
impl BitXorAssign for WlDataDeviceManagerDndAction
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Clone for WlDataDeviceManagerDndAction
impl Clone for WlDataDeviceManagerDndAction
Source§fn clone(&self) -> WlDataDeviceManagerDndAction
fn clone(&self) -> WlDataDeviceManagerDndAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WlDataDeviceManagerDndAction
impl Debug for WlDataDeviceManagerDndAction
Source§impl Default for WlDataDeviceManagerDndAction
impl Default for WlDataDeviceManagerDndAction
Source§fn default() -> WlDataDeviceManagerDndAction
fn default() -> WlDataDeviceManagerDndAction
Source§impl Hash for WlDataDeviceManagerDndAction
impl Hash for WlDataDeviceManagerDndAction
Source§impl Not for WlDataDeviceManagerDndAction
impl Not for WlDataDeviceManagerDndAction
Source§impl Ord for WlDataDeviceManagerDndAction
impl Ord for WlDataDeviceManagerDndAction
Source§fn cmp(&self, other: &WlDataDeviceManagerDndAction) -> Ordering
fn cmp(&self, other: &WlDataDeviceManagerDndAction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WlDataDeviceManagerDndAction
impl PartialEq for WlDataDeviceManagerDndAction
Source§fn eq(&self, other: &WlDataDeviceManagerDndAction) -> bool
fn eq(&self, other: &WlDataDeviceManagerDndAction) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for WlDataDeviceManagerDndAction
impl PartialOrd for WlDataDeviceManagerDndAction
Source§impl Sub for WlDataDeviceManagerDndAction
impl Sub for WlDataDeviceManagerDndAction
Source§impl SubAssign for WlDataDeviceManagerDndAction
impl SubAssign for WlDataDeviceManagerDndAction
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read more