objc2-app-kit 0.3.2

Bindings to the AppKit framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-graphics")]
#[cfg(target_vendor = "apple")]
use objc2_core_graphics::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventType(pub NSUInteger);
impl NSEventType {
    #[doc(alias = "NSEventTypeLeftMouseDown")]
    pub const LeftMouseDown: Self = Self(1);
    #[doc(alias = "NSEventTypeLeftMouseUp")]
    pub const LeftMouseUp: Self = Self(2);
    #[doc(alias = "NSEventTypeRightMouseDown")]
    pub const RightMouseDown: Self = Self(3);
    #[doc(alias = "NSEventTypeRightMouseUp")]
    pub const RightMouseUp: Self = Self(4);
    #[doc(alias = "NSEventTypeMouseMoved")]
    pub const MouseMoved: Self = Self(5);
    #[doc(alias = "NSEventTypeLeftMouseDragged")]
    pub const LeftMouseDragged: Self = Self(6);
    #[doc(alias = "NSEventTypeRightMouseDragged")]
    pub const RightMouseDragged: Self = Self(7);
    #[doc(alias = "NSEventTypeMouseEntered")]
    pub const MouseEntered: Self = Self(8);
    #[doc(alias = "NSEventTypeMouseExited")]
    pub const MouseExited: Self = Self(9);
    #[doc(alias = "NSEventTypeKeyDown")]
    pub const KeyDown: Self = Self(10);
    #[doc(alias = "NSEventTypeKeyUp")]
    pub const KeyUp: Self = Self(11);
    #[doc(alias = "NSEventTypeFlagsChanged")]
    pub const FlagsChanged: Self = Self(12);
    #[doc(alias = "NSEventTypeAppKitDefined")]
    pub const AppKitDefined: Self = Self(13);
    #[doc(alias = "NSEventTypeSystemDefined")]
    pub const SystemDefined: Self = Self(14);
    #[doc(alias = "NSEventTypeApplicationDefined")]
    pub const ApplicationDefined: Self = Self(15);
    #[doc(alias = "NSEventTypePeriodic")]
    pub const Periodic: Self = Self(16);
    #[doc(alias = "NSEventTypeCursorUpdate")]
    pub const CursorUpdate: Self = Self(17);
    #[doc(alias = "NSEventTypeScrollWheel")]
    pub const ScrollWheel: Self = Self(22);
    #[doc(alias = "NSEventTypeTabletPoint")]
    pub const TabletPoint: Self = Self(23);
    #[doc(alias = "NSEventTypeTabletProximity")]
    pub const TabletProximity: Self = Self(24);
    #[doc(alias = "NSEventTypeOtherMouseDown")]
    pub const OtherMouseDown: Self = Self(25);
    #[doc(alias = "NSEventTypeOtherMouseUp")]
    pub const OtherMouseUp: Self = Self(26);
    #[doc(alias = "NSEventTypeOtherMouseDragged")]
    pub const OtherMouseDragged: Self = Self(27);
    #[doc(alias = "NSEventTypeGesture")]
    pub const Gesture: Self = Self(29);
    #[doc(alias = "NSEventTypeMagnify")]
    pub const Magnify: Self = Self(30);
    #[doc(alias = "NSEventTypeSwipe")]
    pub const Swipe: Self = Self(31);
    #[doc(alias = "NSEventTypeRotate")]
    pub const Rotate: Self = Self(18);
    #[doc(alias = "NSEventTypeBeginGesture")]
    pub const BeginGesture: Self = Self(19);
    #[doc(alias = "NSEventTypeEndGesture")]
    pub const EndGesture: Self = Self(20);
    #[doc(alias = "NSEventTypeSmartMagnify")]
    pub const SmartMagnify: Self = Self(32);
    #[doc(alias = "NSEventTypeQuickLook")]
    pub const QuickLook: Self = Self(33);
    #[doc(alias = "NSEventTypePressure")]
    pub const Pressure: Self = Self(34);
    #[doc(alias = "NSEventTypeDirectTouch")]
    pub const DirectTouch: Self = Self(37);
    #[doc(alias = "NSEventTypeChangeMode")]
    pub const ChangeMode: Self = Self(38);
    #[doc(alias = "NSEventTypeMouseCancelled")]
    pub const MouseCancelled: Self = Self(40);
}

