1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9#[cfg(target_vendor = "apple")]
10use objc2_core_graphics::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct NSEventType(pub NSUInteger);
20impl NSEventType {
21 #[doc(alias = "NSEventTypeLeftMouseDown")]
22 pub const LeftMouseDown: Self = Self(1);
23 #[doc(alias = "NSEventTypeLeftMouseUp")]
24 pub const LeftMouseUp: Self = Self(2);
25 #[doc(alias = "NSEventTypeRightMouseDown")]
26 pub const RightMouseDown: Self = Self(3);
27 #[doc(alias = "NSEventTypeRightMouseUp")]
28 pub const RightMouseUp: Self = Self(4);
29 #[doc(alias = "NSEventTypeMouseMoved")]
30 pub const MouseMoved: Self = Self(5);
31 #[doc(alias = "NSEventTypeLeftMouseDragged")]
32 pub const LeftMouseDragged: Self = Self(6);
33 #[doc(alias = "NSEventTypeRightMouseDragged")]
34 pub const RightMouseDragged: Self = Self(7);
35 #[doc(alias = "NSEventTypeMouseEntered")]
36 pub const MouseEntered: Self = Self(8);
37 #[doc(alias = "NSEventTypeMouseExited")]
38 pub const MouseExited: Self = Self(9);
39 #[doc(alias = "NSEventTypeKeyDown")]
40 pub const KeyDown: Self = Self(10);
41 #[doc(alias = "NSEventTypeKeyUp")]
42 pub const KeyUp: Self = Self(11);
43 #[doc(alias = "NSEventTypeFlagsChanged")]
44 pub const FlagsChanged: Self = Self(12);
45 #[doc(alias = "NSEventTypeAppKitDefined")]
46 pub const AppKitDefined: Self = Self(13);
47 #[doc(alias = "NSEventTypeSystemDefined")]
48 pub const SystemDefined: Self = Self(14);
49 #[doc(alias = "NSEventTypeApplicationDefined")]
50 pub const ApplicationDefined: Self = Self(15);
51 #[doc(alias = "NSEventTypePeriodic")]
52 pub const Periodic: Self = Self(16);
53 #[doc(alias = "NSEventTypeCursorUpdate")]
54 pub const CursorUpdate: Self = Self(17);
55 #[doc(alias = "NSEventTypeScrollWheel")]
56 pub const ScrollWheel: Self = Self(22);
57 #[doc(alias = "NSEventTypeTabletPoint")]
58 pub const TabletPoint: Self = Self(23);
59 #[doc(alias = "NSEventTypeTabletProximity")]
60 pub const TabletProximity: Self = Self(24);
61 #[doc(alias = "NSEventTypeOtherMouseDown")]
62 pub const OtherMouseDown: Self = Self(25);
63 #[doc(alias = "NSEventTypeOtherMouseUp")]
64 pub const OtherMouseUp: Self = Self(26);
65 #[doc(alias = "NSEventTypeOtherMouseDragged")]
66 pub const OtherMouseDragged: Self = Self(27);
67 #[doc(alias = "NSEventTypeGesture")]
68 pub const Gesture: Self = Self(29);
69 #[doc(alias = "NSEventTypeMagnify")]
70 pub const Magnify: Self = Self(30);
71 #[doc(alias = "NSEventTypeSwipe")]
72 pub const Swipe: Self = Self(31);
73 #[doc(alias = "NSEventTypeRotate")]
74 pub const Rotate: Self = Self(18);
75 #[doc(alias = "NSEventTypeBeginGesture")]
76 pub const BeginGesture: Self = Self(19);
77 #[doc(alias = "NSEventTypeEndGesture")]
78 pub const EndGesture: Self = Self(20);
79 #[doc(alias = "NSEventTypeSmartMagnify")]
80 pub const SmartMagnify: Self = Self(32);
81 #[doc(alias = "NSEventTypeQuickLook")]
82 pub const QuickLook: Self = Self(33);
83 #[doc(alias = "NSEventTypePressure")]
84 pub const Pressure: Self = Self(34);
85 #[doc(alias = "NSEventTypeDirectTouch")]
86 pub const DirectTouch: Self = Self(37);
87 #[doc(alias = "NSEventTypeChangeMode")]
88 pub const ChangeMode: Self = Self(38);
89}
90
91unsafe impl Encode for NSEventType {
92 const ENCODING: Encoding = NSUInteger::ENCODING;
93}
94
95unsafe impl RefEncode for NSEventType {
96 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
97}
98
99pub static NSLeftMouseDown: NSEventType = NSEventType(NSEventType::LeftMouseDown.0);
101
102pub static NSLeftMouseUp: NSEventType = NSEventType(NSEventType::LeftMouseUp.0);
104
105pub static NSRightMouseDown: NSEventType = NSEventType(NSEventType::RightMouseDown.0);
107
108pub static NSRightMouseUp: NSEventType = NSEventType(NSEventType::RightMouseUp.0);
110
111pub static NSMouseMoved: NSEventType = NSEventType(NSEventType::MouseMoved.0);
113
114pub static NSLeftMouseDragged: NSEventType = NSEventType(NSEventType::LeftMouseDragged.0);
116
117pub static NSRightMouseDragged: NSEventType = NSEventType(NSEventType::RightMouseDragged.0);
119
120pub static NSMouseEntered: NSEventType = NSEventType(NSEventType::MouseEntered.0);
122
123pub static NSMouseExited: NSEventType = NSEventType(NSEventType::MouseExited.0);
125
126pub static NSKeyDown: NSEventType = NSEventType(NSEventType::KeyDown.0);
128
129pub static NSKeyUp: NSEventType = NSEventType(NSEventType::KeyUp.0);
131
132pub static NSFlagsChanged: NSEventType = NSEventType(NSEventType::FlagsChanged.0);
134
135pub static NSAppKitDefined: NSEventType = NSEventType(NSEventType::AppKitDefined.0);
137
138pub static NSSystemDefined: NSEventType = NSEventType(NSEventType::SystemDefined.0);
140
141pub static NSApplicationDefined: NSEventType = NSEventType(NSEventType::ApplicationDefined.0);
143
144pub static NSPeriodic: NSEventType = NSEventType(NSEventType::Periodic.0);
146
147pub static NSCursorUpdate: NSEventType = NSEventType(NSEventType::CursorUpdate.0);
149
150pub static NSScrollWheel: NSEventType = NSEventType(NSEventType::ScrollWheel.0);
152
153pub static NSTabletPoint: NSEventType = NSEventType(NSEventType::TabletPoint.0);
155
156pub static NSTabletProximity: NSEventType = NSEventType(NSEventType::TabletProximity.0);
158
159pub static NSOtherMouseDown: NSEventType = NSEventType(NSEventType::OtherMouseDown.0);
161
162pub static NSOtherMouseUp: NSEventType = NSEventType(NSEventType::OtherMouseUp.0);
164
165pub static NSOtherMouseDragged: NSEventType = NSEventType(NSEventType::OtherMouseDragged.0);
167
168#[repr(transparent)]
171#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
172pub struct NSEventMask(pub c_ulonglong);
173bitflags::bitflags! {
174 impl NSEventMask: c_ulonglong {
175 #[doc(alias = "NSEventMaskLeftMouseDown")]
176 const LeftMouseDown = 1<<NSEventType::LeftMouseDown.0;
177 #[doc(alias = "NSEventMaskLeftMouseUp")]
178 const LeftMouseUp = 1<<NSEventType::LeftMouseUp.0;
179 #[doc(alias = "NSEventMaskRightMouseDown")]
180 const RightMouseDown = 1<<NSEventType::RightMouseDown.0;
181 #[doc(alias = "NSEventMaskRightMouseUp")]
182 const RightMouseUp = 1<<NSEventType::RightMouseUp.0;
183 #[doc(alias = "NSEventMaskMouseMoved")]
184 const MouseMoved = 1<<NSEventType::MouseMoved.0;
185 #[doc(alias = "NSEventMaskLeftMouseDragged")]
186 const LeftMouseDragged = 1<<NSEventType::LeftMouseDragged.0;
187 #[doc(alias = "NSEventMaskRightMouseDragged")]
188 const RightMouseDragged = 1<<NSEventType::RightMouseDragged.0;
189 #[doc(alias = "NSEventMaskMouseEntered")]
190 const MouseEntered = 1<<NSEventType::MouseEntered.0;
191 #[doc(alias = "NSEventMaskMouseExited")]
192 const MouseExited = 1<<NSEventType::MouseExited.0;
193 #[doc(alias = "NSEventMaskKeyDown")]
194 const KeyDown = 1<<NSEventType::KeyDown.0;
195 #[doc(alias = "NSEventMaskKeyUp")]
196 const KeyUp = 1<<NSEventType::KeyUp.0;
197 #[doc(alias = "NSEventMaskFlagsChanged")]
198 const FlagsChanged = 1<<NSEventType::FlagsChanged.0;
199 #[doc(alias = "NSEventMaskAppKitDefined")]
200 const AppKitDefined = 1<<NSEventType::AppKitDefined.0;
201 #[doc(alias = "NSEventMaskSystemDefined")]
202 const SystemDefined = 1<<NSEventType::SystemDefined.0;
203 #[doc(alias = "NSEventMaskApplicationDefined")]
204 const ApplicationDefined = 1<<NSEventType::ApplicationDefined.0;
205 #[doc(alias = "NSEventMaskPeriodic")]
206 const Periodic = 1<<NSEventType::Periodic.0;
207 #[doc(alias = "NSEventMaskCursorUpdate")]
208 const CursorUpdate = 1<<NSEventType::CursorUpdate.0;
209 #[doc(alias = "NSEventMaskScrollWheel")]
210 const ScrollWheel = 1<<NSEventType::ScrollWheel.0;
211 #[doc(alias = "NSEventMaskTabletPoint")]
212 const TabletPoint = 1<<NSEventType::TabletPoint.0;
213 #[doc(alias = "NSEventMaskTabletProximity")]
214 const TabletProximity = 1<<NSEventType::TabletProximity.0;
215 #[doc(alias = "NSEventMaskOtherMouseDown")]
216 const OtherMouseDown = 1<<NSEventType::OtherMouseDown.0;
217 #[doc(alias = "NSEventMaskOtherMouseUp")]
218 const OtherMouseUp = 1<<NSEventType::OtherMouseUp.0;
219 #[doc(alias = "NSEventMaskOtherMouseDragged")]
220 const OtherMouseDragged = 1<<NSEventType::OtherMouseDragged.0;
221 #[doc(alias = "NSEventMaskGesture")]
222 const Gesture = 1<<NSEventType::Gesture.0;
223 #[doc(alias = "NSEventMaskMagnify")]
224 const Magnify = 1<<NSEventType::Magnify.0;
225 #[doc(alias = "NSEventMaskSwipe")]
226 const Swipe = 1<<NSEventType::Swipe.0;
227 #[doc(alias = "NSEventMaskRotate")]
228 const Rotate = 1<<NSEventType::Rotate.0;
229 #[doc(alias = "NSEventMaskBeginGesture")]
230 const BeginGesture = 1<<NSEventType::BeginGesture.0;
231 #[doc(alias = "NSEventMaskEndGesture")]
232 const EndGesture = 1<<NSEventType::EndGesture.0;
233 #[doc(alias = "NSEventMaskSmartMagnify")]
234 const SmartMagnify = 1<<NSEventType::SmartMagnify.0;
235 #[doc(alias = "NSEventMaskPressure")]
236 const Pressure = 1<<NSEventType::Pressure.0;
237 #[doc(alias = "NSEventMaskDirectTouch")]
238 const DirectTouch = 1<<NSEventType::DirectTouch.0;
239 #[doc(alias = "NSEventMaskChangeMode")]
240 const ChangeMode = 1<<NSEventType::ChangeMode.0;
241 #[doc(alias = "NSEventMaskAny")]
242 const Any = NSUIntegerMax as _;
243 }
244}
245
246unsafe impl Encode for NSEventMask {
247 const ENCODING: Encoding = c_ulonglong::ENCODING;
248}
249
250unsafe impl RefEncode for NSEventMask {
251 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
252}
253
254pub static NSLeftMouseDownMask: NSEventMask = NSEventMask(NSEventMask::LeftMouseDown.0);
256
257pub static NSLeftMouseUpMask: NSEventMask = NSEventMask(NSEventMask::LeftMouseUp.0);
259
260pub static NSRightMouseDownMask: NSEventMask = NSEventMask(NSEventMask::RightMouseDown.0);
262
263pub static NSRightMouseUpMask: NSEventMask = NSEventMask(NSEventMask::RightMouseUp.0);
265
266pub static NSMouseMovedMask: NSEventMask = NSEventMask(NSEventMask::MouseMoved.0);
268
269pub static NSLeftMouseDraggedMask: NSEventMask = NSEventMask(NSEventMask::LeftMouseDragged.0);
271
272pub static NSRightMouseDraggedMask: NSEventMask = NSEventMask(NSEventMask::RightMouseDragged.0);
274
275pub static NSMouseEnteredMask: NSEventMask = NSEventMask(NSEventMask::MouseEntered.0);
277
278pub static NSMouseExitedMask: NSEventMask = NSEventMask(NSEventMask::MouseExited.0);
280
281pub static NSKeyDownMask: NSEventMask = NSEventMask(NSEventMask::KeyDown.0);
283
284pub static NSKeyUpMask: NSEventMask = NSEventMask(NSEventMask::KeyUp.0);
286
287pub static NSFlagsChangedMask: NSEventMask = NSEventMask(NSEventMask::FlagsChanged.0);
289
290pub static NSAppKitDefinedMask: NSEventMask = NSEventMask(NSEventMask::AppKitDefined.0);
292
293pub static NSSystemDefinedMask: NSEventMask = NSEventMask(NSEventMask::SystemDefined.0);
295
296pub static NSApplicationDefinedMask: NSEventMask = NSEventMask(NSEventMask::ApplicationDefined.0);
298
299pub static NSPeriodicMask: NSEventMask = NSEventMask(NSEventMask::Periodic.0);
301
302pub static NSCursorUpdateMask: NSEventMask = NSEventMask(NSEventMask::CursorUpdate.0);
304
305pub static NSScrollWheelMask: NSEventMask = NSEventMask(NSEventMask::ScrollWheel.0);
307
308pub static NSTabletPointMask: NSEventMask = NSEventMask(NSEventMask::TabletPoint.0);
310
311pub static NSTabletProximityMask: NSEventMask = NSEventMask(NSEventMask::TabletProximity.0);
313
314pub static NSOtherMouseDownMask: NSEventMask = NSEventMask(NSEventMask::OtherMouseDown.0);
316
317pub static NSOtherMouseUpMask: NSEventMask = NSEventMask(NSEventMask::OtherMouseUp.0);
319
320pub static NSOtherMouseDraggedMask: NSEventMask = NSEventMask(NSEventMask::OtherMouseDragged.0);
322
323pub static NSAnyEventMask: NSEventMask = NSEventMask(NSUIntegerMax as _);
325
326#[repr(transparent)]
331#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
332pub struct NSEventModifierFlags(pub NSUInteger);
333bitflags::bitflags! {
334 impl NSEventModifierFlags: NSUInteger {
335 #[doc(alias = "NSEventModifierFlagCapsLock")]
336 const CapsLock = 1<<16;
337 #[doc(alias = "NSEventModifierFlagShift")]
338 const Shift = 1<<17;
339 #[doc(alias = "NSEventModifierFlagControl")]
340 const Control = 1<<18;
341 #[doc(alias = "NSEventModifierFlagOption")]
342 const Option = 1<<19;
343 #[doc(alias = "NSEventModifierFlagCommand")]
344 const Command = 1<<20;
345 #[doc(alias = "NSEventModifierFlagNumericPad")]
346 const NumericPad = 1<<21;
347 #[doc(alias = "NSEventModifierFlagHelp")]
348 const Help = 1<<22;
349 #[doc(alias = "NSEventModifierFlagFunction")]
350 const Function = 1<<23;
351 #[doc(alias = "NSEventModifierFlagDeviceIndependentFlagsMask")]
352 const DeviceIndependentFlagsMask = 0xffff0000;
353 }
354}
355
356unsafe impl Encode for NSEventModifierFlags {
357 const ENCODING: Encoding = NSUInteger::ENCODING;
358}
359
360unsafe impl RefEncode for NSEventModifierFlags {
361 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
362}
363
364pub static NSAlphaShiftKeyMask: NSEventModifierFlags =
366 NSEventModifierFlags(NSEventModifierFlags::CapsLock.0);
367
368pub static NSShiftKeyMask: NSEventModifierFlags =
370 NSEventModifierFlags(NSEventModifierFlags::Shift.0);
371
372pub static NSControlKeyMask: NSEventModifierFlags =
374 NSEventModifierFlags(NSEventModifierFlags::Control.0);
375
376pub static NSAlternateKeyMask: NSEventModifierFlags =
378 NSEventModifierFlags(NSEventModifierFlags::Option.0);
379
380pub static NSCommandKeyMask: NSEventModifierFlags =
382 NSEventModifierFlags(NSEventModifierFlags::Command.0);
383
384pub static NSNumericPadKeyMask: NSEventModifierFlags =
386 NSEventModifierFlags(NSEventModifierFlags::NumericPad.0);
387
388pub static NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlags(NSEventModifierFlags::Help.0);
390
391pub static NSFunctionKeyMask: NSEventModifierFlags =
393 NSEventModifierFlags(NSEventModifierFlags::Function.0);
394
395pub static NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags =
397 NSEventModifierFlags(NSEventModifierFlags::DeviceIndependentFlagsMask.0);
398
399#[repr(transparent)]
402#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
403pub struct NSPointingDeviceType(pub NSUInteger);
404impl NSPointingDeviceType {
405 #[doc(alias = "NSPointingDeviceTypeUnknown")]
406 pub const Unknown: Self = Self(0);
407 #[doc(alias = "NSPointingDeviceTypePen")]
408 pub const Pen: Self = Self(1);
409 #[doc(alias = "NSPointingDeviceTypeCursor")]
410 pub const Cursor: Self = Self(2);
411 #[doc(alias = "NSPointingDeviceTypeEraser")]
412 pub const Eraser: Self = Self(3);
413}
414
415unsafe impl Encode for NSPointingDeviceType {
416 const ENCODING: Encoding = NSUInteger::ENCODING;
417}
418
419unsafe impl RefEncode for NSPointingDeviceType {
420 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
421}
422
423pub static NSUnknownPointingDevice: NSPointingDeviceType =
425 NSPointingDeviceType(NSPointingDeviceType::Unknown.0);
426
427pub static NSPenPointingDevice: NSPointingDeviceType =
429 NSPointingDeviceType(NSPointingDeviceType::Pen.0);
430
431pub static NSCursorPointingDevice: NSPointingDeviceType =
433 NSPointingDeviceType(NSPointingDeviceType::Cursor.0);
434
435pub static NSEraserPointingDevice: NSPointingDeviceType =
437 NSPointingDeviceType(NSPointingDeviceType::Eraser.0);
438
439#[repr(transparent)]
442#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
443pub struct NSEventButtonMask(pub NSUInteger);
444bitflags::bitflags! {
445 impl NSEventButtonMask: NSUInteger {
446 #[doc(alias = "NSEventButtonMaskPenTip")]
447 const PenTip = 1;
448 #[doc(alias = "NSEventButtonMaskPenLowerSide")]
449 const PenLowerSide = 2;
450 #[doc(alias = "NSEventButtonMaskPenUpperSide")]
451 const PenUpperSide = 4;
452 }
453}
454
455unsafe impl Encode for NSEventButtonMask {
456 const ENCODING: Encoding = NSUInteger::ENCODING;
457}
458
459unsafe impl RefEncode for NSEventButtonMask {
460 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
461}
462
463pub static NSPenTipMask: NSEventButtonMask = NSEventButtonMask(NSEventButtonMask::PenTip.0);
465
466pub static NSPenLowerSideMask: NSEventButtonMask =
468 NSEventButtonMask(NSEventButtonMask::PenLowerSide.0);
469
470pub static NSPenUpperSideMask: NSEventButtonMask =
472 NSEventButtonMask(NSEventButtonMask::PenUpperSide.0);
473
474#[repr(transparent)]
477#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
478pub struct NSEventPhase(pub NSUInteger);
479bitflags::bitflags! {
480 impl NSEventPhase: NSUInteger {
481 #[doc(alias = "NSEventPhaseNone")]
482 const None = 0;
483 #[doc(alias = "NSEventPhaseBegan")]
484 const Began = 0x1<<0;
485 #[doc(alias = "NSEventPhaseStationary")]
486 const Stationary = 0x1<<1;
487 #[doc(alias = "NSEventPhaseChanged")]
488 const Changed = 0x1<<2;
489 #[doc(alias = "NSEventPhaseEnded")]
490 const Ended = 0x1<<3;
491 #[doc(alias = "NSEventPhaseCancelled")]
492 const Cancelled = 0x1<<4;
493 #[doc(alias = "NSEventPhaseMayBegin")]
494 const MayBegin = 0x1<<5;
495 }
496}
497
498unsafe impl Encode for NSEventPhase {
499 const ENCODING: Encoding = NSUInteger::ENCODING;
500}
501
502unsafe impl RefEncode for NSEventPhase {
503 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
504}
505
506#[repr(transparent)]
509#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
510pub struct NSEventGestureAxis(pub NSInteger);
511impl NSEventGestureAxis {
512 #[doc(alias = "NSEventGestureAxisNone")]
513 pub const None: Self = Self(0);
514 #[doc(alias = "NSEventGestureAxisHorizontal")]
515 pub const Horizontal: Self = Self(1);
516 #[doc(alias = "NSEventGestureAxisVertical")]
517 pub const Vertical: Self = Self(2);
518}
519
520unsafe impl Encode for NSEventGestureAxis {
521 const ENCODING: Encoding = NSInteger::ENCODING;
522}
523
524unsafe impl RefEncode for NSEventGestureAxis {
525 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
526}
527
528#[repr(transparent)]
531#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
532pub struct NSEventSwipeTrackingOptions(pub NSUInteger);
533bitflags::bitflags! {
534 impl NSEventSwipeTrackingOptions: NSUInteger {
535 #[doc(alias = "NSEventSwipeTrackingLockDirection")]
536 const LockDirection = 0x1<<0;
537 #[doc(alias = "NSEventSwipeTrackingClampGestureAmount")]
538 const ClampGestureAmount = 0x1<<1;
539 }
540}
541
542unsafe impl Encode for NSEventSwipeTrackingOptions {
543 const ENCODING: Encoding = NSUInteger::ENCODING;
544}
545
546unsafe impl RefEncode for NSEventSwipeTrackingOptions {
547 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
548}
549
550#[repr(transparent)]
553#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
554pub struct NSEventSubtype(pub c_short);
555impl NSEventSubtype {
556 #[doc(alias = "NSEventSubtypeWindowExposed")]
557 pub const WindowExposed: Self = Self(0);
558 #[doc(alias = "NSEventSubtypeApplicationActivated")]
559 pub const ApplicationActivated: Self = Self(1);
560 #[doc(alias = "NSEventSubtypeApplicationDeactivated")]
561 pub const ApplicationDeactivated: Self = Self(2);
562 #[doc(alias = "NSEventSubtypeWindowMoved")]
563 pub const WindowMoved: Self = Self(4);
564 #[doc(alias = "NSEventSubtypeScreenChanged")]
565 pub const ScreenChanged: Self = Self(8);
566 #[doc(alias = "NSEventSubtypePowerOff")]
567 pub const PowerOff: Self = Self(1);
568 #[doc(alias = "NSEventSubtypeMouseEvent")]
569 pub const MouseEvent: Self = Self(0);
570 #[doc(alias = "NSEventSubtypeTabletPoint")]
571 pub const TabletPoint: Self = Self(1);
572 #[doc(alias = "NSEventSubtypeTabletProximity")]
573 pub const TabletProximity: Self = Self(2);
574 #[doc(alias = "NSEventSubtypeTouch")]
575 pub const Touch: Self = Self(3);
576}
577
578unsafe impl Encode for NSEventSubtype {
579 const ENCODING: Encoding = c_short::ENCODING;
580}
581
582unsafe impl RefEncode for NSEventSubtype {
583 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
584}
585
586pub static NSWindowExposedEventType: NSEventSubtype =
588 NSEventSubtype(NSEventSubtype::WindowExposed.0);
589
590pub static NSApplicationActivatedEventType: NSEventSubtype =
592 NSEventSubtype(NSEventSubtype::ApplicationActivated.0);
593
594pub static NSApplicationDeactivatedEventType: NSEventSubtype =
596 NSEventSubtype(NSEventSubtype::ApplicationDeactivated.0);
597
598pub static NSWindowMovedEventType: NSEventSubtype = NSEventSubtype(NSEventSubtype::WindowMoved.0);
600
601pub static NSScreenChangedEventType: NSEventSubtype =
603 NSEventSubtype(NSEventSubtype::ScreenChanged.0);
604
605pub static NSAWTEventType: NSEventSubtype = NSEventSubtype(16);
607
608pub static NSPowerOffEventType: NSEventSubtype = NSEventSubtype(NSEventSubtype::PowerOff.0);
610
611pub static NSMouseEventSubtype: NSEventSubtype = NSEventSubtype(NSEventSubtype::MouseEvent.0);
613
614pub static NSTabletPointEventSubtype: NSEventSubtype =
616 NSEventSubtype(NSEventSubtype::TabletPoint.0);
617
618pub static NSTabletProximityEventSubtype: NSEventSubtype =
620 NSEventSubtype(NSEventSubtype::TabletProximity.0);
621
622pub static NSTouchEventSubtype: NSEventSubtype = NSEventSubtype(NSEventSubtype::Touch.0);
624
625#[repr(transparent)]
628#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
629pub struct NSPressureBehavior(pub NSInteger);
630impl NSPressureBehavior {
631 #[doc(alias = "NSPressureBehaviorUnknown")]
632 pub const Unknown: Self = Self(-1);
633 #[doc(alias = "NSPressureBehaviorPrimaryDefault")]
634 pub const PrimaryDefault: Self = Self(0);
635 #[doc(alias = "NSPressureBehaviorPrimaryClick")]
636 pub const PrimaryClick: Self = Self(1);
637 #[doc(alias = "NSPressureBehaviorPrimaryGeneric")]
638 pub const PrimaryGeneric: Self = Self(2);
639 #[doc(alias = "NSPressureBehaviorPrimaryAccelerator")]
640 pub const PrimaryAccelerator: Self = Self(3);
641 #[doc(alias = "NSPressureBehaviorPrimaryDeepClick")]
642 pub const PrimaryDeepClick: Self = Self(5);
643 #[doc(alias = "NSPressureBehaviorPrimaryDeepDrag")]
644 pub const PrimaryDeepDrag: Self = Self(6);
645}
646
647unsafe impl Encode for NSPressureBehavior {
648 const ENCODING: Encoding = NSInteger::ENCODING;
649}
650
651unsafe impl RefEncode for NSPressureBehavior {
652 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
653}
654
655extern_class!(
656 #[unsafe(super(NSObject))]
658 #[derive(Debug, PartialEq, Eq, Hash)]
659 pub struct NSEvent;
660);
661
662unsafe impl NSCoding for NSEvent {}
663
664unsafe impl NSCopying for NSEvent {}
665
666unsafe impl CopyingHelper for NSEvent {
667 type Result = Self;
668}
669
670unsafe impl NSObjectProtocol for NSEvent {}
671
672impl NSEvent {
673 extern_methods!(
674 #[unsafe(method(type))]
675 #[unsafe(method_family = none)]
676 pub unsafe fn r#type(&self) -> NSEventType;
677
678 #[unsafe(method(modifierFlags))]
679 #[unsafe(method_family = none)]
680 pub unsafe fn modifierFlags(&self) -> NSEventModifierFlags;
681
682 #[unsafe(method(timestamp))]
683 #[unsafe(method_family = none)]
684 pub unsafe fn timestamp(&self) -> NSTimeInterval;
685
686 #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
687 #[unsafe(method(window))]
688 #[unsafe(method_family = none)]
689 pub unsafe fn window(&self, mtm: MainThreadMarker) -> Option<Retained<NSWindow>>;
690
691 #[unsafe(method(windowNumber))]
692 #[unsafe(method_family = none)]
693 pub unsafe fn windowNumber(&self) -> NSInteger;
694
695 #[cfg(feature = "NSGraphicsContext")]
696 #[deprecated = "This method always returns nil. If you need access to the current drawing context, use [NSGraphicsContext currentContext] inside of a draw operation."]
697 #[unsafe(method(context))]
698 #[unsafe(method_family = none)]
699 pub unsafe fn context(&self) -> Option<Retained<NSGraphicsContext>>;
700
701 #[unsafe(method(clickCount))]
702 #[unsafe(method_family = none)]
703 pub unsafe fn clickCount(&self) -> NSInteger;
704
705 #[unsafe(method(buttonNumber))]
706 #[unsafe(method_family = none)]
707 pub unsafe fn buttonNumber(&self) -> NSInteger;
708
709 #[unsafe(method(eventNumber))]
710 #[unsafe(method_family = none)]
711 pub unsafe fn eventNumber(&self) -> NSInteger;
712
713 #[unsafe(method(pressure))]
714 #[unsafe(method_family = none)]
715 pub unsafe fn pressure(&self) -> c_float;
716
717 #[unsafe(method(locationInWindow))]
718 #[unsafe(method_family = none)]
719 pub unsafe fn locationInWindow(&self) -> NSPoint;
720
721 #[cfg(feature = "objc2-core-foundation")]
722 #[unsafe(method(deltaX))]
723 #[unsafe(method_family = none)]
724 pub unsafe fn deltaX(&self) -> CGFloat;
725
726 #[cfg(feature = "objc2-core-foundation")]
727 #[unsafe(method(deltaY))]
728 #[unsafe(method_family = none)]
729 pub unsafe fn deltaY(&self) -> CGFloat;
730
731 #[cfg(feature = "objc2-core-foundation")]
732 #[unsafe(method(deltaZ))]
733 #[unsafe(method_family = none)]
734 pub unsafe fn deltaZ(&self) -> CGFloat;
735
736 #[unsafe(method(hasPreciseScrollingDeltas))]
737 #[unsafe(method_family = none)]
738 pub unsafe fn hasPreciseScrollingDeltas(&self) -> bool;
739
740 #[cfg(feature = "objc2-core-foundation")]
741 #[unsafe(method(scrollingDeltaX))]
742 #[unsafe(method_family = none)]
743 pub unsafe fn scrollingDeltaX(&self) -> CGFloat;
744
745 #[cfg(feature = "objc2-core-foundation")]
746 #[unsafe(method(scrollingDeltaY))]
747 #[unsafe(method_family = none)]
748 pub unsafe fn scrollingDeltaY(&self) -> CGFloat;
749
750 #[unsafe(method(momentumPhase))]
751 #[unsafe(method_family = none)]
752 pub unsafe fn momentumPhase(&self) -> NSEventPhase;
753
754 #[unsafe(method(isDirectionInvertedFromDevice))]
755 #[unsafe(method_family = none)]
756 pub unsafe fn isDirectionInvertedFromDevice(&self) -> bool;
757
758 #[unsafe(method(characters))]
759 #[unsafe(method_family = none)]
760 pub unsafe fn characters(&self) -> Option<Retained<NSString>>;
761
762 #[unsafe(method(charactersIgnoringModifiers))]
763 #[unsafe(method_family = none)]
764 pub unsafe fn charactersIgnoringModifiers(&self) -> Option<Retained<NSString>>;
765
766 #[unsafe(method(charactersByApplyingModifiers:))]
767 #[unsafe(method_family = none)]
768 pub unsafe fn charactersByApplyingModifiers(
769 &self,
770 modifiers: NSEventModifierFlags,
771 ) -> Option<Retained<NSString>>;
772
773 #[unsafe(method(isARepeat))]
774 #[unsafe(method_family = none)]
775 pub unsafe fn isARepeat(&self) -> bool;
776
777 #[unsafe(method(keyCode))]
778 #[unsafe(method_family = none)]
779 pub unsafe fn keyCode(&self) -> c_ushort;
780
781 #[unsafe(method(trackingNumber))]
782 #[unsafe(method_family = none)]
783 pub unsafe fn trackingNumber(&self) -> NSInteger;
784
785 #[unsafe(method(userData))]
786 #[unsafe(method_family = none)]
787 pub unsafe fn userData(&self) -> *mut c_void;
788
789 #[cfg(feature = "NSTrackingArea")]
790 #[unsafe(method(trackingArea))]
791 #[unsafe(method_family = none)]
792 pub unsafe fn trackingArea(&self) -> Option<Retained<NSTrackingArea>>;
793
794 #[unsafe(method(subtype))]
795 #[unsafe(method_family = none)]
796 pub unsafe fn subtype(&self) -> NSEventSubtype;
797
798 #[unsafe(method(data1))]
799 #[unsafe(method_family = none)]
800 pub unsafe fn data1(&self) -> NSInteger;
801
802 #[unsafe(method(data2))]
803 #[unsafe(method_family = none)]
804 pub unsafe fn data2(&self) -> NSInteger;
805
806 #[unsafe(method(eventRef))]
807 #[unsafe(method_family = none)]
808 pub unsafe fn eventRef(&self) -> *const c_void;
809
810 #[unsafe(method(eventWithEventRef:))]
811 #[unsafe(method_family = none)]
812 pub unsafe fn eventWithEventRef(event_ref: NonNull<c_void>) -> Option<Retained<NSEvent>>;
813
814 #[cfg(feature = "objc2-core-graphics")]
815 #[cfg(target_vendor = "apple")]
816 #[unsafe(method(CGEvent))]
817 #[unsafe(method_family = none)]
818 pub unsafe fn CGEvent(&self) -> Option<Retained<CGEvent>>;
819
820 #[cfg(feature = "objc2-core-graphics")]
821 #[cfg(target_vendor = "apple")]
822 #[unsafe(method(eventWithCGEvent:))]
823 #[unsafe(method_family = none)]
824 pub unsafe fn eventWithCGEvent(cg_event: &CGEvent) -> Option<Retained<NSEvent>>;
825
826 #[unsafe(method(isMouseCoalescingEnabled))]
827 #[unsafe(method_family = none)]
828 pub unsafe fn isMouseCoalescingEnabled() -> bool;
829
830 #[unsafe(method(setMouseCoalescingEnabled:))]
832 #[unsafe(method_family = none)]
833 pub unsafe fn setMouseCoalescingEnabled(mouse_coalescing_enabled: bool);
834
835 #[cfg(feature = "objc2-core-foundation")]
836 #[unsafe(method(magnification))]
837 #[unsafe(method_family = none)]
838 pub unsafe fn magnification(&self) -> CGFloat;
839
840 #[unsafe(method(deviceID))]
841 #[unsafe(method_family = none)]
842 pub unsafe fn deviceID(&self) -> NSUInteger;
843
844 #[unsafe(method(rotation))]
845 #[unsafe(method_family = none)]
846 pub unsafe fn rotation(&self) -> c_float;
847
848 #[unsafe(method(absoluteX))]
849 #[unsafe(method_family = none)]
850 pub unsafe fn absoluteX(&self) -> NSInteger;
851
852 #[unsafe(method(absoluteY))]
853 #[unsafe(method_family = none)]
854 pub unsafe fn absoluteY(&self) -> NSInteger;
855
856 #[unsafe(method(absoluteZ))]
857 #[unsafe(method_family = none)]
858 pub unsafe fn absoluteZ(&self) -> NSInteger;
859
860 #[unsafe(method(buttonMask))]
861 #[unsafe(method_family = none)]
862 pub unsafe fn buttonMask(&self) -> NSEventButtonMask;
863
864 #[unsafe(method(tilt))]
865 #[unsafe(method_family = none)]
866 pub unsafe fn tilt(&self) -> NSPoint;
867
868 #[unsafe(method(tangentialPressure))]
869 #[unsafe(method_family = none)]
870 pub unsafe fn tangentialPressure(&self) -> c_float;
871
872 #[unsafe(method(vendorDefined))]
873 #[unsafe(method_family = none)]
874 pub unsafe fn vendorDefined(&self) -> Retained<AnyObject>;
875
876 #[unsafe(method(vendorID))]
877 #[unsafe(method_family = none)]
878 pub unsafe fn vendorID(&self) -> NSUInteger;
879
880 #[unsafe(method(tabletID))]
881 #[unsafe(method_family = none)]
882 pub unsafe fn tabletID(&self) -> NSUInteger;
883
884 #[unsafe(method(pointingDeviceID))]
885 #[unsafe(method_family = none)]
886 pub unsafe fn pointingDeviceID(&self) -> NSUInteger;
887
888 #[unsafe(method(systemTabletID))]
889 #[unsafe(method_family = none)]
890 pub unsafe fn systemTabletID(&self) -> NSUInteger;
891
892 #[unsafe(method(vendorPointingDeviceType))]
893 #[unsafe(method_family = none)]
894 pub unsafe fn vendorPointingDeviceType(&self) -> NSUInteger;
895
896 #[unsafe(method(pointingDeviceSerialNumber))]
897 #[unsafe(method_family = none)]
898 pub unsafe fn pointingDeviceSerialNumber(&self) -> NSUInteger;
899
900 #[unsafe(method(uniqueID))]
901 #[unsafe(method_family = none)]
902 pub unsafe fn uniqueID(&self) -> c_ulonglong;
903
904 #[unsafe(method(capabilityMask))]
905 #[unsafe(method_family = none)]
906 pub unsafe fn capabilityMask(&self) -> NSUInteger;
907
908 #[unsafe(method(pointingDeviceType))]
909 #[unsafe(method_family = none)]
910 pub unsafe fn pointingDeviceType(&self) -> NSPointingDeviceType;
911
912 #[unsafe(method(isEnteringProximity))]
913 #[unsafe(method_family = none)]
914 pub unsafe fn isEnteringProximity(&self) -> bool;
915
916 #[cfg(all(feature = "NSResponder", feature = "NSTouch", feature = "NSView"))]
917 #[unsafe(method(touchesMatchingPhase:inView:))]
918 #[unsafe(method_family = none)]
919 pub unsafe fn touchesMatchingPhase_inView(
920 &self,
921 phase: NSTouchPhase,
922 view: Option<&NSView>,
923 ) -> Retained<NSSet<NSTouch>>;
924
925 #[cfg(feature = "NSTouch")]
926 #[unsafe(method(allTouches))]
927 #[unsafe(method_family = none)]
928 pub unsafe fn allTouches(&self) -> Retained<NSSet<NSTouch>>;
929
930 #[cfg(all(feature = "NSResponder", feature = "NSTouch", feature = "NSView"))]
931 #[unsafe(method(touchesForView:))]
932 #[unsafe(method_family = none)]
933 pub unsafe fn touchesForView(&self, view: &NSView) -> Retained<NSSet<NSTouch>>;
934
935 #[cfg(feature = "NSTouch")]
936 #[unsafe(method(coalescedTouchesForTouch:))]
937 #[unsafe(method_family = none)]
938 pub unsafe fn coalescedTouchesForTouch(
939 &self,
940 touch: &NSTouch,
941 ) -> Retained<NSArray<NSTouch>>;
942
943 #[unsafe(method(phase))]
944 #[unsafe(method_family = none)]
945 pub unsafe fn phase(&self) -> NSEventPhase;
946
947 #[unsafe(method(stage))]
948 #[unsafe(method_family = none)]
949 pub unsafe fn stage(&self) -> NSInteger;
950
951 #[cfg(feature = "objc2-core-foundation")]
952 #[unsafe(method(stageTransition))]
953 #[unsafe(method_family = none)]
954 pub unsafe fn stageTransition(&self) -> CGFloat;
955
956 #[unsafe(method(associatedEventsMask))]
957 #[unsafe(method_family = none)]
958 pub unsafe fn associatedEventsMask(&self) -> NSEventMask;
959
960 #[unsafe(method(pressureBehavior))]
961 #[unsafe(method_family = none)]
962 pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior;
963
964 #[unsafe(method(isSwipeTrackingFromScrollEventsEnabled))]
965 #[unsafe(method_family = none)]
966 pub unsafe fn isSwipeTrackingFromScrollEventsEnabled() -> bool;
967
968 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
969 #[unsafe(method(trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:))]
970 #[unsafe(method_family = none)]
971 pub unsafe fn trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler(
972 &self,
973 options: NSEventSwipeTrackingOptions,
974 min_dampen_threshold: CGFloat,
975 max_dampen_threshold: CGFloat,
976 tracking_handler: &block2::Block<dyn Fn(CGFloat, NSEventPhase, Bool, NonNull<Bool>)>,
977 );
978
979 #[unsafe(method(startPeriodicEventsAfterDelay:withPeriod:))]
980 #[unsafe(method_family = none)]
981 pub unsafe fn startPeriodicEventsAfterDelay_withPeriod(
982 delay: NSTimeInterval,
983 period: NSTimeInterval,
984 );
985
986 #[unsafe(method(stopPeriodicEvents))]
987 #[unsafe(method_family = none)]
988 pub unsafe fn stopPeriodicEvents();
989
990 #[cfg(feature = "NSGraphicsContext")]
991 #[unsafe(method(mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:))]
992 #[unsafe(method_family = none)]
993 pub unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure(
994 r#type: NSEventType,
995 location: NSPoint,
996 flags: NSEventModifierFlags,
997 time: NSTimeInterval,
998 w_num: NSInteger,
999 unused_pass_nil: Option<&NSGraphicsContext>,
1000 e_num: NSInteger,
1001 c_num: NSInteger,
1002 pressure: c_float,
1003 ) -> Option<Retained<NSEvent>>;
1004
1005 #[cfg(feature = "NSGraphicsContext")]
1006 #[unsafe(method(keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:))]
1007 #[unsafe(method_family = none)]
1008 pub unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode(
1009 r#type: NSEventType,
1010 location: NSPoint,
1011 flags: NSEventModifierFlags,
1012 time: NSTimeInterval,
1013 w_num: NSInteger,
1014 unused_pass_nil: Option<&NSGraphicsContext>,
1015 keys: &NSString,
1016 ukeys: &NSString,
1017 flag: bool,
1018 code: c_ushort,
1019 ) -> Option<Retained<NSEvent>>;
1020
1021 #[cfg(feature = "NSGraphicsContext")]
1022 #[unsafe(method(enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:))]
1023 #[unsafe(method_family = none)]
1024 pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData(
1025 r#type: NSEventType,
1026 location: NSPoint,
1027 flags: NSEventModifierFlags,
1028 time: NSTimeInterval,
1029 w_num: NSInteger,
1030 unused_pass_nil: Option<&NSGraphicsContext>,
1031 e_num: NSInteger,
1032 t_num: NSInteger,
1033 data: *mut c_void,
1034 ) -> Option<Retained<NSEvent>>;
1035
1036 #[cfg(feature = "NSGraphicsContext")]
1037 #[unsafe(method(otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:))]
1038 #[unsafe(method_family = none)]
1039 pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2(
1040 r#type: NSEventType,
1041 location: NSPoint,
1042 flags: NSEventModifierFlags,
1043 time: NSTimeInterval,
1044 w_num: NSInteger,
1045 unused_pass_nil: Option<&NSGraphicsContext>,
1046 subtype: c_short,
1047 d1: NSInteger,
1048 d2: NSInteger,
1049 ) -> Option<Retained<NSEvent>>;
1050
1051 #[unsafe(method(mouseLocation))]
1052 #[unsafe(method_family = none)]
1053 pub unsafe fn mouseLocation() -> NSPoint;
1054
1055 #[unsafe(method(modifierFlags))]
1056 #[unsafe(method_family = none)]
1057 pub unsafe fn modifierFlags_class() -> NSEventModifierFlags;
1058
1059 #[unsafe(method(pressedMouseButtons))]
1060 #[unsafe(method_family = none)]
1061 pub unsafe fn pressedMouseButtons() -> NSUInteger;
1062
1063 #[unsafe(method(doubleClickInterval))]
1064 #[unsafe(method_family = none)]
1065 pub unsafe fn doubleClickInterval() -> NSTimeInterval;
1066
1067 #[unsafe(method(keyRepeatDelay))]
1068 #[unsafe(method_family = none)]
1069 pub unsafe fn keyRepeatDelay() -> NSTimeInterval;
1070
1071 #[unsafe(method(keyRepeatInterval))]
1072 #[unsafe(method_family = none)]
1073 pub unsafe fn keyRepeatInterval() -> NSTimeInterval;
1074
1075 #[cfg(feature = "block2")]
1076 #[unsafe(method(addGlobalMonitorForEventsMatchingMask:handler:))]
1077 #[unsafe(method_family = none)]
1078 pub unsafe fn addGlobalMonitorForEventsMatchingMask_handler(
1079 mask: NSEventMask,
1080 block: &block2::Block<dyn Fn(NonNull<NSEvent>)>,
1081 ) -> Option<Retained<AnyObject>>;
1082
1083 #[cfg(feature = "block2")]
1084 #[unsafe(method(addLocalMonitorForEventsMatchingMask:handler:))]
1085 #[unsafe(method_family = none)]
1086 pub unsafe fn addLocalMonitorForEventsMatchingMask_handler(
1087 mask: NSEventMask,
1088 block: &block2::Block<dyn Fn(NonNull<NSEvent>) -> *mut NSEvent>,
1089 ) -> Option<Retained<AnyObject>>;
1090
1091 #[unsafe(method(removeMonitor:))]
1092 #[unsafe(method_family = none)]
1093 pub unsafe fn removeMonitor(event_monitor: &AnyObject);
1094 );
1095}
1096
1097impl NSEvent {
1099 extern_methods!(
1100 #[unsafe(method(init))]
1101 #[unsafe(method_family = init)]
1102 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1103
1104 #[unsafe(method(new))]
1105 #[unsafe(method_family = new)]
1106 pub unsafe fn new() -> Retained<Self>;
1107 );
1108}
1109
1110pub const NSUpArrowFunctionKey: c_uint = 0xF700;
1112pub const NSDownArrowFunctionKey: c_uint = 0xF701;
1114pub const NSLeftArrowFunctionKey: c_uint = 0xF702;
1116pub const NSRightArrowFunctionKey: c_uint = 0xF703;
1118pub const NSF1FunctionKey: c_uint = 0xF704;
1120pub const NSF2FunctionKey: c_uint = 0xF705;
1122pub const NSF3FunctionKey: c_uint = 0xF706;
1124pub const NSF4FunctionKey: c_uint = 0xF707;
1126pub const NSF5FunctionKey: c_uint = 0xF708;
1128pub const NSF6FunctionKey: c_uint = 0xF709;
1130pub const NSF7FunctionKey: c_uint = 0xF70A;
1132pub const NSF8FunctionKey: c_uint = 0xF70B;
1134pub const NSF9FunctionKey: c_uint = 0xF70C;
1136pub const NSF10FunctionKey: c_uint = 0xF70D;
1138pub const NSF11FunctionKey: c_uint = 0xF70E;
1140pub const NSF12FunctionKey: c_uint = 0xF70F;
1142pub const NSF13FunctionKey: c_uint = 0xF710;
1144pub const NSF14FunctionKey: c_uint = 0xF711;
1146pub const NSF15FunctionKey: c_uint = 0xF712;
1148pub const NSF16FunctionKey: c_uint = 0xF713;
1150pub const NSF17FunctionKey: c_uint = 0xF714;
1152pub const NSF18FunctionKey: c_uint = 0xF715;
1154pub const NSF19FunctionKey: c_uint = 0xF716;
1156pub const NSF20FunctionKey: c_uint = 0xF717;
1158pub const NSF21FunctionKey: c_uint = 0xF718;
1160pub const NSF22FunctionKey: c_uint = 0xF719;
1162pub const NSF23FunctionKey: c_uint = 0xF71A;
1164pub const NSF24FunctionKey: c_uint = 0xF71B;
1166pub const NSF25FunctionKey: c_uint = 0xF71C;
1168pub const NSF26FunctionKey: c_uint = 0xF71D;
1170pub const NSF27FunctionKey: c_uint = 0xF71E;
1172pub const NSF28FunctionKey: c_uint = 0xF71F;
1174pub const NSF29FunctionKey: c_uint = 0xF720;
1176pub const NSF30FunctionKey: c_uint = 0xF721;
1178pub const NSF31FunctionKey: c_uint = 0xF722;
1180pub const NSF32FunctionKey: c_uint = 0xF723;
1182pub const NSF33FunctionKey: c_uint = 0xF724;
1184pub const NSF34FunctionKey: c_uint = 0xF725;
1186pub const NSF35FunctionKey: c_uint = 0xF726;
1188pub const NSInsertFunctionKey: c_uint = 0xF727;
1190pub const NSDeleteFunctionKey: c_uint = 0xF728;
1192pub const NSHomeFunctionKey: c_uint = 0xF729;
1194pub const NSBeginFunctionKey: c_uint = 0xF72A;
1196pub const NSEndFunctionKey: c_uint = 0xF72B;
1198pub const NSPageUpFunctionKey: c_uint = 0xF72C;
1200pub const NSPageDownFunctionKey: c_uint = 0xF72D;
1202pub const NSPrintScreenFunctionKey: c_uint = 0xF72E;
1204pub const NSScrollLockFunctionKey: c_uint = 0xF72F;
1206pub const NSPauseFunctionKey: c_uint = 0xF730;
1208pub const NSSysReqFunctionKey: c_uint = 0xF731;
1210pub const NSBreakFunctionKey: c_uint = 0xF732;
1212pub const NSResetFunctionKey: c_uint = 0xF733;
1214pub const NSStopFunctionKey: c_uint = 0xF734;
1216pub const NSMenuFunctionKey: c_uint = 0xF735;
1218pub const NSUserFunctionKey: c_uint = 0xF736;
1220pub const NSSystemFunctionKey: c_uint = 0xF737;
1222pub const NSPrintFunctionKey: c_uint = 0xF738;
1224pub const NSClearLineFunctionKey: c_uint = 0xF739;
1226pub const NSClearDisplayFunctionKey: c_uint = 0xF73A;
1228pub const NSInsertLineFunctionKey: c_uint = 0xF73B;
1230pub const NSDeleteLineFunctionKey: c_uint = 0xF73C;
1232pub const NSInsertCharFunctionKey: c_uint = 0xF73D;
1234pub const NSDeleteCharFunctionKey: c_uint = 0xF73E;
1236pub const NSPrevFunctionKey: c_uint = 0xF73F;
1238pub const NSNextFunctionKey: c_uint = 0xF740;
1240pub const NSSelectFunctionKey: c_uint = 0xF741;
1242pub const NSExecuteFunctionKey: c_uint = 0xF742;
1244pub const NSUndoFunctionKey: c_uint = 0xF743;
1246pub const NSRedoFunctionKey: c_uint = 0xF744;
1248pub const NSFindFunctionKey: c_uint = 0xF745;
1250pub const NSHelpFunctionKey: c_uint = 0xF746;
1252pub const NSModeSwitchFunctionKey: c_uint = 0xF747;