Enum NSEventType

Source
#[repr(u64)]
pub enum NSEventType {
Show 34 variants LeftMouseDown = 1, LeftMouseUp = 2, RightMouseDown = 3, RightMouseUp = 4, MouseMoved = 5, LeftMouseDragged = 6, RightMouseDragged = 7, MouseEntered = 8, MouseExited = 9, KeyDown = 10, KeyUp = 11, FlagsChanged = 12, AppKitDefined = 13, SystemDefined = 14, ApplicationDefined = 15, Periodic = 16, CursorUpdate = 17, ScrollWheel = 22, TabletPoint = 23, TabletProximity = 24, OtherMouseDown = 25, OtherMouseUp = 26, OtherMouseDragged = 27, Gesture = 29, Magnify = 30, Swipe = 31, Rotate = 18, BeginGesture = 19, EndGesture = 20, SmartMagnify = 32, QuickLook = 33, Pressure = 34, DirectTouch = 37, ChangeMode = 38,
}
Expand description

Constants for the types of events that responder objects can handle.

Variants§

§

LeftMouseDown = 1

The user pressed the left mouse button.

§

LeftMouseUp = 2

The user released the left mouse button.

§

RightMouseDown = 3

The user pressed the right mouse button.

§

RightMouseUp = 4

The user released the right mouse button.

§

MouseMoved = 5

The user moved the mouse in a way that caused the cursor to move onscreen.

§

LeftMouseDragged = 6

The user moved the mouse while holding down the left mouse button.

§

RightMouseDragged = 7

The user moved the mouse while holding down the right mouse button.

§

MouseEntered = 8

The cursor entered a well-defined area, such as a view.

§

MouseExited = 9

The cursor exited a well-defined area, such as a view.

§

KeyDown = 10

The user pressed a key on the keyboard.

§

KeyUp = 11

The user released a key on the keyboard.

§

FlagsChanged = 12

The event flags changed.

§

AppKitDefined = 13

An AppKit-related event occurred.

§

SystemDefined = 14

A system-related event occurred.

§

ApplicationDefined = 15

An app-defined event occurred.

§

Periodic = 16

An event that provides execution time to periodic tasks.

§

CursorUpdate = 17

An event that updates the cursor.

§

ScrollWheel = 22

The scroll wheel position changed.

§

TabletPoint = 23

The user touched a point on a tablet.

§

TabletProximity = 24

A pointing device is near, but not touching, the associated tablet.

§

OtherMouseDown = 25

The user pressed a tertiary mouse button.

§

OtherMouseUp = 26

The user released a tertiary mouse button.

§

OtherMouseDragged = 27

The user moved the mouse while holding down a tertiary mouse button.

§

Gesture = 29

The user performed a nonspecific type of gesture.

§

Magnify = 30

The user performed a pinch-open or pinch-close gesture.

§

Swipe = 31

The user performed a swipe gesture.

§

Rotate = 18

The user performed a rotate gesture.

§

BeginGesture = 19

An event marking the beginning of a gesture.

§

EndGesture = 20

An event that marks the end of a gesture.

§

SmartMagnify = 32

The user performed a smart-zoom gesture.

§

QuickLook = 33

An event that initiates a Quick Look request.

§

Pressure = 34

An event that reports a change in pressure on a pressure-sensitive device.

§

DirectTouch = 37

The user touched a portion of the touch bar.

§

ChangeMode = 38

The user changed the mode of a connected device.

Trait Implementations§

Source§

impl Clone for NSEventType

Source§

fn clone(&self) -> NSEventType

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for NSEventType

Source§

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

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

impl PartialEq for NSEventType

Source§

fn eq(&self, other: &NSEventType) -> 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 NSEventType

Source§

impl Eq for NSEventType

Source§

impl StructuralPartialEq for NSEventType

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.