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
/// Objective-C class name for `NSApplication`.
pub const OBJC_CLS_NS_APPLICATION: &str = "NSApplication\0";
/// Objective-C class name for `NSWindow`.
pub const OBJC_CLS_NS_WINDOW: &str = "NSWindow\0";
/// Objective-C class name for `NSScreen`.
pub const OBJC_CLS_NS_SCREEN: &str = "NSScreen\0";
/// Objective-C class name for `NSString`.
pub const OBJC_CLS_NS_STRING: &str = "NSString\0";
/// Objective-C class name for `CAMetalLayer`.
pub const OBJC_CLS_CA_METAL_LAYER: &str = "CAMetalLayer\0";
/// Objective-C class name for `NSCursor`.
pub const OBJC_CLS_NS_CURSOR: &str = "NSCursor\0";
/// Objective-C class name for `NSPasteboard`.
pub const OBJC_CLS_NS_PASTEBOARD: &str = "NSPasteboard\0";
/// Objective-C class name for `NSProcessInfo`.
pub const OBJC_CLS_NS_PROCESS_INFO: &str = "NSProcessInfo\0";
/// Objective-C class name for `NSDate`.
pub const OBJC_CLS_NS_DATE: &str = "NSDate\0";
/// Objective-C class name for `NSColor`.
pub const OBJC_CLS_NS_COLOR: &str = "NSColor\0";
/// Objective-C selector for `colorWithSRGBRed:green:blue:alpha:` on `NSColor`.
pub const OBJC_SEL_COLOR_WITH_SRGB: &str = "colorWithSRGBRed:green:blue:alpha:\0";
/// Objective-C selector for `setBackgroundColor:` on `NSWindow`.
pub const OBJC_SEL_SET_BACKGROUND_COLOR: &str = "setBackgroundColor:\0";
/// Objective-C selector for `distantFuture` on `NSDate`.
pub const OBJC_SEL_DISTANT_FUTURE: &str = "distantFuture\0";
/// Objective-C selector for `isHidden` on `NSApplication`.
pub const OBJC_SEL_IS_HIDDEN: &str = "isHidden\0";
/// Objective-C selector for `processInfo` on `NSProcessInfo`.
pub const OBJC_SEL_PROCESS_INFO: &str = "processInfo\0";
/// Objective-C selector for `isLowPowerModeEnabled` on `NSProcessInfo`.
pub const OBJC_SEL_IS_LOW_POWER_MODE: &str = "isLowPowerModeEnabled\0";
/// Objective-C selector for `isActive` on `NSApplication`.
pub const OBJC_SEL_IS_ACTIVE: &str = "isActive\0";
/// Objective-C selector for `isKeyWindow` on `NSWindow`.
pub const OBJC_SEL_IS_KEY_WINDOW: &str = "isKeyWindow\0";
/// Objective-C selector for `isMiniaturized` on `NSWindow`.
pub const OBJC_SEL_IS_MINIATURIZED: &str = "isMiniaturized\0";
/// Objective-C selector for `changeCount` on `NSPasteboard`.
pub const OBJC_SEL_CHANGE_COUNT: &str = "changeCount\0";
/// Objective-C selector for `generalPasteboard` on `NSPasteboard`.
pub const OBJC_SEL_GENERAL_PASTEBOARD: &str = "generalPasteboard\0";
/// Objective-C selector for `clearContents` on `NSPasteboard`.
pub const OBJC_SEL_CLEAR_CONTENTS: &str = "clearContents\0";
/// Objective-C selector for `setString:forType:` on `NSPasteboard`.
pub const OBJC_SEL_SET_STRING_FOR_TYPE: &str = "setString:forType:\0";
/// UTI string identifier for UTF-8 plain text on macOS `NSPasteboard`.
pub const MACOS_PASTEBOARD_TYPE_UTF8: &str = "public.utf8-plain-text";
/// Objective-C selector for `arrowCursor`.
pub const OBJC_SEL_ARROW_CURSOR: &str = "arrowCursor\0";
/// Objective-C selector for `pointingHandCursor`.
pub const OBJC_SEL_POINTING_HAND_CURSOR: &str = "pointingHandCursor\0";
/// Objective-C selector for `IBeamCursor`.
pub const OBJC_SEL_IBEAM_CURSOR: &str = "IBeamCursor\0";
/// Objective-C selector for `openHandCursor`.
pub const OBJC_SEL_OPEN_HAND_CURSOR: &str = "openHandCursor\0";
/// Objective-C selector for `closedHandCursor`.
pub const OBJC_SEL_CLOSED_HAND_CURSOR: &str = "closedHandCursor\0";
/// Objective-C selector for `operationNotAllowedCursor`.
pub const OBJC_SEL_NOT_ALLOWED_CURSOR: &str = "operationNotAllowedCursor\0";
/// Objective-C selector for `set` on `NSCursor`.
pub const OBJC_SEL_SET_CURSOR: &str = "set\0";
/// Objective-C selector for `hasPreciseScrollingDeltas` on `NSEvent`.
pub const OBJC_SEL_HAS_PRECISE_SCROLL: &str = "hasPreciseScrollingDeltas\0";
/// Objective-C selector for `sharedApplication`.
pub const OBJC_SEL_SHARED_APP: &str = "sharedApplication\0";
/// Objective-C selector for `mainScreen`.
pub const OBJC_SEL_MAIN_SCREEN: &str = "mainScreen\0";
/// Objective-C selector for `screen` on `NSWindow`.
pub const OBJC_SEL_SCREEN: &str = "screen\0";
/// Objective-C selector for `maximumFramesPerSecond` on `NSScreen`.
pub const OBJC_SEL_MAX_FPS: &str = "maximumFramesPerSecond\0";
/// Objective-C selector for `backingScaleFactor`.
pub const OBJC_SEL_BACKING_SCALE: &str = "backingScaleFactor\0";
/// Objective-C selector for `effectiveAppearance`.
pub const OBJC_SEL_EFFECTIVE_APPEARANCE: &str = "effectiveAppearance\0";
/// Objective-C selector for `name`.
pub const OBJC_SEL_NAME: &str = "name\0";
/// Objective-C selector for `UTF8String`.
pub const OBJC_SEL_UTF8_STRING: &str = "UTF8String\0";
/// Objective-C selector for `alloc`.
pub const OBJC_SEL_ALLOC: &str = "alloc\0";
/// Objective-C selector for `initWithContentRect:styleMask:backing:defer:`.
pub const OBJC_SEL_INIT_WINDOW: &str = "initWithContentRect:styleMask:backing:defer:\0";
/// Objective-C selector for `setTitle:`.
pub const OBJC_SEL_SET_TITLE: &str = "setTitle:\0";
/// Objective-C selector for `stringWithUTF8String:`.
pub const OBJC_SEL_STRING_WITH_UTF8: &str = "stringWithUTF8String:\0";
/// Objective-C selector for `contentView`.
pub const OBJC_SEL_CONTENT_VIEW: &str = "contentView\0";
/// Objective-C selector for `setWantsLayer:`.
pub const OBJC_SEL_SET_WANTS_LAYER: &str = "setWantsLayer:\0";
/// Objective-C selector for `setLayer:`.
pub const OBJC_SEL_SET_LAYER: &str = "setLayer:\0";
/// Objective-C selector for `layer`.
pub const OBJC_SEL_LAYER: &str = "layer\0";
/// Objective-C selector for `makeKeyAndOrderFront:`.
pub const OBJC_SEL_MAKE_KEY_FRONT: &str = "makeKeyAndOrderFront:\0";
/// Objective-C selector for `orderOut:`.
pub const OBJC_SEL_ORDER_OUT: &str = "orderOut:\0";
/// Objective-C selector for `close`.
pub const OBJC_SEL_CLOSE: &str = "close\0";
/// Objective-C selector for `setLevel:`.
pub const OBJC_SEL_SET_LEVEL: &str = "setLevel:\0";
/// Objective-C selector for `setContentSize:`.
pub const OBJC_SEL_SET_CONTENT_SIZE: &str = "setContentSize:\0";
/// Objective-C selector for `setStyleMask:`.
pub const OBJC_SEL_SET_STYLE_MASK: &str = "setStyleMask:\0";
/// Objective-C selector for `toggleFullScreen:`.
pub const OBJC_SEL_TOGGLE_FULLSCREEN: &str = "toggleFullScreen:\0";
/// Objective-C selector for `setContents:`.
pub const OBJC_SEL_SET_CONTENTS: &str = "setContents:\0";
/// Objective-C selector for `setContentsScale:`.
pub const OBJC_SEL_SET_CONTENTS_SCALE: &str = "setContentsScale:\0";
/// Objective-C selector for `setFramebufferOnly:` on `CAMetalLayer`.
pub const OBJC_SEL_SET_FRAMEBUFFER_ONLY: &str = "setFramebufferOnly:\0";
/// Objective-C selector for `setMaximumDrawableCount:` on `CAMetalLayer`.
pub const OBJC_SEL_SET_MAX_DRAWABLE_COUNT: &str = "setMaximumDrawableCount:\0";
/// Objective-C selector for `setDisplaySyncEnabled:` on `CAMetalLayer`.
pub const OBJC_SEL_SET_DISPLAY_SYNC_ENABLED: &str = "setDisplaySyncEnabled:\0";
/// Objective-C selector for `setActivationPolicy:`.
pub const OBJC_SEL_SET_ACTIVATION_POLICY: &str = "setActivationPolicy:\0";
/// Objective-C selector for `finishLaunching`.
pub const OBJC_SEL_FINISH_LAUNCHING: &str = "finishLaunching\0";
/// Objective-C selector for `activateIgnoringOtherApps:`.
pub const OBJC_SEL_ACTIVATE_IGNORING: &str = "activateIgnoringOtherApps:\0";
/// Objective-C selector for `center`.
pub const OBJC_SEL_CENTER: &str = "center\0";
/// Objective-C selector for `updateWindows`.
pub const OBJC_SEL_UPDATE_WINDOWS: &str = "updateWindows\0";
/// Objective-C selector for `nextEventMatchingMask:untilDate:inMode:dequeue:`.
pub const OBJC_SEL_NEXT_EVENT: &str = "nextEventMatchingMask:untilDate:inMode:dequeue:\0";
/// Objective-C selector for `sendEvent:`.
pub const OBJC_SEL_SEND_EVENT: &str = "sendEvent:\0";
/// Objective-C selector for `isVisible`.
pub const OBJC_SEL_IS_VISIBLE: &str = "isVisible\0";
/// Objective-C selector for `setAcceptsMouseMovedEvents:`.
pub const OBJC_SEL_SET_ACCEPTS_MOUSE_MOVED: &str = "setAcceptsMouseMovedEvents:\0";
/// Objective-C selector for `type`.
pub const OBJC_SEL_TYPE: &str = "type\0";
/// Objective-C selector for `window`.
pub const OBJC_SEL_WINDOW: &str = "window\0";
/// Objective-C selector for `locationInWindow`.
pub const OBJC_SEL_LOCATION_IN_WINDOW: &str = "locationInWindow\0";
/// Objective-C selector for `scrollingDeltaX`.
pub const OBJC_SEL_SCROLLING_DELTA_X: &str = "scrollingDeltaX\0";
/// Objective-C selector for `scrollingDeltaY`.
pub const OBJC_SEL_SCROLLING_DELTA_Y: &str = "scrollingDeltaY\0";
/// Objective-C selector for `keyCode`.
pub const OBJC_SEL_KEY_CODE: &str = "keyCode\0";
/// Objective-C selector for `modifierFlags`.
pub const OBJC_SEL_MODIFIER_FLAGS: &str = "modifierFlags\0";
/// Objective-C selector for `characters`.
pub const OBJC_SEL_CHARACTERS: &str = "characters\0";
/// Objective-C selector for `charactersIgnoringModifiers`.
pub const OBJC_SEL_CHARS_IGNORING_MODS: &str = "charactersIgnoringModifiers\0";
/// Objective-C selector for `setTitlebarAppearsTransparent:`.
pub const OBJC_SEL_SET_TITLEBAR_TRANSPARENT: &str = "setTitlebarAppearsTransparent:\0";
/// Objective-C selector for `setTitleVisibility:`.
pub const OBJC_SEL_SET_TITLE_VISIBILITY: &str = "setTitleVisibility:\0";
/// Objective-C selector for `bounds`.
pub const OBJC_SEL_BOUNDS: &str = "bounds\0";
/// AppKit `NSEventTypeLeftMouseDown` constant.
pub const NS_EVENT_LEFT_MOUSE_DOWN: usize = 1;
/// AppKit `NSEventTypeLeftMouseUp` constant.
pub const NS_EVENT_LEFT_MOUSE_UP: usize = 2;
/// AppKit `NSEventTypeRightMouseDown` constant.
pub const NS_EVENT_RIGHT_MOUSE_DOWN: usize = 3;
/// AppKit `NSEventTypeRightMouseUp` constant.
pub const NS_EVENT_RIGHT_MOUSE_UP: usize = 4;
/// AppKit `NSEventTypeMouseMoved` constant.
pub const NS_EVENT_MOUSE_MOVED: usize = 5;
/// AppKit `NSEventTypeLeftMouseDragged` constant.
pub const NS_EVENT_LEFT_MOUSE_DRAGGED: usize = 6;
/// AppKit `NSEventTypeKeyDown` constant.
pub const NS_EVENT_KEY_DOWN: usize = 10;
/// AppKit `NSEventTypeKeyUp` constant.
pub const NS_EVENT_KEY_UP: usize = 11;
/// AppKit `NSEventTypeScrollWheel` constant.
pub const NS_EVENT_SCROLL_WHEEL: usize = 22;
/// AppKit `NSEventModifierFlagShift` bit.
pub const NS_MOD_SHIFT: usize = 1 << 17;
/// AppKit `NSEventModifierFlagControl` bit.
pub const NS_MOD_CTRL: usize = 1 << 18;
/// AppKit `NSEventModifierFlagOption` bit.
pub const NS_MOD_ALT: usize = 1 << 19;
/// AppKit `NSEventModifierFlagCommand` bit.
pub const NS_MOD_CMD: usize = 1 << 20;
/// Objective-C default RunLoop mode name.
pub const NS_DEFAULT_RUN_LOOP_MODE: &str = "kCFRunLoopDefaultMode";
/// AppKit event mask matching any event (`NSEventMaskAny`).
pub const NS_EVENT_MASK_ANY: usize = usizeMAX;
/// Objective-C dark appearance name substring.
pub const MACOS_DARK_APPEARANCE_MARKER: &str = "Dark";
/// AppKit style mask bit for titled window.
pub const NS_WINDOW_STYLE_TITLED: usize = 1 << 0;
/// AppKit style mask bit for closable window.
pub const NS_WINDOW_STYLE_CLOSABLE: usize = 1 << 1;
/// AppKit style mask bit for miniaturizable window.
pub const NS_WINDOW_STYLE_MINIATURIZABLE: usize = 1 << 2;
/// AppKit style mask bit for resizable window.
pub const NS_WINDOW_STYLE_RESIZABLE: usize = 1 << 3;
/// AppKit style mask bit for immersive full-size content view behind transparent titlebar.
pub const NS_WINDOW_STYLE_FULL_SIZE_CONTENT: usize = 1 << 15;
/// AppKit style mask for borderless window.
pub const NS_WINDOW_STYLE_BORDERLESS: usize = 0;
/// AppKit buffered backing store constant (`NSBackingStoreBuffered = 2`).
pub const NS_BACKING_STORE_BUFFERED: usize = 2;
/// AppKit floating window level (`NSFloatingWindowLevel = 3`).
pub const NS_FLOATING_WINDOW_LEVEL: isize = 3;
/// AppKit normal window level (`NSNormalWindowLevel = 0`).
pub const NS_NORMAL_WINDOW_LEVEL: isize = 0;
/// CoreGraphics bitmap info flags for RGBA8 straight-alpha (`kCGBitmapByteOrder32Big | kCGImageAlphaLast`).
pub const CG_BITMAP_INFO_RGBA8: u32 = | 3;
/// Triple-buffered `CAMetalLayer.maximumDrawableCount` preventing CPU/GPU swapchain stalls.
pub const MACOS_METAL_MAX_DRAWABLE_COUNT: usize = 3;
/// Minimum interval in milliseconds between slow system metadata polls (pasteboard, theme, low-power).
pub const MACOS_SYSTEM_POLL_INTERVAL_MS: u64 = 250;
/// Error message when `objc_getClass` fails to resolve AppKit class.
pub const ERR_MACOS_APPKIT_MISSING: &str = "AppKit class resolution failed";