NSEventMask

Enum NSEventMask 

Source
#[repr(u64)]
pub enum NSEventMask {
Show 34 variants LeftMouseDown = 2, LeftMouseUp = 4, RightMouseDown = 8, RightMouseUp = 16, MouseMoved = 32, LeftMouseDragged = 64, RightMouseDragged = 128, MouseEntered = 256, MouseExited = 512, KeyDown = 1_024, KeyUp = 2_048, FlagsChanged = 4_096, AppKitDefined = 8_192, SystemDefined = 16_384, ApplicationDefined = 32_768, Periodic = 65_536, CursorUpdate = 131_072, ScrollWheel = 4_194_304, TabletPoint = 8_388_608, TabletProximity = 16_777_216, OtherMouseDown = 33_554_432, OtherMouseUp = 67_108_864, OtherMouseDragged = 134_217_728, Gesture = 536_870_912, Magnify = 1_073_741_824, Swipe = 2_147_483_648, Rotate = 262_144, BeginGesture = 524_288, EndGesture = 1_048_576, SmartMagnify = 4_294_967_296, Pressure = 17_179_869_184, DirectTouch = 137_438_953_472, ChangeMode = 274_877_906_944, AnyEvent = 18_446_744_073_709_551_615,
}
Expand description

Constants that you use to filter out specific event types from the stream of incoming events.

Variants§

§

LeftMouseDown = 2

A mask for left mouse-down events.

§

LeftMouseUp = 4

A mask for left mouse-up events.

§

RightMouseDown = 8

A mask for right mouse-down events.

§

RightMouseUp = 16

A mask for right mouse-up events.

§

MouseMoved = 32

A mask for mouse-moved events.

§

LeftMouseDragged = 64

A mask for left mouse-dragged events.

§

RightMouseDragged = 128

A mask for right mouse-dragged events.

§

MouseEntered = 256

A mask for mouse-entered events.

§

MouseExited = 512

A mask for mouse-exited events.

§

KeyDown = 1_024

A mask for key-down events.

§

KeyUp = 2_048

A mask for key-up events.

§

FlagsChanged = 4_096

A mask for flags-changed events.

§

AppKitDefined = 8_192

A mask for AppKit–defined events.

§

SystemDefined = 16_384

A mask for system-defined events.

§

ApplicationDefined = 32_768

A mask for app-defined events.

§

Periodic = 65_536

A mask for periodic events.

§

CursorUpdate = 131_072

A mask for cursor-update events.

§

ScrollWheel = 4_194_304

A mask for scroll-wheel events.

§

TabletPoint = 8_388_608

A mask for tablet-point events.

§

TabletProximity = 16_777_216

A mask for tablet-proximity events.

§

OtherMouseDown = 33_554_432

A mask for tertiary mouse-down events.

§

OtherMouseUp = 67_108_864

A mask for right mouse-up events.

§

OtherMouseDragged = 134_217_728

A mask for tertiary mouse-dragged events.

§

Gesture = 536_870_912

A mask for generic gesture events.

§

Magnify = 1_073_741_824

A mask for magnify-gesture events.

§

Swipe = 2_147_483_648

A mask for swipe-gesture events.

§

Rotate = 262_144

A mask for rotate-gesture events.

§

BeginGesture = 524_288

A mask for begin-gesture events.

§

EndGesture = 1_048_576

A mask for end-gesture events.

§

SmartMagnify = 4_294_967_296

A mask for smart-zoom gesture events.

§

Pressure = 17_179_869_184

A mask for pressure-change events.

§

DirectTouch = 137_438_953_472

A mask for touch events.

§

ChangeMode = 274_877_906_944

A mask for change-mode events.

§

AnyEvent = 18_446_744_073_709_551_615

A mask that matches any type of event.

Trait Implementations§

Source§

impl Clone for NSEventMask

Source§

fn clone(&self) -> NSEventMask

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NSEventMask

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for NSEventMask

Source§

fn eq(&self, other: &NSEventMask) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for NSEventMask

Source§

impl Eq for NSEventMask

Source§

impl StructuralPartialEq for NSEventMask

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.