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-14")]
8use ohos_sys_opaque_types::Input_Hotkey;
9use ohos_sys_opaque_types::{
10    Input_AxisEvent, Input_KeyEvent, Input_KeyState, Input_MouseEvent, Input_TouchEvent,
11};
12
13#[cfg(feature = "api-12")]
14#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
15impl Input_KeyStateAction {
16    /// Default
17    pub const KEY_DEFAULT: Input_KeyStateAction = Input_KeyStateAction(-1);
18    /// Pressing of a key
19    pub const KEY_PRESSED: Input_KeyStateAction = Input_KeyStateAction(0);
20    /// Release of a key
21    pub const KEY_RELEASED: Input_KeyStateAction = Input_KeyStateAction(1);
22    /// Key switch enabled
23    pub const KEY_SWITCH_ON: Input_KeyStateAction = Input_KeyStateAction(2);
24    /// Key switch disabled
25    pub const KEY_SWITCH_OFF: Input_KeyStateAction = Input_KeyStateAction(3);
26}
27#[repr(transparent)]
28/// Enumerated values of key event action.
29///
30///
31/// Available since API-level: 12
32#[cfg(feature = "api-12")]
33#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
34#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
35pub struct Input_KeyStateAction(pub ::core::ffi::c_int);
36#[cfg(feature = "api-12")]
37#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
38impl Input_KeyEventAction {
39    /// Cancellation of a key action.
40    pub const KEY_ACTION_CANCEL: Input_KeyEventAction = Input_KeyEventAction(0);
41    /// Pressing of a key.
42    pub const KEY_ACTION_DOWN: Input_KeyEventAction = Input_KeyEventAction(1);
43    /// Release of a key.
44    pub const KEY_ACTION_UP: Input_KeyEventAction = Input_KeyEventAction(2);
45}
46#[repr(transparent)]
47/// Enumerates key event types.
48///
49///
50/// Available since API-level: 12
51#[cfg(feature = "api-12")]
52#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
53#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
54pub struct Input_KeyEventAction(pub ::core::ffi::c_uint);
55#[cfg(feature = "api-12")]
56#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
57impl Input_MouseEventAction {
58    /// Cancel.
59    pub const MOUSE_ACTION_CANCEL: Input_MouseEventAction = Input_MouseEventAction(0);
60    /// Moving of the mouse pointer.
61    pub const MOUSE_ACTION_MOVE: Input_MouseEventAction = Input_MouseEventAction(1);
62    /// Pressing down of the mouse.
63    pub const MOUSE_ACTION_BUTTON_DOWN: Input_MouseEventAction = Input_MouseEventAction(2);
64    /// Lifting of the mouse button.
65    pub const MOUSE_ACTION_BUTTON_UP: Input_MouseEventAction = Input_MouseEventAction(3);
66    /// Beginning of the mouse axis event
67    pub const MOUSE_ACTION_AXIS_BEGIN: Input_MouseEventAction = Input_MouseEventAction(4);
68    /// Updating of the mouse axis event
69    pub const MOUSE_ACTION_AXIS_UPDATE: Input_MouseEventAction = Input_MouseEventAction(5);
70    /// End of the mouse axis event
71    pub const MOUSE_ACTION_AXIS_END: Input_MouseEventAction = Input_MouseEventAction(6);
72}
73#[repr(transparent)]
74/// Enumerated values of mouse event action.
75///
76///
77/// Available since API-level: 12
78#[cfg(feature = "api-12")]
79#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
80#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
81pub struct Input_MouseEventAction(pub ::core::ffi::c_uint);
82#[cfg(feature = "api-12")]
83#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
84impl InputEvent_MouseAxis {
85    /// Vertical scroll axis
86    pub const MOUSE_AXIS_SCROLL_VERTICAL: InputEvent_MouseAxis = InputEvent_MouseAxis(0);
87    /// Horizontal scroll axis
88    pub const MOUSE_AXIS_SCROLL_HORIZONTAL: InputEvent_MouseAxis = InputEvent_MouseAxis(1);
89}
90#[repr(transparent)]
91/// Mouse axis types.
92///
93///
94/// Available since API-level: 12
95#[cfg(feature = "api-12")]
96#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
97#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
98pub struct InputEvent_MouseAxis(pub ::core::ffi::c_uint);
99#[cfg(feature = "api-12")]
100#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
101impl Input_MouseEventButton {
102    /// Invalid button
103    pub const MOUSE_BUTTON_NONE: Input_MouseEventButton = Input_MouseEventButton(-1);
104    /// Left button on the mouse.
105    pub const MOUSE_BUTTON_LEFT: Input_MouseEventButton = Input_MouseEventButton(0);
106    /// Middle button on the mouse.
107    pub const MOUSE_BUTTON_MIDDLE: Input_MouseEventButton = Input_MouseEventButton(1);
108    /// Right button on the mouse.
109    pub const MOUSE_BUTTON_RIGHT: Input_MouseEventButton = Input_MouseEventButton(2);
110    /// Forward button on the mouse.
111    pub const MOUSE_BUTTON_FORWARD: Input_MouseEventButton = Input_MouseEventButton(3);
112    /// Back button on the mouse.
113    pub const MOUSE_BUTTON_BACK: Input_MouseEventButton = Input_MouseEventButton(4);
114}
115#[repr(transparent)]
116/// Enumerated values of mouse event button.
117///
118///
119/// Available since API-level: 12
120#[cfg(feature = "api-12")]
121#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
122#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
123pub struct Input_MouseEventButton(pub ::core::ffi::c_int);
124#[cfg(feature = "api-12")]
125#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
126impl Input_TouchEventAction {
127    /// Touch cancelled.
128    pub const TOUCH_ACTION_CANCEL: Input_TouchEventAction = Input_TouchEventAction(0);
129    /// Touch pressed.
130    pub const TOUCH_ACTION_DOWN: Input_TouchEventAction = Input_TouchEventAction(1);
131    /// Touch moved.
132    pub const TOUCH_ACTION_MOVE: Input_TouchEventAction = Input_TouchEventAction(2);
133    /// Touch lifted.
134    pub const TOUCH_ACTION_UP: Input_TouchEventAction = Input_TouchEventAction(3);
135}
136#[repr(transparent)]
137/// Enumerated values of touch event action.
138///
139///
140/// Available since API-level: 12
141#[cfg(feature = "api-12")]
142#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
143#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
144pub struct Input_TouchEventAction(pub ::core::ffi::c_uint);
145#[cfg(feature = "api-13")]
146#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
147impl Input_KeyboardType {
148    /// Keyboard without keys
149    pub const KEYBOARD_TYPE_NONE: Input_KeyboardType = Input_KeyboardType(0);
150    /// Keyboard with unknown keys
151    pub const KEYBOARD_TYPE_UNKNOWN: Input_KeyboardType = Input_KeyboardType(1);
152    /// Full keyboard
153    pub const KEYBOARD_TYPE_ALPHABETIC: Input_KeyboardType = Input_KeyboardType(2);
154    /// Digital keyboard
155    pub const KEYBOARD_TYPE_DIGITAL: Input_KeyboardType = Input_KeyboardType(3);
156    /// Stylus
157    pub const KEYBOARD_TYPE_STYLUS: Input_KeyboardType = Input_KeyboardType(4);
158    /// Remote control
159    pub const KEYBOARD_TYPE_REMOTE_CONTROL: Input_KeyboardType = Input_KeyboardType(5);
160}
161#[repr(transparent)]
162/// Enumerates keyboard types.
163///
164///
165/// Available since API-level: 13
166#[cfg(feature = "api-13")]
167#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
168#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
169pub struct Input_KeyboardType(pub ::core::ffi::c_uint);
170#[cfg(feature = "api-12")]
171#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
172impl InputEvent_SourceType {
173    /// Indicates that the input source generates events similar to mouse cursor movement,
174    /// button press and release, and wheel scrolling.
175    ///
176    ///
177    /// Available since API-level: 12
178    #[cfg(feature = "api-12")]
179    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
180    pub const SOURCE_TYPE_MOUSE: InputEvent_SourceType = InputEvent_SourceType(1);
181    /// Indicates that the input source generates a touchscreen multi-touch event.
182    ///
183    ///
184    /// Available since API-level: 12
185    #[cfg(feature = "api-12")]
186    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
187    pub const SOURCE_TYPE_TOUCHSCREEN: InputEvent_SourceType = InputEvent_SourceType(2);
188    /// Indicates that the input source generates a touchpad multi-touch event.
189    ///
190    ///
191    /// Available since API-level: 12
192    #[cfg(feature = "api-12")]
193    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
194    pub const SOURCE_TYPE_TOUCHPAD: InputEvent_SourceType = InputEvent_SourceType(3);
195}
196#[repr(transparent)]
197/// Enumerates event source types.
198///
199///
200/// Available since API-level: 12
201#[cfg(feature = "api-12")]
202#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
203#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
204pub struct InputEvent_SourceType(pub ::core::ffi::c_uint);
205pub type Input_Result = Result<(), InputErrorCode>;
206#[cfg(feature = "api-12")]
207#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
208impl InputErrorCode {
209    /// Permission verification failed
210    pub const PERMISSION_DENIED: InputErrorCode =
211        InputErrorCode(const { core::num::NonZero::new(201).unwrap() });
212    /// Non-system application
213    pub const NOT_SYSTEM_APPLICATION: InputErrorCode =
214        InputErrorCode(const { core::num::NonZero::new(202).unwrap() });
215    /// Parameter check failed
216    pub const PARAMETER_ERROR: InputErrorCode =
217        InputErrorCode(const { core::num::NonZero::new(401).unwrap() });
218    /// Device not support
219    pub const DEVICE_NOT_SUPPORTED: InputErrorCode =
220        InputErrorCode(const { core::num::NonZero::new(801).unwrap() });
221    /// Service error
222    pub const SERVICE_EXCEPTION: InputErrorCode =
223        InputErrorCode(const { core::num::NonZero::new(3800001).unwrap() });
224    /// Interceptor repeatedly created for an application
225    pub const REPEAT_INTERCEPTOR: InputErrorCode =
226        InputErrorCode(const { core::num::NonZero::new(4200001).unwrap() });
227    /// Already occupied by the system
228    ///
229    /// Available since API-level: 14
230    #[cfg(feature = "api-14")]
231    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
232    pub const OCCUPIED_BY_SYSTEM: InputErrorCode =
233        InputErrorCode(const { core::num::NonZero::new(4200002).unwrap() });
234    /// Already occupied by the other
235    ///
236    /// Available since API-level: 14
237    #[cfg(feature = "api-14")]
238    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
239    pub const OCCUPIED_BY_OTHER: InputErrorCode =
240        InputErrorCode(const { core::num::NonZero::new(4200003).unwrap() });
241}
242#[repr(transparent)]
243/// Enumerates error codes.
244///
245///
246/// Available since API-level: 12
247#[cfg(feature = "api-12")]
248#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
249#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
250pub struct InputErrorCode(pub core::num::NonZero<::core::ffi::c_uint>);
251/// Callback used to return shortcut key events.
252///
253/// Available since API-level: 14
254#[cfg(feature = "api-14")]
255#[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
256pub type Input_HotkeyCallback =
257    ::core::option::Option<unsafe extern "C" fn(hotkey: *mut Input_Hotkey)>;
258/// Represents information about the input device.
259///
260///
261/// Available since API-level: 13
262#[cfg(feature = "api-13")]
263#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
264#[repr(C)]
265pub struct Input_DeviceInfo {
266    _unused: [u8; 0],
267}
268/// Defines a lifecycle callback for keyEvent. If the callback is triggered, keyEvent will be destroyed.
269///
270/// # Arguments
271///
272/// * `keyEvent` - Key event object.
273///
274/// Available since API-level: 12
275#[cfg(feature = "api-12")]
276#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
277pub type Input_KeyEventCallback =
278    ::core::option::Option<unsafe extern "C" fn(keyEvent: *const Input_KeyEvent)>;
279/// Defines a lifecycle callback for mouseEvent. If the callback is triggered, mouseEvent will be destroyed.
280///
281/// # Arguments
282///
283/// * `mouseEvent` - Mouse event object.
284///
285/// Available since API-level: 12
286#[cfg(feature = "api-12")]
287#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
288pub type Input_MouseEventCallback =
289    ::core::option::Option<unsafe extern "C" fn(mouseEvent: *const Input_MouseEvent)>;
290/// Defines a lifecycle callback for touchEvent. If the callback is triggered, touchEvent will be destroyed.
291///
292/// # Arguments
293///
294/// * `touchEvent` - Touch event object.
295///
296/// Available since API-level: 12
297#[cfg(feature = "api-12")]
298#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
299pub type Input_TouchEventCallback =
300    ::core::option::Option<unsafe extern "C" fn(touchEvent: *const Input_TouchEvent)>;
301/// Defines a lifecycle callback for axisEvent. If the callback is triggered, axisEvent will be destroyed.
302///
303/// # Arguments
304///
305/// * `axisEvent` - Axis event object.
306///
307/// Available since API-level: 12
308#[cfg(feature = "api-12")]
309#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
310pub type Input_AxisEventCallback =
311    ::core::option::Option<unsafe extern "C" fn(axisEvent: *const Input_AxisEvent)>;
312/// Defines the callback for device addition events.
313/// # Arguments
314///
315/// * `deviceId` - Device ID.
316///
317/// Available since API-level: 13
318#[cfg(feature = "api-13")]
319#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
320pub type Input_DeviceAddedCallback = ::core::option::Option<unsafe extern "C" fn(deviceId: i32)>;
321/// Defines the callback for device removal events.
322/// # Arguments
323///
324/// * `deviceId` - Device ID.
325///
326/// Available since API-level: 13
327#[cfg(feature = "api-13")]
328#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
329pub type Input_DeviceRemovedCallback = ::core::option::Option<unsafe extern "C" fn(deviceId: i32)>;
330/// Defines the structure for the interceptor of event callbacks,
331/// including mouseCallback, touchCallback, and axisCallback.
332///
333/// Available since API-level: 12
334#[cfg(feature = "api-12")]
335#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
336#[repr(C)]
337#[derive(Debug, Copy, Clone)]
338pub struct Input_InterceptorEventCallback {
339    /// Defines a lifecycle callback for **mouseEvent**.
340    pub mouseCallback: Input_MouseEventCallback,
341    /// Defines a lifecycle callback for **touchEvent**.
342    pub touchCallback: Input_TouchEventCallback,
343    /// Defines a lifecycle callback for **axisEvent**.
344    pub axisCallback: Input_AxisEventCallback,
345}
346/// Defines a listener for device insertion and removal events.
347///
348/// Available since API-level: 13
349#[cfg(feature = "api-13")]
350#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
351#[repr(C)]
352#[derive(Debug, Copy, Clone)]
353pub struct Input_DeviceListener {
354    /// Callback for device addition events
355    pub deviceAddedCallback: Input_DeviceAddedCallback,
356    /// Callback for device removal events
357    pub deviceRemovedCallback: Input_DeviceRemovedCallback,
358}
359/// Defines event interceptor options.
360///
361/// Available since API-level: 12
362#[cfg(feature = "api-12")]
363#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
364#[repr(C)]
365pub struct Input_InterceptorOptions {
366    _unused: [u8; 0],
367}
368extern "C" {
369    /// Queries the key state.
370    ///
371    /// # Arguments
372    ///
373    /// * `keyState` - Key state.
374    ///
375    /// # Returns
376    ///
377    /// * OH_Input_GetKeyState function result code.
378    /// [`INPUT_SUCCESS`] get KeyState success.
379    ///
380    /// [`INPUT_PARAMETER_ERROR`] keyCode is invalid.
381    ///
382    ///
383    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
384    ///
385    /// Available since API-level: 12
386    #[cfg(feature = "api-12")]
387    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
388    pub fn OH_Input_GetKeyState(keyState: *mut Input_KeyState) -> Input_Result;
389    /// Creates a key status enumeration object.
390    ///
391    ///
392    /// # Returns
393    ///
394    /// * Returns an [`Input_KeyState`] pointer object if the operation is successful.
395    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
396    ///
397    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
398    ///
399    /// Available since API-level: 12
400    #[cfg(feature = "api-12")]
401    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
402    pub fn OH_Input_CreateKeyState() -> *mut Input_KeyState;
403    /// Destroys a key status enumeration object.
404    ///
405    /// # Arguments
406    ///
407    /// * `keyState` - Key status enumeration object.
408    ///
409    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
410    ///
411    /// Available since API-level: 12
412    #[cfg(feature = "api-12")]
413    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
414    pub fn OH_Input_DestroyKeyState(keyState: *mut *mut Input_KeyState);
415    /// Sets the key value of a key status enumeration object.
416    ///
417    /// # Arguments
418    ///
419    /// * `keyState` - Key status enumeration object.
420    ///
421    /// * `keyCode` - Key value of the key status enumeration object.
422    ///
423    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
424    ///
425    /// Available since API-level: 12
426    #[cfg(feature = "api-12")]
427    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
428    pub fn OH_Input_SetKeyCode(keyState: *mut Input_KeyState, keyCode: i32);
429    /// Obtains the key value of a key status enumeration object.
430    ///
431    /// # Arguments
432    ///
433    /// * `keyState` - Key status enumeration object.
434    ///
435    /// # Returns
436    ///
437    /// * Key value of the key status enumeration object.
438    ///
439    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
440    ///
441    /// Available since API-level: 12
442    #[cfg(feature = "api-12")]
443    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
444    pub fn OH_Input_GetKeyCode(keyState: *const Input_KeyState) -> i32;
445    /// Sets whether the key specific to a key status enumeration object is pressed.
446    ///
447    /// # Arguments
448    ///
449    /// * `keyState` - Key status enumeration object.
450    ///
451    /// * `keyAction` - Whether the key is pressed.
452    ///
453    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
454    ///
455    /// Available since API-level: 12
456    #[cfg(feature = "api-12")]
457    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
458    pub fn OH_Input_SetKeyPressed(keyState: *mut Input_KeyState, keyAction: i32);
459    /// Checks whether the key specific to a key status enumeration object is pressed.
460    ///
461    /// # Arguments
462    ///
463    /// * `keyState` - Key status enumeration object.
464    ///
465    /// # Returns
466    ///
467    /// * Key pressing status of the key status enumeration object.
468    ///
469    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
470    ///
471    /// Available since API-level: 12
472    #[cfg(feature = "api-12")]
473    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
474    pub fn OH_Input_GetKeyPressed(keyState: *const Input_KeyState) -> i32;
475    /// Sets the key switch of the key status enumeration object.
476    ///
477    /// # Arguments
478    ///
479    /// * `keyState` - Key status enumeration object.
480    ///
481    /// * `keySwitch` - Key switch of the key status enumeration object.
482    ///
483    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
484    ///
485    /// Available since API-level: 12
486    #[cfg(feature = "api-12")]
487    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
488    pub fn OH_Input_SetKeySwitch(keyState: *mut Input_KeyState, keySwitch: i32);
489    /// Obtains the key switch of the key status enumeration object.
490    ///
491    /// # Arguments
492    ///
493    /// * `keyState` - Key status enumeration object.
494    ///
495    /// # Returns
496    ///
497    /// * Key switch of the key status enumeration object.
498    ///
499    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
500    ///
501    /// Available since API-level: 12
502    #[cfg(feature = "api-12")]
503    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
504    pub fn OH_Input_GetKeySwitch(keyState: *const Input_KeyState) -> i32;
505    /// Inject system keys.
506    ///
507    /// # Arguments
508    ///
509    /// * `keyEvent` - - the key event to be injected.
510    ///
511    /// # Returns
512    ///
513    /// * OH_Input_InjectKeyEvent function result code.
514    /// [`INPUT_SUCCESS`] inject keyEvent success.
515    ///
516    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
517    ///
518    /// [`INPUT_PARAMETER_ERROR`] keyCode is less 0, can not process.
519    ///
520    ///
521    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
522    ///
523    /// Available since API-level: 12
524    #[cfg(feature = "api-12")]
525    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
526    pub fn OH_Input_InjectKeyEvent(keyEvent: *const Input_KeyEvent) -> i32;
527    /// Creates a key event object.
528    ///
529    ///
530    /// # Returns
531    ///
532    /// * Returns an [`Input_KeyEvent`] pointer object if the operation is successful.
533    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
534    ///
535    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
536    ///
537    /// Available since API-level: 12
538    #[cfg(feature = "api-12")]
539    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
540    pub fn OH_Input_CreateKeyEvent() -> *mut Input_KeyEvent;
541    /// Destroys a key event object.
542    ///
543    /// # Arguments
544    ///
545    /// * `keyEvent` - Key event object.
546    ///
547    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
548    ///
549    /// Available since API-level: 12
550    #[cfg(feature = "api-12")]
551    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
552    pub fn OH_Input_DestroyKeyEvent(keyEvent: *mut *mut Input_KeyEvent);
553    /// Sets the key event type.
554    ///
555    /// # Arguments
556    ///
557    /// * `keyEvent` - Key event object.
558    ///
559    /// * `action` - Key event type.
560    ///
561    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
562    ///
563    /// Available since API-level: 12
564    #[cfg(feature = "api-12")]
565    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
566    pub fn OH_Input_SetKeyEventAction(keyEvent: *mut Input_KeyEvent, action: i32);
567    /// Obtains the key event type.
568    ///
569    /// # Arguments
570    ///
571    /// * `keyEvent` - Key event object.
572    ///
573    /// # Returns
574    ///
575    /// * Key event type.
576    ///
577    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
578    ///
579    /// Available since API-level: 12
580    #[cfg(feature = "api-12")]
581    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
582    pub fn OH_Input_GetKeyEventAction(keyEvent: *const Input_KeyEvent) -> i32;
583    /// Sets the key value for a key event.
584    ///
585    /// # Arguments
586    ///
587    /// * `keyEvent` - Key event object.
588    ///
589    /// * `keyCode` - keyCode Key code.
590    ///
591    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
592    ///
593    /// Available since API-level: 12
594    #[cfg(feature = "api-12")]
595    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
596    pub fn OH_Input_SetKeyEventKeyCode(keyEvent: *mut Input_KeyEvent, keyCode: i32);
597    /// Obtains the key value of a key event.
598    ///
599    /// # Arguments
600    ///
601    /// * `keyEvent` - Key event object.
602    ///
603    /// # Returns
604    ///
605    /// * Key code.
606    ///
607    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
608    ///
609    /// Available since API-level: 12
610    #[cfg(feature = "api-12")]
611    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
612    pub fn OH_Input_GetKeyEventKeyCode(keyEvent: *const Input_KeyEvent) -> i32;
613    /// Sets the time when a key event occurs.
614    ///
615    /// # Arguments
616    ///
617    /// * `keyEvent` - Key event object.
618    ///
619    /// * `actionTime` - Time when the key event occurs.
620    ///
621    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
622    ///
623    /// Available since API-level: 12
624    #[cfg(feature = "api-12")]
625    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
626    pub fn OH_Input_SetKeyEventActionTime(keyEvent: *mut Input_KeyEvent, actionTime: i64);
627    /// Obtains the time when a key event occurs.
628    ///
629    /// # Arguments
630    ///
631    /// * `keyEvent` - Key event object.
632    ///
633    /// # Returns
634    ///
635    /// * Returns the time when the key event occurs.
636    ///
637    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
638    ///
639    /// Available since API-level: 12
640    #[cfg(feature = "api-12")]
641    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
642    pub fn OH_Input_GetKeyEventActionTime(keyEvent: *const Input_KeyEvent) -> i64;
643    /// Inject mouse event.
644    ///
645    /// # Arguments
646    ///
647    /// * `mouseEvent` - - the mouse event to be injected.
648    ///
649    /// # Returns
650    ///
651    /// * OH_Input_InjectMouseEvent function result code.
652    /// [`INPUT_SUCCESS`] inject mouseEvent success.
653    ///
654    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
655    ///
656    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
657    ///
658    ///
659    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
660    ///
661    /// Available since API-level: 12
662    #[cfg(feature = "api-12")]
663    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
664    pub fn OH_Input_InjectMouseEvent(mouseEvent: *const Input_MouseEvent) -> i32;
665    /// Creates a mouse event object.
666    ///
667    ///
668    /// # Returns
669    ///
670    /// * Returns an [`Input_MouseEvent`] pointer object if the operation is successful.
671    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
672    ///
673    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
674    ///
675    /// Available since API-level: 12
676    #[cfg(feature = "api-12")]
677    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
678    pub fn OH_Input_CreateMouseEvent() -> *mut Input_MouseEvent;
679    /// Destroys a mouse event object.
680    ///
681    /// # Arguments
682    ///
683    /// * `mouseEvent` - Mouse event object.
684    ///
685    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
686    ///
687    /// Available since API-level: 12
688    #[cfg(feature = "api-12")]
689    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
690    pub fn OH_Input_DestroyMouseEvent(mouseEvent: *mut *mut Input_MouseEvent);
691    /// Sets the action for a mouse event.
692    ///
693    /// # Arguments
694    ///
695    /// * `mouseEvent` - Mouse event object.
696    ///
697    /// * `action` - Mouse action.
698    ///
699    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
700    ///
701    /// Available since API-level: 12
702    #[cfg(feature = "api-12")]
703    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
704    pub fn OH_Input_SetMouseEventAction(mouseEvent: *mut Input_MouseEvent, action: i32);
705    /// Obtains the action of a mouse event.
706    ///
707    /// # Arguments
708    ///
709    /// * `mouseEvent` - Mouse event object.
710    ///
711    /// # Returns
712    ///
713    /// * Mouse action.
714    ///
715    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
716    ///
717    /// Available since API-level: 12
718    #[cfg(feature = "api-12")]
719    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
720    pub fn OH_Input_GetMouseEventAction(mouseEvent: *const Input_MouseEvent) -> i32;
721    /// Sets the X coordinate for a mouse event.
722    ///
723    /// # Arguments
724    ///
725    /// * `mouseEvent` - Mouse event object.
726    ///
727    /// * `displayX` - X coordinate on the display.
728    ///
729    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
730    ///
731    /// Available since API-level: 12
732    #[cfg(feature = "api-12")]
733    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
734    pub fn OH_Input_SetMouseEventDisplayX(mouseEvent: *mut Input_MouseEvent, displayX: i32);
735    /// Obtains the X coordinate of a mouse event.
736    ///
737    /// # Arguments
738    ///
739    /// * `mouseEvent` - Mouse event object.
740    ///
741    /// # Returns
742    ///
743    /// * X coordinate on the display.
744    ///
745    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
746    ///
747    /// Available since API-level: 12
748    #[cfg(feature = "api-12")]
749    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
750    pub fn OH_Input_GetMouseEventDisplayX(mouseEvent: *const Input_MouseEvent) -> i32;
751    /// Sets the Y coordinate for a mouse event.
752    ///
753    /// # Arguments
754    ///
755    /// * `mouseEvent` - Mouse event object.
756    ///
757    /// * `displayY` - Y coordinate on the display.
758    ///
759    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
760    ///
761    /// Available since API-level: 12
762    #[cfg(feature = "api-12")]
763    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
764    pub fn OH_Input_SetMouseEventDisplayY(mouseEvent: *mut Input_MouseEvent, displayY: i32);
765    /// Obtains the Y coordinate of a mouse event.
766    ///
767    /// # Arguments
768    ///
769    /// * `mouseEvent` - Mouse event object.
770    ///
771    /// # Returns
772    ///
773    /// * Y coordinate on the display.
774    ///
775    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
776    ///
777    /// Available since API-level: 12
778    #[cfg(feature = "api-12")]
779    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
780    pub fn OH_Input_GetMouseEventDisplayY(mouseEvent: *const Input_MouseEvent) -> i32;
781    /// Sets the button for a mouse event.
782    ///
783    /// # Arguments
784    ///
785    /// * `mouseEvent` - Mouse event object.
786    ///
787    /// * `button` - Mouse button.
788    ///
789    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
790    ///
791    /// Available since API-level: 12
792    #[cfg(feature = "api-12")]
793    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
794    pub fn OH_Input_SetMouseEventButton(mouseEvent: *mut Input_MouseEvent, button: i32);
795    /// Obtains the button of a mouse event.
796    ///
797    /// # Arguments
798    ///
799    /// * `mouseEvent` - Mouse event object.
800    ///
801    /// # Returns
802    ///
803    /// * Mouse button.
804    ///
805    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
806    ///
807    /// Available since API-level: 12
808    #[cfg(feature = "api-12")]
809    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
810    pub fn OH_Input_GetMouseEventButton(mouseEvent: *const Input_MouseEvent) -> i32;
811    /// Sets the axis type for mouse event.
812    ///
813    /// # Arguments
814    ///
815    /// * `mouseEvent` - Mouse event object.
816    ///
817    /// * `axisType` - Axis type, for example, X axis or Y axis.
818    ///
819    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
820    ///
821    /// Available since API-level: 12
822    #[cfg(feature = "api-12")]
823    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
824    pub fn OH_Input_SetMouseEventAxisType(mouseEvent: *mut Input_MouseEvent, axisType: i32);
825    /// Obtains the axis type of a mouse event.
826    ///
827    /// # Arguments
828    ///
829    /// * `mouseEvent` - Mouse event object.
830    ///
831    /// # Returns
832    ///
833    /// * Axis type.
834    ///
835    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
836    ///
837    /// Available since API-level: 12
838    #[cfg(feature = "api-12")]
839    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
840    pub fn OH_Input_GetMouseEventAxisType(mouseEvent: *const Input_MouseEvent) -> i32;
841    /// Sets the axis value for a mouse axis event.
842    ///
843    /// # Arguments
844    ///
845    /// * `mouseEvent` - Mouse event object.
846    ///
847    /// * `axisValue` - Axis value. A positive value means scrolling forward,
848    /// and a negative number means scrolling backward.
849    ///
850    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
851    ///
852    /// Available since API-level: 12
853    #[cfg(feature = "api-12")]
854    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
855    pub fn OH_Input_SetMouseEventAxisValue(mouseEvent: *mut Input_MouseEvent, axisValue: f32);
856    /// Obtains the axis value of a mouse event.
857    ///
858    /// # Arguments
859    ///
860    /// * `mouseEvent` - Mouse event object.
861    ///
862    /// # Returns
863    ///
864    /// * Axis value.
865    ///
866    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
867    ///
868    /// Available since API-level: 12
869    #[cfg(feature = "api-12")]
870    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
871    pub fn OH_Input_GetMouseEventAxisValue(mouseEvent: *const Input_MouseEvent) -> f32;
872    /// Sets the time when a mouse event occurs.
873    ///
874    /// # Arguments
875    ///
876    /// * `mouseEvent` - Mouse event object.
877    ///
878    /// * `actionTime` - Time when the mouse event occurs.
879    ///
880    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
881    ///
882    /// Available since API-level: 12
883    #[cfg(feature = "api-12")]
884    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
885    pub fn OH_Input_SetMouseEventActionTime(mouseEvent: *mut Input_MouseEvent, actionTime: i64);
886    /// Obtains the time when a mouse event occurs.
887    ///
888    /// # Arguments
889    ///
890    /// * `mouseEvent` - Mouse event object.
891    ///
892    /// # Returns
893    ///
894    /// * Returns the time when the mouse event occurs.
895    ///
896    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
897    ///
898    /// Available since API-level: 12
899    #[cfg(feature = "api-12")]
900    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
901    pub fn OH_Input_GetMouseEventActionTime(mouseEvent: *const Input_MouseEvent) -> i64;
902    /// Inject touch event.
903    ///
904    /// # Arguments
905    ///
906    /// * `touchEvent` - - the touch event to be injected.
907    ///
908    /// # Returns
909    ///
910    /// * OH_Input_InjectTouchEvent function result code.
911    /// [`INPUT_SUCCESS`] inject touchEvent success.
912    ///
913    /// [`INPUT_PARAMETER_ERROR`] Parameter check failed.
914    ///
915    ///
916    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
917    ///
918    /// Available since API-level: 12
919    #[cfg(feature = "api-12")]
920    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
921    pub fn OH_Input_InjectTouchEvent(touchEvent: *const Input_TouchEvent) -> i32;
922    /// Creates a touch event object.
923    ///
924    ///
925    /// # Returns
926    ///
927    /// * Returns an [`Input_TouchEvent`] pointer object if the operation is successful.
928    /// Otherwise, a null pointer is returned. The possible cause is memory allocation failure.
929    ///
930    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
931    ///
932    /// Available since API-level: 12
933    #[cfg(feature = "api-12")]
934    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
935    pub fn OH_Input_CreateTouchEvent() -> *mut Input_TouchEvent;
936    /// Destroys a touch event object.
937    ///
938    /// # Arguments
939    ///
940    /// * `touchEvent` - Touch event object.
941    ///
942    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
943    ///
944    /// Available since API-level: 12
945    #[cfg(feature = "api-12")]
946    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
947    pub fn OH_Input_DestroyTouchEvent(touchEvent: *mut *mut Input_TouchEvent);
948    /// Sets the action for a touch event.
949    ///
950    /// # Arguments
951    ///
952    /// * `touchEvent` - Touch event object.
953    ///
954    /// * `action` - Touch action.
955    ///
956    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
957    ///
958    /// Available since API-level: 12
959    #[cfg(feature = "api-12")]
960    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
961    pub fn OH_Input_SetTouchEventAction(touchEvent: *mut Input_TouchEvent, action: i32);
962    /// Obtains the action of a touch event.
963    ///
964    /// # Arguments
965    ///
966    /// * `touchEvent` - Touch event object.
967    ///
968    /// # Returns
969    ///
970    /// * Touch action.
971    ///
972    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
973    ///
974    /// Available since API-level: 12
975    #[cfg(feature = "api-12")]
976    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
977    pub fn OH_Input_GetTouchEventAction(touchEvent: *const Input_TouchEvent) -> i32;
978    /// Sets the finger ID for the touch event.
979    ///
980    /// # Arguments
981    ///
982    /// * `touchEvent` - Touch event object.
983    ///
984    /// * `id` - Finger ID.
985    ///
986    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
987    ///
988    /// Available since API-level: 12
989    #[cfg(feature = "api-12")]
990    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
991    pub fn OH_Input_SetTouchEventFingerId(touchEvent: *mut Input_TouchEvent, id: i32);
992    /// Obtains the finger ID of a touch event.
993    ///
994    /// # Arguments
995    ///
996    /// * `touchEvent` - Touch event object.
997    ///
998    /// # Returns
999    ///
1000    /// * Finger ID.
1001    ///
1002    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1003    ///
1004    /// Available since API-level: 12
1005    #[cfg(feature = "api-12")]
1006    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1007    pub fn OH_Input_GetTouchEventFingerId(touchEvent: *const Input_TouchEvent) -> i32;
1008    /// Sets the X coordinate for a touch event.
1009    ///
1010    /// # Arguments
1011    ///
1012    /// * `touchEvent` - Touch event object.
1013    ///
1014    /// * `displayX` - X coordinate.
1015    ///
1016    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1017    ///
1018    /// Available since API-level: 12
1019    #[cfg(feature = "api-12")]
1020    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1021    pub fn OH_Input_SetTouchEventDisplayX(touchEvent: *mut Input_TouchEvent, displayX: i32);
1022    /// Obtains the X coordinate of a touch event.
1023    ///
1024    /// # Arguments
1025    ///
1026    /// * `touchEvent` - Touch event object.
1027    ///
1028    /// # Returns
1029    ///
1030    /// * X coordinate.
1031    ///
1032    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1033    ///
1034    /// Available since API-level: 12
1035    #[cfg(feature = "api-12")]
1036    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1037    pub fn OH_Input_GetTouchEventDisplayX(touchEvent: *const Input_TouchEvent) -> i32;
1038    /// Sets the Y coordinate for a touch event.
1039    ///
1040    /// # Arguments
1041    ///
1042    /// * `touchEvent` - Touch event object.
1043    ///
1044    /// * `displayY` - Y coordinate.
1045    ///
1046    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1047    ///
1048    /// Available since API-level: 12
1049    #[cfg(feature = "api-12")]
1050    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1051    pub fn OH_Input_SetTouchEventDisplayY(touchEvent: *mut Input_TouchEvent, displayY: i32);
1052    /// Obtains the Y coordinate of a touch event.
1053    ///
1054    /// # Arguments
1055    ///
1056    /// * `touchEvent` - Touch event object.
1057    ///
1058    /// # Returns
1059    ///
1060    /// * Y coordinate.
1061    ///
1062    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1063    ///
1064    /// Available since API-level: 12
1065    #[cfg(feature = "api-12")]
1066    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1067    pub fn OH_Input_GetTouchEventDisplayY(touchEvent: *const Input_TouchEvent) -> i32;
1068    /// Sets the time when a touch event occurs.
1069    ///
1070    /// # Arguments
1071    ///
1072    /// * `touchEvent` - Touch event object.
1073    ///
1074    /// * `actionTime` - Time when the touch event occurs.
1075    ///
1076    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1077    ///
1078    /// Available since API-level: 12
1079    #[cfg(feature = "api-12")]
1080    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1081    pub fn OH_Input_SetTouchEventActionTime(touchEvent: *mut Input_TouchEvent, actionTime: i64);
1082    /// Obtains the time when a touch event occurs.
1083    ///
1084    /// # Arguments
1085    ///
1086    /// * `touchEvent` - touch event object.
1087    ///
1088    /// # Returns
1089    ///
1090    /// * Returns the time when the touch event occurs.
1091    ///
1092    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1093    ///
1094    /// Available since API-level: 12
1095    #[cfg(feature = "api-12")]
1096    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1097    pub fn OH_Input_GetTouchEventActionTime(touchEvent: *const Input_TouchEvent) -> i64;
1098    /// Cancels event injection and revokes authorization.
1099    ///
1100    ///
1101    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1102    ///
1103    /// Available since API-level: 12
1104    #[cfg(feature = "api-12")]
1105    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1106    pub fn OH_Input_CancelInjection();
1107    /// Creates an axis event object.
1108    ///
1109    ///
1110    /// # Returns
1111    ///
1112    /// * If the operation is successful, a [`Input_AxisEvent`] object is returned.
1113    /// If the operation fails, null is returned.
1114    ///
1115    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1116    ///
1117    /// Available since API-level: 12
1118    #[cfg(feature = "api-12")]
1119    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1120    pub fn OH_Input_CreateAxisEvent() -> *mut Input_AxisEvent;
1121    /// Destroys an axis event object.
1122    ///
1123    /// # Arguments
1124    ///
1125    /// * `axisEvent` - Pointer to the axis event object.
1126    ///
1127    /// # Returns
1128    ///
1129    /// * OH_Input_DestroyAxisEvent function result code.
1130    /// [`INPUT_SUCCESS`] Destroys axisEvent success.
1131    ///
1132    /// [`INPUT_PARAMETER_ERROR`]The axisEvent is NULL or the *axisEvent is NULL.
1133    ///
1134    ///
1135    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1136    ///
1137    /// Available since API-level: 12
1138    #[cfg(feature = "api-12")]
1139    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1140    pub fn OH_Input_DestroyAxisEvent(axisEvent: *mut *mut Input_AxisEvent) -> Input_Result;
1141    /// Sets the axis event action.
1142    ///
1143    /// # Arguments
1144    ///
1145    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1146    ///
1147    /// * `action` - Axis event action. The values are defined in [`InputEvent_AxisAction`].
1148    ///
1149    /// # Returns
1150    ///
1151    /// * OH_Input_SetAxisEventAction function result code.
1152    /// [`INPUT_SUCCESS`] Sets the axis event action success.
1153    ///
1154    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1155    ///
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_SetAxisEventAction(
1163        axisEvent: *mut Input_AxisEvent,
1164        action: InputEvent_AxisAction,
1165    ) -> Input_Result;
1166    /// Obtains the axis event action.
1167    ///
1168    /// # Arguments
1169    ///
1170    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1171    ///
1172    /// * `action` - Axis event action. The values are defined in [`InputEvent_AxisAction`].
1173    ///
1174    /// # Returns
1175    ///
1176    /// * OH_Input_GetAxisEventAction function result code.
1177    /// [`INPUT_SUCCESS`] Obtains the axis event action success.
1178    ///
1179    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the action is NULL.
1180    ///
1181    ///
1182    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1183    ///
1184    /// Available since API-level: 12
1185    #[cfg(feature = "api-12")]
1186    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1187    pub fn OH_Input_GetAxisEventAction(
1188        axisEvent: *const Input_AxisEvent,
1189        action: *mut InputEvent_AxisAction,
1190    ) -> Input_Result;
1191    /// Sets the X coordinate of an axis event.
1192    ///
1193    /// # Arguments
1194    ///
1195    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1196    ///
1197    /// * `displayX` - X coordinate of the axis event.
1198    ///
1199    /// # Returns
1200    ///
1201    /// * OH_Input_SetAxisEventDisplayX function result code.
1202    /// [`INPUT_SUCCESS`] Sets the X coordinate of the axis event success.
1203    ///
1204    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1205    ///
1206    ///
1207    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1208    ///
1209    /// Available since API-level: 12
1210    #[cfg(feature = "api-12")]
1211    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1212    pub fn OH_Input_SetAxisEventDisplayX(
1213        axisEvent: *mut Input_AxisEvent,
1214        displayX: f32,
1215    ) -> Input_Result;
1216    /// Obtains the X coordinate of an axis event.
1217    ///
1218    /// # Arguments
1219    ///
1220    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1221    ///
1222    /// * `displayX` - X coordinate of the axis event.
1223    ///
1224    /// # Returns
1225    ///
1226    /// * OH_Input_GetAxisEventDisplayX function result code.
1227    /// [`INPUT_SUCCESS`] Obtains the X coordinate of the axis event success.
1228    ///
1229    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the displayX is NULL.
1230    ///
1231    ///
1232    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1233    ///
1234    /// Available since API-level: 12
1235    #[cfg(feature = "api-12")]
1236    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1237    pub fn OH_Input_GetAxisEventDisplayX(
1238        axisEvent: *const Input_AxisEvent,
1239        displayX: *mut f32,
1240    ) -> Input_Result;
1241    /// Sets the Y coordinate of an axis event.
1242    ///
1243    /// # Arguments
1244    ///
1245    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1246    ///
1247    /// * `displayY` - Y coordinate of the axis event.
1248    ///
1249    /// # Returns
1250    ///
1251    /// * OH_Input_SetAxisEventDisplayY function result code.
1252    /// [`INPUT_SUCCESS`] Sets the Y coordinate of the axis event success.
1253    ///
1254    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1255    ///
1256    ///
1257    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1258    ///
1259    /// Available since API-level: 12
1260    #[cfg(feature = "api-12")]
1261    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1262    pub fn OH_Input_SetAxisEventDisplayY(
1263        axisEvent: *mut Input_AxisEvent,
1264        displayY: f32,
1265    ) -> Input_Result;
1266    /// Obtains the Y coordinate of an axis event.
1267    ///
1268    /// # Arguments
1269    ///
1270    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1271    ///
1272    /// * `displayY` - Y coordinate of the axis event.
1273    ///
1274    /// # Returns
1275    ///
1276    /// * OH_Input_GetAxisEventDisplayY function result code.
1277    /// [`INPUT_SUCCESS`] Obtains the Y coordinate of the axis event success.
1278    ///
1279    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the displayY is NULL.
1280    ///
1281    ///
1282    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1283    ///
1284    /// Available since API-level: 12
1285    #[cfg(feature = "api-12")]
1286    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1287    pub fn OH_Input_GetAxisEventDisplayY(
1288        axisEvent: *const Input_AxisEvent,
1289        displayY: *mut f32,
1290    ) -> Input_Result;
1291    /// Sets the axis value of the axis type specified by the axis event.
1292    ///
1293    /// # Arguments
1294    ///
1295    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1296    ///
1297    /// * `axisType` - Axis type. The values are defined in [`InputEvent_AxisType`].
1298    ///
1299    /// * `axisValue` - Axis value.
1300    ///
1301    /// # Returns
1302    ///
1303    /// * OH_Input_SetAxisEventAxisValue function result code.
1304    /// [`INPUT_SUCCESS`] Sets the axis value of the axis event success.
1305    ///
1306    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1307    ///
1308    ///
1309    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1310    ///
1311    /// Available since API-level: 12
1312    #[cfg(feature = "api-12")]
1313    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1314    pub fn OH_Input_SetAxisEventAxisValue(
1315        axisEvent: *mut Input_AxisEvent,
1316        axisType: InputEvent_AxisType,
1317        axisValue: f64,
1318    ) -> Input_Result;
1319    /// Obtains the axis value for the specified axis type of the axis event.
1320    ///
1321    /// # Arguments
1322    ///
1323    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1324    ///
1325    /// * `axisType` - Axis type. The values are defined in [`InputEvent_AxisType`].
1326    ///
1327    /// * `axisValue` - Axis value.
1328    ///
1329    /// # Returns
1330    ///
1331    /// * OH_Input_GetAxisEventAxisValue function result code.
1332    /// [`INPUT_SUCCESS`] Obtains the axis value of the axis event success.
1333    ///
1334    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the axisValue is NULL,
1335    /// or the axisType not found in the axisEvent.
1336    ///
1337    ///
1338    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1339    ///
1340    /// Available since API-level: 12
1341    #[cfg(feature = "api-12")]
1342    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1343    pub fn OH_Input_GetAxisEventAxisValue(
1344        axisEvent: *const Input_AxisEvent,
1345        axisType: InputEvent_AxisType,
1346        axisValue: *mut f64,
1347    ) -> Input_Result;
1348    /// Sets the time when an axis event occurs.
1349    ///
1350    /// # Arguments
1351    ///
1352    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1353    ///
1354    /// * `actionTime` - Time when an axis event occurs.
1355    ///
1356    /// # Returns
1357    ///
1358    /// * OH_Input_SetAxisEventActionTime function result code.
1359    /// [`INPUT_SUCCESS`] Sets the time when an axis event occurs success.
1360    ///
1361    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1362    ///
1363    ///
1364    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1365    ///
1366    /// Available since API-level: 12
1367    #[cfg(feature = "api-12")]
1368    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1369    pub fn OH_Input_SetAxisEventActionTime(
1370        axisEvent: *mut Input_AxisEvent,
1371        actionTime: i64,
1372    ) -> Input_Result;
1373    /// Obtains the time when an axis event occurs.
1374    ///
1375    /// # Arguments
1376    ///
1377    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1378    ///
1379    /// * `actionTime` - Time when an axis event occurs.
1380    ///
1381    /// # Returns
1382    ///
1383    /// * OH_Input_GetAxisEventActionTime function result code.
1384    /// [`INPUT_SUCCESS`] Obtains the time when an axis event occurs success.
1385    ///
1386    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the actionTime is NULL.
1387    ///
1388    ///
1389    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1390    ///
1391    /// Available since API-level: 12
1392    #[cfg(feature = "api-12")]
1393    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1394    pub fn OH_Input_GetAxisEventActionTime(
1395        axisEvent: *const Input_AxisEvent,
1396        actionTime: *mut i64,
1397    ) -> Input_Result;
1398    /// Sets the axis event type.
1399    ///
1400    /// # Arguments
1401    ///
1402    /// * `axisEvent` - Axis event object. For details, see [`Input_AxisEvent`].
1403    ///
1404    /// * `axisEventType` - Axis event type. The values are defined in [`InputEvent_AxisEventType`].
1405    ///
1406    /// # Returns
1407    ///
1408    /// * OH_Input_SetAxisEventType function result code.
1409    /// [`INPUT_SUCCESS`] Sets the axis event type success.
1410    ///
1411    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1412    ///
1413    ///
1414    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1415    ///
1416    /// Available since API-level: 12
1417    #[cfg(feature = "api-12")]
1418    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1419    pub fn OH_Input_SetAxisEventType(
1420        axisEvent: *mut Input_AxisEvent,
1421        axisEventType: InputEvent_AxisEventType,
1422    ) -> Input_Result;
1423    /// Obtains the axis event type.
1424    ///
1425    /// # Arguments
1426    ///
1427    /// * `axisEvent` - Axis event object.
1428    ///
1429    /// * `axisEventType` - Axis event type. The values are defined in [`InputEvent_AxisEventType`].
1430    ///
1431    /// # Returns
1432    ///
1433    /// * OH_Input_GetAxisEventType function result code.
1434    /// [`INPUT_SUCCESS`] Obtains the axis event type success.
1435    ///
1436    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the axisEventType is NULL.
1437    ///
1438    ///
1439    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1440    ///
1441    /// Available since API-level: 12
1442    #[cfg(feature = "api-12")]
1443    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1444    pub fn OH_Input_GetAxisEventType(
1445        axisEvent: *const Input_AxisEvent,
1446        axisEventType: *mut InputEvent_AxisEventType,
1447    ) -> Input_Result;
1448    /// Sets the axis event source type.
1449    ///
1450    /// # Arguments
1451    ///
1452    /// * `axisEvent` - Axis event object.
1453    ///
1454    /// * `sourceType` - Axis event source type. The values are defined in [`InputEvent_SourceType`].
1455    ///
1456    /// # Returns
1457    ///
1458    /// * OH_Input_SetAxisEventSourceType function result code.
1459    /// [`INPUT_SUCCESS`] Sets the axis event source type success.
1460    ///
1461    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL.
1462    ///
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_SetAxisEventSourceType(
1470        axisEvent: *mut Input_AxisEvent,
1471        sourceType: InputEvent_SourceType,
1472    ) -> Input_Result;
1473    /// Obtains the axis event source type.
1474    ///
1475    /// # Arguments
1476    ///
1477    /// * `axisEvent` - Axis event object.
1478    ///
1479    /// * `sourceType` - Axis event source type. The values are defined in [`InputEvent_SourceType`].
1480    ///
1481    /// # Returns
1482    ///
1483    /// * OH_Input_GetAxisEventSourceType function result code.
1484    /// [`INPUT_SUCCESS`] Obtains the axis event source type success.
1485    ///
1486    /// [`INPUT_PARAMETER_ERROR`] The axisEvent is NULL or the sourceType is NULL.
1487    ///
1488    ///
1489    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1490    ///
1491    /// Available since API-level: 12
1492    #[cfg(feature = "api-12")]
1493    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1494    pub fn OH_Input_GetAxisEventSourceType(
1495        axisEvent: *const Input_AxisEvent,
1496        sourceType: *mut InputEvent_SourceType,
1497    ) -> Input_Result;
1498    /// Adds a listener of key events.
1499    ///
1500    /// ohos.permission.INPUT_MONITORING
1501    /// # Arguments
1502    ///
1503    /// * `callback` - - Callback used to receive key events.
1504    ///
1505    /// # Returns
1506    ///
1507    /// * OH_Input_AddKeyEventMonitor function result code.
1508    /// [`INPUT_SUCCESS`] Adds a listener of key events success.
1509    ///
1510    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1511    ///
1512    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1513    ///
1514    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
1515    ///
1516    ///
1517    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1518    ///
1519    /// Available since API-level: 12
1520    #[cfg(feature = "api-12")]
1521    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1522    pub fn OH_Input_AddKeyEventMonitor(callback: Input_KeyEventCallback) -> Input_Result;
1523    /// Adds a listener for mouse events, including mouse click and movement events,
1524    /// but not scroll wheel events. Scroll wheel events are axis events.
1525    ///
1526    /// ohos.permission.INPUT_MONITORING
1527    /// # Arguments
1528    ///
1529    /// * `callback` - - Callback used to receive mouse events.
1530    ///
1531    /// # Returns
1532    ///
1533    /// * OH_Input_AddMouseEventMonitor function result code.
1534    /// [`INPUT_SUCCESS`] Adds a listener of mouse events success.
1535    ///
1536    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1537    ///
1538    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1539    ///
1540    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
1541    ///
1542    ///
1543    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1544    ///
1545    /// Available since API-level: 12
1546    #[cfg(feature = "api-12")]
1547    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1548    pub fn OH_Input_AddMouseEventMonitor(callback: Input_MouseEventCallback) -> Input_Result;
1549    /// Add a listener for touch events.
1550    ///
1551    /// ohos.permission.INPUT_MONITORING
1552    /// # Arguments
1553    ///
1554    /// * `callback` - - Callback used to receive touch events.
1555    ///
1556    /// # Returns
1557    ///
1558    /// * OH_Input_AddTouchEventMonitor function result code.
1559    /// [`INPUT_SUCCESS`] Adds a listener of touch events success.
1560    ///
1561    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1562    ///
1563    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1564    ///
1565    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
1566    ///
1567    ///
1568    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1569    ///
1570    /// Available since API-level: 12
1571    #[cfg(feature = "api-12")]
1572    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1573    pub fn OH_Input_AddTouchEventMonitor(callback: Input_TouchEventCallback) -> Input_Result;
1574    /// Adds a listener for all types of axis events.
1575    /// The axis event types are defined in [`InputEvent_AxisEventType`].
1576    ///
1577    /// ohos.permission.INPUT_MONITORING
1578    /// # Arguments
1579    ///
1580    /// * `callback` - - Callback used to receive axis events.
1581    ///
1582    /// # Returns
1583    ///
1584    /// * OH_Input_AddAxisEventMonitorForAll function result code.
1585    /// [`INPUT_SUCCESS`] Adds a listener for all types of axis events success.
1586    ///
1587    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1588    ///
1589    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1590    ///
1591    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
1592    ///
1593    ///
1594    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1595    ///
1596    /// Available since API-level: 12
1597    #[cfg(feature = "api-12")]
1598    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1599    pub fn OH_Input_AddAxisEventMonitorForAll(callback: Input_AxisEventCallback) -> Input_Result;
1600    /// Adds a listener for the specified type of axis events.
1601    ///
1602    /// ohos.permission.INPUT_MONITORING
1603    /// # Arguments
1604    ///
1605    /// * `axisEventType` - - Axis event type. The values are defined in [`InputEvent_AxisEventType`].
1606    ///
1607    /// * `callback` - - Callback used to receive the specified type of axis events.
1608    ///
1609    /// # Returns
1610    ///
1611    /// * OH_Input_AddAxisEventMonitor function result code.
1612    /// [`INPUT_SUCCESS`] Adds a listener for the specified types of axis events success.
1613    ///
1614    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1615    ///
1616    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1617    ///
1618    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the monitor because the service is exception.
1619    ///
1620    ///
1621    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1622    ///
1623    /// Available since API-level: 12
1624    #[cfg(feature = "api-12")]
1625    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1626    pub fn OH_Input_AddAxisEventMonitor(
1627        axisEventType: InputEvent_AxisEventType,
1628        callback: Input_AxisEventCallback,
1629    ) -> Input_Result;
1630    /// Removes a key event listener.
1631    ///
1632    /// ohos.permission.INPUT_MONITORING
1633    /// # Arguments
1634    ///
1635    /// * `callback` - - Callback for the key event listener.
1636    ///
1637    /// # Returns
1638    ///
1639    /// * OH_Input_RemoveKeyEventMonitor function result code.
1640    /// [`INPUT_SUCCESS`] Removes a key event listener success.
1641    ///
1642    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1643    ///
1644    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
1645    ///
1646    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
1647    ///
1648    ///
1649    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1650    ///
1651    /// Available since API-level: 12
1652    #[cfg(feature = "api-12")]
1653    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1654    pub fn OH_Input_RemoveKeyEventMonitor(callback: Input_KeyEventCallback) -> Input_Result;
1655    /// Removes a mouse event listener.
1656    ///
1657    /// ohos.permission.INPUT_MONITORING
1658    /// # Arguments
1659    ///
1660    /// * `callback` - - Callback for the mouse event listener.
1661    ///
1662    /// # Returns
1663    ///
1664    /// * OH_Input_RemoveMouseEventMonitor function result code.
1665    /// [`INPUT_SUCCESS`] Removes a mouse event listener success.
1666    ///
1667    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1668    ///
1669    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
1670    ///
1671    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
1672    ///
1673    ///
1674    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1675    ///
1676    /// Available since API-level: 12
1677    #[cfg(feature = "api-12")]
1678    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1679    pub fn OH_Input_RemoveMouseEventMonitor(callback: Input_MouseEventCallback) -> Input_Result;
1680    /// Removes a touch event listener.
1681    ///
1682    /// ohos.permission.INPUT_MONITORING
1683    /// # Arguments
1684    ///
1685    /// * `callback` - - Callback for the touch event listener.
1686    ///
1687    /// # Returns
1688    ///
1689    /// * OH_Input_RemoveTouchEventMonitor function result code.
1690    /// [`INPUT_SUCCESS`] Removes a touch event listener success.
1691    ///
1692    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1693    ///
1694    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
1695    ///
1696    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
1697    ///
1698    ///
1699    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1700    ///
1701    /// Available since API-level: 12
1702    #[cfg(feature = "api-12")]
1703    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1704    pub fn OH_Input_RemoveTouchEventMonitor(callback: Input_TouchEventCallback) -> Input_Result;
1705    /// Removes the listener for all types of axis events.
1706    ///
1707    /// ohos.permission.INPUT_MONITORING
1708    /// # Arguments
1709    ///
1710    /// * `callback` - - Callback for the listener used to listen for all types of axis events.
1711    ///
1712    /// # Returns
1713    ///
1714    /// * OH_Input_RemoveAxisEventMonitorForAll function result code.
1715    /// [`INPUT_SUCCESS`] Removes the listener for all types of axis events success.
1716    ///
1717    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1718    ///
1719    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
1720    ///
1721    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
1722    ///
1723    ///
1724    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1725    ///
1726    /// Available since API-level: 12
1727    #[cfg(feature = "api-12")]
1728    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1729    pub fn OH_Input_RemoveAxisEventMonitorForAll(callback: Input_AxisEventCallback)
1730        -> Input_Result;
1731    /// Removes the listener for the specified type of axis events.
1732    ///
1733    /// ohos.permission.INPUT_MONITORING
1734    /// # Arguments
1735    ///
1736    /// * `axisEventType` - - Axis event type. The axis event type is defined in [`InputEvent_AxisEventType`].
1737    ///
1738    /// * `callback` - - Callback for the listener used to listen for the specified type of axis events.
1739    ///
1740    /// # Returns
1741    ///
1742    /// * OH_Input_RemoveAxisEventMonitor function result code.
1743    /// [`INPUT_SUCCESS`] Removes the listener for the specified type of axis events success.
1744    ///
1745    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1746    ///
1747    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL or has not been added.
1748    ///
1749    /// [`INPUT_SERVICE_EXCEPTION`] Fail to remove the monitor because the service is exception.
1750    ///
1751    ///
1752    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1753    ///
1754    /// Available since API-level: 12
1755    #[cfg(feature = "api-12")]
1756    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1757    pub fn OH_Input_RemoveAxisEventMonitor(
1758        axisEventType: InputEvent_AxisEventType,
1759        callback: Input_AxisEventCallback,
1760    ) -> Input_Result;
1761    /// Adds a key event interceptor. If multiple interceptors are added, only the first one takes effect.
1762    ///
1763    /// ohos.permission.INTERCEPT_INPUT_EVENT
1764    /// # Arguments
1765    ///
1766    /// * `callback` - - Callback used to receive key events.
1767    ///
1768    /// * `option` - - Options for event interception. If **null** is passed, the default value is used.
1769    ///
1770    /// # Returns
1771    ///
1772    /// * OH_Input_AddKeyEventInterceptor function result code.
1773    /// [`INPUT_SUCCESS`] Adds a key event interceptor success.
1774    ///
1775    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1776    ///
1777    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1778    ///
1779    /// [`INPUT_REPEAT_INTERCEPTOR`] Interceptor repeatedly created for an application.
1780    ///
1781    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the interceptor because the service is exception.
1782    ///
1783    ///
1784    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1785    ///
1786    /// Available since API-level: 12
1787    #[cfg(feature = "api-12")]
1788    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1789    pub fn OH_Input_AddKeyEventInterceptor(
1790        callback: Input_KeyEventCallback,
1791        option: *mut Input_InterceptorOptions,
1792    ) -> Input_Result;
1793    /// Adds an interceptor for input events, including mouse, touch, and axis events.
1794    /// If multiple interceptors are added, only the first one takes effect.
1795    ///
1796    /// ohos.permission.INTERCEPT_INPUT_EVENT
1797    /// # Arguments
1798    ///
1799    /// * `callback` - - Pointer to the structure of the callback for the input event interceptor.
1800    /// For details, see [`Input_InterceptorEventCallback`].
1801    ///
1802    /// * `option` - - Options for event interception. If **null** is passed, the default value is used.
1803    ///
1804    /// # Returns
1805    ///
1806    /// * OH_Input_AddInputEventInterceptor function result code.
1807    /// [`INPUT_SUCCESS`] Adds an interceptor for input events success.
1808    ///
1809    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1810    ///
1811    /// [`INPUT_PARAMETER_ERROR`] The callback is NULL.
1812    ///
1813    /// [`INPUT_REPEAT_INTERCEPTOR`] Interceptor repeatedly created for an application.
1814    ///
1815    /// [`INPUT_SERVICE_EXCEPTION`] Failed to add the interceptor because the service is exception.
1816    ///
1817    ///
1818    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1819    ///
1820    /// Available since API-level: 12
1821    #[cfg(feature = "api-12")]
1822    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1823    pub fn OH_Input_AddInputEventInterceptor(
1824        callback: *mut Input_InterceptorEventCallback,
1825        option: *mut Input_InterceptorOptions,
1826    ) -> Input_Result;
1827    /// Removes a key event interceptor.
1828    ///
1829    /// ohos.permission.INTERCEPT_INPUT_EVENT
1830    ///
1831    /// # Returns
1832    ///
1833    /// * OH_Input_RemoveKeyEventInterceptor function result code.
1834    /// [`INPUT_SUCCESS`]Removes a key event interceptor success.
1835    ///
1836    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1837    ///
1838    /// [`INPUT_SERVICE_EXCEPTION`] Failed to remove the interceptor because the service is exception.
1839    ///
1840    ///
1841    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1842    ///
1843    /// Available since API-level: 12
1844    #[cfg(feature = "api-12")]
1845    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1846    pub fn OH_Input_RemoveKeyEventInterceptor() -> Input_Result;
1847    /// Removes an interceptor for input events, including mouse, touch, and axis events.
1848    ///
1849    /// ohos.permission.INTERCEPT_INPUT_EVENT
1850    ///
1851    /// # Returns
1852    ///
1853    /// * OH_Input_RemoveInputEventInterceptor function result code.
1854    /// [`INPUT_SUCCESS`] Removes an interceptor for input events success.
1855    ///
1856    /// [`INPUT_PERMISSION_DENIED`] Permission verification failed.
1857    ///
1858    /// [`INPUT_SERVICE_EXCEPTION`] Failed to remove the interceptor because the service is exception.
1859    ///
1860    ///
1861    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1862    ///
1863    /// Available since API-level: 12
1864    #[cfg(feature = "api-12")]
1865    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1866    pub fn OH_Input_RemoveInputEventInterceptor() -> Input_Result;
1867    /// Obtains the interval since the last system input event.
1868    ///
1869    /// # Arguments
1870    ///
1871    /// * `timeInterval` - Interval, in microseconds.
1872    ///
1873    /// # Returns
1874    ///
1875    /// * OH_Input_GetIntervalSinceLastInput status code, specifically.
1876    /// [`INPUT_SUCCESS`] if the Operation is successful.
1877    ///
1878    /// [`INPUT_SERVICE_EXCEPTION`] Failed to get the interval because the service is exception.
1879    ///
1880    /// [`INPUT_PARAMETER_ERROR`] The timeInterval is NULL.
1881    ///
1882    ///
1883    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1884    ///
1885    /// Available since API-level: 14
1886    #[cfg(feature = "api-14")]
1887    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1888    pub fn OH_Input_GetIntervalSinceLastInput(timeInterval: *mut i64) -> Input_Result;
1889    /// Creates a hot key object.
1890    ///
1891    ///
1892    /// # Returns
1893    ///
1894    /// * Returns an [`Input_Hotkey`] pointer object if the operation is successful. Otherwise, a null pointer is
1895    /// returned. The possible cause is memory allocation failure.
1896    ///
1897    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1898    ///
1899    /// Available since API-level: 14
1900    #[cfg(feature = "api-14")]
1901    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1902    pub fn OH_Input_CreateHotkey() -> *mut Input_Hotkey;
1903    /// Destroys a hot key object.
1904    ///
1905    /// # Arguments
1906    ///
1907    /// * `hotkey` - Hot key object.
1908    ///
1909    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1910    ///
1911    /// Available since API-level: 14
1912    #[cfg(feature = "api-14")]
1913    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1914    pub fn OH_Input_DestroyHotkey(hotkey: *mut *mut Input_Hotkey);
1915    /// Sets a modifier key.
1916    ///
1917    /// # Arguments
1918    ///
1919    /// * `hotkey` - Hotkey key object.
1920    ///
1921    /// * `preKeys` - List of modifier keys.
1922    ///
1923    /// * `size` - Number of modifier keys. One or two modifier keys are supported.
1924    ///
1925    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1926    ///
1927    /// Available since API-level: 14
1928    #[cfg(feature = "api-14")]
1929    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1930    pub fn OH_Input_SetPreKeys(hotkey: *mut Input_Hotkey, preKeys: *mut i32, size: i32);
1931    /// Obtains a modifier key.
1932    ///
1933    /// # Arguments
1934    ///
1935    /// * `hotkey` - Hotkey key object.
1936    ///
1937    /// * `preKeys` - List of modifier keys.
1938    ///
1939    /// * `preKeyCount` - Number of modifier keys.
1940    ///
1941    /// # Returns
1942    ///
1943    /// * OH_Input_GetPreKeys status code, specifically,
1944    /// [`INPUT_SUCCESS`] if the operation is successful;
1945    ///
1946    /// [`INPUT_PARAMETER_ERROR`] The hotkey is NULL or the pressedKeys is NULL or the pressedKeyCount
1947    /// is NULL;
1948    ///
1949    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
1950    ///
1951    ///
1952    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1953    ///
1954    /// Available since API-level: 14
1955    #[cfg(feature = "api-14")]
1956    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1957    pub fn OH_Input_GetPreKeys(
1958        hotkey: *const Input_Hotkey,
1959        preKeys: *mut *mut i32,
1960        preKeyCount: *mut i32,
1961    ) -> Input_Result;
1962    /// Sets a modified key.
1963    ///
1964    /// # Arguments
1965    ///
1966    /// * `hotkey` - Hotkey key object.
1967    ///
1968    /// * `finalKey` - Modified key. Only one modified key is supported.
1969    ///
1970    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1971    ///
1972    /// Available since API-level: 14
1973    #[cfg(feature = "api-14")]
1974    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1975    pub fn OH_Input_SetFinalKey(hotkey: *mut Input_Hotkey, finalKey: i32);
1976    /// Obtains a modified key.
1977    ///
1978    /// # Arguments
1979    ///
1980    /// * `hotkey` - Hotkey key object.
1981    ///
1982    /// * `finalKeyCode` - Returns the key value of the decorated key.
1983    ///
1984    /// # Returns
1985    ///
1986    /// * OH_Input_GetfinalKey status code, specifically,
1987    /// [`INPUT_SUCCESS`] if the operation is successful;
1988    ///
1989    /// [`INPUT_PARAMETER_ERROR`] The hotkey is NULL or the finalKeyCode is NULL;
1990    ///
1991    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
1992    ///
1993    ///
1994    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
1995    ///
1996    /// Available since API-level: 14
1997    #[cfg(feature = "api-14")]
1998    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1999    pub fn OH_Input_GetFinalKey(
2000        hotkey: *const Input_Hotkey,
2001        finalKeyCode: *mut i32,
2002    ) -> Input_Result;
2003    /// Creates an array of [`Input_Hotkey`] instances.
2004    ///
2005    /// # Arguments
2006    ///
2007    /// * `count` - Number of [`Input_Hotkey`] instances to be created. The count must be the same as the number of
2008    /// system shortcut keys.
2009    ///
2010    /// # Returns
2011    ///
2012    /// * Returns a pointer to an array of [`Input_Hotkey`] instances if the operation is successful. If the
2013    /// operation fails, a null pointer is returned. The possible cause is memory allocation failure or count is not equal
2014    /// to the number of system hotkeys.
2015    ///
2016    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2017    ///
2018    /// Available since API-level: 14
2019    #[cfg(feature = "api-14")]
2020    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2021    pub fn OH_Input_CreateAllSystemHotkeys(count: i32) -> *mut *mut Input_Hotkey;
2022    /// Destroys an array of [`Input_Hotkey`] instances and reclaims memory.
2023    ///
2024    /// # Arguments
2025    ///
2026    /// * `hotkeys` - Pointer to an array of [`Input_Hotkey`] instances created by the
2027    /// [`OH_Input_CreateAllSystemHotkeys`] method.
2028    ///
2029    /// * `count` - Count of the array to be destroyed, which must be the same as the number of system shortcut keys.
2030    ///
2031    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2032    ///
2033    /// Available since API-level: 14
2034    #[cfg(feature = "api-14")]
2035    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2036    pub fn OH_Input_DestroyAllSystemHotkeys(hotkeys: *mut *mut Input_Hotkey, count: i32);
2037    /// Obtains all hot keys supported by the system.
2038    ///
2039    /// # Arguments
2040    ///
2041    /// * `hotkey` - Array of [`Input_Hotkey`] instances.
2042    /// When calling this API for the first time, you can pass NULL to obtain the array length.
2043    ///
2044    /// * `count` - Number of hot keys supported by the system.
2045    ///
2046    /// # Returns
2047    ///
2048    /// * OH_Input_GetAllSystemHotkeys status code, specifically,
2049    /// [`INPUT_SUCCESS`] if the operation is successful;
2050    ///
2051    /// [`INPUT_PARAMETER_ERROR`] The hotkey or count is NULL, or the value of count does not match the number
2052    /// of system shortcut keys supported by the system;
2053    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2054    ///
2055    ///
2056    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2057    ///
2058    /// Available since API-level: 14
2059    #[cfg(feature = "api-14")]
2060    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2061    pub fn OH_Input_GetAllSystemHotkeys(
2062        hotkey: *mut *mut Input_Hotkey,
2063        count: *mut i32,
2064    ) -> Input_Result;
2065    /// Specifies whether to report repeated key events.
2066    ///
2067    /// # Arguments
2068    ///
2069    /// * `hotkey` - Shortcut key object.
2070    ///
2071    /// * `isRepeat` - Whether to report repeated key events.
2072    /// The value <b>true</b> means to report repeated key events, and the value <b>false</b> means the opposite.
2073    ///
2074    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2075    ///
2076    /// Available since API-level: 14
2077    #[cfg(feature = "api-14")]
2078    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2079    pub fn OH_Input_SetRepeat(hotkey: *mut Input_Hotkey, isRepeat: bool);
2080    /// Checks whether to report repeated key events.
2081    ///
2082    /// # Arguments
2083    ///
2084    /// * `hotkey` - Shortcut key object.
2085    ///
2086    /// * `isRepeat` - Whether a key event is repeated.
2087    ///
2088    /// # Returns
2089    ///
2090    /// * OH_Input_GetIsRepeat status code, specifically,
2091    /// [`INPUT_SUCCESS`] if the operation is successful;
2092    ///
2093    /// [`INPUT_PARAMETER_ERROR`] otherwise;
2094    ///
2095    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2096    ///
2097    ///
2098    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2099    ///
2100    /// Available since API-level: 14
2101    #[cfg(feature = "api-14")]
2102    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2103    pub fn OH_Input_GetRepeat(hotkey: *const Input_Hotkey, isRepeat: *mut bool) -> Input_Result;
2104    /// Subscribes to shortcut key events.
2105    ///
2106    /// # Arguments
2107    ///
2108    /// * `hotkey` - Shortcut key object.
2109    ///
2110    /// * `callback` - Callback used to return shortcut key events.
2111    ///
2112    /// # Returns
2113    ///
2114    /// * OH_Input_AddHotkeyMonitor status code, specifically,
2115    /// [`INPUT_SUCCESS`] if the operation is successful;
2116    ///
2117    /// [`INPUT_PARAMETER_ERROR`] if hotkey or callback is NULL;
2118    ///
2119    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported;
2120    ///
2121    /// [`INPUT_OCCUPIED_BY_SYSTEM`] The hotkey has been used by the system. You can call the [`GetAllSystemHotkeys`] interface to query all system shortcut keys.
2122    ///
2123    /// [`INPUT_OCCUPIED_BY_OTHER`] The hotkey has been subscribed to by another.
2124    ///
2125    ///
2126    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2127    ///
2128    /// Available since API-level: 14
2129    #[cfg(feature = "api-14")]
2130    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2131    pub fn OH_Input_AddHotkeyMonitor(
2132        hotkey: *const Input_Hotkey,
2133        callback: Input_HotkeyCallback,
2134    ) -> Input_Result;
2135    /// Unsubscribes from shortcut key events.
2136    ///
2137    /// # Arguments
2138    ///
2139    /// * `hotkey` - Shortcut key object.
2140    ///
2141    /// * `callback` - Callback used to return shortcut key events.
2142    ///
2143    /// # Returns
2144    ///
2145    /// * OH_Input_RemoveHotkeyMonitor status code, specifically,
2146    /// [`INPUT_SUCCESS`] if the operation is successful;
2147    ///
2148    /// [`INPUT_PARAMETER_ERROR`] if hotkey or callback is NULL;
2149    ///
2150    /// [`INPUT_DEVICE_NOT_SUPPORTED`] Capability not supported.
2151    ///
2152    ///
2153    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2154    ///
2155    /// Available since API-level: 14
2156    #[cfg(feature = "api-14")]
2157    #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
2158    pub fn OH_Input_RemoveHotkeyMonitor(
2159        hotkey: *const Input_Hotkey,
2160        callback: Input_HotkeyCallback,
2161    ) -> Input_Result;
2162    /// Obtains the IDs of all input devices.
2163    ///
2164    /// # Arguments
2165    ///
2166    /// * `deviceIds` - Array of input device IDs.
2167    ///
2168    /// * `inSize` - Size of the array of input device IDs.
2169    ///
2170    /// * `outSize` - Length of the list of input device IDs. The value cannot be greater than the value of inSize.
2171    ///
2172    /// # Returns
2173    ///
2174    /// * OH_Input_GetDeviceIds result code, specifically,
2175    /// [`INPUT_SUCCESS`] if the operation is successful;
2176    /// [`INPUT_PARAMETER_ERROR`] if deviceIds or outSize is a null pointer or inSize is less than 0.
2177    ///
2178    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2179    ///
2180    /// Available since API-level: 13
2181    #[cfg(feature = "api-13")]
2182    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2183    pub fn OH_Input_GetDeviceIds(
2184        deviceIds: *mut i32,
2185        inSize: i32,
2186        outSize: *mut i32,
2187    ) -> Input_Result;
2188    /// Obtains the information about an input device.
2189    ///
2190    /// # Arguments
2191    ///
2192    /// * `deviceId` - Device ID.
2193    ///
2194    /// * `deviceInfo` - Pointer to an [`Input_DeviceInfo`] object.
2195    ///
2196    /// # Returns
2197    ///
2198    /// * OH_Input_GetDevice result code, specifically,
2199    /// [`INPUT_SUCCESS`] if the operation is successful;
2200    /// [`INPUT_PARAMETER_ERROR`] if the deviceInfo is a null pointer or the deviceId is invalid.
2201    /// You can use the [`OH_Input_GetDeviceIds`] interface to query the device IDs supported by the system.
2202    ///
2203    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2204    ///
2205    /// Available since API-level: 13
2206    #[cfg(feature = "api-13")]
2207    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2208    pub fn OH_Input_GetDevice(
2209        deviceId: i32,
2210        deviceInfo: *mut *mut Input_DeviceInfo,
2211    ) -> Input_Result;
2212    /// Creates a deviceInfo object.
2213    ///
2214    ///
2215    /// # Returns
2216    ///
2217    /// * Pointer to an [`Input_DeviceInfo`] object if the operation is successful;
2218    /// a null pointer otherwise (possibly because of a memory allocation failure).
2219    ///
2220    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2221    ///
2222    /// Available since API-level: 13
2223    #[cfg(feature = "api-13")]
2224    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2225    pub fn OH_Input_CreateDeviceInfo() -> *mut Input_DeviceInfo;
2226    /// Destroys a deviceInfo object.
2227    ///
2228    /// # Arguments
2229    ///
2230    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2231    ///
2232    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2233    ///
2234    /// Available since API-level: 13
2235    #[cfg(feature = "api-13")]
2236    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2237    pub fn OH_Input_DestroyDeviceInfo(deviceInfo: *mut *mut Input_DeviceInfo);
2238    /// Obtains the keyboard type of an input device.
2239    ///
2240    /// # Arguments
2241    ///
2242    /// * `deviceId` - Device ID.
2243    ///
2244    /// * `keyboardType` - Pointer to the keyboard type of the input device.
2245    ///
2246    /// # Returns
2247    ///
2248    /// * OH_Input_GetKeyboardType result code, specifically,
2249    /// [`INPUT_SUCCESS`] if the operation is successful;
2250    /// [`INPUT_PARAMETER_ERROR`] if the device ID is invalid or keyboardType is a null pointer.
2251    ///
2252    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2253    ///
2254    /// Available since API-level: 13
2255    #[cfg(feature = "api-13")]
2256    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2257    pub fn OH_Input_GetKeyboardType(deviceId: i32, keyboardType: *mut i32) -> Input_Result;
2258    /// Obtains the ID of an input device.
2259    ///
2260    /// # Arguments
2261    ///
2262    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2263    ///
2264    /// * `id` - Pointer to the ID of the input device.
2265    ///
2266    /// # Returns
2267    ///
2268    /// * OH_Input_GetDeviceId result code, specifically,
2269    /// [`INPUT_SUCCESS`] if the operation is successful;
2270    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or id is a null pointer.
2271    ///
2272    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2273    ///
2274    /// Available since API-level: 13
2275    #[cfg(feature = "api-13")]
2276    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2277    pub fn OH_Input_GetDeviceId(deviceInfo: *mut Input_DeviceInfo, id: *mut i32) -> Input_Result;
2278    /// Obtains the name of an input device.
2279    ///
2280    /// # Arguments
2281    ///
2282    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2283    ///
2284    /// * `name` - Pointer to the name of the input device.
2285    ///
2286    /// # Returns
2287    ///
2288    /// * OH_Input_GetDeviceName result code, specifically,
2289    /// [`INPUT_SUCCESS`] if the operation is successful;
2290    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or name is a null pointer.
2291    ///
2292    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2293    ///
2294    /// Available since API-level: 13
2295    #[cfg(feature = "api-13")]
2296    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2297    pub fn OH_Input_GetDeviceName(
2298        deviceInfo: *mut Input_DeviceInfo,
2299        name: *mut *mut ::core::ffi::c_char,
2300    ) -> Input_Result;
2301    /// Obtains the capabilities of an input device, for example, a touchscreen, touchpad, or keyboard.
2302    ///
2303    /// # Arguments
2304    ///
2305    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2306    ///
2307    /// * `capabilities` - Pointer to the capabilities of the input device.
2308    ///
2309    /// # Returns
2310    ///
2311    /// * OH_Input_GetCapabilities result code, specifically,
2312    /// [`INPUT_SUCCESS`] if the operation is successful;
2313    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or capabilities is a null pointer.
2314    ///
2315    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2316    ///
2317    /// Available since API-level: 13
2318    #[cfg(feature = "api-13")]
2319    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2320    pub fn OH_Input_GetCapabilities(
2321        deviceInfo: *mut Input_DeviceInfo,
2322        capabilities: *mut i32,
2323    ) -> Input_Result;
2324    /// Obtains the version information of an input device.
2325    ///
2326    /// # Arguments
2327    ///
2328    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2329    ///
2330    /// * `version` - Pointer to the version information of the input device.
2331    ///
2332    /// # Returns
2333    ///
2334    /// * OH_Input_GetDeviceVersion result code, specifically,
2335    /// [`INPUT_SUCCESS`] if the operation is successful;
2336    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or version is a null pointer.
2337    ///
2338    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2339    ///
2340    /// Available since API-level: 13
2341    #[cfg(feature = "api-13")]
2342    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2343    pub fn OH_Input_GetDeviceVersion(
2344        deviceInfo: *mut Input_DeviceInfo,
2345        version: *mut i32,
2346    ) -> Input_Result;
2347    /// Obtains the product information of an input device.
2348    ///
2349    /// # Arguments
2350    ///
2351    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2352    ///
2353    /// * `product` - Pointer to the product information of the input device.
2354    ///
2355    /// # Returns
2356    ///
2357    /// * OH_Input_GetDeviceProduct result code, specifically,
2358    /// [`INPUT_SUCCESS`] if the operation is successful;
2359    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or product is a null pointer.
2360    ///
2361    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2362    ///
2363    /// Available since API-level: 13
2364    #[cfg(feature = "api-13")]
2365    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2366    pub fn OH_Input_GetDeviceProduct(
2367        deviceInfo: *mut Input_DeviceInfo,
2368        product: *mut i32,
2369    ) -> Input_Result;
2370    /// Obtains the vendor information of an input device.
2371    ///
2372    /// # Arguments
2373    ///
2374    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2375    ///
2376    /// * `vendor` - Pointer to the vendor information of the input device.
2377    ///
2378    /// # Returns
2379    ///
2380    /// * OH_Input_GetDeviceVendor result code, specifically,
2381    /// [`INPUT_SUCCESS`] if the operation is successful;
2382    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or vendor is a null pointer.
2383    ///
2384    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2385    ///
2386    /// Available since API-level: 13
2387    #[cfg(feature = "api-13")]
2388    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2389    pub fn OH_Input_GetDeviceVendor(
2390        deviceInfo: *mut Input_DeviceInfo,
2391        vendor: *mut i32,
2392    ) -> Input_Result;
2393    /// Obtains the physical address of an input device.
2394    ///
2395    /// # Arguments
2396    ///
2397    /// * `deviceInfo` - information object. For details, see [`Input_DeviceInfo`].
2398    ///
2399    /// * `address` - Pointer to the physical address of the input device.
2400    ///
2401    /// # Returns
2402    ///
2403    /// * OH_Input_GetDeviceAddress result code, specifically,
2404    /// [`INPUT_SUCCESS`] if the operation is successful;
2405    /// [`INPUT_PARAMETER_ERROR`] if deviceInfo or address is a null pointer.
2406    ///
2407    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2408    ///
2409    /// Available since API-level: 13
2410    #[cfg(feature = "api-13")]
2411    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2412    pub fn OH_Input_GetDeviceAddress(
2413        deviceInfo: *mut Input_DeviceInfo,
2414        address: *mut *mut ::core::ffi::c_char,
2415    ) -> Input_Result;
2416    /// Registers a listener for device hot swap events.
2417    ///
2418    /// # Arguments
2419    ///
2420    /// * `listener` - Pointer to an [`Input_DeviceListener`] object.
2421    ///
2422    ///
2423    /// # Returns
2424    ///
2425    /// * OH_Input_RegisterDeviceListener status code, specifically,
2426    /// [`INPUT_SUCCESS`] if the operation is successful;
2427    ///
2428    /// [`INPUT_PARAMETER_ERROR`] if listener is NULL;
2429    ///
2430    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2431    ///
2432    /// Available since API-level: 13
2433    #[cfg(feature = "api-13")]
2434    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2435    pub fn OH_Input_RegisterDeviceListener(listener: *mut Input_DeviceListener) -> Input_Result;
2436    /// Unregisters the listener for device hot swap events.
2437    ///
2438    /// # Arguments
2439    ///
2440    /// * `listener` - Pointer to the listener for device hot swap events. For details, see [`Input_DeviceListener`].
2441    ///
2442    ///
2443    /// # Returns
2444    ///
2445    /// * OH_Input_UnregisterDeviceListener status code, specifically,
2446    /// [`INPUT_SUCCESS`] if the operation is successful;
2447    ///
2448    /// [`INPUT_PARAMETER_ERROR`] if listener is NULL or no listener is registered;
2449    /// [`INPUT_SERVICE_EXCEPTION`] if the service is abnormal.
2450    ///
2451    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2452    ///
2453    /// Available since API-level: 13
2454    #[cfg(feature = "api-13")]
2455    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2456    pub fn OH_Input_UnregisterDeviceListener(listener: *mut Input_DeviceListener) -> Input_Result;
2457    /// Unregisters the listener for all device hot swap events.
2458    ///
2459    ///
2460    /// # Returns
2461    ///
2462    /// * OH_Input_UnregisterDeviceListener status code, specifically,
2463    /// [`INPUT_SUCCESS`] if the operation is successful;
2464    ///
2465    /// [`INPUT_SERVICE_EXCEPTION`] if the service is abnormal.
2466    ///
2467    /// Required System Capabilities: SystemCapability.MultimodalInput.Input.Core
2468    ///
2469    /// Available since API-level: 13
2470    #[cfg(feature = "api-13")]
2471    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
2472    pub fn OH_Input_UnregisterDeviceListeners() -> Input_Result;
2473}