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
/// Canonical HarmonyOS `module.json5` deviceType string for smartphones.
pub const HARMONY_DEVICE_PHONE: &str = "phone";
/// Canonical HarmonyOS `module.json5` deviceType string for tablets.
pub const HARMONY_DEVICE_TABLET: &str = "tablet";
/// Canonical HarmonyOS `module.json5` deviceType string for PCs / 2-in-1 laptops.
pub const HARMONY_DEVICE_PC_2IN1: &str = "2in1";
/// Canonical HarmonyOS device identifier for foldable displays.
pub const HARMONY_DEVICE_FOLDABLE: &str = "foldable";
/// Canonical HarmonyOS `module.json5` deviceType string for smartwatches/wearables.
pub const HARMONY_DEVICE_WATCH: &str = "wearable";
/// Canonical HarmonyOS `module.json5` deviceType string for Smart TV / Vision displays.
pub const HARMONY_DEVICE_TV: &str = "tv";
/// Canonical HarmonyOS `module.json5` deviceType string for Automotive / Cockpit displays.
pub const HARMONY_DEVICE_AUTOMOTIVE: &str = "car";
/// HarmonyOS ArkUI NDK shared library name exporting `OH_NativeXComponent_*` symbols.
pub const HARMONY_LIB_ACE_NDK: &str = "libace_ndk.z.so";
/// OpenHarmony native window shared library name exporting `OH_NativeWindow_*` symbols.
pub const HARMONY_LIB_NATIVE_WINDOW: &str = "libnative_window.so";
/// OpenHarmony NAPI runtime library name exporting `napi_*` symbols.
pub const HARMONY_LIB_ACE_NAPI: &str = "libace_napi.z.so";
/// OpenHarmony native VSync shared library name exporting `OH_NativeVSync_*` symbols.
pub const HARMONY_LIB_NATIVE_VSYNC: &str = "libnative_vsync.so";
/// OpenHarmony `OH_NativeXComponent` touch down type constant (`OH_NATIVEXCOMPONENT_DOWN`).
pub const HARMONY_TOUCH_DOWN: i32 = 0;
/// OpenHarmony `OH_NativeXComponent` touch up type constant (`OH_NATIVEXCOMPONENT_UP`).
pub const HARMONY_TOUCH_UP: i32 = 1;
/// OpenHarmony `OH_NativeXComponent` touch move type constant (`OH_NATIVEXCOMPONENT_MOVE`).
pub const HARMONY_TOUCH_MOVE: i32 = 2;
/// OpenHarmony `OH_NativeXComponent` touch cancel type constant (`OH_NATIVEXCOMPONENT_CANCEL`).
pub const HARMONY_TOUCH_CANCEL: i32 = 3;
/// OpenHarmony `OHNativeWindow` `SET_BUFFER_GEOMETRY` handle option code.
pub const HARMONY_NW_OPT_SET_BUFFER_GEOMETRY: i32 = 0;
/// OpenHarmony `OHNativeWindow` `GET_BUFFER_GEOMETRY` handle option code.
pub const HARMONY_NW_OPT_GET_BUFFER_GEOMETRY: i32 = 1;
/// OpenHarmony `OHNativeWindow` `SET_FORMAT` handle option code (`PIXEL_FMT_RGBA_8888 = 12`).
pub const HARMONY_NW_OPT_SET_FORMAT: i32 = 3;
/// OpenHarmony `PIXEL_FMT_RGBA_8888` native buffer pixel format code.
pub const HARMONY_PIXEL_FMT_RGBA_8888: i32 = 12;
/// OpenHarmony `OH_NativeXComponent` key code for system Back (`KEYCODE_BACK`).
pub const HARMONY_KEYCODE_BACK: i32 = 2;
/// OpenHarmony `OH_NativeXComponent` key code for D-pad Up (`KEYCODE_DPAD_UP`).
pub const HARMONY_KEYCODE_DPAD_UP: i32 = 2012;
/// OpenHarmony `OH_NativeXComponent` key code for D-pad Down (`KEYCODE_DPAD_DOWN`).
pub const HARMONY_KEYCODE_DPAD_DOWN: i32 = 2013;
/// OpenHarmony `OH_NativeXComponent` key code for D-pad Left (`KEYCODE_DPAD_LEFT`).
pub const HARMONY_KEYCODE_DPAD_LEFT: i32 = 2014;
/// OpenHarmony `OH_NativeXComponent` key code for D-pad Right (`KEYCODE_DPAD_RIGHT`).
pub const HARMONY_KEYCODE_DPAD_RIGHT: i32 = 2015;
/// OpenHarmony `OH_NativeXComponent` key code for D-pad Center / OK (`KEYCODE_DPAD_CENTER`).
pub const HARMONY_KEYCODE_DPAD_CENTER: i32 = 2016;
/// OpenHarmony `OH_NativeXComponent` key code for Tab (`KEYCODE_TAB`).
pub const HARMONY_KEYCODE_TAB: i32 = 2049;
/// OpenHarmony `OH_NativeXComponent` key code for Space (`KEYCODE_SPACE`).
pub const HARMONY_KEYCODE_SPACE: i32 = 2050;
/// OpenHarmony `OH_NativeXComponent` key code for Enter (`KEYCODE_ENTER`).
pub const HARMONY_KEYCODE_ENTER: i32 = 2054;
/// OpenHarmony `OH_NativeXComponent` key code for Backspace (`KEYCODE_DEL`).
pub const HARMONY_KEYCODE_DEL: i32 = 2055;
/// OpenHarmony `OH_NativeXComponent` key code for Forward Delete (`KEYCODE_FORWARD_DEL`).
pub const HARMONY_KEYCODE_FORWARD_DEL: i32 = 2071;
/// OpenHarmony `OH_NativeXComponent` key code for Escape (`KEYCODE_ESCAPE`).
pub const HARMONY_KEYCODE_ESCAPE: i32 = 2070;
/// OpenHarmony `AbilityConstant.MemoryLevel.MEMORY_LEVEL_MODERATE`.
pub const HARMONY_MEMORY_MODERATE: i32 = 0;
/// OpenHarmony `AbilityConstant.MemoryLevel.MEMORY_LEVEL_LOW`.
pub const HARMONY_MEMORY_LOW: i32 = 1;
/// OpenHarmony `AbilityConstant.MemoryLevel.MEMORY_LEVEL_CRITICAL`.
pub const HARMONY_MEMORY_CRITICAL: i32 = 2;
/// OpenHarmony `OH_NativeXComponent` mouse press action (`OH_NATIVEXCOMPONENT_MOUSE_PRESS`).
pub const HARMONY_MOUSE_PRESS: i32 = 1;
/// OpenHarmony `OH_NativeXComponent` mouse release action (`OH_NATIVEXCOMPONENT_MOUSE_RELEASE`).
pub const HARMONY_MOUSE_RELEASE: i32 = 2;
/// OpenHarmony `OH_NativeXComponent` mouse move action (`OH_NATIVEXCOMPONENT_MOUSE_MOVE`).
pub const HARMONY_MOUSE_MOVE: i32 = 3;
/// OpenHarmony `OH_NativeXComponent` mouse cancel action (`OH_NATIVEXCOMPONENT_MOUSE_CANCEL`).
pub const HARMONY_MOUSE_CANCEL: i32 = 4;
/// OpenHarmony `OH_NativeXComponent` primary left mouse button (`OH_NATIVEXCOMPONENT_LEFT_BUTTON`).
pub const HARMONY_MOUSE_BUTTON_LEFT: i32 = 1;
/// OpenHarmony `OH_NativeXComponent` secondary right mouse button (`OH_NATIVEXCOMPONENT_RIGHT_BUTTON`).
pub const HARMONY_MOUSE_BUTTON_RIGHT: i32 = 2;
/// OpenHarmony `OH_NativeXComponent` middle scroll-wheel mouse button (`OH_NATIVEXCOMPONENT_MIDDLE_BUTTON`).
pub const HARMONY_MOUSE_BUTTON_MIDDLE: i32 = 4;
/// OpenHarmony `OH_NativeXComponent` first numeric digit key code (`KEY_0`).
pub const HARMONY_KEYCODE_0: i32 = 2000;
/// OpenHarmony `OH_NativeXComponent` last numeric digit key code (`KEY_9`).
pub const HARMONY_KEYCODE_9: i32 = 2009;
/// OpenHarmony `OH_NativeXComponent` first Latin letter key code (`KEY_A`).
pub const HARMONY_KEYCODE_A: i32 = 2017;
/// OpenHarmony `OH_NativeXComponent` last Latin letter key code (`KEY_Z`).
pub const HARMONY_KEYCODE_Z: i32 = 2042;
/// OpenHarmony `OH_NativeXComponent` left Alt key code (`KEY_ALT_LEFT`).
pub const HARMONY_KEYCODE_ALT_LEFT: i32 = 2045;
/// OpenHarmony `OH_NativeXComponent` right Alt key code (`KEY_ALT_RIGHT`).
pub const HARMONY_KEYCODE_ALT_RIGHT: i32 = 2046;
/// OpenHarmony `OH_NativeXComponent` left Shift key code (`KEY_SHIFT_LEFT`).
pub const HARMONY_KEYCODE_SHIFT_LEFT: i32 = 2047;
/// OpenHarmony `OH_NativeXComponent` right Shift key code (`KEY_SHIFT_RIGHT`).
pub const HARMONY_KEYCODE_SHIFT_RIGHT: i32 = 2048;
/// OpenHarmony `OH_NativeXComponent` Page Up key code (`KEY_PAGE_UP`).
pub const HARMONY_KEYCODE_PAGE_UP: i32 = 2068;
/// OpenHarmony `OH_NativeXComponent` Page Down key code (`KEY_PAGE_DOWN`).
pub const HARMONY_KEYCODE_PAGE_DOWN: i32 = 2069;
/// OpenHarmony `OH_NativeXComponent` left Control key code (`KEY_CTRL_LEFT`).
pub const HARMONY_KEYCODE_CTRL_LEFT: i32 = 2072;
/// OpenHarmony `OH_NativeXComponent` right Control key code (`KEY_CTRL_RIGHT`).
pub const HARMONY_KEYCODE_CTRL_RIGHT: i32 = 2073;
/// OpenHarmony `OH_NativeXComponent` left Meta/Super key code (`KEY_META_LEFT`).
pub const HARMONY_KEYCODE_META_LEFT: i32 = 2076;
/// OpenHarmony `OH_NativeXComponent` right Meta/Super key code (`KEY_META_RIGHT`).
pub const HARMONY_KEYCODE_META_RIGHT: i32 = 2077;
/// OpenHarmony `OH_NativeXComponent` Home key code (`KEY_MOVE_HOME`).
pub const HARMONY_KEYCODE_MOVE_HOME: i32 = 2081;
/// OpenHarmony `OH_NativeXComponent` End key code (`KEY_MOVE_END`).
pub const HARMONY_KEYCODE_MOVE_END: i32 = 2082;
/// OpenHarmony `@ohos.multimodalInput.pointer` default arrow pointer style ID.
pub const HARMONY_POINTER_STYLE_DEFAULT: i32 = 0;
/// OpenHarmony `@ohos.multimodalInput.pointer` hand pointing link pointer style ID.
pub const HARMONY_POINTER_STYLE_HAND_POINTING: i32 = 6;
/// OpenHarmony `@ohos.multimodalInput.pointer` text I-beam cursor style ID.
pub const HARMONY_POINTER_STYLE_TEXT_CURSOR: i32 = 10;
/// OpenHarmony `@ohos.multimodalInput.pointer` vertical resize pointer style ID.
pub const HARMONY_POINTER_STYLE_NORTH_SOUTH: i32 = 11;
/// OpenHarmony `@ohos.multimodalInput.pointer` horizontal resize pointer style ID.
pub const HARMONY_POINTER_STYLE_WEST_EAST: i32 = 12;
/// OpenHarmony `@ohos.multimodalInput.pointer` crosshair precision pointer style ID.
pub const HARMONY_POINTER_STYLE_CROSSHAIR: i32 = 18;
/// OpenHarmony `@ohos.multimodalInput.pointer` move/drag pointer style ID.
pub const HARMONY_POINTER_STYLE_MOVE: i32 = 22;
/// OpenHarmony `@ohos.multimodalInput.pointer` forbidden/not-allowed pointer style ID.
pub const HARMONY_POINTER_STYLE_FORBIDDEN: i32 = 25;
/// OpenHarmony `@ohos.multimodalInput.pointer` open-hand grab pointer style ID.
pub const HARMONY_POINTER_STYLE_HAND_OPEN: i32 = 26;
/// OpenHarmony `@ohos.multimodalInput.pointer` closed-hand grabbing pointer style ID.
pub const HARMONY_POINTER_STYLE_HAND_GRABBING: i32 = 27;
/// Alias accepted by `HarmonyDeviceType::from_str_id` for HarmonyOS PC / 2-in-1 desktops.
pub const HARMONY_ALIAS_PC: &str = "pc";
/// Alias accepted by `HarmonyDeviceType::from_str_id` for HarmonyOS PC desktop builds.
pub const HARMONY_ALIAS_HARMONY_PC: &str = "harmony-pc";
/// Alias accepted by `HarmonyDeviceType::from_str_id` for desktop form factor.
pub const HARMONY_ALIAS_DESKTOP: &str = "desktop";
/// Alias accepted by `HarmonyDeviceType::from_str_id` for smartwatch devices.
pub const HARMONY_ALIAS_WATCH: &str = "watch";
/// Alias accepted by `HarmonyDeviceType::from_str_id` for Smart TV / Vision displays.
pub const HARMONY_ALIAS_VISION: &str = "vision";
/// Alias accepted by `HarmonyDeviceType::from_str_id` for automotive cockpit targets.
pub const HARMONY_ALIAS_AUTOMOTIVE: &str = "automotive";
/// Native action key emitted when HarmonyOS PC/Tablet window title changes.
pub const HARMONY_ACTION_WINDOW_TITLE: &str = "harmony_window_title";
/// Native action key emitted when HarmonyOS PC cursor pointer style changes.
pub const HARMONY_ACTION_CURSOR: &str = "harmony_cursor";
/// Native action key emitted when HarmonyOS PC/Tablet window mode changes.
pub const HARMONY_ACTION_WINDOW_MODE: &str = "harmony_window_mode";
/// Native action key emitted when HarmonyOS PC window decorations toggle.
pub const HARMONY_ACTION_DECORATIONS: &str = "harmony_decorations";
/// Native action key emitted when HarmonyOS PC window always-on-top toggles.
pub const HARMONY_ACTION_ALWAYS_ON_TOP: &str = "harmony_always_on_top";
/// Native action key emitted when HarmonyOS IME visibility toggles.
pub const HARMONY_ACTION_IME: &str = "ime";
/// Native action argument enabling an ArkTS host feature.
pub const HARMONY_ACTION_ARG_SHOW: &str = "show";
/// Native action argument disabling an ArkTS host feature.
pub const HARMONY_ACTION_ARG_HIDE: &str = "hide";
/// Native action argument indicating boolean true state.
pub const HARMONY_ACTION_ARG_ON: &str = "on";
/// Native action argument indicating boolean false state.
pub const HARMONY_ACTION_ARG_OFF: &str = "off";
/// Default HarmonyOS phone top status bar inset in logical vp.
pub const HARMONY_PHONE_SAFE_TOP_VP: f32 = 38.0;
/// Default HarmonyOS phone bottom navigation indicator inset in logical vp.
pub const HARMONY_PHONE_SAFE_BOTTOM_VP: f32 = 28.0;
/// Default HarmonyOS TV overscan safe margin in logical vp.
pub const HARMONY_TV_OVERSCAN_VP: f32 = 24.0;
/// Default HarmonyOS automotive status/dock safe inset in logical vp.
pub const HARMONY_CAR_DOCK_VP: f32 = 44.0;
/// Default initial route path for HarmonyOS UIAbility sessions.
pub const HARMONY_DEFAULT_ROUTE: &str = "/";
/// Default HarmonyOS XComponent surface identifier.
pub const HARMONY_DEFAULT_XCOMPONENT_ID: &str = "euv_xcomponent";
/// Minimum valid VSync frame interval in nanoseconds (`1 ms` / `1000 Hz`).
pub const HARMONY_VSYNC_MIN_PERIOD_NS: i64 = 1_000_000;
/// Maximum valid VSync frame interval in nanoseconds (`100 ms` / `10 Hz`).
pub const HARMONY_VSYNC_MAX_PERIOD_NS: i64 = 100_000_000;
/// Error message when `OHNativeWindow` surface buffer request or flush fails.
pub const ERR_HARMONY_SURFACE_POST: &str = "harmony OHNativeWindow buffer post failed";
/// Registered `OH_NativeVSync` channel identifier string.
pub const HARMONY_VSYNC_NAME: &str = "euv_harmony_vsync";
/// Sync fence `poll(2)` wait timeout in milliseconds before falling back to write.
pub const HARMONY_FENCE_POLL_TIMEOUT_MS: i32 = 16;
/// POSIX `POLLIN` flag for waiting on an acquire sync fence FD.
pub const HARMONY_POLLIN: i16 = 0x0001;
/// POSIX `PROT_READ | PROT_WRITE` mapping flags for `OhBufferHandle::fd`.
pub const HARMONY_PROT_READ_WRITE: i32 = 0x3;
/// POSIX `MAP_SHARED` mapping flag for `OhBufferHandle::fd`.
pub const HARMONY_MAP_SHARED: i32 = 0x1;
/// Sentinel `MAP_FAILED` address (`(void*)-1`) returned by `mmap(2)`.
pub const HARMONY_MAP_FAILED: usize = usizeMAX;