unsafe impl Encode for NSEventType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSEventType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftmousedown?language=objc)
#[deprecated]
pub static NSLeftMouseDown: NSEventType = NSEventType(NSEventType::LeftMouseDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftmouseup?language=objc)
#[deprecated]
pub static NSLeftMouseUp: NSEventType = NSEventType(NSEventType::LeftMouseUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightmousedown?language=objc)
#[deprecated]
pub static NSRightMouseDown: NSEventType = NSEventType(NSEventType::RightMouseDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightmouseup?language=objc)
#[deprecated]
pub static NSRightMouseUp: NSEventType = NSEventType(NSEventType::RightMouseUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmousemoved?language=objc)
#[deprecated]
pub static NSMouseMoved: NSEventType = NSEventType(NSEventType::MouseMoved.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftmousedragged?language=objc)
#[deprecated]
pub static NSLeftMouseDragged: NSEventType = NSEventType(NSEventType::LeftMouseDragged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightmousedragged?language=objc)
#[deprecated]
pub static NSRightMouseDragged: NSEventType = NSEventType(NSEventType::RightMouseDragged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmouseentered?language=objc)
#[deprecated]
pub static NSMouseEntered: NSEventType = NSEventType(NSEventType::MouseEntered.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmouseexited?language=objc)
#[deprecated]
pub static NSMouseExited: NSEventType = NSEventType(NSEventType::MouseExited.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nskeydown?language=objc)
#[deprecated]
pub static NSKeyDown: NSEventType = NSEventType(NSEventType::KeyDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nskeyup?language=objc)
#[deprecated]
pub static NSKeyUp: NSEventType = NSEventType(NSEventType::KeyUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsflagschanged?language=objc)
#[deprecated]
pub static NSFlagsChanged: NSEventType = NSEventType(NSEventType::FlagsChanged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsappkitdefined?language=objc)
#[deprecated]
pub static NSAppKitDefined: NSEventType = NSEventType(NSEventType::AppKitDefined.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssystemdefined?language=objc)
#[deprecated]
pub static NSSystemDefined: NSEventType = NSEventType(NSEventType::SystemDefined.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsapplicationdefined?language=objc)
#[deprecated]
pub static NSApplicationDefined: NSEventType = NSEventType(NSEventType::ApplicationDefined.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsperiodic?language=objc)
#[deprecated]
pub static NSPeriodic: NSEventType = NSEventType(NSEventType::Periodic.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscursorupdate?language=objc)
#[deprecated]
pub static NSCursorUpdate: NSEventType = NSEventType(NSEventType::CursorUpdate.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsscrollwheel?language=objc)
#[deprecated]
pub static NSScrollWheel: NSEventType = NSEventType(NSEventType::ScrollWheel.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstabletpoint?language=objc)
#[deprecated]
pub static NSTabletPoint: NSEventType = NSEventType(NSEventType::TabletPoint.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstabletproximity?language=objc)
#[deprecated]
pub static NSTabletProximity: NSEventType = NSEventType(NSEventType::TabletProximity.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsothermousedown?language=objc)
#[deprecated]
pub static NSOtherMouseDown: NSEventType = NSEventType(NSEventType::OtherMouseDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsothermouseup?language=objc)
#[deprecated]
pub static NSOtherMouseUp: NSEventType = NSEventType(NSEventType::OtherMouseUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsothermousedragged?language=objc)
#[deprecated]
pub static NSOtherMouseDragged: NSEventType = NSEventType(NSEventType::OtherMouseDragged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventmask?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventMask(pub c_ulonglong);
bitflags::bitflags! {
    impl NSEventMask: c_ulonglong {
        #[doc(alias = "NSEventMaskLeftMouseDown")]
        const LeftMouseDown = 1<<NSEventType::LeftMouseDown.0;
        #[doc(alias = "NSEventMaskLeftMouseUp")]
        const LeftMouseUp = 1<<NSEventType::LeftMouseUp.0;
        #[doc(alias = "NSEventMaskRightMouseDown")]
        const RightMouseDown = 1<<NSEventType::RightMouseDown.0;
        #[doc(alias = "NSEventMaskRightMouseUp")]
        const RightMouseUp = 1<<NSEventType::RightMouseUp.0;
        #[doc(alias = "NSEventMaskMouseMoved")]
        const MouseMoved = 1<<NSEventType::MouseMoved.0;
        #[doc(alias = "NSEventMaskLeftMouseDragged")]
        const LeftMouseDragged = 1<<NSEventType::LeftMouseDragged.0;
        #[doc(alias = "NSEventMaskRightMouseDragged")]
        const RightMouseDragged = 1<<NSEventType::RightMouseDragged.0;
        #[doc(alias = "NSEventMaskMouseEntered")]
        const MouseEntered = 1<<NSEventType::MouseEntered.0;
        #[doc(alias = "NSEventMaskMouseExited")]
        const MouseExited = 1<<NSEventType::MouseExited.0;
        #[doc(alias = "NSEventMaskKeyDown")]
        const KeyDown = 1<<NSEventType::KeyDown.0;
        #[doc(alias = "NSEventMaskKeyUp")]
        const KeyUp = 1<<NSEventType::KeyUp.0;
        #[doc(alias = "NSEventMaskFlagsChanged")]
        const FlagsChanged = 1<<NSEventType::FlagsChanged.0;
        #[doc(alias = "NSEventMaskAppKitDefined")]
        const AppKitDefined = 1<<NSEventType::AppKitDefined.0;
        #[doc(alias = "NSEventMaskSystemDefined")]
        const SystemDefined = 1<<NSEventType::SystemDefined.0;
        #[doc(alias = "NSEventMaskApplicationDefined")]
        const ApplicationDefined = 1<<NSEventType::ApplicationDefined.0;
        #[doc(alias = "NSEventMaskPeriodic")]
        const Periodic = 1<<NSEventType::Periodic.0;
        #[doc(alias = "NSEventMaskCursorUpdate")]
        const CursorUpdate = 1<<NSEventType::CursorUpdate.0;
        #[doc(alias = "NSEventMaskScrollWheel")]
        const ScrollWheel = 1<<NSEventType::ScrollWheel.0;
        #[doc(alias = "NSEventMaskTabletPoint")]
        const TabletPoint = 1<<NSEventType::TabletPoint.0;
        #[doc(alias = "NSEventMaskTabletProximity")]
        const TabletProximity = 1<<NSEventType::TabletProximity.0;
        #[doc(alias = "NSEventMaskOtherMouseDown")]
        const OtherMouseDown = 1<<NSEventType::OtherMouseDown.0;
        #[doc(alias = "NSEventMaskOtherMouseUp")]
        const OtherMouseUp = 1<<NSEventType::OtherMouseUp.0;
        #[doc(alias = "NSEventMaskOtherMouseDragged")]
        const OtherMouseDragged = 1<<NSEventType::OtherMouseDragged.0;
        #[doc(alias = "NSEventMaskGesture")]
        const Gesture = 1<<NSEventType::Gesture.0;
        #[doc(alias = "NSEventMaskMagnify")]
        const Magnify = 1<<NSEventType::Magnify.0;
        #[doc(alias = "NSEventMaskSwipe")]
        const Swipe = 1<<NSEventType::Swipe.0;
        #[doc(alias = "NSEventMaskRotate")]
        const Rotate = 1<<NSEventType::Rotate.0;
        #[doc(alias = "NSEventMaskBeginGesture")]
        const BeginGesture = 1<<NSEventType::BeginGesture.0;
        #[doc(alias = "NSEventMaskEndGesture")]
        const EndGesture = 1<<NSEventType::EndGesture.0;
        #[doc(alias = "NSEventMaskSmartMagnify")]
        const SmartMagnify = 1<<NSEventType::SmartMagnify.0;
        #[doc(alias = "NSEventMaskPressure")]
        const Pressure = 1<<NSEventType::Pressure.0;
        #[doc(alias = "NSEventMaskDirectTouch")]
        const DirectTouch = 1<<NSEventType::DirectTouch.0;
        #[doc(alias = "NSEventMaskChangeMode")]
        const ChangeMode = 1<<NSEventType::ChangeMode.0;
        #[doc(alias = "NSEventMaskMouseCancelled")]
        const MouseCancelled = 1<<NSEventType::MouseCancelled.0;
        #[doc(alias = "NSEventMaskAny")]
        const Any = NSUIntegerMax as _;
    }
}

unsafe impl Encode for NSEventMask {
    const ENCODING: Encoding = c_ulonglong::ENCODING;
}

unsafe impl RefEncode for NSEventMask {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftmousedownmask?language=objc)
#[deprecated]
pub static NSLeftMouseDownMask: NSEventMask = NSEventMask(NSEventMask::LeftMouseDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftmouseupmask?language=objc)
#[deprecated]
pub static NSLeftMouseUpMask: NSEventMask = NSEventMask(NSEventMask::LeftMouseUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightmousedownmask?language=objc)
#[deprecated]
pub static NSRightMouseDownMask: NSEventMask = NSEventMask(NSEventMask::RightMouseDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightmouseupmask?language=objc)
#[deprecated]
pub static NSRightMouseUpMask: NSEventMask = NSEventMask(NSEventMask::RightMouseUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmousemovedmask?language=objc)
#[deprecated]
pub static NSMouseMovedMask: NSEventMask = NSEventMask(NSEventMask::MouseMoved.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftmousedraggedmask?language=objc)
#[deprecated]
pub static NSLeftMouseDraggedMask: NSEventMask = NSEventMask(NSEventMask::LeftMouseDragged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightmousedraggedmask?language=objc)
#[deprecated]
pub static NSRightMouseDraggedMask: NSEventMask = NSEventMask(NSEventMask::RightMouseDragged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmouseenteredmask?language=objc)
#[deprecated]
pub static NSMouseEnteredMask: NSEventMask = NSEventMask(NSEventMask::MouseEntered.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmouseexitedmask?language=objc)
#[deprecated]
pub static NSMouseExitedMask: NSEventMask = NSEventMask(NSEventMask::MouseExited.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nskeydownmask?language=objc)
#[deprecated]
pub static NSKeyDownMask: NSEventMask = NSEventMask(NSEventMask::KeyDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nskeyupmask?language=objc)
#[deprecated]
pub static NSKeyUpMask: NSEventMask = NSEventMask(NSEventMask::KeyUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsflagschangedmask?language=objc)
#[deprecated]
pub static NSFlagsChangedMask: NSEventMask = NSEventMask(NSEventMask::FlagsChanged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsappkitdefinedmask?language=objc)
#[deprecated]
pub static NSAppKitDefinedMask: NSEventMask = NSEventMask(NSEventMask::AppKitDefined.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssystemdefinedmask?language=objc)
#[deprecated]
pub static NSSystemDefinedMask: NSEventMask = NSEventMask(NSEventMask::SystemDefined.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsapplicationdefinedmask?language=objc)
#[deprecated]
pub static NSApplicationDefinedMask: NSEventMask = NSEventMask(NSEventMask::ApplicationDefined.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsperiodicmask?language=objc)
#[deprecated]
pub static NSPeriodicMask: NSEventMask = NSEventMask(NSEventMask::Periodic.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscursorupdatemask?language=objc)
#[deprecated]
pub static NSCursorUpdateMask: NSEventMask = NSEventMask(NSEventMask::CursorUpdate.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsscrollwheelmask?language=objc)
#[deprecated]
pub static NSScrollWheelMask: NSEventMask = NSEventMask(NSEventMask::ScrollWheel.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstabletpointmask?language=objc)
#[deprecated]
pub static NSTabletPointMask: NSEventMask = NSEventMask(NSEventMask::TabletPoint.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstabletproximitymask?language=objc)
#[deprecated]
pub static NSTabletProximityMask: NSEventMask = NSEventMask(NSEventMask::TabletProximity.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsothermousedownmask?language=objc)
#[deprecated]
pub static NSOtherMouseDownMask: NSEventMask = NSEventMask(NSEventMask::OtherMouseDown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsothermouseupmask?language=objc)
#[deprecated]
pub static NSOtherMouseUpMask: NSEventMask = NSEventMask(NSEventMask::OtherMouseUp.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsothermousedraggedmask?language=objc)
#[deprecated]
pub static NSOtherMouseDraggedMask: NSEventMask = NSEventMask(NSEventMask::OtherMouseDragged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsanyeventmask?language=objc)
#[deprecated]
pub static NSAnyEventMask: NSEventMask = NSEventMask(NSUIntegerMax as _);

impl NSEventMask {
    // TODO: pub fn NSEventMaskFromType(r#type: NSEventType,) -> NSEventMask;
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventmodifierflags?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventModifierFlags(pub NSUInteger);
bitflags::bitflags! {
    impl NSEventModifierFlags: NSUInteger {
        #[doc(alias = "NSEventModifierFlagCapsLock")]
        const CapsLock = 1<<16;
        #[doc(alias = "NSEventModifierFlagShift")]
        const Shift = 1<<17;
        #[doc(alias = "NSEventModifierFlagControl")]
        const Control = 1<<18;
        #[doc(alias = "NSEventModifierFlagOption")]
        const Option = 1<<19;
        #[doc(alias = "NSEventModifierFlagCommand")]
        const Command = 1<<20;
        #[doc(alias = "NSEventModifierFlagNumericPad")]
        const NumericPad = 1<<21;
        #[doc(alias = "NSEventModifierFlagHelp")]
        const Help = 1<<22;
        #[doc(alias = "NSEventModifierFlagFunction")]
        const Function = 1<<23;
        #[doc(alias = "NSEventModifierFlagDeviceIndependentFlagsMask")]
        const DeviceIndependentFlagsMask = 0xffff0000;
    }
}

unsafe impl Encode for NSEventModifierFlags {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSEventModifierFlags {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsalphashiftkeymask?language=objc)
#[deprecated]
pub static NSAlphaShiftKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::CapsLock.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsshiftkeymask?language=objc)
#[deprecated]
pub static NSShiftKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::Shift.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscontrolkeymask?language=objc)
#[deprecated]
pub static NSControlKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::Control.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsalternatekeymask?language=objc)
#[deprecated]
pub static NSAlternateKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::Option.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscommandkeymask?language=objc)
#[deprecated]
pub static NSCommandKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::Command.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnumericpadkeymask?language=objc)
#[deprecated]
pub static NSNumericPadKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::NumericPad.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nshelpkeymask?language=objc)
#[deprecated]
pub static NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlags(NSEventModifierFlags::Help.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfunctionkeymask?language=objc)
#[deprecated]
pub static NSFunctionKeyMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::Function.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdeviceindependentmodifierflagsmask?language=objc)
#[deprecated]
pub static NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags =
    NSEventModifierFlags(NSEventModifierFlags::DeviceIndependentFlagsMask.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspointingdevicetype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPointingDeviceType(pub NSUInteger);
impl NSPointingDeviceType {
    #[doc(alias = "NSPointingDeviceTypeUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "NSPointingDeviceTypePen")]
    pub const Pen: Self = Self(1);
    #[doc(alias = "NSPointingDeviceTypeCursor")]
    pub const Cursor: Self = Self(2);
    #[doc(alias = "NSPointingDeviceTypeEraser")]
    pub const Eraser: Self = Self(3);
}

unsafe impl Encode for NSPointingDeviceType {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSPointingDeviceType {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsunknownpointingdevice?language=objc)
#[deprecated]
pub static NSUnknownPointingDevice: NSPointingDeviceType =
    NSPointingDeviceType(NSPointingDeviceType::Unknown.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspenpointingdevice?language=objc)
#[deprecated]
pub static NSPenPointingDevice: NSPointingDeviceType =
    NSPointingDeviceType(NSPointingDeviceType::Pen.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscursorpointingdevice?language=objc)
#[deprecated]
pub static NSCursorPointingDevice: NSPointingDeviceType =
    NSPointingDeviceType(NSPointingDeviceType::Cursor.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseraserpointingdevice?language=objc)
#[deprecated]
pub static NSEraserPointingDevice: NSPointingDeviceType =
    NSPointingDeviceType(NSPointingDeviceType::Eraser.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventbuttonmask?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventButtonMask(pub NSUInteger);
bitflags::bitflags! {
    impl NSEventButtonMask: NSUInteger {
        #[doc(alias = "NSEventButtonMaskPenTip")]
        const PenTip = 1;
        #[doc(alias = "NSEventButtonMaskPenLowerSide")]
        const PenLowerSide = 2;
        #[doc(alias = "NSEventButtonMaskPenUpperSide")]
        const PenUpperSide = 4;
    }
}

unsafe impl Encode for NSEventButtonMask {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSEventButtonMask {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspentipmask?language=objc)
#[deprecated]
pub static NSPenTipMask: NSEventButtonMask = NSEventButtonMask(NSEventButtonMask::PenTip.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspenlowersidemask?language=objc)
#[deprecated]
pub static NSPenLowerSideMask: NSEventButtonMask =
    NSEventButtonMask(NSEventButtonMask::PenLowerSide.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspenuppersidemask?language=objc)
#[deprecated]
pub static NSPenUpperSideMask: NSEventButtonMask =
    NSEventButtonMask(NSEventButtonMask::PenUpperSide.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventphase?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventPhase(pub NSUInteger);
bitflags::bitflags! {
    impl NSEventPhase: NSUInteger {
        #[doc(alias = "NSEventPhaseNone")]
        const None = 0;
        #[doc(alias = "NSEventPhaseBegan")]
        const Began = 0x1<<0;
        #[doc(alias = "NSEventPhaseStationary")]
        const Stationary = 0x1<<1;
        #[doc(alias = "NSEventPhaseChanged")]
        const Changed = 0x1<<2;
        #[doc(alias = "NSEventPhaseEnded")]
        const Ended = 0x1<<3;
        #[doc(alias = "NSEventPhaseCancelled")]
        const Cancelled = 0x1<<4;
        #[doc(alias = "NSEventPhaseMayBegin")]
        const MayBegin = 0x1<<5;
    }
}

unsafe impl Encode for NSEventPhase {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSEventPhase {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventgestureaxis?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventGestureAxis(pub NSInteger);
impl NSEventGestureAxis {
    #[doc(alias = "NSEventGestureAxisNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "NSEventGestureAxisHorizontal")]
    pub const Horizontal: Self = Self(1);
    #[doc(alias = "NSEventGestureAxisVertical")]
    pub const Vertical: Self = Self(2);
}

unsafe impl Encode for NSEventGestureAxis {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for NSEventGestureAxis {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventswipetrackingoptions?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventSwipeTrackingOptions(pub NSUInteger);
bitflags::bitflags! {
    impl NSEventSwipeTrackingOptions: NSUInteger {
        #[doc(alias = "NSEventSwipeTrackingLockDirection")]
        const LockDirection = 0x1<<0;
        #[doc(alias = "NSEventSwipeTrackingClampGestureAmount")]
        const ClampGestureAmount = 0x1<<1;
    }
}

unsafe impl Encode for NSEventSwipeTrackingOptions {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for NSEventSwipeTrackingOptions {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nseventsubtype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSEventSubtype(pub c_short);
impl NSEventSubtype {
    #[doc(alias = "NSEventSubtypeWindowExposed")]
    pub const WindowExposed: Self = Self(0);
    #[doc(alias = "NSEventSubtypeApplicationActivated")]
    pub const ApplicationActivated: Self = Self(1);
    #[doc(alias = "NSEventSubtypeApplicationDeactivated")]
    pub const ApplicationDeactivated: Self = Self(2);
    #[doc(alias = "NSEventSubtypeWindowMoved")]
    pub const WindowMoved: Self = Self(4);
    #[doc(alias = "NSEventSubtypeScreenChanged")]
    pub const ScreenChanged: Self = Self(8);
    #[doc(alias = "NSEventSubtypePowerOff")]
    pub const PowerOff: Self = Self(1);
    #[doc(alias = "NSEventSubtypeMouseEvent")]
    pub const MouseEvent: Self = Self(0);
    #[doc(alias = "NSEventSubtypeTabletPoint")]
    pub const TabletPoint: Self = Self(1);
    #[doc(alias = "NSEventSubtypeTabletProximity")]
    pub const TabletProximity: Self = Self(2);
    #[doc(alias = "NSEventSubtypeTouch")]
    pub const Touch: Self = Self(3);
}

unsafe impl Encode for NSEventSubtype {
    const ENCODING: Encoding = c_short::ENCODING;
}

unsafe impl RefEncode for NSEventSubtype {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nswindowexposedeventtype?language=objc)
#[deprecated]
pub static NSWindowExposedEventType: NSEventSubtype =
    NSEventSubtype(NSEventSubtype::WindowExposed.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsapplicationactivatedeventtype?language=objc)
#[deprecated]
pub static NSApplicationActivatedEventType: NSEventSubtype =
    NSEventSubtype(NSEventSubtype::ApplicationActivated.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsapplicationdeactivatedeventtype?language=objc)
#[deprecated]
pub static NSApplicationDeactivatedEventType: NSEventSubtype =
    NSEventSubtype(NSEventSubtype::ApplicationDeactivated.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nswindowmovedeventtype?language=objc)
#[deprecated]
pub static NSWindowMovedEventType: NSEventSubtype = NSEventSubtype(NSEventSubtype::WindowMoved.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsscreenchangedeventtype?language=objc)
#[deprecated]
pub static NSScreenChangedEventType: NSEventSubtype =
    NSEventSubtype(NSEventSubtype::ScreenChanged.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsawteventtype?language=objc)
#[deprecated = "This subtype no longer exists"]
pub static NSAWTEventType: NSEventSubtype = NSEventSubtype(16);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspoweroffeventtype?language=objc)
#[deprecated]
pub static NSPowerOffEventType: NSEventSubtype = NSEventSubtype(NSEventSubtype::PowerOff.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmouseeventsubtype?language=objc)
#[deprecated]
pub static NSMouseEventSubtype: NSEventSubtype = NSEventSubtype(NSEventSubtype::MouseEvent.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstabletpointeventsubtype?language=objc)
#[deprecated]
pub static NSTabletPointEventSubtype: NSEventSubtype =
    NSEventSubtype(NSEventSubtype::TabletPoint.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstabletproximityeventsubtype?language=objc)
#[deprecated]
pub static NSTabletProximityEventSubtype: NSEventSubtype =
    NSEventSubtype(NSEventSubtype::TabletProximity.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoucheventsubtype?language=objc)
#[deprecated]
pub static NSTouchEventSubtype: NSEventSubtype = NSEventSubtype(NSEventSubtype::Touch.0);

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspressurebehavior?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSPressureBehavior(pub NSInteger);
impl NSPressureBehavior {
    #[doc(alias = "NSPressureBehaviorUnknown")]
    pub const Unknown: Self = Self(-1);
    #[doc(alias = "NSPressureBehaviorPrimaryDefault")]
    pub const PrimaryDefault: Self = Self(0);
    #[doc(alias = "NSPressureBehaviorPrimaryClick")]
    pub const PrimaryClick: Self = Self(1);
    #[doc(alias = "NSPressureBehaviorPrimaryGeneric")]
    pub const PrimaryGeneric: Self = Self(2);
    #[doc(alias = "NSPressureBehaviorPrimaryAccelerator")]
    pub const PrimaryAccelerator: Self = Self(3);
    #[doc(alias = "NSPressureBehaviorPrimaryDeepClick")]
    pub const PrimaryDeepClick: Self = Self(5);
    #[doc(alias = "NSPressureBehaviorPrimaryDeepDrag")]
    pub const PrimaryDeepDrag: Self = Self(6);
}

unsafe impl Encode for NSPressureBehavior {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for NSPressureBehavior {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsevent?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSEvent;
);

extern_conformance!(
    unsafe impl NSCoding for NSEvent {}
);

extern_conformance!(
    unsafe impl NSCopying for NSEvent {}
);

unsafe impl CopyingHelper for NSEvent {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for NSEvent {}
);

impl NSEvent {
    extern_methods!(
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub fn r#type(&self) -> NSEventType;

        #[unsafe(method(modifierFlags))]
        #[unsafe(method_family = none)]
        pub fn modifierFlags(&self) -> NSEventModifierFlags;

        #[unsafe(method(timestamp))]
        #[unsafe(method_family = none)]
        pub fn timestamp(&self) -> NSTimeInterval;

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(window))]
        #[unsafe(method_family = none)]
        pub fn window(&self, mtm: MainThreadMarker) -> Option<Retained<NSWindow>>;

        #[unsafe(method(windowNumber))]
        #[unsafe(method_family = none)]
        pub fn windowNumber(&self) -> NSInteger;

        #[cfg(feature = "NSGraphicsContext")]
        #[deprecated = "This method always returns nil. If you need access to the current drawing context, use [NSGraphicsContext currentContext] inside of a draw operation."]
        #[unsafe(method(context))]
        #[unsafe(method_family = none)]
        pub fn context(&self) -> Option<Retained<NSGraphicsContext>>;

        #[unsafe(method(clickCount))]
        #[unsafe(method_family = none)]
        pub fn clickCount(&self) -> NSInteger;

        #[unsafe(method(buttonNumber))]
        #[unsafe(method_family = none)]
        pub fn buttonNumber(&self) -> NSInteger;

        #[unsafe(method(eventNumber))]
        #[unsafe(method_family = none)]
        pub fn eventNumber(&self) -> NSInteger;

        #[unsafe(method(pressure))]
        #[unsafe(method_family = none)]
        pub fn pressure(&self) -> c_float;

        #[unsafe(method(locationInWindow))]
        #[unsafe(method_family = none)]
        pub fn locationInWindow(&self) -> NSPoint;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(deltaX))]
        #[unsafe(method_family = none)]
        pub fn deltaX(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(deltaY))]
        #[unsafe(method_family = none)]
        pub fn deltaY(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(deltaZ))]
        #[unsafe(method_family = none)]
        pub fn deltaZ(&self) -> CGFloat;

        #[unsafe(method(hasPreciseScrollingDeltas))]
        #[unsafe(method_family = none)]
        pub fn hasPreciseScrollingDeltas(&self) -> bool;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(scrollingDeltaX))]
        #[unsafe(method_family = none)]
        pub fn scrollingDeltaX(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(scrollingDeltaY))]
        #[unsafe(method_family = none)]
        pub fn scrollingDeltaY(&self) -> CGFloat;

        #[unsafe(method(momentumPhase))]
        #[unsafe(method_family = none)]
        pub fn momentumPhase(&self) -> NSEventPhase;

        #[unsafe(method(isDirectionInvertedFromDevice))]
        #[unsafe(method_family = none)]
        pub fn isDirectionInvertedFromDevice(&self) -> bool;

        #[unsafe(method(characters))]
        #[unsafe(method_family = none)]
        pub fn characters(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(charactersIgnoringModifiers))]
        #[unsafe(method_family = none)]
        pub fn charactersIgnoringModifiers(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(charactersByApplyingModifiers:))]
        #[unsafe(method_family = none)]
        pub fn charactersByApplyingModifiers(
            &self,
            modifiers: NSEventModifierFlags,
        ) -> Option<Retained<NSString>>;

        #[unsafe(method(isARepeat))]
        #[unsafe(method_family = none)]
        pub fn isARepeat(&self) -> bool;

        #[unsafe(method(keyCode))]
        #[unsafe(method_family = none)]
        pub fn keyCode(&self) -> c_ushort;

        #[unsafe(method(trackingNumber))]
        #[unsafe(method_family = none)]
        pub fn trackingNumber(&self) -> NSInteger;

        #[unsafe(method(userData))]
        #[unsafe(method_family = none)]
        pub fn userData(&self) -> *mut c_void;

        #[cfg(feature = "NSTrackingArea")]
        #[unsafe(method(trackingArea))]
        #[unsafe(method_family = none)]
        pub fn trackingArea(&self) -> Option<Retained<NSTrackingArea>>;

        #[unsafe(method(subtype))]
        #[unsafe(method_family = none)]
        pub fn subtype(&self) -> NSEventSubtype;

        #[unsafe(method(data1))]
        #[unsafe(method_family = none)]
        pub fn data1(&self) -> NSInteger;

        #[unsafe(method(data2))]
        #[unsafe(method_family = none)]
        pub fn data2(&self) -> NSInteger;

        #[unsafe(method(eventRef))]
        #[unsafe(method_family = none)]
        pub fn eventRef(&self) -> *const c_void;

        /// # Safety
        ///
        /// `event_ref` must be a valid pointer.
        #[unsafe(method(eventWithEventRef:))]
        #[unsafe(method_family = none)]
        pub unsafe fn eventWithEventRef(event_ref: NonNull<c_void>) -> Option<Retained<NSEvent>>;

        #[cfg(feature = "objc2-core-graphics")]
        #[cfg(target_vendor = "apple")]
        #[unsafe(method(CGEvent))]
        #[unsafe(method_family = none)]
        pub fn CGEvent(&self) -> Option<Retained<CGEvent>>;

        #[cfg(feature = "objc2-core-graphics")]
        #[cfg(target_vendor = "apple")]
        #[unsafe(method(eventWithCGEvent:))]
        #[unsafe(method_family = none)]
        pub fn eventWithCGEvent(cg_event: &CGEvent) -> Option<Retained<NSEvent>>;

        #[unsafe(method(isMouseCoalescingEnabled))]
        #[unsafe(method_family = none)]
        pub fn isMouseCoalescingEnabled() -> bool;

        /// Setter for [`isMouseCoalescingEnabled`][Self::isMouseCoalescingEnabled].
        #[unsafe(method(setMouseCoalescingEnabled:))]
        #[unsafe(method_family = none)]
        pub fn setMouseCoalescingEnabled(mouse_coalescing_enabled: bool);

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(magnification))]
        #[unsafe(method_family = none)]
        pub fn magnification(&self) -> CGFloat;

        #[unsafe(method(deviceID))]
        #[unsafe(method_family = none)]
        pub fn deviceID(&self) -> NSUInteger;

        #[unsafe(method(rotation))]
        #[unsafe(method_family = none)]
        pub fn rotation(&self) -> c_float;

        #[unsafe(method(absoluteX))]
        #[unsafe(method_family = none)]
        pub fn absoluteX(&self) -> NSInteger;

        #[unsafe(method(absoluteY))]
        #[unsafe(method_family = none)]
        pub fn absoluteY(&self) -> NSInteger;

        #[unsafe(method(absoluteZ))]
        #[unsafe(method_family = none)]
        pub fn absoluteZ(&self) -> NSInteger;

        #[unsafe(method(buttonMask))]
        #[unsafe(method_family = none)]
        pub fn buttonMask(&self) -> NSEventButtonMask;

        #[unsafe(method(tilt))]
        #[unsafe(method_family = none)]
        pub fn tilt(&self) -> NSPoint;

        #[unsafe(method(tangentialPressure))]
        #[unsafe(method_family = none)]
        pub fn tangentialPressure(&self) -> c_float;

        #[unsafe(method(vendorDefined))]
        #[unsafe(method_family = none)]
        pub fn vendorDefined(&self) -> Retained<AnyObject>;

        #[unsafe(method(vendorID))]
        #[unsafe(method_family = none)]
        pub fn vendorID(&self) -> NSUInteger;

        #[unsafe(method(tabletID))]
        #[unsafe(method_family = none)]
        pub fn tabletID(&self) -> NSUInteger;

        #[unsafe(method(pointingDeviceID))]
        #[unsafe(method_family = none)]
        pub fn pointingDeviceID(&self) -> NSUInteger;

        #[unsafe(method(systemTabletID))]
        #[unsafe(method_family = none)]
        pub fn systemTabletID(&self) -> NSUInteger;

        #[unsafe(method(vendorPointingDeviceType))]
        #[unsafe(method_family = none)]
        pub fn vendorPointingDeviceType(&self) -> NSUInteger;

        #[unsafe(method(pointingDeviceSerialNumber))]
        #[unsafe(method_family = none)]
        pub fn pointingDeviceSerialNumber(&self) -> NSUInteger;

        #[unsafe(method(uniqueID))]
        #[unsafe(method_family = none)]
        pub fn uniqueID(&self) -> c_ulonglong;

        #[unsafe(method(capabilityMask))]
        #[unsafe(method_family = none)]
        pub fn capabilityMask(&self) -> NSUInteger;

        #[unsafe(method(pointingDeviceType))]
        #[unsafe(method_family = none)]
        pub fn pointingDeviceType(&self) -> NSPointingDeviceType;

        #[unsafe(method(isEnteringProximity))]
        #[unsafe(method_family = none)]
        pub fn isEnteringProximity(&self) -> bool;

        #[cfg(all(feature = "NSResponder", feature = "NSTouch", feature = "NSView"))]
        #[unsafe(method(touchesMatchingPhase:inView:))]
        #[unsafe(method_family = none)]
        pub fn touchesMatchingPhase_inView(
            &self,
            phase: NSTouchPhase,
            view: Option<&NSView>,
        ) -> Retained<NSSet<NSTouch>>;

        #[cfg(feature = "NSTouch")]
        #[unsafe(method(allTouches))]
        #[unsafe(method_family = none)]
        pub fn allTouches(&self) -> Retained<NSSet<NSTouch>>;

        #[cfg(all(feature = "NSResponder", feature = "NSTouch", feature = "NSView"))]
        #[unsafe(method(touchesForView:))]
        #[unsafe(method_family = none)]
        pub fn touchesForView(&self, view: &NSView) -> Retained<NSSet<NSTouch>>;

        #[cfg(feature = "NSTouch")]
        #[unsafe(method(coalescedTouchesForTouch:))]
        #[unsafe(method_family = none)]
        pub fn coalescedTouchesForTouch(&self, touch: &NSTouch) -> Retained<NSArray<NSTouch>>;

        #[unsafe(method(phase))]
        #[unsafe(method_family = none)]
        pub fn phase(&self) -> NSEventPhase;

        #[unsafe(method(stage))]
        #[unsafe(method_family = none)]
        pub fn stage(&self) -> NSInteger;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(stageTransition))]
        #[unsafe(method_family = none)]
        pub fn stageTransition(&self) -> CGFloat;

        #[unsafe(method(associatedEventsMask))]
        #[unsafe(method_family = none)]
        pub fn associatedEventsMask(&self) -> NSEventMask;

        #[unsafe(method(pressureBehavior))]
        #[unsafe(method_family = none)]
        pub fn pressureBehavior(&self) -> NSPressureBehavior;

        #[unsafe(method(isSwipeTrackingFromScrollEventsEnabled))]
        #[unsafe(method_family = none)]
        pub fn isSwipeTrackingFromScrollEventsEnabled() -> bool;

        #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
        #[unsafe(method(trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:))]
        #[unsafe(method_family = none)]
        pub fn trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler(
            &self,
            options: NSEventSwipeTrackingOptions,
            min_dampen_threshold: CGFloat,
            max_dampen_threshold: CGFloat,
            tracking_handler: &block2::DynBlock<dyn Fn(CGFloat, NSEventPhase, Bool, NonNull<Bool>)>,
        );

        #[unsafe(method(startPeriodicEventsAfterDelay:withPeriod:))]
        #[unsafe(method_family = none)]
        pub fn startPeriodicEventsAfterDelay_withPeriod(
            delay: NSTimeInterval,
            period: NSTimeInterval,
        );

        #[unsafe(method(stopPeriodicEvents))]
        #[unsafe(method_family = none)]
        pub fn stopPeriodicEvents();

        #[cfg(feature = "NSGraphicsContext")]
        #[unsafe(method(mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:))]
        #[unsafe(method_family = none)]
        pub fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure(
            r#type: NSEventType,
            location: NSPoint,
            flags: NSEventModifierFlags,
            time: NSTimeInterval,
            w_num: NSInteger,
            unused_pass_nil: Option<&NSGraphicsContext>,
            e_num: NSInteger,
            c_num: NSInteger,
            pressure: c_float,
        ) -> Option<Retained<NSEvent>>;

        #[cfg(feature = "NSGraphicsContext")]
        #[unsafe(method(keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:))]
        #[unsafe(method_family = none)]
        pub fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode(
            r#type: NSEventType,
            location: NSPoint,
            flags: NSEventModifierFlags,
            time: NSTimeInterval,
            w_num: NSInteger,
            unused_pass_nil: Option<&NSGraphicsContext>,
            keys: &NSString,
            ukeys: &NSString,
            flag: bool,
            code: c_ushort,
        ) -> Option<Retained<NSEvent>>;

        #[cfg(feature = "NSGraphicsContext")]
        /// # Safety
        ///
        /// `data` must be a valid pointer or null.
        #[unsafe(method(enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:))]
        #[unsafe(method_family = none)]
        pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData(
            r#type: NSEventType,
            location: NSPoint,
            flags: NSEventModifierFlags,
            time: NSTimeInterval,
            w_num: NSInteger,
            unused_pass_nil: Option<&NSGraphicsContext>,
            e_num: NSInteger,
            t_num: NSInteger,
            data: *mut c_void,
        ) -> Option<Retained<NSEvent>>;

        #[cfg(feature = "NSGraphicsContext")]
        #[unsafe(method(otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:))]
        #[unsafe(method_family = none)]
        pub fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2(
            r#type: NSEventType,
            location: NSPoint,
            flags: NSEventModifierFlags,
            time: NSTimeInterval,
            w_num: NSInteger,
            unused_pass_nil: Option<&NSGraphicsContext>,
            subtype: c_short,
            d1: NSInteger,
            d2: NSInteger,
        ) -> Option<Retained<NSEvent>>;

        #[unsafe(method(mouseLocation))]
        #[unsafe(method_family = none)]
        pub fn mouseLocation() -> NSPoint;

        #[unsafe(method(modifierFlags))]
        #[unsafe(method_family = none)]
        pub fn modifierFlags_class() -> NSEventModifierFlags;

        #[unsafe(method(pressedMouseButtons))]
        #[unsafe(method_family = none)]
        pub fn pressedMouseButtons() -> NSUInteger;

        #[unsafe(method(doubleClickInterval))]
        #[unsafe(method_family = none)]
        pub fn doubleClickInterval() -> NSTimeInterval;

        #[unsafe(method(keyRepeatDelay))]
        #[unsafe(method_family = none)]
        pub fn keyRepeatDelay() -> NSTimeInterval;

        #[unsafe(method(keyRepeatInterval))]
        #[unsafe(method_family = none)]
        pub fn keyRepeatInterval() -> NSTimeInterval;

        #[cfg(feature = "block2")]
        #[unsafe(method(addGlobalMonitorForEventsMatchingMask:handler:))]
        #[unsafe(method_family = none)]
        pub fn addGlobalMonitorForEventsMatchingMask_handler(
            mask: NSEventMask,
            block: &block2::DynBlock<dyn Fn(NonNull<NSEvent>)>,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "block2")]
        /// # Safety
        ///
        /// `block` block's return must be a valid pointer or null.
        #[unsafe(method(addLocalMonitorForEventsMatchingMask:handler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn addLocalMonitorForEventsMatchingMask_handler(
            mask: NSEventMask,
            block: &block2::DynBlock<dyn Fn(NonNull<NSEvent>) -> *mut NSEvent>,
        ) -> Option<Retained<AnyObject>>;

        /// # Safety
        ///
        /// `event_monitor` should be of the correct type.
        #[unsafe(method(removeMonitor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeMonitor(event_monitor: &AnyObject);
    );
}

