Skip to main content

ohos_input_sys/input_manager/
input_manager_ffi.rs

1// automatically generated by rust-bindgen 0.71.1
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6use crate::axis_type::{InputEvent_AxisAction, InputEvent_AxisEventType, InputEvent_AxisType};
7#[cfg(feature = "api-22")]
8use crate::pointer_style::Input_PointerStyle;
9#[cfg(feature = "api-14")]
10use ohos_sys_opaque_types::Input_Hotkey;
11#[cfg(feature = "api-22")]
12use ohos_sys_opaque_types::OH_PixelmapNative;
13use ohos_sys_opaque_types::{
14    Input_AxisEvent, Input_KeyEvent, Input_KeyState, Input_MouseEvent, Input_TouchEvent,
15};
16
17#[cfg(feature = "api-12")]
18#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
19impl Input_KeyStateAction {
20    /// Default
21    pub const KEY_DEFAULT: Input_KeyStateAction = Input_KeyStateAction(-1);
22    /// Pressing of a key
23    pub const KEY_PRESSED: Input_KeyStateAction = Input_KeyStateAction(0);
24    /// Release of a key
25    pub const KEY_RELEASED: Input_KeyStateAction = Input_KeyStateAction(1);
26    /// Key switch enabled
27    pub const KEY_SWITCH_ON: Input_KeyStateAction = Input_KeyStateAction(2);
28    /// Key switch disabled
29    pub const KEY_SWITCH_OFF: Input_KeyStateAction = Input_KeyStateAction(3);
30}
31#[repr(transparent)]
32/// Enumerated values of key event action.
33///
34///
35/// Available since API-level: 12
36#[cfg(feature = "api-12")]
37#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
38#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
39pub struct Input_KeyStateAction(pub ::core::ffi::c_int);
40#[cfg(feature = "api-12")]
41#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
42impl Input_KeyEventAction {
43    /// Cancellation of a key action.
44    pub const KEY_ACTION_CANCEL: Input_KeyEventAction = Input_KeyEventAction(0);
45    /// Pressing of a key.
46    pub const KEY_ACTION_DOWN: Input_KeyEventAction = Input_KeyEventAction(1);
47    /// Release of a key.
48    pub const KEY_ACTION_UP: Input_KeyEventAction = Input_KeyEventAction(2);
49}
50#[repr(transparent)]
51/// Enumerates key event types.
52///
53///
54/// Available since API-level: 12
55#[cfg(feature = "api-12")]
56#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
57#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
58pub struct Input_KeyEventAction(pub ::core::ffi::c_uint);
59#[cfg(feature = "api-12")]
60#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
61impl Input_MouseEventAction {
62    /// Cancel.
63    pub const MOUSE_ACTION_CANCEL: Input_MouseEventAction = Input_MouseEventAction(0);
64    /// Moving of the mouse pointer.
65    pub const MOUSE_ACTION_MOVE: Input_MouseEventAction = Input_MouseEventAction(1);
66    /// Pressing down of the mouse.
67    pub const MOUSE_ACTION_BUTTON_DOWN: Input_MouseEventAction = Input_MouseEventAction(2);
68    /// Lifting of the mouse button.
69    pub const MOUSE_ACTION_BUTTON_UP: Input_MouseEventAction = Input_MouseEventAction(3);
70    /// Beginning of the mouse axis event
71    pub const MOUSE_ACTION_AXIS_BEGIN: Input_MouseEventAction = Input_MouseEventAction(4);
72    /// Updating of the mouse axis event
73    pub const MOUSE_ACTION_AXIS_UPDATE: Input_MouseEventAction = Input_MouseEventAction(5);
74    /// End of the mouse axis event
75    pub const MOUSE_ACTION_AXIS_END: Input_MouseEventAction = Input_MouseEventAction(6);
76}
77#[repr(transparent)]
78/// Enumerated values of mouse event action.
79///
80///
81/// Available since API-level: 12
82#[cfg(feature = "api-12")]
83#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
84#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
85pub struct Input_MouseEventAction(pub ::core::ffi::c_uint);
86#[cfg(feature = "api-12")]
87#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
88impl InputEvent_MouseAxis {
89    /// Vertical scroll axis
90    pub const MOUSE_AXIS_SCROLL_VERTICAL: InputEvent_MouseAxis = InputEvent_MouseAxis(0);
91    /// Horizontal scroll axis
92    pub const MOUSE_AXIS_SCROLL_HORIZONTAL: InputEvent_MouseAxis = InputEvent_MouseAxis(1);
93}
94#[repr(transparent)]
95/// Mouse axis types.
96///
97///
98/// Available since API-level: 12
99#[cfg(feature = "api-12")]
100#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
101#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
102pub struct InputEvent_MouseAxis(pub ::core::ffi::c_uint);
103#[cfg(feature = "api-12")]
104#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
105impl Input_MouseEventButton {
106    /// Invalid button
107    pub const MOUSE_BUTTON_NONE: Input_MouseEventButton = Input_MouseEventButton(-1);
108    /// Left button on the mouse.
109    pub const MOUSE_BUTTON_LEFT: Input_MouseEventButton = Input_MouseEventButton(0);
110    /// Middle button on the mouse.
111    pub const MOUSE_BUTTON_MIDDLE: Input_MouseEventButton = Input_MouseEventButton(1);
112    /// Right button on the mouse.
113    pub const MOUSE_BUTTON_RIGHT: Input_MouseEventButton = Input_MouseEventButton(2);
114    /// Forward button on the mouse.
115    pub const MOUSE_BUTTON_FORWARD: Input_MouseEventButton = Input_MouseEventButton(3);
116    /// Back button on the mouse.
117    pub const MOUSE_BUTTON_BACK: Input_MouseEventButton = Input_MouseEventButton(4);
118}
119#[repr(transparent)]
120/// Enumerated values of mouse event button.
121///
122///
123/// Available since API-level: 12
124#[cfg(feature = "api-12")]
125#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
126#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
127pub struct Input_MouseEventButton(pub ::core::ffi::c_int);
128#[cfg(feature = "api-12")]
129#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
130impl Input_TouchEventAction {
131    /// Touch cancelled.
132    pub const TOUCH_ACTION_CANCEL: Input_TouchEventAction = Input_TouchEventAction(0);
133    /// Touch pressed.
134    pub const TOUCH_ACTION_DOWN: Input_TouchEventAction = Input_TouchEventAction(1);
135    /// Touch moved.
136    pub const TOUCH_ACTION_MOVE: Input_TouchEventAction = Input_TouchEventAction(2);
137    /// Touch lifted.
138    pub const TOUCH_ACTION_UP: Input_TouchEventAction = Input_TouchEventAction(3);
139}
140#[repr(transparent)]
141/// Enumerated values of touch event action.
142///
143///
144/// Available since API-level: 12
145#[cfg(feature = "api-12")]
146#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
147#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
148pub struct Input_TouchEventAction(pub ::core::ffi::c_uint);
149#[cfg(feature = "api-13")]
150#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
151impl Input_KeyboardType {
152    /// Keyboard without keys
153    pub const KEYBOARD_TYPE_NONE: Input_KeyboardType = Input_KeyboardType(0);
154    /// Keyboard with unknown keys
155    pub const KEYBOARD_TYPE_UNKNOWN: Input_KeyboardType = Input_KeyboardType(1);
156    /// Full keyboard
157    pub const KEYBOARD_TYPE_ALPHABETIC: Input_KeyboardType = Input_KeyboardType(2);
158    /// Digital keyboard
159    pub const KEYBOARD_TYPE_DIGITAL: Input_KeyboardType = Input_KeyboardType(3);
160    /// Stylus
161    pub const KEYBOARD_TYPE_STYLUS: Input_KeyboardType = Input_KeyboardType(4);
162    /// Remote control
163    pub const KEYBOARD_TYPE_REMOTE_CONTROL: Input_KeyboardType = Input_KeyboardType(5);
164}
165#[repr(transparent)]
166/// Enumerates keyboard types.
167///
168///
169/// Available since API-level: 13
170#[cfg(feature = "api-13")]
171#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
172#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
173pub struct Input_KeyboardType(pub ::core::ffi::c_uint);
174#[cfg(feature = "api-20")]
175#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
176impl Input_InjectionStatus {
177    /// Unauthorized
178    pub const UNAUTHORIZED: Input_InjectionStatus = Input_InjectionStatus(0);
179    /// Authorizing
180    pub const AUTHORIZING: Input_InjectionStatus = Input_InjectionStatus(1);
181    /// Authorized
182    pub const AUTHORIZED: Input_InjectionStatus = Input_InjectionStatus(2);
183}
184#[repr(transparent)]
185/// Enumerates the injection authorization status.
186///
187///
188/// Available since API-level: 20
189#[cfg(feature = "api-20")]
190#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
191#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
192pub struct Input_InjectionStatus(pub ::core::ffi::c_uint);
193#[cfg(feature = "api-12")]
194#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
195impl InputEvent_SourceType {
196    /// Indicates that the input source generates events similar to mouse cursor movement,
197    /// button press and release, and wheel scrolling.
198    ///
199    ///
200    /// Available since API-level: 12
201    #[cfg(feature = "api-12")]
202    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
203    pub const SOURCE_TYPE_MOUSE: InputEvent_SourceType = InputEvent_SourceType(1);
204    /// Indicates that the input source generates a touchscreen multi-touch event.
205    ///
206    ///
207    /// Available since API-level: 12
208    #[cfg(feature = "api-12")]
209    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
210    pub const SOURCE_TYPE_TOUCHSCREEN: InputEvent_SourceType = InputEvent_SourceType(2);
211    /// Indicates that the input source generates a touchpad multi-touch event.
212    ///
213    ///
214    /// Available since API-level: 12
215    #[cfg(feature = "api-12")]
216    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
217    pub const SOURCE_TYPE_TOUCHPAD: InputEvent_SourceType = InputEvent_SourceType(3);
218}
219#[repr(transparent)]
220/// Enumerates event source types.
221///
222///
223/// Available since API-level: 12
224#[cfg(feature = "api-12")]
225#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
226#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
227pub struct InputEvent_SourceType(pub ::core::ffi::c_uint);
228/// Defines the cursor information.
229///
230///
231/// Available since API-level: 22
232#[cfg(feature = "api-22")]
233#[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
234#[repr(C)]
235pub struct Input_CursorInfo {
236    _unused: [u8; 0],
237}
238pub type Input_Result = Result<(), InputErrorCode>;
239#[cfg(feature = "api-12")]
240#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
241impl InputErrorCode {
242    /// Permission verification failed
243    pub const PERMISSION_DENIED: InputErrorCode =
244        InputErrorCode(const { core::num::NonZero::new(201).unwrap() });
245    /// Non-system application
246    pub const NOT_SYSTEM_APPLICATION: InputErrorCode =
247        InputErrorCode(const { core::num::NonZero::new(202).unwrap() });
248    /// Parameter check failed
249    pub const PARAMETER_ERROR: InputErrorCode =
250        InputErrorCode(const { core::num::NonZero::new(401).unwrap() });
251    /// Device not support
252    pub const DEVICE_NOT_SUPPORTED: InputErrorCode =
253        InputErrorCode(const { core::num::NonZero::new(801).unwrap() });
254    /// Service error
255    pub const SERVICE_EXCEPTION: InputErrorCode =
256        InputErrorCode(const { core::num::NonZero::new(3800001).unwrap() });
257    /// Interceptor repeatedly created for an application
258    pub const REPEAT_INTERCEPTOR: InputErrorCode =
259        InputErrorCode(const { core::num::NonZero::new(4200001).unwrap() });
260    /// Already occupied by the system
261    ///
262    /// Available since API-level: 14
263    #[cfg(feature = "api-14")]
264    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
265    pub const OCCUPIED_BY_SYSTEM: InputErrorCode =
266        InputErrorCode(const { core::num::NonZero::new(4200002).unwrap() });
267    /// Already occupied by the other
268    ///
269    /// Available since API-level: 14
270    #[cfg(feature = "api-14")]
271    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
272    pub const OCCUPIED_BY_OTHER: InputErrorCode =
273        InputErrorCode(const { core::num::NonZero::new(4200003).unwrap() });
274    /// No keyboard device connected
275    ///
276    /// Available since API-level: 15
277    #[cfg(feature = "api-15")]
278    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
279    pub const KEYBOARD_DEVICE_NOT_EXIST: InputErrorCode =
280        InputErrorCode(const { core::num::NonZero::new(3900002).unwrap() });
281    /// Authorizing
282    ///
283    /// Available since API-level: 20
284    #[cfg(feature = "api-20")]
285    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
286    pub const INJECTION_AUTHORIZING: InputErrorCode =
287        InputErrorCode(const { core::num::NonZero::new(3900005).unwrap() });
288    /// Too many operations
289    ///
290    /// Available since API-level: 20
291    #[cfg(feature = "api-20")]
292    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
293    pub const INJECTION_OPERATION_FREQUENT: InputErrorCode =
294        InputErrorCode(const { core::num::NonZero::new(3900006).unwrap() });
295    /// Authorized
296    ///
297    /// Available since API-level: 20
298    #[cfg(feature = "api-20")]
299    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
300    pub const INJECTION_AUTHORIZED: InputErrorCode =
301        InputErrorCode(const { core::num::NonZero::new(3900007).unwrap() });
302    /// Authorized to other applications
303    ///
304    /// Available since API-level: 20
305    #[cfg(feature = "api-20")]
306    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
307    pub const INJECTION_AUTHORIZED_OTHERS: InputErrorCode =
308        InputErrorCode(const { core::num::NonZero::new(3900008).unwrap() });
309    /// App is not the focused app
310    ///
311    /// Available since API-level: 20
312    #[cfg(feature = "api-20")]
313    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
314    pub const APP_NOT_FOCUSED: InputErrorCode =
315        InputErrorCode(const { core::num::NonZero::new(3900009).unwrap() });
316    /// The device has no pointer
317    ///
318    /// Available since API-level: 20
319    #[cfg(feature = "api-20")]
320    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
321    pub const DEVICE_NO_POINTER: InputErrorCode =
322        InputErrorCode(const { core::num::NonZero::new(3900010).unwrap() });
323    /// Invalid windowID
324    ///
325    /// Available since API-level: 22
326    #[cfg(feature = "api-22")]
327    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
328    pub const INVALID_WINDOWID: InputErrorCode =
329        InputErrorCode(const { core::num::NonZero::new(26500001).unwrap() });
330}
331#[repr(transparent)]
332/// Enumerates error codes.
333///
334///
335/// Available since API-level: 12
336#[cfg(feature = "api-12")]
337#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
338#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
339pub struct InputErrorCode(pub core::num::NonZero<::core::ffi::c_uint>);
340/// Callback used to return shortcut key events.
341///
342/// Available since API-level: 14
343#[cfg(feature = "api-14")]
344#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
345pub type Input_HotkeyCallback =
346    ::core::option::Option<unsafe extern "C" fn(hotkey: *mut Input_Hotkey)>;
347/// Represents information about the input device.
348///
349///
350/// Available since API-level: 13
351#[cfg(feature = "api-13")]
352#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
353#[repr(C)]
354pub struct Input_DeviceInfo {
355    _unused: [u8; 0],
356}
357/// Pixel map resource.
358///
359///
360/// Available since API-level: 22
361#[cfg(feature = "api-22")]
362#[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
363#[repr(C)]
364pub struct Input_CustomCursor {
365    _unused: [u8; 0],
366}
367/// Defines the custom cursor configuration.
368///
369///
370/// Available since API-level: 22
371#[cfg(feature = "api-22")]
372#[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
373#[repr(C)]
374pub struct Input_CursorConfig {
375    _unused: [u8; 0],
376}
377/// Defines a lifecycle callback for keyEvent. If the callback is triggered, keyEvent will be destroyed.
378///
379/// # Arguments
380///
381/// * `keyEvent` - Key event object.
382///
383/// Available since API-level: 12
384#[cfg(feature = "api-12")]
385#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
386pub type Input_KeyEventCallback =
387    ::core::option::Option<unsafe extern "C" fn(keyEvent: *const Input_KeyEvent)>;
388/// Defines a lifecycle callback for mouseEvent. If the callback is triggered, mouseEvent will be destroyed.
389///
390/// # Arguments
391///
392/// * `mouseEvent` - Mouse event object.
393///
394/// Available since API-level: 12
395#[cfg(feature = "api-12")]
396#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
397pub type Input_MouseEventCallback =
398    ::core::option::Option<unsafe extern "C" fn(mouseEvent: *const Input_MouseEvent)>;
399/// Defines a lifecycle callback for touchEvent. If the callback is triggered, touchEvent will be destroyed.
400///
401/// # Arguments
402///
403/// * `touchEvent` - Touch event object.
404///
405/// Available since API-level: 12
406#[cfg(feature = "api-12")]
407#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
408pub type Input_TouchEventCallback =
409    ::core::option::Option<unsafe extern "C" fn(touchEvent: *const Input_TouchEvent)>;
410/// Defines a lifecycle callback for axisEvent. If the callback is triggered, axisEvent will be destroyed.
411///
412/// # Arguments
413///
414/// * `axisEvent` - Axis event object.
415///
416/// Available since API-level: 12
417#[cfg(feature = "api-12")]
418#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
419pub type Input_AxisEventCallback =
420    ::core::option::Option<unsafe extern "C" fn(axisEvent: *const Input_AxisEvent)>;
421/// Defines the callback for device addition events.
422/// # Arguments
423///
424/// * `deviceId` - Device ID.
425///
426/// Available since API-level: 13
427#[cfg(feature = "api-13")]
428#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
429pub type Input_DeviceAddedCallback = ::core::option::Option<unsafe extern "C" fn(deviceId: i32)>;
430/// Defines the callback for device removal events.
431/// # Arguments
432///
433/// * `deviceId` - Device ID.
434///
435/// Available since API-level: 13
436#[cfg(feature = "api-13")]
437#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
438pub type Input_DeviceRemovedCallback = ::core::option::Option<unsafe extern "C" fn(deviceId: i32)>;
439/// Defines the event injection callback.
440/// # Arguments
441///
442/// * `authorizedStatus` - Authorization status.
443///
444/// Available since API-level: 20
445#[cfg(feature = "api-20")]
446#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
447pub type Input_InjectAuthorizeCallback =
448    ::core::option::Option<unsafe extern "C" fn(authorizedStatus: Input_InjectionStatus)>;
449/// Defines the structure for the interceptor of event callbacks,
450/// including mouseCallback, touchCallback, and axisCallback.
451///
452/// Available since API-level: 12
453#[cfg(feature = "api-12")]
454#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
455#[repr(C)]
456#[derive(Debug, Copy, Clone)]
457pub struct Input_InterceptorEventCallback {
458    /// Defines a lifecycle callback for **mouseEvent**.
459    pub mouseCallback: Input_MouseEventCallback,
460    /// Defines a lifecycle callback for **touchEvent**.
461    pub touchCallback: Input_TouchEventCallback,
462    /// Defines a lifecycle callback for **axisEvent**.
463    pub axisCallback: Input_AxisEventCallback,
464}
465/// Defines a listener for device insertion and removal events.
466///
467/// Available since API-level: 13
468#[cfg(feature = "api-13")]
469#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
470#[repr(C)]
471#[derive(Debug, Copy, Clone)]
472pub struct Input_DeviceListener {
473    /// Callback for device addition events
474    pub deviceAddedCallback: Input_DeviceAddedCallback,
475    /// Callback for device removal events
476    pub deviceRemovedCallback: Input_DeviceRemovedCallback,
477}
478/// Defines event interceptor options.
479///
480/// Available since API-level: 12
481#[cfg(feature = "api-12")]
482#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
483#[repr(C)]
484pub struct Input_InterceptorOptions {
485    _unused: [u8; 0],
486}
487extern "C" {
488    /// Queries the key state.
489    ///
490    /// # Arguments
491    ///
492    /// * `keyState` - Key state.
493    ///
494    /// # Returns
495    ///
496    /// * OH_Input_GetKeyState function result code.
497    /// [`INPUT_SUCCESS`] get KeyState success.
498    ///
499    /// [`INPUT_PARAMETER_ERROR`] keyCode is invalid.
500    ///
501    ///
502    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
503    ///
504    /// Available since API-level: 12
505    #[cfg(feature = "api-12")]
506    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
507    pub fn OH_Input_GetKeyState(keyState: *mut Input_KeyState) -> Input_Result;
508    /// Creates a key status enumeration object.
509    ///
510    ///
511    /// # Returns
512    ///
513    /// * Returns an [`Input_KeyState`] pointer object if the operation is successful.
514    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
515    ///
516    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
517    ///
518    /// Available since API-level: 12
519    #[cfg(feature = "api-12")]
520    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
521    pub fn OH_Input_CreateKeyState() -> *mut Input_KeyState;
522    /// Destroys a key status enumeration object.
523    ///
524    /// # Arguments
525    ///
526    /// * `keyState` - Key status enumeration object.
527    ///
528    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
529    ///
530    /// Available since API-level: 12
531    #[cfg(feature = "api-12")]
532    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
533    pub fn OH_Input_DestroyKeyState(keyState: *mut *mut Input_KeyState);
534    /// Sets the key value of a key status enumeration object.
535    ///
536    /// # Arguments
537    ///
538    /// * `keyState` - Key status enumeration object.
539    ///
540    /// * `keyCode` - Key value of the key status enumeration object.
541    ///
542    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
543    ///
544    /// Available since API-level: 12
545    #[cfg(feature = "api-12")]
546    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
547    pub fn OH_Input_SetKeyCode(keyState: *mut Input_KeyState, keyCode: i32);
548    /// Obtains the key value of a key status enumeration object.
549    ///
550    /// # Arguments
551    ///
552    /// * `keyState` - Key status enumeration object.
553    ///
554    /// # Returns
555    ///
556    /// * Key value of the key status enumeration object.
557    ///
558    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
559    ///
560    /// Available since API-level: 12
561    #[cfg(feature = "api-12")]
562    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
563    pub fn OH_Input_GetKeyCode(keyState: *const Input_KeyState) -> i32;
564    /// Sets whether the key specific to a key status enumeration object is pressed.
565    ///
566    /// # Arguments
567    ///
568    /// * `keyState` - Key status enumeration object.
569    ///
570    /// * `keyAction` - Whether the key is pressed.
571    ///
572    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
573    ///
574    /// Available since API-level: 12
575    #[cfg(feature = "api-12")]
576    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
577    pub fn OH_Input_SetKeyPressed(keyState: *mut Input_KeyState, keyAction: i32);
578    /// Checks whether the key specific to a key status enumeration object is pressed.
579    ///
580    /// # Arguments
581    ///
582    /// * `keyState` - Key status enumeration object.
583    ///
584    /// # Returns
585    ///
586    /// * Key pressing status of the key status enumeration object.
587    ///
588    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
589    ///
590    /// Available since API-level: 12
591    #[cfg(feature = "api-12")]
592    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
593    pub fn OH_Input_GetKeyPressed(keyState: *const Input_KeyState) -> i32;
594    /// Sets the key switch of the key status enumeration object.
595    ///
596    /// # Arguments
597    ///
598    /// * `keyState` - Key status enumeration object.
599    ///
600    /// * `keySwitch` - Key switch of the key status enumeration object.
601    ///
602    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
603    ///
604    /// Available since API-level: 12
605    #[cfg(feature = "api-12")]
606    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
607    pub fn OH_Input_SetKeySwitch(keyState: *mut Input_KeyState, keySwitch: i32);
608    /// Obtains the key switch of the key status enumeration object.
609    ///
610    /// # Arguments
611    ///
612    /// * `keyState` - Key status enumeration object.
613    ///
614    /// # Returns
615    ///
616    /// * Key switch of the key status enumeration object.
617    ///
618    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
619    ///
620    /// Available since API-level: 12
621    #[cfg(feature = "api-12")]
622    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
623    pub fn OH_Input_GetKeySwitch(keyState: *const Input_KeyState) -> i32;
624    /// Inject system keys.
625    /// since API 20, it is recommended to use OH_Input_RequestInjection
626    /// to request authorization before using the interface,
627    /// and then use OH_Input_QueryAuthorizedStatus to query the authorization status.
628    /// When the authorization status is AUTHORIZED, use the interface.
629    ///
630    /// # Arguments
631    ///
632    /// * `keyEvent` - - the key event to be injected.
633    ///
634    /// # Returns
635    ///
636    /// * OH_Input_InjectKeyEvent function result code.
637    /// [`INPUT_SUCCESS`] inject keyEvent success.
638    ///
639    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
640    ///
641    /// [`INPUT_PARAMETER_ERROR`] keyCode is less 0, can not process.
642    ///
643    ///
644    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
645    ///
646    /// Available since API-level: 12
647    #[cfg(feature = "api-12")]
648    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
649    pub fn OH_Input_InjectKeyEvent(keyEvent: *const Input_KeyEvent) -> i32;
650    /// Creates a key event object.
651    ///
652    ///
653    /// # Returns
654    ///
655    /// * Returns an [`Input_KeyEvent`] pointer object if the operation is successful.
656    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
657    ///
658    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
659    ///
660    /// Available since API-level: 12
661    #[cfg(feature = "api-12")]
662    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
663    pub fn OH_Input_CreateKeyEvent() -> *mut Input_KeyEvent;
664    /// Destroys a key event object.
665    ///
666    /// # Arguments
667    ///
668    /// * `keyEvent` - Key event object.
669    ///
670    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
671    ///
672    /// Available since API-level: 12
673    #[cfg(feature = "api-12")]
674    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
675    pub fn OH_Input_DestroyKeyEvent(keyEvent: *mut *mut Input_KeyEvent);
676    /// Sets the key event type.
677    ///
678    /// # Arguments
679    ///
680    /// * `keyEvent` - Key event object.
681    ///
682    /// * `action` - Key event type.
683    ///
684    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
685    ///
686    /// Available since API-level: 12
687    #[cfg(feature = "api-12")]
688    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
689    pub fn OH_Input_SetKeyEventAction(keyEvent: *mut Input_KeyEvent, action: i32);
690    /// Obtains the key event type.
691    ///
692    /// # Arguments
693    ///
694    /// * `keyEvent` - Key event object.
695    ///
696    /// # Returns
697    ///
698    /// * Key event type.
699    ///
700    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
701    ///
702    /// Available since API-level: 12
703    #[cfg(feature = "api-12")]
704    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
705    pub fn OH_Input_GetKeyEventAction(keyEvent: *const Input_KeyEvent) -> i32;
706    /// Sets the key value for a key event.
707    ///
708    /// # Arguments
709    ///
710    /// * `keyEvent` - Key event object.
711    ///
712    /// * `keyCode` - keyCode Key code.
713    ///
714    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
715    ///
716    /// Available since API-level: 12
717    #[cfg(feature = "api-12")]
718    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
719    pub fn OH_Input_SetKeyEventKeyCode(keyEvent: *mut Input_KeyEvent, keyCode: i32);
720    /// Obtains the key value of a key event.
721    ///
722    /// # Arguments
723    ///
724    /// * `keyEvent` - Key event object.
725    ///
726    /// # Returns
727    ///
728    /// * Key code.
729    ///
730    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
731    ///
732    /// Available since API-level: 12
733    #[cfg(feature = "api-12")]
734    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
735    pub fn OH_Input_GetKeyEventKeyCode(keyEvent: *const Input_KeyEvent) -> i32;
736    /// Sets the time when a key event occurs.
737    ///
738    /// # Arguments
739    ///
740    /// * `keyEvent` - Key event object.
741    ///
742    /// * `actionTime` - Time when the key event occurs.
743    ///
744    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
745    ///
746    /// Available since API-level: 12
747    #[cfg(feature = "api-12")]
748    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
749    pub fn OH_Input_SetKeyEventActionTime(keyEvent: *mut Input_KeyEvent, actionTime: i64);
750    /// Obtains the time when a key event occurs.
751    ///
752    /// # Arguments
753    ///
754    /// * `keyEvent` - Key event object.
755    ///
756    /// # Returns
757    ///
758    /// * Returns the time when the key event occurs.
759    ///
760    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
761    ///
762    /// Available since API-level: 12
763    #[cfg(feature = "api-12")]
764    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
765    pub fn OH_Input_GetKeyEventActionTime(keyEvent: *const Input_KeyEvent) -> i64;
766    /// Sets the windowId for a key event.
767    ///
768    /// # Arguments
769    ///
770    /// * `keyEvent` - Key event object.
771    ///
772    /// * `windowId` - The windowId for a key event.
773    ///
774    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
775    ///
776    /// Available since API-level: 15
777    #[cfg(feature = "api-15")]
778    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
779    pub fn OH_Input_SetKeyEventWindowId(keyEvent: *mut Input_KeyEvent, windowId: i32);
780    /// Obtains the windowId of a key event.
781    ///
782    /// # Arguments
783    ///
784    /// * `keyEvent` - Key event object.
785    ///
786    /// # Returns
787    ///
788    /// * windowId.
789    ///
790    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
791    ///
792    /// Available since API-level: 15
793    #[cfg(feature = "api-15")]
794    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
795    pub fn OH_Input_GetKeyEventWindowId(keyEvent: *const Input_KeyEvent) -> i32;
796    /// Sets the displayId for a key event.
797    ///
798    /// # Arguments
799    ///
800    /// * `keyEvent` - Key event object.
801    ///
802    /// * `displayId` - The displayId for a key event.
803    ///
804    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
805    ///
806    /// Available since API-level: 15
807    #[cfg(feature = "api-15")]
808    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
809    pub fn OH_Input_SetKeyEventDisplayId(keyEvent: *mut Input_KeyEvent, displayId: i32);
810    /// Obtains the displayId of a key event.
811    ///
812    /// # Arguments
813    ///
814    /// * `keyEvent` - Key event object.
815    ///
816    /// # Returns
817    ///
818    /// * displayId.
819    ///
820    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
821    ///
822    /// Available since API-level: 15
823    #[cfg(feature = "api-15")]
824    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
825    pub fn OH_Input_GetKeyEventDisplayId(keyEvent: *const Input_KeyEvent) -> i32;
826    /// Get the eventId of the keyEvent.
827    ///
828    /// # Arguments
829    ///
830    /// * `keyEvent` - - Key event object.
831    ///
832    /// * `eventId` - - Get the keyEvent eventId.
833    ///
834    /// # Returns
835    ///
836    /// * OH_Input_GetKeyEventId function result code.
837    /// [`INPUT_SUCCESS`] Get the eventId of the keyEvent success.
838    ///
839    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
840    ///
841    ///
842    /// Available since API-level: 21
843    #[cfg(feature = "api-21")]
844    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
845    pub fn OH_Input_GetKeyEventId(
846        keyEvent: *const Input_KeyEvent,
847        eventId: *mut i32,
848    ) -> Input_Result;
849    /// Add a keyEvent interception hook function. Before using this interface,
850    /// the user needs to authorize it in the settings.
851    ///
852    /// ohos.permission.HOOK_KEY_EVENT
853    /// # Arguments
854    ///
855    /// * `callback` - - Hook function, keyEvent will be sent to the hook function for priority processing.
856    ///
857    /// # Returns
858    ///
859    /// * OH_Input_AddKeyEventHook function result code.
860    /// [`INPUT_SUCCESS`] Added hook function successfully.
861    ///
862    /// [`INPUT_PARAMETER_ERROR`] Failed to add the hook function. Reason: Parameter check failed.
863    ///
864    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
865    ///
866    /// [`INPUT_PERMISSION_DENIED`] Failed to add the hook function. Reason: Permission check failed.
867    ///
868    /// [`INPUT_REPEAT_INTERCEPTOR`] Failed to add the hook function.
869    ///
870    /// Reason: Repeatedly set the hook function. A process can only have one key hook function.
871    ///
872    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the hook function.
873    ///
874    /// Reason: Input service exception, please try again.
875    ///
876    ///
877    /// Available since API-level: 21
878    #[cfg(feature = "api-21")]
879    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
880    pub fn OH_Input_AddKeyEventHook(callback: Input_KeyEventCallback) -> Input_Result;
881    /// Remove keyEvent interception hook function.
882    ///
883    /// # Arguments
884    ///
885    /// * `callback` - - Hook function, Same as the parameters when calling OH_Input_AddKeyEventHook.
886    ///
887    /// # Returns
888    ///
889    /// * OH_Input_RemoveKeyEventHook function result code.
890    /// [`INPUT_SUCCESS`] Hook function removed successfully.
891    ///
892    /// Even if the hook function has not been added before, it will return success when removed.
893    ///
894    /// [`INPUT_PARAMETER_ERROR`] Failed to remove the hook function. Reason: Parameter check failed.
895    ///
896    /// [`INPUT_SERVICE_EXCEPTION`] Failed to remove the hook function.
897    ///
898    /// Reason: Input service exception, please try again.
899    ///
900    ///
901    /// Available since API-level: 21
902    #[cfg(feature = "api-21")]
903    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
904    pub fn OH_Input_RemoveKeyEventHook(callback: Input_KeyEventCallback) -> Input_Result;
905    /// Redispatches keyEvent.
906    /// Only keyEvent intercepted by hook functions can be redispatched,
907    /// and the event order must be maintained during redispatching.
908    /// The hook function intercepts the input event and then redistributes it for 3 seconds.
909    /// If this time is exceeded, calling this function will return INPUT_PARAMETER_ERROR.
910    /// Re-dispatching requires event pairing, usually starting with one or more KEY_ACTION_DOWN and
911    /// ending with KEY_ACTION_UP or KEY_ACTION_CANCEL.
912    /// Only KEY_ACTION_UP or KEY_ACTION_CANCEL is redispatched, the function call succeeds,
913    /// but no actual dispatch is made.
914    /// If an event is dispatched that is not intercepted by the hook function,
915    /// the function call succeeds, but no actual dispatch action is taken.
916    ///
917    /// # Arguments
918    ///
919    /// * `eventId` - - keyEvent eventId.
920    ///
921    /// # Returns
922    ///
923    /// * OH_Input_DispatchToNextHandler function result code.
924    /// [`INPUT_SUCCESS`] Redistribution successful.
925    ///
926    /// [`INPUT_PARAMETER_ERROR`] Redistribution failed. Reason: KeyEvent does not exist.
927    ///
928    /// [`INPUT_SERVICE_EXCEPTION`] Redistribution failed.
929    ///
930    /// Reason: Input service exception, it's recommended to reset the pending distribution status.
931    ///
932    ///
933    /// Available since API-level: 21
934    #[cfg(feature = "api-21")]
935    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
936    pub fn OH_Input_DispatchToNextHandler(eventId: i32) -> Input_Result;
937    /// Inject mouse event.
938    /// since API 20, it is recommended to use OH_Input_RequestInjection
939    /// to request authorization before using the interface,
940    /// and then use OH_Input_QueryAuthorizedStatus to query the authorization status.
941    /// When the authorization status is AUTHORIZED, use the interface.
942    ///
943    /// # Arguments
944    ///
945    /// * `mouseEvent` - - the mouse event to be injected.
946    ///
947    /// # Returns
948    ///
949    /// * OH_Input_InjectMouseEvent function result code.
950    /// [`INPUT_SUCCESS`] inject mouseEvent success.
951    ///
952    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
953    ///
954    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
955    ///
956    ///
957    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
958    ///
959    /// Available since API-level: 12
960    #[cfg(feature = "api-12")]
961    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
962    pub fn OH_Input_InjectMouseEvent(mouseEvent: *const Input_MouseEvent) -> i32;
963    /// Inject mouse event using global coordinate.
964    /// since API 20, it is recommended to use OH_Input_RequestInjection
965    /// to request authorization before using the interface,
966    /// and then use OH_Input_QueryAuthorizedStatus to query the authorization status.
967    /// When the authorization status is AUTHORIZED, use the interface.
968    ///
969    /// # Arguments
970    ///
971    /// * `mouseEvent` - - the mouse event to be injected, set up effective globalX globalY.
972    ///
973    /// # Returns
974    ///
975    /// * OH_Input_InjectMouseEventGlobal function result code.
976    /// [`INPUT_SUCCESS`] inject mouseEvent success.
977    ///
978    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
979    ///
980    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
981    ///
982    ///
983    /// Available since API-level: 20
984    #[cfg(feature = "api-20")]
985    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
986    pub fn OH_Input_InjectMouseEventGlobal(mouseEvent: *const Input_MouseEvent) -> i32;
987    /// Creates a mouse event object.
988    ///
989    ///
990    /// # Returns
991    ///
992    /// * Returns an [`Input_MouseEvent`] pointer object if the operation is successful.
993    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
994    ///
995    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
996    ///
997    /// Available since API-level: 12
998    #[cfg(feature = "api-12")]
999    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1000    pub fn OH_Input_CreateMouseEvent() -> *mut Input_MouseEvent;
1001    /// Destroys a mouse event object.
1002    ///
1003    /// # Arguments
1004    ///
1005    /// * `mouseEvent` - Mouse event object.
1006    ///
1007    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1008    ///
1009    /// Available since API-level: 12
1010    #[cfg(feature = "api-12")]
1011    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1012    pub fn OH_Input_DestroyMouseEvent(mouseEvent: *mut *mut Input_MouseEvent);
1013    /// Sets the action for a mouse event.
1014    ///
1015    /// # Arguments
1016    ///
1017    /// * `mouseEvent` - Mouse event object.
1018    ///
1019    /// * `action` - Mouse action.
1020    ///
1021    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1022    ///
1023    /// Available since API-level: 12
1024    #[cfg(feature = "api-12")]
1025    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1026    pub fn OH_Input_SetMouseEventAction(mouseEvent: *mut Input_MouseEvent, action: i32);
1027    /// Obtains the action of a mouse event.
1028    ///
1029    /// # Arguments
1030    ///
1031    /// * `mouseEvent` - Mouse event object.
1032    ///
1033    /// # Returns
1034    ///
1035    /// * Mouse action.
1036    ///
1037    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1038    ///
1039    /// Available since API-level: 12
1040    #[cfg(feature = "api-12")]
1041    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1042    pub fn OH_Input_GetMouseEventAction(mouseEvent: *const Input_MouseEvent) -> i32;
1043    /// Sets the X coordinate for a mouse event.
1044    ///
1045    /// # Arguments
1046    ///
1047    /// * `mouseEvent` - Mouse event object.
1048    ///
1049    /// * `displayX` - X coordinate on the display.
1050    ///
1051    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1052    ///
1053    /// Available since API-level: 12
1054    #[cfg(feature = "api-12")]
1055    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1056    pub fn OH_Input_SetMouseEventDisplayX(mouseEvent: *mut Input_MouseEvent, displayX: i32);
1057    /// Obtains the X coordinate of a mouse event.
1058    ///
1059    /// # Arguments
1060    ///
1061    /// * `mouseEvent` - Mouse event object.
1062    ///
1063    /// # Returns
1064    ///
1065    /// * X coordinate on the display.
1066    ///
1067    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1068    ///
1069    /// Available since API-level: 12
1070    #[cfg(feature = "api-12")]
1071    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1072    pub fn OH_Input_GetMouseEventDisplayX(mouseEvent: *const Input_MouseEvent) -> i32;
1073    /// Sets the Y coordinate for a mouse event.
1074    ///
1075    /// # Arguments
1076    ///
1077    /// * `mouseEvent` - Mouse event object.
1078    ///
1079    /// * `displayY` - Y coordinate on the display.
1080    ///
1081    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1082    ///
1083    /// Available since API-level: 12
1084    #[cfg(feature = "api-12")]
1085    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1086    pub fn OH_Input_SetMouseEventDisplayY(mouseEvent: *mut Input_MouseEvent, displayY: i32);
1087    /// Obtains the Y coordinate of a mouse event.
1088    ///
1089    /// # Arguments
1090    ///
1091    /// * `mouseEvent` - Mouse event object.
1092    ///
1093    /// # Returns
1094    ///
1095    /// * Y coordinate on the display.
1096    ///
1097    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1098    ///
1099    /// Available since API-level: 12
1100    #[cfg(feature = "api-12")]
1101    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1102    pub fn OH_Input_GetMouseEventDisplayY(mouseEvent: *const Input_MouseEvent) -> i32;
1103    /// Sets the button for a mouse event.
1104    ///
1105    /// # Arguments
1106    ///
1107    /// * `mouseEvent` - Mouse event object.
1108    ///
1109    /// * `button` - Mouse button.
1110    ///
1111    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1112    ///
1113    /// Available since API-level: 12
1114    #[cfg(feature = "api-12")]
1115    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1116    pub fn OH_Input_SetMouseEventButton(mouseEvent: *mut Input_MouseEvent, button: i32);
1117    /// Obtains the button of a mouse event.
1118    ///
1119    /// # Arguments
1120    ///
1121    /// * `mouseEvent` - Mouse event object.
1122    ///
1123    /// # Returns
1124    ///
1125    /// * Mouse button.
1126    ///
1127    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1128    ///
1129    /// Available since API-level: 12
1130    #[cfg(feature = "api-12")]
1131    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1132    pub fn OH_Input_GetMouseEventButton(mouseEvent: *const Input_MouseEvent) -> i32;
1133    /// Sets the axis type for mouse event.
1134    ///
1135    /// # Arguments
1136    ///
1137    /// * `mouseEvent` - Mouse event object.
1138    ///
1139    /// * `axisType` - Axis type, for example, X axis or Y axis.
1140    ///
1141    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1142    ///
1143    /// Available since API-level: 12
1144    #[cfg(feature = "api-12")]
1145    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1146    pub fn OH_Input_SetMouseEventAxisType(mouseEvent: *mut Input_MouseEvent, axisType: i32);
1147    /// Obtains the axis type of a mouse event.
1148    ///
1149    /// # Arguments
1150    ///
1151    /// * `mouseEvent` - Mouse event object.
1152    ///
1153    /// # Returns
1154    ///
1155    /// * Axis type.
1156    ///
1157    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1158    ///
1159    /// Available since API-level: 12
1160    #[cfg(feature = "api-12")]
1161    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1162    pub fn OH_Input_GetMouseEventAxisType(mouseEvent: *const Input_MouseEvent) -> i32;
1163    /// Sets the axis value for a mouse axis event.
1164    ///
1165    /// # Arguments
1166    ///
1167    /// * `mouseEvent` - Mouse event object.
1168    ///
1169    /// * `axisValue` - Axis value. A positive value means scrolling forward,
1170    /// and a negative number means scrolling backward.
1171    ///
1172    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1173    ///
1174    /// Available since API-level: 12
1175    #[cfg(feature = "api-12")]
1176    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1177    pub fn OH_Input_SetMouseEventAxisValue(mouseEvent: *mut Input_MouseEvent, axisValue: f32);
1178    /// Obtains the axis value of a mouse event.
1179    ///
1180    /// # Arguments
1181    ///
1182    /// * `mouseEvent` - Mouse event object.
1183    ///
1184    /// # Returns
1185    ///
1186    /// * Axis value.
1187    ///
1188    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1189    ///
1190    /// Available since API-level: 12
1191    #[cfg(feature = "api-12")]
1192    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1193    pub fn OH_Input_GetMouseEventAxisValue(mouseEvent: *const Input_MouseEvent) -> f32;
1194    /// Sets the time when a mouse event occurs.
1195    ///
1196    /// # Arguments
1197    ///
1198    /// * `mouseEvent` - Mouse event object.
1199    ///
1200    /// * `actionTime` - Time when the mouse event occurs.
1201    ///
1202    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1203    ///
1204    /// Available since API-level: 12
1205    #[cfg(feature = "api-12")]
1206    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1207    pub fn OH_Input_SetMouseEventActionTime(mouseEvent: *mut Input_MouseEvent, actionTime: i64);
1208    /// Obtains the time when a mouse event occurs.
1209    ///
1210    /// # Arguments
1211    ///
1212    /// * `mouseEvent` - Mouse event object.
1213    ///
1214    /// # Returns
1215    ///
1216    /// * Returns the time when the mouse event occurs.
1217    ///
1218    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1219    ///
1220    /// Available since API-level: 12
1221    #[cfg(feature = "api-12")]
1222    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1223    pub fn OH_Input_GetMouseEventActionTime(mouseEvent: *const Input_MouseEvent) -> i64;
1224    /// Sets the windowId for a mouse event.
1225    ///
1226    /// # Arguments
1227    ///
1228    /// * `mouseEvent` - Mouse event object.
1229    ///
1230    /// * `windowId` - The windowId for a mouse event.
1231    ///
1232    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1233    ///
1234    /// Available since API-level: 15
1235    #[cfg(feature = "api-15")]
1236    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1237    pub fn OH_Input_SetMouseEventWindowId(mouseEvent: *mut Input_MouseEvent, windowId: i32);
1238    /// Obtains the windowId of a mouse event.
1239    ///
1240    /// # Arguments
1241    ///
1242    /// * `mouseEvent` - Mouse event object.
1243    ///
1244    /// # Returns
1245    ///
1246    /// * windowId.
1247    ///
1248    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1249    ///
1250    /// Available since API-level: 15
1251    #[cfg(feature = "api-15")]
1252    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1253    pub fn OH_Input_GetMouseEventWindowId(mouseEvent: *const Input_MouseEvent) -> i32;
1254    /// Sets the displayId for a mouse event.
1255    ///
1256    /// # Arguments
1257    ///
1258    /// * `mouseEvent` - Mouse event object.
1259    ///
1260    /// * `displayId` - The displayId for a mouse event.
1261    ///
1262    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1263    ///
1264    /// Available since API-level: 15
1265    #[cfg(feature = "api-15")]
1266    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1267    pub fn OH_Input_SetMouseEventDisplayId(mouseEvent: *mut Input_MouseEvent, displayId: i32);
1268    /// Obtains the displayId of a mouse event.
1269    ///
1270    /// # Arguments
1271    ///
1272    /// * `mouseEvent` - Mouse event object.
1273    ///
1274    /// # Returns
1275    ///
1276    /// * displayId.
1277    ///
1278    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1279    ///
1280    /// Available since API-level: 15
1281    #[cfg(feature = "api-15")]
1282    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1283    pub fn OH_Input_GetMouseEventDisplayId(mouseEvent: *const Input_MouseEvent) -> i32;
1284    /// Set the global X coordinate of the mouse event.
1285    ///
1286    /// # Arguments
1287    ///
1288    /// * `mouseEvent` - Mouse event object.
1289    ///
1290    /// * `globalX` - Global X coordinate.
1291    ///
1292    /// Available since API-level: 20
1293    #[cfg(feature = "api-20")]
1294    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1295    pub fn OH_Input_SetMouseEventGlobalX(mouseEvent: *mut Input_MouseEvent, globalX: i32);
1296    /// Queries the global X coordinate of the mouse event.
1297    ///
1298    /// # Arguments
1299    ///
1300    /// * `mouseEvent` - Mouse event object.
1301    ///
1302    /// # Returns
1303    ///
1304    /// * Global X coordinate.
1305    ///
1306    /// Available since API-level: 20
1307    #[cfg(feature = "api-20")]
1308    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1309    pub fn OH_Input_GetMouseEventGlobalX(mouseEvent: *const Input_MouseEvent) -> i32;
1310    /// Set the global Y coordinate of the mouse event.
1311    ///
1312    /// # Arguments
1313    ///
1314    /// * `mouseEvent` - Mouse event object.
1315    ///
1316    /// * `globalY` - Global Y coordinate.
1317    ///
1318    /// Available since API-level: 20
1319    #[cfg(feature = "api-20")]
1320    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1321    pub fn OH_Input_SetMouseEventGlobalY(mouseEvent: *mut Input_MouseEvent, globalY: i32);
1322    /// Queries the global Y coordinate of the mouse event.
1323    ///
1324    /// # Arguments
1325    ///
1326    /// * `mouseEvent` - Mouse event object.
1327    ///
1328    /// # Returns
1329    ///
1330    /// * Global Y coordinate.
1331    ///
1332    /// Available since API-level: 20
1333    #[cfg(feature = "api-20")]
1334    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1335    pub fn OH_Input_GetMouseEventGlobalY(mouseEvent: *const Input_MouseEvent) -> i32;
1336    /// Inject touch event.
1337    /// since API 20, it is recommended to use OH_Input_RequestInjection
1338    /// to request authorization before using the interface,
1339    /// and then use OH_Input_QueryAuthorizedStatus to query the authorization status.
1340    /// When the authorization status is AUTHORIZED, use the interface.
1341    ///
1342    /// # Arguments
1343    ///
1344    /// * `touchEvent` - - the touch event to be injected.
1345    ///
1346    /// # Returns
1347    ///
1348    /// * OH_Input_InjectTouchEvent function result code.
1349    /// [`INPUT_SUCCESS`] inject touchEvent success.
1350    ///
1351    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
1352    ///
1353    ///
1354    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1355    ///
1356    /// Available since API-level: 12
1357    #[cfg(feature = "api-12")]
1358    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1359    pub fn OH_Input_InjectTouchEvent(touchEvent: *const Input_TouchEvent) -> i32;
1360    /// Inject touch event using global coordinate.
1361    /// since API 20, it is recommended to use OH_Input_RequestInjection
1362    /// to request authorization before using the interface,
1363    /// and then use OH_Input_QueryAuthorizedStatus to query the authorization status.
1364    /// When the authorization status is AUTHORIZED, use the interface.
1365    ///
1366    /// # Arguments
1367    ///
1368    /// * `touchEvent` - - the touch event to be injected, set up effective globalX globalY.
1369    ///
1370    /// # Returns
1371    ///
1372    /// * OH_Input_InjectTouchEventGlobal function result code.
1373    /// [`INPUT_SUCCESS`] inject touchEvent success.
1374    ///
1375    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
1376    ///
1377    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1378    ///
1379    ///
1380    /// Available since API-level: 20
1381    #[cfg(feature = "api-20")]
1382    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1383    pub fn OH_Input_InjectTouchEventGlobal(touchEvent: *const Input_TouchEvent) -> i32;
1384    /// Creates a touch event object.
1385    ///
1386    ///
1387    /// # Returns
1388    ///
1389    /// * Returns an [`Input_TouchEvent`] pointer object if the operation is successful.
1390    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
1391    ///
1392    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1393    ///
1394    /// Available since API-level: 12
1395    #[cfg(feature = "api-12")]
1396    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1397    pub fn OH_Input_CreateTouchEvent() -> *mut Input_TouchEvent;
1398    /// Destroys a touch event object.
1399    ///
1400    /// # Arguments
1401    ///
1402    /// * `touchEvent` - Touch event object.
1403    ///
1404    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1405    ///
1406    /// Available since API-level: 12
1407    #[cfg(feature = "api-12")]
1408    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1409    pub fn OH_Input_DestroyTouchEvent(touchEvent: *mut *mut Input_TouchEvent);
1410    /// Sets the action for a touch event.
1411    ///
1412    /// # Arguments
1413    ///
1414    /// * `touchEvent` - Touch event object.
1415    ///
1416    /// * `action` - Touch action.
1417    ///
1418    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1419    ///
1420    /// Available since API-level: 12
1421    #[cfg(feature = "api-12")]
1422    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1423    pub fn OH_Input_SetTouchEventAction(touchEvent: *mut Input_TouchEvent, action: i32);
1424    /// Obtains the action of a touch event.
1425    ///
1426    /// # Arguments
1427    ///
1428    /// * `touchEvent` - Touch event object.
1429    ///
1430    /// # Returns
1431    ///
1432    /// * Touch action.
1433    ///
1434    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1435    ///
1436    /// Available since API-level: 12
1437    #[cfg(feature = "api-12")]
1438    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1439    pub fn OH_Input_GetTouchEventAction(touchEvent: *const Input_TouchEvent) -> i32;
1440    /// Sets the finger ID for the touch event.
1441    ///
1442    /// # Arguments
1443    ///
1444    /// * `touchEvent` - Touch event object.
1445    ///
1446    /// * `id` - Finger ID.
1447    ///
1448    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1449    ///
1450    /// Available since API-level: 12
1451    #[cfg(feature = "api-12")]
1452    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1453    pub fn OH_Input_SetTouchEventFingerId(touchEvent: *mut Input_TouchEvent, id: i32);
1454    /// Obtains the finger ID of a touch event.
1455    ///
1456    /// # Arguments
1457    ///
1458    /// * `touchEvent` - Touch event object.
1459    ///
1460    /// # Returns
1461    ///
1462    /// * Finger ID.
1463    ///
1464    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1465    ///
1466    /// Available since API-level: 12
1467    #[cfg(feature = "api-12")]
1468    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1469    pub fn OH_Input_GetTouchEventFingerId(touchEvent: *const Input_TouchEvent) -> i32;
1470    /// Sets the X coordinate for a touch event.
1471    ///
1472    /// # Arguments
1473    ///
1474    /// * `touchEvent` - Touch event object.
1475    ///
1476    /// * `displayX` - X coordinate.
1477    ///
1478    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1479    ///
1480    /// Available since API-level: 12
1481    #[cfg(feature = "api-12")]
1482    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1483    pub fn OH_Input_SetTouchEventDisplayX(touchEvent: *mut Input_TouchEvent, displayX: i32);
1484    /// Obtains the X coordinate of a touch event.
1485    ///
1486    /// # Arguments
1487    ///
1488    /// * `touchEvent` - Touch event object.
1489    ///
1490    /// # Returns
1491    ///
1492    /// * X coordinate.
1493    ///
1494    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1495    ///
1496    /// Available since API-level: 12
1497    #[cfg(feature = "api-12")]
1498    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1499    pub fn OH_Input_GetTouchEventDisplayX(touchEvent: *const Input_TouchEvent) -> i32;
1500    /// Sets the Y coordinate for a touch event.
1501    ///
1502    /// # Arguments
1503    ///
1504    /// * `touchEvent` - Touch event object.
1505    ///
1506    /// * `displayY` - Y coordinate.
1507    ///
1508    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1509    ///
1510    /// Available since API-level: 12
1511    #[cfg(feature = "api-12")]
1512    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1513    pub fn OH_Input_SetTouchEventDisplayY(touchEvent: *mut Input_TouchEvent, displayY: i32);
1514    /// Obtains the Y coordinate of a touch event.
1515    ///
1516    /// # Arguments
1517    ///
1518    /// * `touchEvent` - Touch event object.
1519    ///
1520    /// # Returns
1521    ///
1522    /// * Y coordinate.
1523    ///
1524    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1525    ///
1526    /// Available since API-level: 12
1527    #[cfg(feature = "api-12")]
1528    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1529    pub fn OH_Input_GetTouchEventDisplayY(touchEvent: *const Input_TouchEvent) -> i32;
1530    /// Sets the time when a touch event occurs.
1531    ///
1532    /// # Arguments
1533    ///
1534    /// * `touchEvent` - Touch event object.
1535    ///
1536    /// * `actionTime` - Time when the touch event occurs.
1537    ///
1538    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1539    ///
1540    /// Available since API-level: 12
1541    #[cfg(feature = "api-12")]
1542    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1543    pub fn OH_Input_SetTouchEventActionTime(touchEvent: *mut Input_TouchEvent, actionTime: i64);
1544    /// Obtains the time when a touch event occurs.
1545    ///
1546    /// # Arguments
1547    ///
1548    /// * `touchEvent` - touch event object.
1549    ///
1550    /// # Returns
1551    ///
1552    /// * Returns the time when the touch event occurs.
1553    ///
1554    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1555    ///
1556    /// Available since API-level: 12
1557    #[cfg(feature = "api-12")]
1558    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1559    pub fn OH_Input_GetTouchEventActionTime(touchEvent: *const Input_TouchEvent) -> i64;
1560    /// Sets the windowId for a touch event.
1561    ///
1562    /// # Arguments
1563    ///
1564    /// * `touchEvent` - Touch event object.
1565    ///
1566    /// * `windowId` - The windowId for a touch event.
1567    ///
1568    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1569    ///
1570    /// Available since API-level: 15
1571    #[cfg(feature = "api-15")]
1572    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1573    pub fn OH_Input_SetTouchEventWindowId(touchEvent: *mut Input_TouchEvent, windowId: i32);
1574    /// Obtains the windowId of a touch event.
1575    ///
1576    /// # Arguments
1577    ///
1578    /// * `touchEvent` - Touch event object.
1579    ///
1580    /// # Returns
1581    ///
1582    /// * windowId.
1583    ///
1584    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1585    ///
1586    /// Available since API-level: 15
1587    #[cfg(feature = "api-15")]
1588    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1589    pub fn OH_Input_GetTouchEventWindowId(touchEvent: *const Input_TouchEvent) -> i32;
1590    /// Sets the displayId for a touch event.
1591    ///
1592    /// # Arguments
1593    ///
1594    /// * `touchEvent` - Touch event object.
1595    ///
1596    /// * `displayId` - The displayId for a touch event.
1597    ///
1598    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1599    ///
1600    /// Available since API-level: 15
1601    #[cfg(feature = "api-15")]
1602    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1603    pub fn OH_Input_SetTouchEventDisplayId(touchEvent: *mut Input_TouchEvent, displayId: i32);
1604    /// Obtains the displayId of a touch event.
1605    ///
1606    /// # Arguments
1607    ///
1608    /// * `touchEvent` - Touch event object.
1609    ///
1610    /// # Returns
1611    ///
1612    /// * displayId.
1613    ///
1614    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1615    ///
1616    /// Available since API-level: 15
1617    #[cfg(feature = "api-15")]
1618    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1619    pub fn OH_Input_GetTouchEventDisplayId(touchEvent: *const Input_TouchEvent) -> i32;
1620    /// Set the global X coordinate of the touch event.
1621    ///
1622    /// # Arguments
1623    ///
1624    /// * `touchEvent` - Touch event object.
1625    ///
1626    /// * `globalX` - Global X coordinate.
1627    ///
1628    /// Available since API-level: 20
1629    #[cfg(feature = "api-20")]
1630    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1631    pub fn OH_Input_SetTouchEventGlobalX(touchEvent: *mut Input_TouchEvent, globalX: i32);
1632    /// Queries the global X coordinate of the touch event.
1633    ///
1634    /// # Arguments
1635    ///
1636    /// * `touchEvent` - Touch event object.
1637    ///
1638    /// # Returns
1639    ///
1640    /// * Global X coordinate.
1641    ///
1642    /// Available since API-level: 20
1643    #[cfg(feature = "api-20")]
1644    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1645    pub fn OH_Input_GetTouchEventGlobalX(touchEvent: *const Input_TouchEvent) -> i32;
1646    /// Set the global Y coordinate of the touch event.
1647    ///
1648    /// # Arguments
1649    ///
1650    /// * `touchEvent` - Touch event object.
1651    ///
1652    /// * `globalY` - Global Y coordinate.
1653    ///
1654    /// Available since API-level: 20
1655    #[cfg(feature = "api-20")]
1656    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1657    pub fn OH_Input_SetTouchEventGlobalY(touchEvent: *mut Input_TouchEvent, globalY: i32);
1658    /// Queries the global Y coordinate of the touch event.
1659    ///
1660    /// # Arguments
1661    ///
1662    /// * `touchEvent` - Touch event object.
1663    ///
1664    /// # Returns
1665    ///
1666    /// * Global Y coordinate.
1667    ///
1668    /// Available since API-level: 20
1669    #[cfg(feature = "api-20")]
1670    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1671    pub fn OH_Input_GetTouchEventGlobalY(touchEvent: *const Input_TouchEvent) -> i32;
1672    /// Cancels event injection and revokes authorization.
1673    ///
1674    ///
1675    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1676    ///
1677    /// Available since API-level: 12
1678    #[cfg(feature = "api-12")]
1679    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1680    pub fn OH_Input_CancelInjection();
1681    /// Requests for injection authorization.
1682    ///
1683    /// # Arguments
1684    ///
1685    /// * `callback` - - callback used to return the result.
1686    ///
1687    /// # Returns
1688    ///
1689    /// * OH_Input_RequestInjection function result code.
1690    /// [`INPUT_SUCCESS`] Success.
1691    ///
1692    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1693    ///
1694    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
1695    ///
1696    /// [`INPUT_SERVICE_EXCEPTION`] Service error.
1697    ///
1698    /// [`INPUT_INJECTION_AUTHORIZING`] Authorizing.
1699    ///
1700    /// [`INPUT_INJECTION_OPERATION_FREQUENT`] Too many operations.
1701    ///
1702    /// [`INPUT_INJECTION_AUTHORIZED`] Authorized.
1703    ///
1704    /// [`INPUT_INJECTION_AUTHORIZED_OTHERS`] Authorized to other applications.
1705    ///
1706    ///
1707    /// Available since API-level: 20
1708    #[cfg(feature = "api-20")]
1709    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1710    pub fn OH_Input_RequestInjection(callback: Input_InjectAuthorizeCallback) -> Input_Result;
1711    /// Queries the injection authorization status.
1712    ///
1713    /// # Arguments
1714    ///
1715    /// * `status` - Injection authorization status. For details, see [`Input_InjectionStatus`].
1716    ///
1717    /// # Returns
1718    ///
1719    /// * OH_Input_QueryAuthorizedStatus function result code.
1720    /// [`INPUT_SUCCESS`] Success.
1721    ///
1722    /// [`INPUT_PARAMETER_ERROR`] The status is NULL
1723    ///
1724    /// [`INPUT_SERVICE_EXCEPTION`] Service error.
1725    ///
1726    ///
1727    /// Available since API-level: 20
1728    #[cfg(feature = "api-20")]
1729    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
1730    pub fn OH_Input_QueryAuthorizedStatus(status: *mut Input_InjectionStatus) -> Input_Result;
1731    /// Creates an axis event object.
1732    ///
1733    ///
1734    /// # Returns
1735    ///
1736    /// * If the operation is successful, a [`Input_AxisEvent`] object is returned.
1737    /// If the operation fails, null is returned.
1738    ///
1739    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1740    ///
1741    /// Available since API-level: 12
1742    #[cfg(feature = "api-12")]
1743    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1744    pub fn OH_Input_CreateAxisEvent() -> *mut Input_AxisEvent;
1745    /// Destroys an axis event object.
1746    ///
1747    /// # Arguments
1748    ///
1749    /// * `axisEvent` - Pointer to the axis event object.
1750    ///
1751    /// # Returns
1752    ///
1753    /// * OH_Input_DestroyAxisEvent function result code.
1754    /// [`INPUT_SUCCESS`] Destroys axisEvent success.
1755    ///
1756    /// [`INPUT_PARAMETER_ERROR`]The axisEvent is NULL or the *axisEvent is NULL.
1757    ///
1758    ///
1759    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1760    ///
1761    /// Available since API-level: 12
1762    #[cfg(feature = "api-12")]
1763    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1764    pub fn OH_Input_DestroyAxisEvent(axisEvent: *mut *mut Input_AxisEvent) -> Input_Result;
1765    /// Sets the axis event action.
1766    ///
1767    /// # Arguments
1768    ///
1769    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1770    ///
1771    /// * `action` - Axis event action. The values are defined in [`InputEvent_AxisAction`].
1772    ///
1773    /// # Returns
1774    ///
1775    /// * OH_Input_SetAxisEventAction function result code.
1776    /// [`INPUT_SUCCESS`] Sets the axis event action success.
1777    ///
1778    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1779    ///
1780    ///
1781    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1782    ///
1783    /// Available since API-level: 12
1784    #[cfg(feature = "api-12")]
1785    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1786    pub fn OH_Input_SetAxisEventAction(
1787        axisEvent: *mut Input_AxisEvent,
1788        action: InputEvent_AxisAction,
1789    ) -> Input_Result;
1790    /// Obtains the axis event action.
1791    ///
1792    /// # Arguments
1793    ///
1794    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1795    ///
1796    /// * `action` - Axis event action. The values are defined in [`InputEvent_AxisAction`].
1797    ///
1798    /// # Returns
1799    ///
1800    /// * OH_Input_GetAxisEventAction function result code.
1801    /// [`INPUT_SUCCESS`] Obtains the axis event action success.
1802    ///
1803    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the action is NULL.
1804    ///
1805    ///
1806    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1807    ///
1808    /// Available since API-level: 12
1809    #[cfg(feature = "api-12")]
1810    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1811    pub fn OH_Input_GetAxisEventAction(
1812        axisEvent: *const Input_AxisEvent,
1813        action: *mut InputEvent_AxisAction,
1814    ) -> Input_Result;
1815    /// Sets the X coordinate of an axis event.
1816    ///
1817    /// # Arguments
1818    ///
1819    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1820    ///
1821    /// * `displayX` - X coordinate of the axis event.
1822    ///
1823    /// # Returns
1824    ///
1825    /// * OH_Input_SetAxisEventDisplayX function result code.
1826    /// [`INPUT_SUCCESS`] Sets the X coordinate of the axis event success.
1827    ///
1828    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1829    ///
1830    ///
1831    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1832    ///
1833    /// Available since API-level: 12
1834    #[cfg(feature = "api-12")]
1835    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1836    pub fn OH_Input_SetAxisEventDisplayX(
1837        axisEvent: *mut Input_AxisEvent,
1838        displayX: f32,
1839    ) -> Input_Result;
1840    /// Obtains the X coordinate of an axis event.
1841    ///
1842    /// # Arguments
1843    ///
1844    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1845    ///
1846    /// * `displayX` - X coordinate of the axis event.
1847    ///
1848    /// # Returns
1849    ///
1850    /// * OH_Input_GetAxisEventDisplayX function result code.
1851    /// [`INPUT_SUCCESS`] Obtains the X coordinate of the axis event success.
1852    ///
1853    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the displayX is NULL.
1854    ///
1855    ///
1856    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1857    ///
1858    /// Available since API-level: 12
1859    #[cfg(feature = "api-12")]
1860    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1861    pub fn OH_Input_GetAxisEventDisplayX(
1862        axisEvent: *const Input_AxisEvent,
1863        displayX: *mut f32,
1864    ) -> Input_Result;
1865    /// Sets the Y coordinate of an axis event.
1866    ///
1867    /// # Arguments
1868    ///
1869    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1870    ///
1871    /// * `displayY` - Y coordinate of the axis event.
1872    ///
1873    /// # Returns
1874    ///
1875    /// * OH_Input_SetAxisEventDisplayY function result code.
1876    /// [`INPUT_SUCCESS`] Sets the Y coordinate of the axis event success.
1877    ///
1878    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1879    ///
1880    ///
1881    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1882    ///
1883    /// Available since API-level: 12
1884    #[cfg(feature = "api-12")]
1885    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1886    pub fn OH_Input_SetAxisEventDisplayY(
1887        axisEvent: *mut Input_AxisEvent,
1888        displayY: f32,
1889    ) -> Input_Result;
1890    /// Obtains the Y coordinate of an axis event.
1891    ///
1892    /// # Arguments
1893    ///
1894    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1895    ///
1896    /// * `displayY` - Y coordinate of the axis event.
1897    ///
1898    /// # Returns
1899    ///
1900    /// * OH_Input_GetAxisEventDisplayY function result code.
1901    /// [`INPUT_SUCCESS`] Obtains the Y coordinate of the axis event success.
1902    ///
1903    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the displayY is NULL.
1904    ///
1905    ///
1906    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1907    ///
1908    /// Available since API-level: 12
1909    #[cfg(feature = "api-12")]
1910    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1911    pub fn OH_Input_GetAxisEventDisplayY(
1912        axisEvent: *const Input_AxisEvent,
1913        displayY: *mut f32,
1914    ) -> Input_Result;
1915    /// Sets the axis value of the axis type specified by the axis event.
1916    ///
1917    /// # Arguments
1918    ///
1919    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1920    ///
1921    /// * `axisType` - Axis type. The values are defined in [`InputEvent_AxisType`].
1922    ///
1923    /// * `axisValue` - Axis value.
1924    ///
1925    /// # Returns
1926    ///
1927    /// * OH_Input_SetAxisEventAxisValue function result code.
1928    /// [`INPUT_SUCCESS`] Sets the axis value of the axis event success.
1929    ///
1930    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1931    ///
1932    ///
1933    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1934    ///
1935    /// Available since API-level: 12
1936    #[cfg(feature = "api-12")]
1937    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1938    pub fn OH_Input_SetAxisEventAxisValue(
1939        axisEvent: *mut Input_AxisEvent,
1940        axisType: InputEvent_AxisType,
1941        axisValue: f64,
1942    ) -> Input_Result;
1943    /// Obtains the axis value for the specified axis type of the axis event.
1944    ///
1945    /// # Arguments
1946    ///
1947    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1948    ///
1949    /// * `axisType` - Axis type. The values are defined in [`InputEvent_AxisType`].
1950    ///
1951    /// * `axisValue` - Axis value.
1952    ///
1953    /// # Returns
1954    ///
1955    /// * OH_Input_GetAxisEventAxisValue function result code.
1956    /// [`INPUT_SUCCESS`] Obtains the axis value of the axis event success.
1957    ///
1958    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the axisValue is NULL,
1959    /// or the axisType not found in the axisEvent.
1960    ///
1961    ///
1962    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1963    ///
1964    /// Available since API-level: 12
1965    #[cfg(feature = "api-12")]
1966    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1967    pub fn OH_Input_GetAxisEventAxisValue(
1968        axisEvent: *const Input_AxisEvent,
1969        axisType: InputEvent_AxisType,
1970        axisValue: *mut f64,
1971    ) -> Input_Result;
1972    /// Sets the time when an axis event occurs.
1973    ///
1974    /// # Arguments
1975    ///
1976    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1977    ///
1978    /// * `actionTime` - Time when an axis event occurs.
1979    ///
1980    /// # Returns
1981    ///
1982    /// * OH_Input_SetAxisEventActionTime function result code.
1983    /// [`INPUT_SUCCESS`] Sets the time when an axis event occurs success.
1984    ///
1985    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1986    ///
1987    ///
1988    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1989    ///
1990    /// Available since API-level: 12
1991    #[cfg(feature = "api-12")]
1992    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1993    pub fn OH_Input_SetAxisEventActionTime(
1994        axisEvent: *mut Input_AxisEvent,
1995        actionTime: i64,
1996    ) -> Input_Result;
1997    /// Obtains the time when an axis event occurs.
1998    ///
1999    /// # Arguments
2000    ///
2001    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2002    ///
2003    /// * `actionTime` - Time when an axis event occurs.
2004    ///
2005    /// # Returns
2006    ///
2007    /// * OH_Input_GetAxisEventActionTime function result code.
2008    /// [`INPUT_SUCCESS`] Obtains the time when an axis event occurs success.
2009    ///
2010    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the actionTime is NULL.
2011    ///
2012    ///
2013    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2014    ///
2015    /// Available since API-level: 12
2016    #[cfg(feature = "api-12")]
2017    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2018    pub fn OH_Input_GetAxisEventActionTime(
2019        axisEvent: *const Input_AxisEvent,
2020        actionTime: *mut i64,
2021    ) -> Input_Result;
2022    /// Sets the axis event type.
2023    ///
2024    /// # Arguments
2025    ///
2026    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2027    ///
2028    /// * `axisEventType` - Axis event type. The values are defined in [`InputEvent_AxisEventType`].
2029    ///
2030    /// # Returns
2031    ///
2032    /// * OH_Input_SetAxisEventType function result code.
2033    /// [`INPUT_SUCCESS`] Sets the axis event type success.
2034    ///
2035    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
2036    ///
2037    ///
2038    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2039    ///
2040    /// Available since API-level: 12
2041    #[cfg(feature = "api-12")]
2042    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2043    pub fn OH_Input_SetAxisEventType(
2044        axisEvent: *mut Input_AxisEvent,
2045        axisEventType: InputEvent_AxisEventType,
2046    ) -> Input_Result;
2047    /// Obtains the axis event type.
2048    ///
2049    /// # Arguments
2050    ///
2051    /// * `axisEvent` - Axis event object.
2052    ///
2053    /// * `axisEventType` - Axis event type. The values are defined in [`InputEvent_AxisEventType`].
2054    ///
2055    /// # Returns
2056    ///
2057    /// * OH_Input_GetAxisEventType function result code.
2058    /// [`INPUT_SUCCESS`] Obtains the axis event type success.
2059    ///
2060    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the axisEventType is NULL.
2061    ///
2062    ///
2063    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2064    ///
2065    /// Available since API-level: 12
2066    #[cfg(feature = "api-12")]
2067    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2068    pub fn OH_Input_GetAxisEventType(
2069        axisEvent: *const Input_AxisEvent,
2070        axisEventType: *mut InputEvent_AxisEventType,
2071    ) -> Input_Result;
2072    /// Sets the axis event source type.
2073    ///
2074    /// # Arguments
2075    ///
2076    /// * `axisEvent` - Axis event object.
2077    ///
2078    /// * `sourceType` - Axis event source type. The values are defined in [`InputEvent_SourceType`].
2079    ///
2080    /// # Returns
2081    ///
2082    /// * OH_Input_SetAxisEventSourceType function result code.
2083    /// [`INPUT_SUCCESS`] Sets the axis event source type success.
2084    ///
2085    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
2086    ///
2087    ///
2088    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2089    ///
2090    /// Available since API-level: 12
2091    #[cfg(feature = "api-12")]
2092    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2093    pub fn OH_Input_SetAxisEventSourceType(
2094        axisEvent: *mut Input_AxisEvent,
2095        sourceType: InputEvent_SourceType,
2096    ) -> Input_Result;
2097    /// Obtains the axis event source type.
2098    ///
2099    /// # Arguments
2100    ///
2101    /// * `axisEvent` - Axis event object.
2102    ///
2103    /// * `sourceType` - Axis event source type. The values are defined in [`InputEvent_SourceType`].
2104    ///
2105    /// # Returns
2106    ///
2107    /// * OH_Input_GetAxisEventSourceType function result code.
2108    /// [`INPUT_SUCCESS`] Obtains the axis event source type success.
2109    ///
2110    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the sourceType is NULL.
2111    ///
2112    ///
2113    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2114    ///
2115    /// Available since API-level: 12
2116    #[cfg(feature = "api-12")]
2117    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2118    pub fn OH_Input_GetAxisEventSourceType(
2119        axisEvent: *const Input_AxisEvent,
2120        sourceType: *mut InputEvent_SourceType,
2121    ) -> Input_Result;
2122    /// Sets the windowId of an axis event.
2123    ///
2124    /// # Arguments
2125    ///
2126    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2127    ///
2128    /// * `windowId` - The windowId for the axis event.
2129    ///
2130    /// # Returns
2131    ///
2132    /// * OH_Input_SetAxisEventWindowId function result code.
2133    /// [`INPUT_SUCCESS`] Sets the Y coordinate of the axis event success.
2134    ///
2135    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
2136    ///
2137    ///
2138    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2139    ///
2140    /// Available since API-level: 15
2141    #[cfg(feature = "api-15")]
2142    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
2143    pub fn OH_Input_SetAxisEventWindowId(
2144        axisEvent: *mut Input_AxisEvent,
2145        windowId: i32,
2146    ) -> Input_Result;
2147    /// Obtains the windowId of an axis event.
2148    ///
2149    /// # Arguments
2150    ///
2151    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2152    ///
2153    /// * `windowId` - The windowId for the axis event.
2154    ///
2155    /// # Returns
2156    ///
2157    /// * OH_Input_GetAxisEventWindowId function result code.
2158    /// [`INPUT_SUCCESS`] Obtains the Y coordinate of the axis event success.
2159    ///
2160    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the displayY is NULL.
2161    ///
2162    ///
2163    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2164    ///
2165    /// Available since API-level: 15
2166    #[cfg(feature = "api-15")]
2167    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
2168    pub fn OH_Input_GetAxisEventWindowId(
2169        axisEvent: *const Input_AxisEvent,
2170        windowId: *mut i32,
2171    ) -> Input_Result;
2172    /// Sets the displayId of an axis event.
2173    ///
2174    /// # Arguments
2175    ///
2176    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2177    ///
2178    /// * `displayId` - The displayId for the axis event.
2179    ///
2180    /// # Returns
2181    ///
2182    /// * OH_Input_SetAxisEventDisplayId function result code.
2183    /// [`INPUT_SUCCESS`] Sets the Y coordinate of the axis event success.
2184    ///
2185    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
2186    ///
2187    ///
2188    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2189    ///
2190    /// Available since API-level: 15
2191    #[cfg(feature = "api-15")]
2192    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
2193    pub fn OH_Input_SetAxisEventDisplayId(
2194        axisEvent: *mut Input_AxisEvent,
2195        displayId: i32,
2196    ) -> Input_Result;
2197    /// Obtains the displayId of an axis event.
2198    ///
2199    /// # Arguments
2200    ///
2201    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2202    ///
2203    /// * `displayId` - The displayId for the axis event.
2204    ///
2205    /// # Returns
2206    ///
2207    /// * OH_Input_GetAxisEventDisplayId function result code.
2208    /// [`INPUT_SUCCESS`] Obtains the Y coordinate of the axis event success.
2209    ///
2210    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the displayY is NULL.
2211    ///
2212    ///
2213    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2214    ///
2215    /// Available since API-level: 15
2216    #[cfg(feature = "api-15")]
2217    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
2218    pub fn OH_Input_GetAxisEventDisplayId(
2219        axisEvent: *const Input_AxisEvent,
2220        displayId: *mut i32,
2221    ) -> Input_Result;
2222    /// Set the global X coordinate of the axis event.
2223    ///
2224    /// # Arguments
2225    ///
2226    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2227    ///
2228    /// * `globalX` - Global X coordinate.
2229    ///
2230    /// # Returns
2231    ///
2232    /// * OH_Input_SetAxisEventGlobalX function result code.
2233    /// [`INPUT_SUCCESS`] Success.
2234    ///
2235    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
2236    ///
2237    ///
2238    /// Available since API-level: 20
2239    #[cfg(feature = "api-20")]
2240    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2241    pub fn OH_Input_SetAxisEventGlobalX(
2242        axisEvent: *mut Input_AxisEvent,
2243        globalX: i32,
2244    ) -> Input_Result;
2245    /// Queries the global X coordinate of the axis event.
2246    ///
2247    /// # Arguments
2248    ///
2249    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2250    ///
2251    /// * `globalX` - Global X coordinate.
2252    ///
2253    /// # Returns
2254    ///
2255    /// * OH_Input_GetAxisEventGlobalX function result code.
2256    /// [`INPUT_SUCCESS`] Success.
2257    ///
2258    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the globalX is NULL.
2259    ///
2260    ///
2261    /// Available since API-level: 20
2262    #[cfg(feature = "api-20")]
2263    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2264    pub fn OH_Input_GetAxisEventGlobalX(
2265        axisEvent: *const Input_AxisEvent,
2266        globalX: *mut i32,
2267    ) -> Input_Result;
2268    /// Set the global Y coordinate of the axis event.
2269    ///
2270    /// # Arguments
2271    ///
2272    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2273    ///
2274    /// * `globalY` - Global Y coordinate.
2275    ///
2276    /// # Returns
2277    ///
2278    /// * OH_Input_SetAxisEventGlobalY function result code.
2279    /// [`INPUT_SUCCESS`] Success.
2280    ///
2281    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
2282    ///
2283    ///
2284    /// Available since API-level: 20
2285    #[cfg(feature = "api-20")]
2286    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2287    pub fn OH_Input_SetAxisEventGlobalY(
2288        axisEvent: *mut Input_AxisEvent,
2289        globalY: i32,
2290    ) -> Input_Result;
2291    /// Queries the global Y coordinate of the axis event.
2292    ///
2293    /// # Arguments
2294    ///
2295    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
2296    ///
2297    /// * `globalY` - Global Y coordinate.
2298    ///
2299    /// # Returns
2300    ///
2301    /// * OH_Input_GetAxisEventGlobalY function result code.
2302    /// [`INPUT_SUCCESS`] Success.
2303    ///
2304    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the globalY is NULL.
2305    ///
2306    ///
2307    /// Available since API-level: 20
2308    #[cfg(feature = "api-20")]
2309    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
2310    pub fn OH_Input_GetAxisEventGlobalY(
2311        axisEvent: *const Input_AxisEvent,
2312        globalY: *mut i32,
2313    ) -> Input_Result;
2314    /// Adds a listener of key events.
2315    ///
2316    /// ohos.permission.INPUT_MONITORING
2317    /// # Arguments
2318    ///
2319    /// * `callback` - - Callback used to receive key events.
2320    ///
2321    /// # Returns
2322    ///
2323    /// * OH_Input_AddKeyEventMonitor function result code.
2324    /// [`INPUT_SUCCESS`] Adds a listener of key events success.
2325    ///
2326    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2327    ///
2328    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2329    ///
2330    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
2331    ///
2332    ///
2333    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2334    ///
2335    /// Available since API-level: 12
2336    #[cfg(feature = "api-12")]
2337    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2338    pub fn OH_Input_AddKeyEventMonitor(callback: Input_KeyEventCallback) -> Input_Result;
2339    /// Adds a listener for mouse events, including mouse click and movement events,
2340    /// but not scroll wheel events. Scroll wheel events are axis events.
2341    ///
2342    /// ohos.permission.INPUT_MONITORING
2343    /// # Arguments
2344    ///
2345    /// * `callback` - - Callback used to receive mouse events.
2346    ///
2347    /// # Returns
2348    ///
2349    /// * OH_Input_AddMouseEventMonitor function result code.
2350    /// [`INPUT_SUCCESS`] Adds a listener of mouse events success.
2351    ///
2352    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2353    ///
2354    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2355    ///
2356    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
2357    ///
2358    ///
2359    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2360    ///
2361    /// Available since API-level: 12
2362    #[cfg(feature = "api-12")]
2363    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2364    pub fn OH_Input_AddMouseEventMonitor(callback: Input_MouseEventCallback) -> Input_Result;
2365    /// Add a listener for touch events.
2366    ///
2367    /// ohos.permission.INPUT_MONITORING
2368    /// # Arguments
2369    ///
2370    /// * `callback` - - Callback used to receive touch events.
2371    ///
2372    /// # Returns
2373    ///
2374    /// * OH_Input_AddTouchEventMonitor function result code.
2375    /// [`INPUT_SUCCESS`] Adds a listener of touch events success.
2376    ///
2377    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2378    ///
2379    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2380    ///
2381    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
2382    ///
2383    ///
2384    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2385    ///
2386    /// Available since API-level: 12
2387    #[cfg(feature = "api-12")]
2388    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2389    pub fn OH_Input_AddTouchEventMonitor(callback: Input_TouchEventCallback) -> Input_Result;
2390    /// Adds a listener for all types of axis events.
2391    /// The axis event types are defined in [`InputEvent_AxisEventType`].
2392    ///
2393    /// ohos.permission.INPUT_MONITORING
2394    /// # Arguments
2395    ///
2396    /// * `callback` - - Callback used to receive axis events.
2397    ///
2398    /// # Returns
2399    ///
2400    /// * OH_Input_AddAxisEventMonitorForAll function result code.
2401    /// [`INPUT_SUCCESS`] Adds a listener for all types of axis events success.
2402    ///
2403    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2404    ///
2405    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2406    ///
2407    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
2408    ///
2409    ///
2410    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2411    ///
2412    /// Available since API-level: 12
2413    #[cfg(feature = "api-12")]
2414    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2415    pub fn OH_Input_AddAxisEventMonitorForAll(callback: Input_AxisEventCallback) -> Input_Result;
2416    /// Adds a listener for the specified type of axis events.
2417    ///
2418    /// ohos.permission.INPUT_MONITORING
2419    /// # Arguments
2420    ///
2421    /// * `axisEventType` - - Axis event type. The values are defined in [`InputEvent_AxisEventType`].
2422    ///
2423    /// * `callback` - - Callback used to receive the specified type of axis events.
2424    ///
2425    /// # Returns
2426    ///
2427    /// * OH_Input_AddAxisEventMonitor function result code.
2428    /// [`INPUT_SUCCESS`] Adds a listener for the specified types of axis events success.
2429    ///
2430    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2431    ///
2432    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2433    ///
2434    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
2435    ///
2436    ///
2437    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2438    ///
2439    /// Available since API-level: 12
2440    #[cfg(feature = "api-12")]
2441    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2442    pub fn OH_Input_AddAxisEventMonitor(
2443        axisEventType: InputEvent_AxisEventType,
2444        callback: Input_AxisEventCallback,
2445    ) -> Input_Result;
2446    /// Removes a key event listener.
2447    ///
2448    /// ohos.permission.INPUT_MONITORING
2449    /// # Arguments
2450    ///
2451    /// * `callback` - - Callback for the key event listener.
2452    ///
2453    /// # Returns
2454    ///
2455    /// * OH_Input_RemoveKeyEventMonitor function result code.
2456    /// [`INPUT_SUCCESS`] Removes a key event listener success.
2457    ///
2458    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2459    ///
2460    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
2461    ///
2462    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
2463    ///
2464    ///
2465    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2466    ///
2467    /// Available since API-level: 12
2468    #[cfg(feature = "api-12")]
2469    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2470    pub fn OH_Input_RemoveKeyEventMonitor(callback: Input_KeyEventCallback) -> Input_Result;
2471    /// Removes a mouse event listener.
2472    ///
2473    /// ohos.permission.INPUT_MONITORING
2474    /// # Arguments
2475    ///
2476    /// * `callback` - - Callback for the mouse event listener.
2477    ///
2478    /// # Returns
2479    ///
2480    /// * OH_Input_RemoveMouseEventMonitor function result code.
2481    /// [`INPUT_SUCCESS`] Removes a mouse event listener success.
2482    ///
2483    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2484    ///
2485    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
2486    ///
2487    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
2488    ///
2489    ///
2490    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2491    ///
2492    /// Available since API-level: 12
2493    #[cfg(feature = "api-12")]
2494    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2495    pub fn OH_Input_RemoveMouseEventMonitor(callback: Input_MouseEventCallback) -> Input_Result;
2496    /// Removes a touch event listener.
2497    ///
2498    /// ohos.permission.INPUT_MONITORING
2499    /// # Arguments
2500    ///
2501    /// * `callback` - - Callback for the touch event listener.
2502    ///
2503    /// # Returns
2504    ///
2505    /// * OH_Input_RemoveTouchEventMonitor function result code.
2506    /// [`INPUT_SUCCESS`] Removes a touch event listener success.
2507    ///
2508    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2509    ///
2510    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
2511    ///
2512    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
2513    ///
2514    ///
2515    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2516    ///
2517    /// Available since API-level: 12
2518    #[cfg(feature = "api-12")]
2519    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2520    pub fn OH_Input_RemoveTouchEventMonitor(callback: Input_TouchEventCallback) -> Input_Result;
2521    /// Removes the listener for all types of axis events.
2522    ///
2523    /// ohos.permission.INPUT_MONITORING
2524    /// # Arguments
2525    ///
2526    /// * `callback` - - Callback for the listener used to listen for all types of axis events.
2527    ///
2528    /// # Returns
2529    ///
2530    /// * OH_Input_RemoveAxisEventMonitorForAll function result code.
2531    /// [`INPUT_SUCCESS`] Removes the listener for all types of axis events success.
2532    ///
2533    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2534    ///
2535    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
2536    ///
2537    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
2538    ///
2539    ///
2540    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2541    ///
2542    /// Available since API-level: 12
2543    #[cfg(feature = "api-12")]
2544    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2545    pub fn OH_Input_RemoveAxisEventMonitorForAll(callback: Input_AxisEventCallback)
2546        -> Input_Result;
2547    /// Removes the listener for the specified type of axis events.
2548    ///
2549    /// ohos.permission.INPUT_MONITORING
2550    /// # Arguments
2551    ///
2552    /// * `axisEventType` - - Axis event type. The axis event type is defined in [`InputEvent_AxisEventType`].
2553    ///
2554    /// * `callback` - - Callback for the listener used to listen for the specified type of axis events.
2555    ///
2556    /// # Returns
2557    ///
2558    /// * OH_Input_RemoveAxisEventMonitor function result code.
2559    /// [`INPUT_SUCCESS`] Removes the listener for the specified type of axis events success.
2560    ///
2561    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2562    ///
2563    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
2564    ///
2565    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
2566    ///
2567    ///
2568    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2569    ///
2570    /// Available since API-level: 12
2571    #[cfg(feature = "api-12")]
2572    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2573    pub fn OH_Input_RemoveAxisEventMonitor(
2574        axisEventType: InputEvent_AxisEventType,
2575        callback: Input_AxisEventCallback,
2576    ) -> Input_Result;
2577    /// Adds a key event interceptor. If multiple interceptors are added, only the first one takes effect.
2578    ///
2579    /// ohos.permission.INTERCEPT_INPUT_EVENT
2580    /// # Arguments
2581    ///
2582    /// * `callback` - - Callback used to receive key events.
2583    ///
2584    /// * `option` - - Options for event interception. If **null** is passed, the default value is used.
2585    ///
2586    /// # Returns
2587    ///
2588    /// * OH_Input_AddKeyEventInterceptor function result code.
2589    /// [`INPUT_SUCCESS`] Adds a key event interceptor success.
2590    ///
2591    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2592    ///
2593    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2594    ///
2595    /// [`INPUT_REPEAT_INTERCEPTOR`] Interceptor repeatedly created for an application.
2596    ///
2597    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the interceptor because the service is exception.
2598    ///
2599    ///
2600    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2601    ///
2602    /// Available since API-level: 12
2603    #[cfg(feature = "api-12")]
2604    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2605    pub fn OH_Input_AddKeyEventInterceptor(
2606        callback: Input_KeyEventCallback,
2607        option: *mut Input_InterceptorOptions,
2608    ) -> Input_Result;
2609    /// Adds an interceptor for input events, including mouse, touch, and axis events.
2610    /// If multiple interceptors are added, only the first one takes effect.
2611    ///
2612    /// ohos.permission.INTERCEPT_INPUT_EVENT
2613    /// # Arguments
2614    ///
2615    /// * `callback` - - Pointer to the structure of the callback for the input event interceptor.
2616    /// For details, see [`Input_InterceptorEventCallback`].
2617    ///
2618    /// * `option` - - Options for event interception. If **null** is passed, the default value is used.
2619    ///
2620    /// # Returns
2621    ///
2622    /// * OH_Input_AddInputEventInterceptor function result code.
2623    /// [`INPUT_SUCCESS`] Adds an interceptor for input events success.
2624    ///
2625    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2626    ///
2627    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
2628    ///
2629    /// [`INPUT_REPEAT_INTERCEPTOR`] Interceptor repeatedly created for an application.
2630    ///
2631    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the interceptor because the service is exception.
2632    ///
2633    ///
2634    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2635    ///
2636    /// Available since API-level: 12
2637    #[cfg(feature = "api-12")]
2638    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2639    pub fn OH_Input_AddInputEventInterceptor(
2640        callback: *mut Input_InterceptorEventCallback,
2641        option: *mut Input_InterceptorOptions,
2642    ) -> Input_Result;
2643    /// Removes a key event interceptor.
2644    ///
2645    /// ohos.permission.INTERCEPT_INPUT_EVENT
2646    ///
2647    /// # Returns
2648    ///
2649    /// * OH_Input_RemoveKeyEventInterceptor function result code.
2650    /// [`INPUT_SUCCESS`]Removes a key event interceptor success.
2651    ///
2652    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2653    ///
2654    /// [`INPUT_SERVICE_EXCEPTION`] Failed to remove the interceptor because the service is exception.
2655    ///
2656    ///
2657    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2658    ///
2659    /// Available since API-level: 12
2660    #[cfg(feature = "api-12")]
2661    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2662    pub fn OH_Input_RemoveKeyEventInterceptor() -> Input_Result;
2663    /// Removes an interceptor for input events, including mouse, touch, and axis events.
2664    ///
2665    /// ohos.permission.INTERCEPT_INPUT_EVENT
2666    ///
2667    /// # Returns
2668    ///
2669    /// * OH_Input_RemoveInputEventInterceptor function result code.
2670    /// [`INPUT_SUCCESS`] Removes an interceptor for input events success.
2671    ///
2672    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
2673    ///
2674    /// [`INPUT_SERVICE_EXCEPTION`] Failed to remove the interceptor because the service is exception.
2675    ///
2676    ///
2677    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2678    ///
2679    /// Available since API-level: 12
2680    #[cfg(feature = "api-12")]
2681    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
2682    pub fn OH_Input_RemoveInputEventInterceptor() -> Input_Result;
2683    /// Obtains the interval since the last system input event.
2684    ///
2685    /// # Arguments
2686    ///
2687    /// * `timeInterval` - Interval, in microseconds.
2688    ///
2689    /// # Returns
2690    ///
2691    /// * OH_Input_GetIntervalSinceLastInput status code, specifically.
2692    /// [`INPUT_SUCCESS`] if the Operation is successful.
2693    ///
2694    /// [`INPUT_SERVICE_EXCEPTION`] Failed to get the interval because the service is exception.
2695    ///
2696    /// [`INPUT_PARAMETER_ERROR`] The timeInterval is NULL.
2697    ///
2698    ///
2699    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2700    ///
2701    /// Available since API-level: 14
2702    #[cfg(feature = "api-14")]
2703    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2704    pub fn OH_Input_GetIntervalSinceLastInput(timeInterval: *mut i64) -> Input_Result;
2705    /// Creates a hot key object.
2706    ///
2707    ///
2708    /// # Returns
2709    ///
2710    /// * Returns an [`Input_Hotkey`] pointer object if the operation is successful. Otherwise, a null pointer is
2711    /// returned. The possible cause is memory allocation failure.
2712    ///
2713    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2714    ///
2715    /// Available since API-level: 14
2716    #[cfg(feature = "api-14")]
2717    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2718    pub fn OH_Input_CreateHotkey() -> *mut Input_Hotkey;
2719    /// Destroys a hot key object.
2720    ///
2721    /// # Arguments
2722    ///
2723    /// * `hotkey` - Hot key object.
2724    ///
2725    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2726    ///
2727    /// Available since API-level: 14
2728    #[cfg(feature = "api-14")]
2729    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2730    pub fn OH_Input_DestroyHotkey(hotkey: *mut *mut Input_Hotkey);
2731    /// Sets a modifier key.
2732    ///
2733    /// # Arguments
2734    ///
2735    /// * `hotkey` - Hotkey key object.
2736    ///
2737    /// * `preKeys` - List of modifier keys.
2738    ///
2739    /// * `size` - Number of modifier keys. One or two modifier keys are supported.
2740    ///
2741    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2742    ///
2743    /// Available since API-level: 14
2744    #[cfg(feature = "api-14")]
2745    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2746    pub fn OH_Input_SetPreKeys(hotkey: *mut Input_Hotkey, preKeys: *mut i32, size: i32);
2747    /// Obtains a modifier key.
2748    ///
2749    /// # Arguments
2750    ///
2751    /// * `hotkey` - Hotkey key object.
2752    ///
2753    /// * `preKeys` - List of modifier keys.
2754    ///
2755    /// * `preKeyCount` - Number of modifier keys.
2756    ///
2757    /// # Returns
2758    ///
2759    /// * OH_Input_GetPreKeys status code, specifically,
2760    /// [`INPUT_SUCCESS`] if the operation is successful;
2761    ///
2762    /// [`INPUT_PARAMETER_ERROR`] The hotkey is NULL or the pressedKeys is NULL or the pressedKeyCount
2763    /// is NULL;
2764    ///
2765    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2766    ///
2767    ///
2768    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2769    ///
2770    /// Available since API-level: 14
2771    #[cfg(feature = "api-14")]
2772    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2773    pub fn OH_Input_GetPreKeys(
2774        hotkey: *const Input_Hotkey,
2775        preKeys: *mut *mut i32,
2776        preKeyCount: *mut i32,
2777    ) -> Input_Result;
2778    /// Sets a modified key.
2779    ///
2780    /// # Arguments
2781    ///
2782    /// * `hotkey` - Hotkey key object.
2783    ///
2784    /// * `finalKey` - Modified key. Only one modified key is supported.
2785    ///
2786    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2787    ///
2788    /// Available since API-level: 14
2789    #[cfg(feature = "api-14")]
2790    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2791    pub fn OH_Input_SetFinalKey(hotkey: *mut Input_Hotkey, finalKey: i32);
2792    /// Obtains a modified key.
2793    ///
2794    /// # Arguments
2795    ///
2796    /// * `hotkey` - Hotkey key object.
2797    ///
2798    /// * `finalKeyCode` - Returns the key value of the decorated key.
2799    ///
2800    /// # Returns
2801    ///
2802    /// * OH_Input_GetFinalKey status code, specifically,
2803    /// [`INPUT_SUCCESS`] if the operation is successful;
2804    ///
2805    /// [`INPUT_PARAMETER_ERROR`] The hotkey is NULL or the finalKeyCode is NULL;
2806    ///
2807    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2808    ///
2809    ///
2810    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2811    ///
2812    /// Available since API-level: 14
2813    #[cfg(feature = "api-14")]
2814    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2815    pub fn OH_Input_GetFinalKey(
2816        hotkey: *const Input_Hotkey,
2817        finalKeyCode: *mut i32,
2818    ) -> Input_Result;
2819    /// Creates an array of [`Input_Hotkey`] instances.
2820    ///
2821    /// # Arguments
2822    ///
2823    /// * `count` - Number of [`Input_Hotkey`] instances to be created. The count must be the same as the number of
2824    /// system shortcut keys.
2825    ///
2826    /// # Returns
2827    ///
2828    /// * Returns a pointer to an array of [`Input_Hotkey`] instances if the operation is successful. If the
2829    /// operation fails, a null pointer is returned. The possible cause is memory allocation failure or count is not equal
2830    /// to the number of system hotkeys.
2831    ///
2832    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2833    ///
2834    /// Available since API-level: 14
2835    #[cfg(feature = "api-14")]
2836    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2837    pub fn OH_Input_CreateAllSystemHotkeys(count: i32) -> *mut *mut Input_Hotkey;
2838    /// Destroys an array of [`Input_Hotkey`] instances and reclaims memory.
2839    ///
2840    /// # Arguments
2841    ///
2842    /// * `hotkeys` - Pointer to an array of [`Input_Hotkey`] instances created by the
2843    /// [`OH_Input_CreateAllSystemHotkeys`] method.
2844    ///
2845    /// * `count` - Count of the array to be destroyed, which must be the same as the number of system shortcut keys.
2846    ///
2847    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2848    ///
2849    /// Available since API-level: 14
2850    #[cfg(feature = "api-14")]
2851    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2852    pub fn OH_Input_DestroyAllSystemHotkeys(hotkeys: *mut *mut Input_Hotkey, count: i32);
2853    /// Obtains all hot keys supported by the system.
2854    ///
2855    /// # Arguments
2856    ///
2857    /// * `hotkey` - Array of [`Input_Hotkey`] instances.
2858    /// When calling this API for the first time, you can pass NULL to obtain the array length.
2859    ///
2860    /// * `count` - Number of hot keys supported by the system.
2861    ///
2862    /// # Returns
2863    ///
2864    /// * OH_Input_GetAllSystemHotkeys status code, specifically,
2865    /// [`INPUT_SUCCESS`] if the operation is successful;
2866    ///
2867    /// [`INPUT_PARAMETER_ERROR`] The hotkey or count is NULL, or the value of count does not match the number
2868    /// of system shortcut keys supported by the system;
2869    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2870    ///
2871    ///
2872    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2873    ///
2874    /// Available since API-level: 14
2875    #[cfg(feature = "api-14")]
2876    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2877    pub fn OH_Input_GetAllSystemHotkeys(
2878        hotkey: *mut *mut Input_Hotkey,
2879        count: *mut i32,
2880    ) -> Input_Result;
2881    /// Specifies whether to report repeated key events.
2882    ///
2883    /// # Arguments
2884    ///
2885    /// * `hotkey` - Shortcut key object.
2886    ///
2887    /// * `isRepeat` - Whether to report repeated key events.
2888    /// The value <b>true</b> means to report repeated key events, and the value <b>false</b> means the opposite.
2889    ///
2890    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2891    ///
2892    /// Available since API-level: 14
2893    #[cfg(feature = "api-14")]
2894    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2895    pub fn OH_Input_SetRepeat(hotkey: *mut Input_Hotkey, isRepeat: bool);
2896    /// Checks whether to report repeated key events.
2897    ///
2898    /// # Arguments
2899    ///
2900    /// * `hotkey` - Shortcut key object.
2901    ///
2902    /// * `isRepeat` - Whether a key event is repeated.
2903    ///
2904    /// # Returns
2905    ///
2906    /// * OH_Input_GetRepeat status code, specifically,
2907    /// [`INPUT_SUCCESS`] if the operation is successful;
2908    ///
2909    /// [`INPUT_PARAMETER_ERROR`] otherwise;
2910    ///
2911    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2912    ///
2913    ///
2914    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2915    ///
2916    /// Available since API-level: 14
2917    #[cfg(feature = "api-14")]
2918    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2919    pub fn OH_Input_GetRepeat(hotkey: *const Input_Hotkey, isRepeat: *mut bool) -> Input_Result;
2920    /// Subscribes to shortcut key events.
2921    ///
2922    /// # Arguments
2923    ///
2924    /// * `hotkey` - Shortcut key object.
2925    ///
2926    /// * `callback` - Callback used to return shortcut key events.
2927    ///
2928    /// # Returns
2929    ///
2930    /// * OH_Input_AddHotkeyMonitor status code, specifically,
2931    /// [`INPUT_SUCCESS`] if the operation is successful;
2932    ///
2933    /// [`INPUT_PARAMETER_ERROR`] if hotkey or callback is NULL;
2934    ///
2935    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported;
2936    ///
2937    /// [`INPUT_OCCUPIED_BY_SYSTEM`] The hotkey has been used by the system. You can call the [`GetAllSystemHotkeys`] interface to query all system shortcut keys.
2938    ///
2939    /// [`INPUT_OCCUPIED_BY_OTHER`] The hotkey has been subscribed to by another.
2940    ///
2941    ///
2942    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2943    ///
2944    /// Available since API-level: 14
2945    #[cfg(feature = "api-14")]
2946    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2947    pub fn OH_Input_AddHotkeyMonitor(
2948        hotkey: *const Input_Hotkey,
2949        callback: Input_HotkeyCallback,
2950    ) -> Input_Result;
2951    /// Unsubscribes from shortcut key events.
2952    ///
2953    /// # Arguments
2954    ///
2955    /// * `hotkey` - Shortcut key object.
2956    ///
2957    /// * `callback` - Callback used to return shortcut key events.
2958    ///
2959    /// # Returns
2960    ///
2961    /// * OH_Input_RemoveHotkeyMonitor status code, specifically,
2962    /// [`INPUT_SUCCESS`] if the operation is successful;
2963    ///
2964    /// [`INPUT_PARAMETER_ERROR`] if hotkey or callback is NULL;
2965    ///
2966    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2967    ///
2968    ///
2969    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2970    ///
2971    /// Available since API-level: 14
2972    #[cfg(feature = "api-14")]
2973    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2974    pub fn OH_Input_RemoveHotkeyMonitor(
2975        hotkey: *const Input_Hotkey,
2976        callback: Input_HotkeyCallback,
2977    ) -> Input_Result;
2978    /// Obtains the IDs of all input devices.
2979    ///
2980    /// # Arguments
2981    ///
2982    /// * `deviceIds` - Array of input device IDs.
2983    ///
2984    /// * `inSize` - Size of the array of input device IDs.
2985    ///
2986    /// * `outSize` - Length of the list of input device IDs. The value cannot be greater than the value of inSize.
2987    ///
2988    /// # Returns
2989    ///
2990    /// * OH_Input_GetDeviceIds result code, specifically,
2991    /// [`INPUT_SUCCESS`] if the operation is successful;
2992    /// [`INPUT_PARAMETER_ERROR`] if deviceIds or outSize is a null pointer or inSize is less than 0.
2993    ///
2994    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2995    ///
2996    /// Available since API-level: 13
2997    #[cfg(feature = "api-13")]
2998    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2999    pub fn OH_Input_GetDeviceIds(
3000        deviceIds: *mut i32,
3001        inSize: i32,
3002        outSize: *mut i32,
3003    ) -> Input_Result;
3004    /// Obtains the information about an input device.
3005    ///
3006    /// # Arguments
3007    ///
3008    /// * `deviceId` - Device ID.
3009    ///
3010    /// * `deviceInfo` - Pointer to an [`Input_DeviceInfo`] object.
3011    ///
3012    /// # Returns
3013    ///
3014    /// * OH_Input_GetDevice result code, specifically,
3015    /// [`INPUT_SUCCESS`] if the operation is successful;
3016    /// [`INPUT_PARAMETER_ERROR`] if the deviceInfo is a null pointer or the deviceId is invalid.
3017    /// You can use the [`OH_Input_GetDeviceIds`] interface to query the device IDs supported by the system.
3018    ///
3019    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3020    ///
3021    /// Available since API-level: 13
3022    #[cfg(feature = "api-13")]
3023    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3024    pub fn OH_Input_GetDevice(
3025        deviceId: i32,
3026        deviceInfo: *mut *mut Input_DeviceInfo,
3027    ) -> Input_Result;
3028    /// Creates a deviceInfo object.
3029    ///
3030    ///
3031    /// # Returns
3032    ///
3033    /// * Pointer to an [`Input_DeviceInfo`] object if the operation is successful;
3034    /// a null pointer otherwise (possibly because of a memory allocation failure).
3035    ///
3036    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3037    ///
3038    /// Available since API-level: 13
3039    #[cfg(feature = "api-13")]
3040    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3041    pub fn OH_Input_CreateDeviceInfo() -> *mut Input_DeviceInfo;
3042    /// Destroys a deviceInfo object.
3043    ///
3044    /// # Arguments
3045    ///
3046    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3047    ///
3048    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3049    ///
3050    /// Available since API-level: 13
3051    #[cfg(feature = "api-13")]
3052    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3053    pub fn OH_Input_DestroyDeviceInfo(deviceInfo: *mut *mut Input_DeviceInfo);
3054    /// Obtains the keyboard type of an input device.
3055    ///
3056    /// # Arguments
3057    ///
3058    /// * `deviceId` - Device ID.
3059    ///
3060    /// * `keyboardType` - Pointer to the keyboard type of the input device.
3061    ///
3062    /// # Returns
3063    ///
3064    /// * OH_Input_GetKeyboardType result code, specifically,
3065    /// [`INPUT_SUCCESS`] if the operation is successful;
3066    /// [`INPUT_PARAMETER_ERROR`] if the device ID is invalid or keyboardType is a null pointer.
3067    ///
3068    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3069    ///
3070    /// Available since API-level: 13
3071    #[cfg(feature = "api-13")]
3072    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3073    pub fn OH_Input_GetKeyboardType(deviceId: i32, keyboardType: *mut i32) -> Input_Result;
3074    /// Obtains the ID of an input device.
3075    ///
3076    /// # Arguments
3077    ///
3078    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3079    ///
3080    /// * `id` - Pointer to the ID of the input device.
3081    ///
3082    /// # Returns
3083    ///
3084    /// * OH_Input_GetDeviceId result code, specifically,
3085    /// [`INPUT_SUCCESS`] if the operation is successful;
3086    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or id is a null pointer.
3087    ///
3088    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3089    ///
3090    /// Available since API-level: 13
3091    #[cfg(feature = "api-13")]
3092    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3093    pub fn OH_Input_GetDeviceId(deviceInfo: *mut Input_DeviceInfo, id: *mut i32) -> Input_Result;
3094    /// Obtains the name of an input device.
3095    ///
3096    /// # Arguments
3097    ///
3098    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3099    ///
3100    /// * `name` - Pointer to the name of the input device.
3101    ///
3102    /// # Returns
3103    ///
3104    /// * OH_Input_GetDeviceName result code, specifically,
3105    /// [`INPUT_SUCCESS`] if the operation is successful;
3106    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or name is a null pointer.
3107    ///
3108    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3109    ///
3110    /// Available since API-level: 13
3111    #[cfg(feature = "api-13")]
3112    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3113    pub fn OH_Input_GetDeviceName(
3114        deviceInfo: *mut Input_DeviceInfo,
3115        name: *mut *mut ::core::ffi::c_char,
3116    ) -> Input_Result;
3117    /// Obtains the capabilities of an input device, for example, a touchscreen, touchpad, or keyboard.
3118    ///
3119    /// # Arguments
3120    ///
3121    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3122    ///
3123    /// * `capabilities` - Pointer to the capabilities of the input device.
3124    ///
3125    /// # Returns
3126    ///
3127    /// * OH_Input_GetCapabilities result code, specifically,
3128    /// [`INPUT_SUCCESS`] if the operation is successful;
3129    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or capabilities is a null pointer.
3130    ///
3131    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3132    ///
3133    /// Available since API-level: 13
3134    #[cfg(feature = "api-13")]
3135    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3136    pub fn OH_Input_GetCapabilities(
3137        deviceInfo: *mut Input_DeviceInfo,
3138        capabilities: *mut i32,
3139    ) -> Input_Result;
3140    /// Obtains the version information of an input device.
3141    ///
3142    /// # Arguments
3143    ///
3144    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3145    ///
3146    /// * `version` - Pointer to the version information of the input device.
3147    ///
3148    /// # Returns
3149    ///
3150    /// * OH_Input_GetDeviceVersion result code, specifically,
3151    /// [`INPUT_SUCCESS`] if the operation is successful;
3152    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or version is a null pointer.
3153    ///
3154    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3155    ///
3156    /// Available since API-level: 13
3157    #[cfg(feature = "api-13")]
3158    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3159    pub fn OH_Input_GetDeviceVersion(
3160        deviceInfo: *mut Input_DeviceInfo,
3161        version: *mut i32,
3162    ) -> Input_Result;
3163    /// Obtains the product information of an input device.
3164    ///
3165    /// # Arguments
3166    ///
3167    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3168    ///
3169    /// * `product` - Pointer to the product information of the input device.
3170    ///
3171    /// # Returns
3172    ///
3173    /// * OH_Input_GetDeviceProduct result code, specifically,
3174    /// [`INPUT_SUCCESS`] if the operation is successful;
3175    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or product is a null pointer.
3176    ///
3177    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3178    ///
3179    /// Available since API-level: 13
3180    #[cfg(feature = "api-13")]
3181    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3182    pub fn OH_Input_GetDeviceProduct(
3183        deviceInfo: *mut Input_DeviceInfo,
3184        product: *mut i32,
3185    ) -> Input_Result;
3186    /// Obtains the vendor information of an input device.
3187    ///
3188    /// # Arguments
3189    ///
3190    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3191    ///
3192    /// * `vendor` - Pointer to the vendor information of the input device.
3193    ///
3194    /// # Returns
3195    ///
3196    /// * OH_Input_GetDeviceVendor result code, specifically,
3197    /// [`INPUT_SUCCESS`] if the operation is successful;
3198    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or vendor is a null pointer.
3199    ///
3200    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3201    ///
3202    /// Available since API-level: 13
3203    #[cfg(feature = "api-13")]
3204    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3205    pub fn OH_Input_GetDeviceVendor(
3206        deviceInfo: *mut Input_DeviceInfo,
3207        vendor: *mut i32,
3208    ) -> Input_Result;
3209    /// Obtains the physical address of an input device.
3210    ///
3211    /// # Arguments
3212    ///
3213    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
3214    ///
3215    /// * `address` - Pointer to the physical address of the input device.
3216    ///
3217    /// # Returns
3218    ///
3219    /// * OH_Input_GetDeviceAddress result code, specifically,
3220    /// [`INPUT_SUCCESS`] if the operation is successful;
3221    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or address is a null pointer.
3222    ///
3223    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3224    ///
3225    /// Available since API-level: 13
3226    #[cfg(feature = "api-13")]
3227    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3228    pub fn OH_Input_GetDeviceAddress(
3229        deviceInfo: *mut Input_DeviceInfo,
3230        address: *mut *mut ::core::ffi::c_char,
3231    ) -> Input_Result;
3232    /// Registers a listener for device hot swap events.
3233    ///
3234    /// # Arguments
3235    ///
3236    /// * `listener` - Pointer to an [`Input_DeviceListener`] object.
3237    ///
3238    ///
3239    /// # Returns
3240    ///
3241    /// * OH_Input_RegisterDeviceListener status code, specifically,
3242    /// [`INPUT_SUCCESS`] if the operation is successful;
3243    ///
3244    /// [`INPUT_PARAMETER_ERROR`] if listener is NULL;
3245    ///
3246    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3247    ///
3248    /// Available since API-level: 13
3249    #[cfg(feature = "api-13")]
3250    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3251    pub fn OH_Input_RegisterDeviceListener(listener: *mut Input_DeviceListener) -> Input_Result;
3252    /// Unregisters the listener for device hot swap events.
3253    ///
3254    /// # Arguments
3255    ///
3256    /// * `listener` - Pointer to the listener for device hot swap events. For details, see [`Input_DeviceListener`].
3257    ///
3258    ///
3259    /// # Returns
3260    ///
3261    /// * OH_Input_UnregisterDeviceListener status code, specifically,
3262    /// [`INPUT_SUCCESS`] if the operation is successful;
3263    ///
3264    /// [`INPUT_PARAMETER_ERROR`] if listener is NULL or no listener is registered;
3265    /// [`INPUT_SERVICE_EXCEPTION`] if the service is abnormal.
3266    ///
3267    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3268    ///
3269    /// Available since API-level: 13
3270    #[cfg(feature = "api-13")]
3271    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3272    pub fn OH_Input_UnregisterDeviceListener(listener: *mut Input_DeviceListener) -> Input_Result;
3273    /// Unregisters the listener for all device hot swap events.
3274    ///
3275    ///
3276    /// # Returns
3277    ///
3278    /// * OH_Input_UnregisterDeviceListeners status code, specifically,
3279    /// [`INPUT_SUCCESS`] if the operation is successful;
3280    ///
3281    /// [`INPUT_SERVICE_EXCEPTION`] if the service is abnormal.
3282    ///
3283    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3284    ///
3285    /// Available since API-level: 13
3286    #[cfg(feature = "api-13")]
3287    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
3288    pub fn OH_Input_UnregisterDeviceListeners() -> Input_Result;
3289    /// Obtains the function key status.
3290    ///
3291    /// # Arguments
3292    ///
3293    /// * `keyCode` - Function key value. Supported function keys include capsLock, NumLock, and ScrollLock.
3294    ///
3295    /// * `state` - Function key status. The value 0 indicates that the function key is disabled,
3296    /// and the value 1 indicates the opposite.
3297    ///
3298    /// # Returns
3299    ///
3300    /// * OH_Input_GetFunctionKeyState function api result code
3301    /// [`INPUT_SUCCESS`] if the operation is successful;
3302    /// [`INPUT_PARAMETER_ERROR`] if keyCode is invalid or state is a null pointer.
3303    /// [`INPUT_KEYBOARD_DEVICE_NOT_EXIST`] no keyboard device connected.
3304    ///
3305    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
3306    ///
3307    /// Available since API-level: 15
3308    #[cfg(feature = "api-15")]
3309    #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
3310    pub fn OH_Input_GetFunctionKeyState(keyCode: i32, state: *mut i32) -> Input_Result;
3311    /// Queries the maximum number of touch points supported by the current device.
3312    /// If -1 is returned, the number is unknown.
3313    ///
3314    /// # Arguments
3315    ///
3316    /// * `count` - Maximum number of touch points supported.
3317    ///
3318    /// # Returns
3319    ///
3320    /// * OH_Input_QueryMaxTouchPoints function api result code
3321    /// [`INPUT_SUCCESS`] if the operation is successful;
3322    /// [`INPUT_PARAMETER_ERROR`] if count is a null pointer.
3323    ///
3324    /// Available since API-level: 20
3325    #[cfg(feature = "api-20")]
3326    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
3327    pub fn OH_Input_QueryMaxTouchPoints(count: *mut i32) -> Input_Result;
3328    /// Get pointer location.
3329    ///
3330    /// # Arguments
3331    ///
3332    /// * `displayId` - The displayId for the pointer location.
3333    ///
3334    /// * `displayX` - The displayX for the pointer location.
3335    ///
3336    /// * `displayY` - The displayY for the pointer location.
3337    ///
3338    /// # Returns
3339    ///
3340    /// * OH_Input_GetPointerLocation function api result code
3341    /// [`INPUT_SUCCESS`] if the operation is successful;
3342    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null pointer;
3343    /// [`INPUT_APP_NOT_FOCUSED`] if the app is not the focused app;
3344    /// [`INPUT_DEVICE_NO_POINTER`] if the device has no pointer;
3345    /// [`INPUT_SERVICE_EXCEPTION`] if the service is exception.
3346    ///
3347    /// Available since API-level: 20
3348    #[cfg(feature = "api-20")]
3349    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
3350    pub fn OH_Input_GetPointerLocation(
3351        displayId: *mut i32,
3352        displayX: *mut f64,
3353        displayY: *mut f64,
3354    ) -> Input_Result;
3355    /// Creates a cursor info object.
3356    ///
3357    ///
3358    /// # Returns
3359    ///
3360    /// * Returns an [`Input_CursorInfo`] cursor object if the operation is successful.
3361    /// Otherwise, a null cursor is returned. The possible cause is memory allocation failure.
3362    ///
3363    /// Available since API-level: 22
3364    #[cfg(feature = "api-22")]
3365    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3366    pub fn OH_Input_CursorInfo_Create() -> *mut Input_CursorInfo;
3367    /// Destroys a cursor info object.
3368    ///
3369    /// # Arguments
3370    ///
3371    /// * `cursorInfo` - Cursor info object.
3372    ///
3373    /// Available since API-level: 22
3374    #[cfg(feature = "api-22")]
3375    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3376    pub fn OH_Input_CursorInfo_Destroy(cursorInfo: *mut *mut Input_CursorInfo);
3377    /// Obtains the cursor visibility of the cursorInfo.
3378    ///
3379    /// # Arguments
3380    ///
3381    /// * `cursorInfo` - Cursor info object.
3382    ///
3383    /// * `visible` - Visibility of the cursorInfo.
3384    ///
3385    /// # Returns
3386    ///
3387    /// * OH_Input_CursorInfo_IsVisible function api result code
3388    /// [`INPUT_SUCCESS`] if the operation is successful;
3389    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null cursor;
3390    ///
3391    /// Available since API-level: 22
3392    #[cfg(feature = "api-22")]
3393    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3394    pub fn OH_Input_CursorInfo_IsVisible(
3395        cursorInfo: *mut Input_CursorInfo,
3396        visible: *mut bool,
3397    ) -> Input_Result;
3398    /// Obtains the cursor style of the cursorInfo.
3399    ///
3400    /// # Arguments
3401    ///
3402    /// * `cursorInfo` - Cursor info object.
3403    ///
3404    /// * `style` - Cursor style of the cursorInfo.
3405    ///
3406    /// # Returns
3407    ///
3408    /// * OH_Input_CursorInfo_GetStyle function api result code
3409    /// [`INPUT_SUCCESS`] if the operation is successful;
3410    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null cursor or the cursor is invisible;
3411    ///
3412    /// Available since API-level: 22
3413    #[cfg(feature = "api-22")]
3414    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3415    pub fn OH_Input_CursorInfo_GetStyle(
3416        cursorInfo: *mut Input_CursorInfo,
3417        style: *mut Input_PointerStyle,
3418    ) -> Input_Result;
3419    /// Obtains the cursor sizeLevel of the cursorInfo.
3420    ///
3421    /// # Arguments
3422    ///
3423    /// * `cursorInfo` - Cursor info object.
3424    ///
3425    /// * `sizeLevel` - Cursor size level of the cursorInfo.
3426    ///
3427    /// # Returns
3428    ///
3429    /// * OH_Input_CursorInfo_GetSizeLevel function api result code
3430    /// [`INPUT_SUCCESS`] if the operation is successful;
3431    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null cursor or the cursor is invisible;
3432    ///
3433    /// Available since API-level: 22
3434    #[cfg(feature = "api-22")]
3435    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3436    pub fn OH_Input_CursorInfo_GetSizeLevel(
3437        cursorInfo: *mut Input_CursorInfo,
3438        sizeLevel: *mut i32,
3439    ) -> Input_Result;
3440    /// Obtains the cursor color of the cursorInfo represented as a 32-bit ARGB integer.
3441    ///
3442    /// # Arguments
3443    ///
3444    /// * `cursorInfo` - Cursor info object.
3445    ///
3446    /// * `color` - Cursor color of the cursorInfo represented as a 32-bit ARGB integer.
3447    ///
3448    /// # Returns
3449    ///
3450    /// * OH_Input_CursorInfo_GetColor function api result code
3451    /// [`INPUT_SUCCESS`] if the operation is successful;
3452    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null cursor or the cursor is invisible;
3453    ///
3454    /// Available since API-level: 22
3455    #[cfg(feature = "api-22")]
3456    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3457    pub fn OH_Input_CursorInfo_GetColor(
3458        cursorInfo: *mut Input_CursorInfo,
3459        color: *mut u32,
3460    ) -> Input_Result;
3461    /// Get cursor info of the mouseEvent.
3462    ///
3463    /// # Arguments
3464    ///
3465    /// * `mouseEvent` - The received mouseEvent.
3466    ///
3467    /// * `cursorInfo` - The object to receive the cursor info.
3468    ///
3469    /// # Returns
3470    ///
3471    /// * OH_Input_GetMouseEventCursorInfo function api result code
3472    /// [`INPUT_SUCCESS`] if the operation is successful;
3473    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null cursor;
3474    ///
3475    /// Available since API-level: 22
3476    #[cfg(feature = "api-22")]
3477    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3478    pub fn OH_Input_GetMouseEventCursorInfo(
3479        mouseEvent: *const Input_MouseEvent,
3480        cursorInfo: *mut Input_CursorInfo,
3481    ) -> Input_Result;
3482    /// Retrieves cursor information. If the pixelmap parameter is specified, and the cursor is user-defined type
3483    /// currently, the cursor's pixelmap will be returned along with it.
3484    ///
3485    /// # Arguments
3486    ///
3487    /// * `cursorInfo` - The object to receive the cursor info.
3488    ///
3489    /// * `pixelmap` - The object to receive the cursor pixelmap, null value will be ignored.
3490    ///
3491    /// # Returns
3492    ///
3493    /// * OH_Input_GetCursorInfo function api result code
3494    /// [`INPUT_SUCCESS`] if the operation is successful;
3495    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null cursor;
3496    /// [`INPUT_SERVICE_EXCEPTION`] if the service is exception.
3497    ///
3498    /// Available since API-level: 22
3499    #[cfg(feature = "api-22")]
3500    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3501    pub fn OH_Input_GetCursorInfo(
3502        cursorInfo: *mut Input_CursorInfo,
3503        pixelmap: *mut *mut OH_PixelmapNative,
3504    ) -> Input_Result;
3505    /// Sets the visible status of the mouse pointer.
3506    ///
3507    /// # Arguments
3508    ///
3509    /// * `visible` - Whether the mouse pointer is visible. The value true indicates that the pointer
3510    ///
3511    /// # Returns
3512    ///
3513    /// * OH_Input_SetPointerVisible function api result code
3514    /// [`INPUT_SUCCESS`] if the operation is successful;
3515    /// [`INPUT_DEVICE_NOT_SUPPORTED`] if the device is not supported.
3516    /// [`INPUT_SERVICE_EXCEPTION`] if the service is exception.
3517    ///
3518    /// Available since API-level: 22
3519    #[cfg(feature = "api-22")]
3520    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3521    pub fn OH_Input_SetPointerVisible(visible: bool) -> Input_Result;
3522    /// Obtains the mouse pointer style.
3523    ///
3524    /// # Arguments
3525    ///
3526    /// * `windowId` - Window ID. The value is an integer greater than or equal to -1.
3527    ///
3528    /// * `pointerStyle` - Pointer to the pointerStyle.
3529    ///
3530    /// # Returns
3531    ///
3532    /// * OH_Input_GetPointerStyle function api result code
3533    /// [`INPUT_SUCCESS`] if the operation is successful;
3534    /// [`INPUT_PARAMETER_ERROR`] if parameter is a null pointer or window ID is invalid;
3535    /// [`INPUT_SERVICE_EXCEPTION`] if the service is exception.
3536    ///
3537    /// Available since API-level: 22
3538    #[cfg(feature = "api-22")]
3539    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3540    pub fn OH_Input_GetPointerStyle(windowId: i32, pointerStyle: *mut i32) -> Input_Result;
3541    /// Sets the mouse pointer style.
3542    ///
3543    /// # Arguments
3544    ///
3545    /// * `windowId` - Window ID. The value is an integer greater than or equal to 0.
3546    ///
3547    /// * `pointerStyle` - Pointer style.The value should be a member of the [`Input_PointerStyle`] enumeration.
3548    ///
3549    /// # Returns
3550    ///
3551    /// * OH_Input_SetPointerStyle function api result code
3552    /// [`INPUT_SUCCESS`] if the operation is successful;
3553    /// [`INPUT_PARAMETER_ERROR`] if window ID is invalid or pointerStyle is invalid;
3554    /// [`INPUT_SERVICE_EXCEPTION`] if the service is exception.
3555    ///
3556    /// Available since API-level: 22
3557    #[cfg(feature = "api-22")]
3558    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3559    pub fn OH_Input_SetPointerStyle(windowId: i32, pointerStyle: i32) -> Input_Result;
3560    /// Creates a CustomCursor object.
3561    ///
3562    /// # Arguments
3563    ///
3564    /// * `pixelMap` - Pointer to a [`OH_PixelmapNative`] object.
3565    ///
3566    /// * `anchorX` - Horizontal coordinate of the cursor focus.
3567    ///
3568    /// * `anchorY` - Vertical coordinate of the cursor focus.
3569    ///
3570    /// # Returns
3571    ///
3572    /// * Returns an [`Input_CustomCursor`] pointer object if the operation is successful.
3573    /// returns a null pointer otherwise.
3574    ///
3575    /// Available since API-level: 22
3576    #[cfg(feature = "api-22")]
3577    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3578    pub fn OH_Input_CustomCursor_Create(
3579        pixelMap: *mut OH_PixelmapNative,
3580        anchorX: i32,
3581        anchorY: i32,
3582    ) -> *mut Input_CustomCursor;
3583    /// Destroys a CustomCursor object.
3584    ///
3585    /// # Arguments
3586    ///
3587    /// * `customCursor` - Pointer to a pointer to an [`Input_CustomCursor`] object.
3588    ///
3589    /// Available since API-level: 22
3590    #[cfg(feature = "api-22")]
3591    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3592    pub fn OH_Input_CustomCursor_Destroy(customCursor: *mut *mut Input_CustomCursor);
3593    /// Obtains the pixelMap of the CustomCursor.
3594    ///
3595    /// # Arguments
3596    ///
3597    /// * `customCursor` - Pointer to an [`Input_CustomCursor`] object.
3598    ///
3599    /// * `pixelMap` - Pointer to a [`OH_PixelmapNative`] object.
3600    ///
3601    /// # Returns
3602    ///
3603    /// * OH_Input_CustomCursor_GetPixelMap function result code.
3604    /// [`INPUT_SUCCESS`] if the operation is successful;
3605    /// [`INPUT_PARAMETER_ERROR`] The customCursor is NULL.
3606    ///
3607    /// Available since API-level: 22
3608    #[cfg(feature = "api-22")]
3609    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3610    pub fn OH_Input_CustomCursor_GetPixelMap(
3611        customCursor: *mut Input_CustomCursor,
3612        pixelMap: *mut *mut OH_PixelmapNative,
3613    ) -> Input_Result;
3614    /// Obtains the anchor of the CustomCursor.
3615    ///
3616    /// # Arguments
3617    ///
3618    /// * `customCursor` - Pointer to an [`Input_CustomCursor`] object.
3619    ///
3620    /// * `anchorX` - Pointer to horizontal coordinate of the cursor focus.
3621    ///
3622    /// * `anchorY` - Pointer to vertical coordinate of the cursor focus.
3623    ///
3624    /// # Returns
3625    ///
3626    /// * OH_Input_CustomCursor_GetAnchor function result code.
3627    /// [`INPUT_SUCCESS`] if the operation is successful;
3628    /// [`INPUT_PARAMETER_ERROR`] The customCursor is NULL.
3629    ///
3630    /// Available since API-level: 22
3631    #[cfg(feature = "api-22")]
3632    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3633    pub fn OH_Input_CustomCursor_GetAnchor(
3634        customCursor: *mut Input_CustomCursor,
3635        anchorX: *mut i32,
3636        anchorY: *mut i32,
3637    ) -> Input_Result;
3638    /// Creates a CursorConfig object.
3639    ///
3640    /// # Arguments
3641    ///
3642    /// * `followSystem` - Pointer of the config whether to adjust the cursor size based on system settings
3643    ///
3644    /// # Returns
3645    ///
3646    /// * Returns an [`Input_CursorConfig`] pointer object if the operation is successful.
3647    /// returns a null pointer otherwise.
3648    ///
3649    /// Available since API-level: 22
3650    #[cfg(feature = "api-22")]
3651    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3652    pub fn OH_Input_CursorConfig_Create(followSystem: bool) -> *mut Input_CursorConfig;
3653    /// Destroys a CursorConfig object.
3654    ///
3655    /// # Arguments
3656    ///
3657    /// * `cursorConfig` - Pointer to a pointer to an [`cursorConfig`] object.
3658    ///
3659    /// Available since API-level: 22
3660    #[cfg(feature = "api-22")]
3661    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3662    pub fn OH_Input_CursorConfig_Destroy(cursorConfig: *mut *mut Input_CursorConfig);
3663    /// Obtains the followSystem of the cursorConfig.
3664    ///
3665    /// # Arguments
3666    ///
3667    /// * `cursorConfig` - Pointer to an [`Input_CursorConfig`] object.
3668    ///
3669    /// * `followSystem` - Pointer of the config whether to adjust the cursor size based on system settings
3670    ///
3671    /// # Returns
3672    ///
3673    /// * OH_Input_CursorConfig_IsFollowSystem function result code.
3674    /// [`INPUT_SUCCESS`] if the operation is successful;
3675    /// [`INPUT_PARAMETER_ERROR`] The cursorOptions or followSystem the is NULL.
3676    ///
3677    /// Available since API-level: 22
3678    #[cfg(feature = "api-22")]
3679    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3680    pub fn OH_Input_CursorConfig_IsFollowSystem(
3681        cursorConfig: *mut Input_CursorConfig,
3682        followSystem: *mut bool,
3683    ) -> Input_Result;
3684    /// Sets the custom cursor style.
3685    ///
3686    /// # Arguments
3687    ///
3688    /// * `windowId` - Window ID. The value is an integer greater than or equal to 0.
3689    ///
3690    /// * `customCursor` - Pointer to an [`Input_CustomCursor`] object.
3691    ///
3692    /// * `cursorConfig` - Pointer to an [`cursorConfig`] object.
3693    ///
3694    /// # Returns
3695    ///
3696    /// * OH_Input_SetCustomCursor function result code.
3697    /// [`INPUT_SUCCESS`] if the operation is successful;
3698    /// [`INPUT_PARAMETER_ERROR`] if window ID is abnormal or customCursor is invalid;
3699    /// [`INPUT_INVALID_WINDOWID`] if window ID is invaild.
3700    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
3701    /// [`INPUT_SERVICE_EXCEPTION`] if the service is exception.
3702    ///
3703    /// Available since API-level: 22
3704    #[cfg(feature = "api-22")]
3705    #[cfg_attr(docsrs, doc(cfg(feature = "api-22")))]
3706    pub fn OH_Input_SetCustomCursor(
3707        windowId: i32,
3708        customCursor: *mut Input_CustomCursor,
3709        cursorConfig: *mut Input_CursorConfig,
3710    ) -> Input_Result;
3711}