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
/// 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 `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;
/// 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";
/// Error message when `OHNativeWindow` surface buffer request or flush fails.
pub const ERR_HARMONY_SURFACE_POST: &str = "harmony OHNativeWindow buffer post failed";