/// Methods declared on superclass `NSObject`.
impl NSEvent {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

impl DefaultRetained for NSEvent {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsuparrowfunctionkey?language=objc)
pub const NSUpArrowFunctionKey: c_uint = 0xF700;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdownarrowfunctionkey?language=objc)
pub const NSDownArrowFunctionKey: c_uint = 0xF701;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsleftarrowfunctionkey?language=objc)
pub const NSLeftArrowFunctionKey: c_uint = 0xF702;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsrightarrowfunctionkey?language=objc)
pub const NSRightArrowFunctionKey: c_uint = 0xF703;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf1functionkey?language=objc)
pub const NSF1FunctionKey: c_uint = 0xF704;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf2functionkey?language=objc)
pub const NSF2FunctionKey: c_uint = 0xF705;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf3functionkey?language=objc)
pub const NSF3FunctionKey: c_uint = 0xF706;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf4functionkey?language=objc)
pub const NSF4FunctionKey: c_uint = 0xF707;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf5functionkey?language=objc)
pub const NSF5FunctionKey: c_uint = 0xF708;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf6functionkey?language=objc)
pub const NSF6FunctionKey: c_uint = 0xF709;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf7functionkey?language=objc)
pub const NSF7FunctionKey: c_uint = 0xF70A;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf8functionkey?language=objc)
pub const NSF8FunctionKey: c_uint = 0xF70B;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf9functionkey?language=objc)
pub const NSF9FunctionKey: c_uint = 0xF70C;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf10functionkey?language=objc)
pub const NSF10FunctionKey: c_uint = 0xF70D;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf11functionkey?language=objc)
pub const NSF11FunctionKey: c_uint = 0xF70E;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf12functionkey?language=objc)
pub const NSF12FunctionKey: c_uint = 0xF70F;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf13functionkey?language=objc)
pub const NSF13FunctionKey: c_uint = 0xF710;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf14functionkey?language=objc)
pub const NSF14FunctionKey: c_uint = 0xF711;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf15functionkey?language=objc)
pub const NSF15FunctionKey: c_uint = 0xF712;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf16functionkey?language=objc)
pub const NSF16FunctionKey: c_uint = 0xF713;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf17functionkey?language=objc)
pub const NSF17FunctionKey: c_uint = 0xF714;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf18functionkey?language=objc)
pub const NSF18FunctionKey: c_uint = 0xF715;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf19functionkey?language=objc)
pub const NSF19FunctionKey: c_uint = 0xF716;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf20functionkey?language=objc)
pub const NSF20FunctionKey: c_uint = 0xF717;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf21functionkey?language=objc)
pub const NSF21FunctionKey: c_uint = 0xF718;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf22functionkey?language=objc)
pub const NSF22FunctionKey: c_uint = 0xF719;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf23functionkey?language=objc)
pub const NSF23FunctionKey: c_uint = 0xF71A;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf24functionkey?language=objc)
pub const NSF24FunctionKey: c_uint = 0xF71B;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf25functionkey?language=objc)
pub const NSF25FunctionKey: c_uint = 0xF71C;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf26functionkey?language=objc)
pub const NSF26FunctionKey: c_uint = 0xF71D;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf27functionkey?language=objc)
pub const NSF27FunctionKey: c_uint = 0xF71E;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf28functionkey?language=objc)
pub const NSF28FunctionKey: c_uint = 0xF71F;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf29functionkey?language=objc)
pub const NSF29FunctionKey: c_uint = 0xF720;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf30functionkey?language=objc)
pub const NSF30FunctionKey: c_uint = 0xF721;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf31functionkey?language=objc)
pub const NSF31FunctionKey: c_uint = 0xF722;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf32functionkey?language=objc)
pub const NSF32FunctionKey: c_uint = 0xF723;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf33functionkey?language=objc)
pub const NSF33FunctionKey: c_uint = 0xF724;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf34functionkey?language=objc)
pub const NSF34FunctionKey: c_uint = 0xF725;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsf35functionkey?language=objc)
pub const NSF35FunctionKey: c_uint = 0xF726;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsinsertfunctionkey?language=objc)
pub const NSInsertFunctionKey: c_uint = 0xF727;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdeletefunctionkey?language=objc)
pub const NSDeleteFunctionKey: c_uint = 0xF728;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nshomefunctionkey?language=objc)
pub const NSHomeFunctionKey: c_uint = 0xF729;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbeginfunctionkey?language=objc)
pub const NSBeginFunctionKey: c_uint = 0xF72A;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsendfunctionkey?language=objc)
pub const NSEndFunctionKey: c_uint = 0xF72B;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspageupfunctionkey?language=objc)
pub const NSPageUpFunctionKey: c_uint = 0xF72C;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspagedownfunctionkey?language=objc)
pub const NSPageDownFunctionKey: c_uint = 0xF72D;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintscreenfunctionkey?language=objc)
pub const NSPrintScreenFunctionKey: c_uint = 0xF72E;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsscrolllockfunctionkey?language=objc)
pub const NSScrollLockFunctionKey: c_uint = 0xF72F;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nspausefunctionkey?language=objc)
pub const NSPauseFunctionKey: c_uint = 0xF730;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssysreqfunctionkey?language=objc)
pub const NSSysReqFunctionKey: c_uint = 0xF731;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsbreakfunctionkey?language=objc)
pub const NSBreakFunctionKey: c_uint = 0xF732;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsresetfunctionkey?language=objc)
pub const NSResetFunctionKey: c_uint = 0xF733;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsstopfunctionkey?language=objc)
pub const NSStopFunctionKey: c_uint = 0xF734;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmenufunctionkey?language=objc)
pub const NSMenuFunctionKey: c_uint = 0xF735;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsuserfunctionkey?language=objc)
pub const NSUserFunctionKey: c_uint = 0xF736;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssystemfunctionkey?language=objc)
pub const NSSystemFunctionKey: c_uint = 0xF737;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprintfunctionkey?language=objc)
pub const NSPrintFunctionKey: c_uint = 0xF738;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsclearlinefunctionkey?language=objc)
pub const NSClearLineFunctionKey: c_uint = 0xF739;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscleardisplayfunctionkey?language=objc)
pub const NSClearDisplayFunctionKey: c_uint = 0xF73A;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsinsertlinefunctionkey?language=objc)
pub const NSInsertLineFunctionKey: c_uint = 0xF73B;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdeletelinefunctionkey?language=objc)
pub const NSDeleteLineFunctionKey: c_uint = 0xF73C;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsinsertcharfunctionkey?language=objc)
pub const NSInsertCharFunctionKey: c_uint = 0xF73D;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdeletecharfunctionkey?language=objc)
pub const NSDeleteCharFunctionKey: c_uint = 0xF73E;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsprevfunctionkey?language=objc)
pub const NSPrevFunctionKey: c_uint = 0xF73F;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnextfunctionkey?language=objc)
pub const NSNextFunctionKey: c_uint = 0xF740;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsselectfunctionkey?language=objc)
pub const NSSelectFunctionKey: c_uint = 0xF741;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsexecutefunctionkey?language=objc)
pub const NSExecuteFunctionKey: c_uint = 0xF742;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsundofunctionkey?language=objc)
pub const NSUndoFunctionKey: c_uint = 0xF743;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsredofunctionkey?language=objc)
pub const NSRedoFunctionKey: c_uint = 0xF744;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfindfunctionkey?language=objc)
pub const NSFindFunctionKey: c_uint = 0xF745;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nshelpfunctionkey?language=objc)
pub const NSHelpFunctionKey: c_uint = 0xF746;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsmodeswitchfunctionkey?language=objc)
pub const NSModeSwitchFunctionKey: c_uint = 0xF747;