arkui_sys/ui_input_event/ui_input_event_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::native_type::*;
7
8/// Defines the UI input event.
9///
10///
11/// Available since API-level: 12
12#[cfg(feature = "api-12")]
13#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
14#[repr(C)]
15pub struct ArkUI_UIInputEvent {
16 _unused: [u8; 0],
17}
18#[cfg(feature = "api-12")]
19#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
20impl ArkUI_UIInputEvent_Type {
21 pub const ARKUI_UIINPUTEVENT_TYPE_UNKNOWN: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(0);
22 pub const ARKUI_UIINPUTEVENT_TYPE_TOUCH: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(1);
23 pub const ARKUI_UIINPUTEVENT_TYPE_AXIS: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(2);
24 /// Mouse event.
25 pub const ARKUI_UIINPUTEVENT_TYPE_MOUSE: ArkUI_UIInputEvent_Type = ArkUI_UIInputEvent_Type(3);
26}
27#[repr(transparent)]
28/// Enumerates the UI input event types.
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 ArkUI_UIInputEvent_Type(pub ::core::ffi::c_uint);
36#[cfg(feature = "api-12")]
37#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
38impl HitTestMode {
39 /// Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from
40 /// the hit test.
41 pub const HTM_DEFAULT: HitTestMode = HitTestMode(0);
42 /// The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit
43 /// test.
44 pub const HTM_BLOCK: HitTestMode = HitTestMode(1);
45 /// Both the node and its child node respond to the hit test of a touch event, and its sibling node is also
46 /// considered during the hit test.
47 pub const HTM_TRANSPARENT: HitTestMode = HitTestMode(2);
48 /// The node does not respond to the hit test of a touch event, but its child node and sibling node are considered
49 /// during the hit test.
50 pub const HTM_NONE: HitTestMode = HitTestMode(3);
51}
52#[repr(transparent)]
53/// Enumerates the hit test modes.
54///
55///
56/// Available since API-level: 12
57#[cfg(feature = "api-12")]
58#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
59#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
60pub struct HitTestMode(pub ::core::ffi::c_uint);
61#[cfg(feature = "api-12")]
62#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
63impl ::core::ops::BitOr<ArkUI_ModifierKeyName> for ArkUI_ModifierKeyName {
64 type Output = Self;
65 #[inline]
66 fn bitor(self, other: Self) -> Self {
67 ArkUI_ModifierKeyName(self.0 | other.0)
68 }
69}
70#[cfg(feature = "api-12")]
71#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
72impl ::core::ops::BitOrAssign for ArkUI_ModifierKeyName {
73 #[inline]
74 fn bitor_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
75 self.0 |= rhs.0;
76 }
77}
78#[cfg(feature = "api-12")]
79#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
80impl ::core::ops::BitAnd<ArkUI_ModifierKeyName> for ArkUI_ModifierKeyName {
81 type Output = Self;
82 #[inline]
83 fn bitand(self, other: Self) -> Self {
84 ArkUI_ModifierKeyName(self.0 & other.0)
85 }
86}
87#[cfg(feature = "api-12")]
88#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
89impl ::core::ops::BitAndAssign for ArkUI_ModifierKeyName {
90 #[inline]
91 fn bitand_assign(&mut self, rhs: ArkUI_ModifierKeyName) {
92 self.0 &= rhs.0;
93 }
94}
95#[cfg(feature = "api-12")]
96#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
97impl ArkUI_ModifierKeyName {
98 /// Ctrl.
99 pub const ARKUI_MODIFIER_KEY_CTRL: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(1);
100 /// Shift.
101 pub const ARKUI_MODIFIER_KEY_SHIFT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(2);
102 /// Alt.
103 pub const ARKUI_MODIFIER_KEY_ALT: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(4);
104 /// Fn.
105 pub const ARKUI_MODIFIER_KEY_FN: ArkUI_ModifierKeyName = ArkUI_ModifierKeyName(8);
106}
107#[repr(transparent)]
108/// Defines an enum for modifier keys.
109///
110///
111/// Available since API-level: 12
112#[cfg(feature = "api-12")]
113#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
114#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
115pub struct ArkUI_ModifierKeyName(pub ::core::ffi::c_uint);
116/// ABS_X.
117#[cfg(feature = "api-15")]
118#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
119pub const UI_FOCUS_AXIS_EVENT_ABS_X: _bindgen_ty_6 = _bindgen_ty_6(0);
120/// ABS_Y.
121#[cfg(feature = "api-15")]
122#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
123pub const UI_FOCUS_AXIS_EVENT_ABS_Y: _bindgen_ty_6 = _bindgen_ty_6(1);
124/// ABS_Z.
125#[cfg(feature = "api-15")]
126#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
127pub const UI_FOCUS_AXIS_EVENT_ABS_Z: _bindgen_ty_6 = _bindgen_ty_6(2);
128/// ABS_RZ.
129#[cfg(feature = "api-15")]
130#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
131pub const UI_FOCUS_AXIS_EVENT_ABS_RZ: _bindgen_ty_6 = _bindgen_ty_6(3);
132/// ABS_GAS.
133#[cfg(feature = "api-15")]
134#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
135pub const UI_FOCUS_AXIS_EVENT_ABS_GAS: _bindgen_ty_6 = _bindgen_ty_6(4);
136/// ABS_BRAKE.
137#[cfg(feature = "api-15")]
138#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
139pub const UI_FOCUS_AXIS_EVENT_ABS_BRAKE: _bindgen_ty_6 = _bindgen_ty_6(5);
140/// ABS_HAT0X.
141#[cfg(feature = "api-15")]
142#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
143pub const UI_FOCUS_AXIS_EVENT_ABS_HAT0X: _bindgen_ty_6 = _bindgen_ty_6(6);
144/// ABS_HAT0Y.
145#[cfg(feature = "api-15")]
146#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
147pub const UI_FOCUS_AXIS_EVENT_ABS_HAT0Y: _bindgen_ty_6 = _bindgen_ty_6(7);
148#[repr(transparent)]
149/// Defines an enum for the axis types for focus axis events.
150///
151///
152/// Available since API-level: 15
153#[cfg(feature = "api-15")]
154#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
155#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
156pub struct _bindgen_ty_6(pub ::core::ffi::c_uint);
157#[cfg(feature = "api-15")]
158#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
159impl ArkUI_InteractionHand {
160 /// Unknown.
161 pub const ARKUI_EVENT_HAND_NONE: ArkUI_InteractionHand = ArkUI_InteractionHand(0);
162 /// Left hand.
163 pub const ARKUI_EVENT_HAND_LEFT: ArkUI_InteractionHand = ArkUI_InteractionHand(1);
164 /// Right hand.
165 pub const ARKUI_EVENT_HAND_RIGHT: ArkUI_InteractionHand = ArkUI_InteractionHand(2);
166}
167#[repr(transparent)]
168/// Defines whether the touch event is from the left or right hand.
169///
170///
171/// Available since API-level: 15
172#[cfg(feature = "api-15")]
173#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
174#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
175pub struct ArkUI_InteractionHand(pub ::core::ffi::c_uint);
176/// The axis event is abnormal.
177#[cfg(feature = "api-15")]
178#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
179pub const UI_AXIS_EVENT_ACTION_NONE: _bindgen_ty_7 = _bindgen_ty_7(0);
180/// The axis event begins.
181#[cfg(feature = "api-15")]
182#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
183pub const UI_AXIS_EVENT_ACTION_BEGIN: _bindgen_ty_7 = _bindgen_ty_7(1);
184/// The axis event is updated.
185#[cfg(feature = "api-15")]
186#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
187pub const UI_AXIS_EVENT_ACTION_UPDATE: _bindgen_ty_7 = _bindgen_ty_7(2);
188/// The axis event ends.
189#[cfg(feature = "api-15")]
190#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
191pub const UI_AXIS_EVENT_ACTION_END: _bindgen_ty_7 = _bindgen_ty_7(3);
192/// The axis event is canceled.
193#[cfg(feature = "api-15")]
194#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
195pub const UI_AXIS_EVENT_ACTION_CANCEL: _bindgen_ty_7 = _bindgen_ty_7(4);
196#[repr(transparent)]
197/// Enumerates the action types for axis events.
198///
199///
200/// Available since API-level: 15
201#[cfg(feature = "api-15")]
202#[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
203#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
204pub struct _bindgen_ty_7(pub ::core::ffi::c_uint);
205extern "C" {
206 /// Obtains the type of this UI input event.
207 ///
208 /// # Arguments
209 ///
210 /// * `event` - Indicates the pointer to the current UI input event.
211 ///
212 /// # Returns
213 ///
214 /// * Returns the type of the current UI input event; returns <b>0</b> if any parameter error occurs.
215 ///
216 /// Available since API-level: 12
217 #[cfg(feature = "api-12")]
218 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
219 pub fn OH_ArkUI_UIInputEvent_GetType(event: *const ArkUI_UIInputEvent) -> i32;
220 /// Obtains the action type of this UI input event.
221 ///
222 /// # Arguments
223 ///
224 /// * `event` - Indicates the pointer to the current UI input event.
225 ///
226 /// # Returns
227 ///
228 /// * Returns the action type of the current UI input event; returns <b>0</b> if any parameter error occurs.
229 ///
230 /// Available since API-level: 12
231 #[cfg(feature = "api-12")]
232 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
233 pub fn OH_ArkUI_UIInputEvent_GetAction(event: *const ArkUI_UIInputEvent) -> i32;
234 /// Obtains the source type of this UI input event.
235 ///
236 /// # Arguments
237 ///
238 /// * `event` - Indicates the pointer to the current UI input event.
239 ///
240 /// # Returns
241 ///
242 /// * Returns the source type of the current UI input event.
243 ///
244 /// Available since API-level: 12
245 #[cfg(feature = "api-12")]
246 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
247 pub fn OH_ArkUI_UIInputEvent_GetSourceType(event: *const ArkUI_UIInputEvent) -> i32;
248 /// Obtains the tool type of this UI input event.
249 ///
250 /// # Arguments
251 ///
252 /// * `event` - Indicates the pointer to the current UI input event.
253 ///
254 /// # Returns
255 ///
256 /// * Returns the tool type of the current UI input event.
257 ///
258 /// Available since API-level: 12
259 #[cfg(feature = "api-12")]
260 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
261 pub fn OH_ArkUI_UIInputEvent_GetToolType(event: *const ArkUI_UIInputEvent) -> i32;
262 /// Obtains the time when this UI input event occurs.
263 ///
264 /// # Arguments
265 ///
266 /// * `event` - Indicates the pointer to the current UI input event.
267 ///
268 /// # Returns
269 ///
270 /// * Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
271 ///
272 /// Available since API-level: 12
273 #[cfg(feature = "api-12")]
274 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
275 pub fn OH_ArkUI_UIInputEvent_GetEventTime(event: *const ArkUI_UIInputEvent) -> i64;
276 /// Obtains the number of touch points from a directional input event (such as a touch event, mouse event,
277 /// or axis event).
278 ///
279 /// # Arguments
280 ///
281 /// * `event` - Indicates the pointer to the current UI input event.
282 ///
283 /// # Returns
284 ///
285 /// * Returns the number of touch points for the directional input event.
286 ///
287 /// Available since API-level: 12
288 #[cfg(feature = "api-12")]
289 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
290 pub fn OH_ArkUI_PointerEvent_GetPointerCount(event: *const ArkUI_UIInputEvent) -> u32;
291 /// Obtains the ID of a touch point from a directional input event (such as a touch event, mouse event,
292 /// or axis event).
293 ///
294 /// # Arguments
295 ///
296 /// * `event` - Indicates the pointer to the current UI input event.
297 ///
298 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
299 ///
300 /// # Returns
301 ///
302 /// * Returns the ID of the corresponding touch point.
303 ///
304 /// Available since API-level: 12
305 #[cfg(feature = "api-12")]
306 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
307 pub fn OH_ArkUI_PointerEvent_GetPointerId(
308 event: *const ArkUI_UIInputEvent,
309 pointerIndex: u32,
310 ) -> i32;
311 /// Obtains the ID of the touch pointer that triggers the current touch event.
312 ///
313 /// # Arguments
314 ///
315 /// * `event` - Indicates the pointer to the current UI input event.
316 ///
317 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
318 ///
319 /// # Returns
320 ///
321 /// * Returns the result code.
322 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
323 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
324 ///
325 /// Available since API-level: 15
326 #[cfg(feature = "api-15")]
327 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
328 pub fn OH_ArkUI_PointerEvent_GetChangedPointerId(
329 event: *const ArkUI_UIInputEvent,
330 pointerIndex: *mut u32,
331 ) -> i32;
332 /// Obtains the X coordinate relative to the upper left corner of the current component from a directional
333 /// input event (such as a touch event, mouse event, or axis event).
334 ///
335 /// # Arguments
336 ///
337 /// * `event` - Indicates the pointer to the directional input event.
338 ///
339 /// # Returns
340 ///
341 /// * Returns the X coordinate relative to the upper left corner of the current component;
342 /// returns <b>0</b> if any parameter error occurs.
343 ///
344 /// Available since API-level: 12
345 #[cfg(feature = "api-12")]
346 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
347 pub fn OH_ArkUI_PointerEvent_GetX(event: *const ArkUI_UIInputEvent) -> f32;
348 /// Obtains the X coordinate of a specific touch point relative to the upper left corner of the current component
349 /// from a directional input event (such as a touch event, mouse event, or axis event).
350 ///
351 /// # Arguments
352 ///
353 /// * `event` - Indicates the pointer to the current UI input event.
354 ///
355 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
356 ///
357 /// # Returns
358 ///
359 /// * Returns the X coordinate relative to the upper left corner of the current component;
360 /// returns <b>0.0f</b> if any parameter error occurs.
361 ///
362 /// Available since API-level: 12
363 #[cfg(feature = "api-12")]
364 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
365 pub fn OH_ArkUI_PointerEvent_GetXByIndex(
366 event: *const ArkUI_UIInputEvent,
367 pointerIndex: u32,
368 ) -> f32;
369 /// Obtains the Y coordinate relative to the upper left corner of the current component from a directional
370 /// input event (such as a touch event, mouse event, or axis event).
371 ///
372 /// # Arguments
373 ///
374 /// * `event` - Indicates the pointer to the UI input event.
375 ///
376 /// # Returns
377 ///
378 /// * Returns the Y coordinate relative to the upper left corner of the current component;
379 /// returns <b>0</b> if any parameter error occurs.
380 ///
381 /// Available since API-level: 12
382 #[cfg(feature = "api-12")]
383 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
384 pub fn OH_ArkUI_PointerEvent_GetY(event: *const ArkUI_UIInputEvent) -> f32;
385 /// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current component
386 /// from a directional input event (such as a touch event, mouse event, or axis event).
387 ///
388 /// # Arguments
389 ///
390 /// * `event` - Indicates the pointer to the current UI input event.
391 ///
392 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
393 ///
394 /// # Returns
395 ///
396 /// * Returns the Y coordinate relative to the upper left corner of the current component;
397 /// returns <b>0.0f</b> if any parameter error occurs.
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_ArkUI_PointerEvent_GetYByIndex(
403 event: *const ArkUI_UIInputEvent,
404 pointerIndex: u32,
405 ) -> f32;
406 /// Obtains the X coordinate relative to the upper left corner of the current application window from a
407 /// directional input event (such as a touch event, mouse event, or axis event).
408 ///
409 /// # Arguments
410 ///
411 /// * `event` - Indicates the pointer to the UI input event.
412 ///
413 /// # Returns
414 ///
415 /// * Returns the X coordinate relative to the upper left corner of the current application window;
416 /// returns <b>0</b> if any parameter error occurs.
417 ///
418 /// Available since API-level: 12
419 #[cfg(feature = "api-12")]
420 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
421 pub fn OH_ArkUI_PointerEvent_GetWindowX(event: *const ArkUI_UIInputEvent) -> f32;
422 /// Obtains the X coordinate of a specific touch point relative to the upper left corner of the current
423 /// application window from a directional input event (such as a touch event, mouse event, or axis event).
424 ///
425 /// # Arguments
426 ///
427 /// * `event` - Indicates the pointer to the current UI input event.
428 ///
429 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
430 ///
431 /// # Returns
432 ///
433 /// * Returns the X coordinate relative to the upper left corner of the current application window;
434 /// returns <b>0.0f</b> if any parameter error occurs.
435 ///
436 /// Available since API-level: 12
437 #[cfg(feature = "api-12")]
438 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
439 pub fn OH_ArkUI_PointerEvent_GetWindowXByIndex(
440 event: *const ArkUI_UIInputEvent,
441 pointerIndex: u32,
442 ) -> f32;
443 /// Obtains the Y coordinate relative to the upper left corner of the current application window from a
444 /// directional input event (such as a touch event, mouse event, or axis event).
445 ///
446 /// # Arguments
447 ///
448 /// * `event` - Indicates the pointer to the UI input event.
449 ///
450 /// # Returns
451 ///
452 /// * Returns the Y coordinate relative to the upper left corner of the current application window;
453 /// returns <b>0</b> if any parameter error occurs.
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_ArkUI_PointerEvent_GetWindowY(event: *const ArkUI_UIInputEvent) -> f32;
459 /// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current
460 /// application window from a directional input event (such as a touch event, mouse event, or axis event).
461 ///
462 /// # Arguments
463 ///
464 /// * `event` - Indicates the pointer to the current UI input event.
465 ///
466 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
467 ///
468 /// # Returns
469 ///
470 /// * Returns the Y coordinate relative to the upper left corner of the current application window;
471 /// returns <b>0.0f</b> if any parameter error occurs.
472 ///
473 /// Available since API-level: 12
474 #[cfg(feature = "api-12")]
475 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
476 pub fn OH_ArkUI_PointerEvent_GetWindowYByIndex(
477 event: *const ArkUI_UIInputEvent,
478 pointerIndex: u32,
479 ) -> f32;
480 /// Obtains the X coordinate relative to the upper left corner of the current screen from a directional input
481 /// event (such as a touch event, mouse event, or axis event).
482 ///
483 /// # Arguments
484 ///
485 /// * `event` - Indicates the pointer to the UI input event.
486 ///
487 /// # Returns
488 ///
489 /// * Returns the X coordinate relative to the upper left corner of the current screen;
490 /// returns <b>0</b> if any parameter error occurs.
491 ///
492 /// Available since API-level: 12
493 #[cfg(feature = "api-12")]
494 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
495 pub fn OH_ArkUI_PointerEvent_GetDisplayX(event: *const ArkUI_UIInputEvent) -> f32;
496 /// Obtains the X coordinate of a specific touch point relative to the upper left corner of the current screen
497 /// from a directional input event (such as a touch event, mouse event, or axis event).
498 ///
499 /// # Arguments
500 ///
501 /// * `event` - Indicates the pointer to the current UI input event.
502 ///
503 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
504 ///
505 /// # Returns
506 ///
507 /// * Returns the X coordinate relative to the upper left corner of the current screen;
508 /// returns <b>0.0f</b> if any parameter error occurs.
509 ///
510 /// Available since API-level: 12
511 #[cfg(feature = "api-12")]
512 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
513 pub fn OH_ArkUI_PointerEvent_GetDisplayXByIndex(
514 event: *const ArkUI_UIInputEvent,
515 pointerIndex: u32,
516 ) -> f32;
517 /// Obtains the Y coordinate relative to the upper left corner of the current screen from a directional input
518 /// event (such as a touch event, mouse event, or axis event).
519 ///
520 /// # Arguments
521 ///
522 /// * `event` - Indicates the pointer to the UI input event.
523 ///
524 /// # Returns
525 ///
526 /// * Returns the Y coordinate relative to the upper left corner of the current screen;
527 /// returns <b>0</b> if any parameter error occurs.
528 ///
529 /// Available since API-level: 12
530 #[cfg(feature = "api-12")]
531 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
532 pub fn OH_ArkUI_PointerEvent_GetDisplayY(event: *const ArkUI_UIInputEvent) -> f32;
533 /// Obtains the Y coordinate of a specific touch point relative to the upper left corner of the current screen
534 /// from a directional input event (such as a touch event, mouse event, or axis event).
535 ///
536 /// # Arguments
537 ///
538 /// * `event` - Indicates the pointer to the current UI input event.
539 ///
540 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
541 ///
542 /// # Returns
543 ///
544 /// * Returns the Y coordinate relative to the upper left corner of the current screen;
545 /// returns <b>0.0f</b> if any parameter error occurs.
546 ///
547 /// Available since API-level: 12
548 #[cfg(feature = "api-12")]
549 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
550 pub fn OH_ArkUI_PointerEvent_GetDisplayYByIndex(
551 event: *const ArkUI_UIInputEvent,
552 pointerIndex: u32,
553 ) -> f32;
554 /// Obtains the pressure applied to the touchscreen from a directional input event (for example, a touch event).
555 ///
556 /// # Arguments
557 ///
558 /// * `event` - Indicates the pointer to the current UI input event.
559 ///
560 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
561 ///
562 /// # Returns
563 ///
564 /// * Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
565 ///
566 /// Available since API-level: 12
567 #[cfg(feature = "api-12")]
568 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
569 pub fn OH_ArkUI_PointerEvent_GetPressure(
570 event: *const ArkUI_UIInputEvent,
571 pointerIndex: u32,
572 ) -> f32;
573 /// Obtains the angle relative to the YZ plane from a directional input event (for example, a touch event).
574 /// The value range is [-90, 90]. A positive value indicates a rightward tilt.
575 ///
576 /// # Arguments
577 ///
578 /// * `event` - Indicates the pointer to the current UI input event.
579 ///
580 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
581 ///
582 /// # Returns
583 ///
584 /// * Returns the angle relative to the YZ plane.
585 ///
586 /// Available since API-level: 12
587 #[cfg(feature = "api-12")]
588 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
589 pub fn OH_ArkUI_PointerEvent_GetTiltX(
590 event: *const ArkUI_UIInputEvent,
591 pointerIndex: u32,
592 ) -> f32;
593 /// Obtains the angle relative to the XZ plane from a directional input event (for example, a touch event).
594 /// The value range is [-90, 90]. A positive value indicates a downward tilt.
595 ///
596 /// # Arguments
597 ///
598 /// * `event` - Indicates the pointer to the current UI input event.
599 ///
600 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
601 ///
602 /// # Returns
603 ///
604 /// * Returns the angle relative to the XZ plane.
605 ///
606 /// Available since API-level: 12
607 #[cfg(feature = "api-12")]
608 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
609 pub fn OH_ArkUI_PointerEvent_GetTiltY(
610 event: *const ArkUI_UIInputEvent,
611 pointerIndex: u32,
612 ) -> f32;
613 /// Obtains the rotation angle of the stylus around the z-axis from a UI input event.
614 ///
615 /// # Arguments
616 ///
617 /// * `event` - Pointer to the UI input event.
618 ///
619 /// * `rollAngle` - Rotation angle of the stylus around the z-axis.
620 ///
621 /// # Returns
622 ///
623 /// * Returns the result code.
624 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
625 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
626 ///
627 /// Available since API-level: 17
628 #[cfg(feature = "api-17")]
629 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
630 pub fn OH_ArkUI_PointerEvent_GetRollAngle(
631 event: *const ArkUI_UIInputEvent,
632 rollAngle: *mut f64,
633 ) -> i32;
634 /// Obtains the width of the touch area from a directional input event (for example, a touch event).
635 ///
636 /// # Arguments
637 ///
638 /// * `event` - Indicates the pointer to the current UI input event.
639 ///
640 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
641 ///
642 /// # Returns
643 ///
644 /// * Returns the width of the touch area.
645 ///
646 /// Available since API-level: 12
647 #[cfg(feature = "api-12")]
648 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
649 pub fn OH_ArkUI_PointerEvent_GetTouchAreaWidth(
650 event: *const ArkUI_UIInputEvent,
651 pointerIndex: u32,
652 ) -> f32;
653 /// Obtains the height of the touch area from a directional input event (for example, a touch event).
654 ///
655 /// # Arguments
656 ///
657 /// * `event` - Indicates the pointer to the current UI input event.
658 ///
659 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
660 ///
661 /// # Returns
662 ///
663 /// * Returns the height of the touch area.
664 ///
665 /// Available since API-level: 12
666 #[cfg(feature = "api-12")]
667 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
668 pub fn OH_ArkUI_PointerEvent_GetTouchAreaHeight(
669 event: *const ArkUI_UIInputEvent,
670 pointerIndex: u32,
671 ) -> f32;
672 /// Obtains whether the current touch event is from the left or right hand.
673 ///
674 /// # Arguments
675 ///
676 /// * `event` - Pointer to the current UI input event.
677 ///
678 /// * `hand` - Whether the touch point is from the left or right hand.
679 ///
680 /// # Returns
681 ///
682 /// * Returns the result code.
683 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
684 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
685 ///
686 /// Available since API-level: 15
687 #[cfg(feature = "api-15")]
688 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
689 pub fn OH_ArkUI_PointerEvent_GetInteractionHand(
690 event: *const ArkUI_UIInputEvent,
691 hand: *mut ArkUI_InteractionHand,
692 ) -> i32;
693 /// Obtains whether the current touch event is from the left or right hand.
694 ///
695 /// # Arguments
696 ///
697 /// * `event` - Pointer to the current UI input event.
698 ///
699 /// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
700 ///
701 /// * `hand` - Whether the touch point is from the left or right hand.
702 ///
703 /// # Returns
704 ///
705 /// * Returns the result code.
706 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
707 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
708 ///
709 /// Available since API-level: 15
710 #[cfg(feature = "api-15")]
711 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
712 pub fn OH_ArkUI_PointerEvent_GetInteractionHandByIndex(
713 event: *const ArkUI_UIInputEvent,
714 pointerIndex: i32,
715 hand: *mut ArkUI_InteractionHand,
716 ) -> i32;
717 /// Obtains the number of historical events from a directional input event (such as a touch event, mouse event,
718 /// or axis event).
719 ///
720 /// # Arguments
721 ///
722 /// * `event` - Indicates the pointer to the current UI input event.
723 ///
724 /// # Returns
725 ///
726 /// * Returns the number of historical events.
727 ///
728 /// Available since API-level: 12
729 #[cfg(feature = "api-12")]
730 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
731 pub fn OH_ArkUI_PointerEvent_GetHistorySize(event: *const ArkUI_UIInputEvent) -> u32;
732 /// Obtains the occurrence time of a historical event from a directional input event (such as a touch event,
733 /// mouse event, or axis event).
734 ///
735 /// # Arguments
736 ///
737 /// * `event` - Indicates the pointer to the current UI input event.
738 ///
739 /// * `historyIndex` - Indicates the index of the target historical event.
740 ///
741 /// # Returns
742 ///
743 /// * Returns the time when the UI input event occurs; returns <b>0</b> if any parameter error occurs.
744 ///
745 /// Available since API-level: 12
746 #[cfg(feature = "api-12")]
747 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
748 pub fn OH_ArkUI_PointerEvent_GetHistoryEventTime(
749 event: *const ArkUI_UIInputEvent,
750 historyIndex: u32,
751 ) -> i64;
752 /// Obtains the number of touch points in a specific historical event from a directional input event (such as
753 /// a touch event, mouse event, or axis event).
754 ///
755 /// # Arguments
756 ///
757 /// * `event` - Indicates the pointer to the current UI input event.
758 ///
759 /// * `historyIndex` - Indicates the index of the target historical event.
760 ///
761 /// # Returns
762 ///
763 /// * Returns the number of touch points in the specified historical event
764 ///
765 /// Available since API-level: 12
766 #[cfg(feature = "api-12")]
767 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
768 pub fn OH_ArkUI_PointerEvent_GetHistoryPointerCount(
769 event: *const ArkUI_UIInputEvent,
770 historyIndex: u32,
771 ) -> u32;
772 /// Obtains the ID of a touch point in a specific historical event from a directional input event (such as
773 /// a touch event, mouse event, or axis event).
774 ///
775 /// # Arguments
776 ///
777 /// * `event` - Indicates the pointer to the current UI input event.
778 ///
779 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
780 ///
781 /// * `historyIndex` - Indicates the index of the target historical event.
782 ///
783 /// # Returns
784 ///
785 /// * Returns the ID of the corresponding touch point in the specified historical event.
786 ///
787 /// Available since API-level: 12
788 #[cfg(feature = "api-12")]
789 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
790 pub fn OH_ArkUI_PointerEvent_GetHistoryPointerId(
791 event: *const ArkUI_UIInputEvent,
792 pointerIndex: u32,
793 historyIndex: u32,
794 ) -> i32;
795 /// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
796 /// of the current component from a directional input event (such as a touch event, mouse event, or axis event).
797 ///
798 /// # Arguments
799 ///
800 /// * `event` - Indicates the pointer to the current UI input event.
801 ///
802 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
803 ///
804 /// * `historyIndex` - Indicates the index of the target historical event.
805 ///
806 /// # Returns
807 ///
808 /// * Returns the X coordinate relative to the upper left corner of the current component;
809 /// returns <b>0.0f</b> if any parameter error occurs.
810 ///
811 /// Available since API-level: 12
812 #[cfg(feature = "api-12")]
813 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
814 pub fn OH_ArkUI_PointerEvent_GetHistoryX(
815 event: *const ArkUI_UIInputEvent,
816 pointerIndex: u32,
817 historyIndex: u32,
818 ) -> f32;
819 /// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
820 /// of the current component from a directional input event (such as a touch event, mouse event, or axis event).
821 ///
822 /// # Arguments
823 ///
824 /// * `event` - Indicates the pointer to the current UI input event.
825 ///
826 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
827 ///
828 /// * `historyIndex` - Indicates the index of the target historical event.
829 ///
830 /// # Returns
831 ///
832 /// * Returns the Y coordinate relative to the upper left corner of the current component;
833 /// returns <b>0.0f</b> if any parameter error occurs.
834 ///
835 /// Available since API-level: 12
836 #[cfg(feature = "api-12")]
837 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
838 pub fn OH_ArkUI_PointerEvent_GetHistoryY(
839 event: *const ArkUI_UIInputEvent,
840 pointerIndex: u32,
841 historyIndex: u32,
842 ) -> f32;
843 /// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
844 /// of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
845 ///
846 /// # Arguments
847 ///
848 /// * `event` - Indicates the pointer to the current UI input event.
849 ///
850 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
851 ///
852 /// * `historyIndex` - Indicates the index of the target historical event.
853 ///
854 /// # Returns
855 ///
856 /// * Returns the X coordinate relative to the upper left corner of the current application window;
857 /// returns <b>0.0f</b> if any parameter error occurs.
858 ///
859 /// Available since API-level: 12
860 #[cfg(feature = "api-12")]
861 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
862 pub fn OH_ArkUI_PointerEvent_GetHistoryWindowX(
863 event: *const ArkUI_UIInputEvent,
864 pointerIndex: u32,
865 historyIndex: u32,
866 ) -> f32;
867 /// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
868 /// of the current application window from a directional input event (such as a touch event, mouse event, or axis event).
869 ///
870 /// # Arguments
871 ///
872 /// * `event` - Indicates the pointer to the current UI input event.
873 ///
874 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
875 ///
876 /// * `historyIndex` - Indicates the index of the target historical event.
877 ///
878 /// # Returns
879 ///
880 /// * Returns the Y coordinate relative to the upper left corner of the current application window;
881 /// returns <b>0.0f</b> if any parameter error occurs.
882 ///
883 /// Available since API-level: 12
884 #[cfg(feature = "api-12")]
885 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
886 pub fn OH_ArkUI_PointerEvent_GetHistoryWindowY(
887 event: *const ArkUI_UIInputEvent,
888 pointerIndex: u32,
889 historyIndex: u32,
890 ) -> f32;
891 /// Obtains the X coordinate of a specific touch point in a historical event relative to the upper left corner
892 /// of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
893 ///
894 /// # Arguments
895 ///
896 /// * `event` - Indicates the pointer to the current UI input event.
897 ///
898 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
899 ///
900 /// * `historyIndex` - Indicates the index of the target historical event.
901 ///
902 /// # Returns
903 ///
904 /// * Returns the X coordinate relative to the upper left corner of the current screen;
905 /// returns <b>0.0f</b> if any parameter error occurs.
906 ///
907 /// Available since API-level: 12
908 #[cfg(feature = "api-12")]
909 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
910 pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayX(
911 event: *const ArkUI_UIInputEvent,
912 pointerIndex: u32,
913 historyIndex: u32,
914 ) -> f32;
915 /// Obtains the Y coordinate of a specific touch point in a historical event relative to the upper left corner
916 /// of the current screen from a directional input event (such as a touch event, mouse event, or axis event).
917 ///
918 /// # Arguments
919 ///
920 /// * `event` - Indicates the pointer to the current UI input event.
921 ///
922 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
923 ///
924 /// * `historyIndex` - Indicates the index of the target historical event.
925 ///
926 /// # Returns
927 ///
928 /// * Returns the Y coordinate relative to the upper left corner of the current screen;
929 /// returns <b>0.0f</b> if any parameter error occurs.
930 ///
931 /// Available since API-level: 12
932 #[cfg(feature = "api-12")]
933 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
934 pub fn OH_ArkUI_PointerEvent_GetHistoryDisplayY(
935 event: *const ArkUI_UIInputEvent,
936 pointerIndex: u32,
937 historyIndex: u32,
938 ) -> f32;
939 /// Obtains the pressure applied to the touchscreen in a specific historical event from a directional input event
940 /// (for example, a touch event)..
941 ///
942 /// # Arguments
943 ///
944 /// * `event` - Indicates the pointer to the current UI input event.
945 ///
946 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
947 ///
948 /// * `historyIndex` - Indicates the index of the target historical event.
949 ///
950 /// # Returns
951 ///
952 /// * Returns the pressure applied to the touchscreen; returns <b>0.0f</b> if any parameter error occurs.
953 ///
954 /// Available since API-level: 12
955 #[cfg(feature = "api-12")]
956 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
957 pub fn OH_ArkUI_PointerEvent_GetHistoryPressure(
958 event: *const ArkUI_UIInputEvent,
959 pointerIndex: u32,
960 historyIndex: u32,
961 ) -> f32;
962 /// Obtains the angle relative to the YZ plane in a specific historical event from a directional input event
963 /// (for example, a touch event). The value range is [-90, 90]. A positive value indicates a rightward tilt.
964 ///
965 /// # Arguments
966 ///
967 /// * `event` - Indicates the pointer to the current UI input event.
968 ///
969 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
970 ///
971 /// * `historyIndex` - Indicates the index of the target historical event.
972 ///
973 /// # Returns
974 ///
975 /// * Returns the angle relative to the YZ plane.
976 ///
977 /// Available since API-level: 12
978 #[cfg(feature = "api-12")]
979 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
980 pub fn OH_ArkUI_PointerEvent_GetHistoryTiltX(
981 event: *const ArkUI_UIInputEvent,
982 pointerIndex: u32,
983 historyIndex: u32,
984 ) -> f32;
985 /// Obtains the angle relative to the XZ plane in a specific historical event from a directional input event
986 /// (for example, a touch event). The value range is [-90, 90]. A positive value indicates a downward tilt.
987 ///
988 /// # Arguments
989 ///
990 /// * `event` - Indicates the pointer to the current UI input event.
991 ///
992 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
993 ///
994 /// * `historyIndex` - Indicates the index of the target historical event.
995 ///
996 /// # Returns
997 ///
998 /// * Returns the angle relative to the XZ plane.
999 ///
1000 /// Available since API-level: 12
1001 #[cfg(feature = "api-12")]
1002 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1003 pub fn OH_ArkUI_PointerEvent_GetHistoryTiltY(
1004 event: *const ArkUI_UIInputEvent,
1005 pointerIndex: u32,
1006 historyIndex: u32,
1007 ) -> f32;
1008 /// Obtains the width of the touch area in a specific historical event from a directional input event
1009 /// (for example, a touch event).
1010 ///
1011 /// # Arguments
1012 ///
1013 /// * `event` - Indicates the pointer to the current UI input event.
1014 ///
1015 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
1016 ///
1017 /// * `historyIndex` - Indicates the index of the target historical event.
1018 ///
1019 /// # Returns
1020 ///
1021 /// * Returns the width of the touch area.
1022 ///
1023 /// Available since API-level: 12
1024 #[cfg(feature = "api-12")]
1025 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1026 pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaWidth(
1027 event: *const ArkUI_UIInputEvent,
1028 pointerIndex: u32,
1029 historyIndex: u32,
1030 ) -> f32;
1031 /// Obtains the height of the touch area in a specific historical event from a directional input event
1032 /// (for example, a touch event).
1033 ///
1034 /// # Arguments
1035 ///
1036 /// * `event` - Indicates the pointer to the current UI input event.
1037 ///
1038 /// * `pointerIndex` - Indicates the index of the target touch point in the multi-touch data list.
1039 ///
1040 /// * `historyIndex` - Indicates the index of the target historical event.
1041 ///
1042 /// # Returns
1043 ///
1044 /// * Returns the height of the touch area.
1045 ///
1046 /// Available since API-level: 12
1047 #[cfg(feature = "api-12")]
1048 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1049 pub fn OH_ArkUI_PointerEvent_GetHistoryTouchAreaHeight(
1050 event: *const ArkUI_UIInputEvent,
1051 pointerIndex: u32,
1052 historyIndex: u32,
1053 ) -> f32;
1054 /// Obtains the value of the vertical scroll axis for this axis event.
1055 ///
1056 /// # Arguments
1057 ///
1058 /// * `event` - Indicates the pointer to the UI input event.
1059 ///
1060 /// # Returns
1061 ///
1062 /// * Returns the value of the vertical scroll axis of the current axis event;
1063 /// returns <b>0</b> if any parameter error occurs.
1064 ///
1065 /// Available since API-level: 12
1066 #[cfg(feature = "api-12")]
1067 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1068 pub fn OH_ArkUI_AxisEvent_GetVerticalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
1069 /// Obtains the value of the horizontal scroll axis for this axis event.
1070 ///
1071 /// # Arguments
1072 ///
1073 /// * `event` - Indicates the pointer to the UI input event.
1074 ///
1075 /// # Returns
1076 ///
1077 /// * Returns the value of the horizontal scroll axis of the current axis event;
1078 /// returns <b>0</b> if any parameter error occurs.
1079 ///
1080 /// Available since API-level: 12
1081 #[cfg(feature = "api-12")]
1082 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1083 pub fn OH_ArkUI_AxisEvent_GetHorizontalAxisValue(event: *const ArkUI_UIInputEvent) -> f64;
1084 /// Obtains the scale value of the pinch axis for this axis event.
1085 ///
1086 /// # Arguments
1087 ///
1088 /// * `event` - Indicates the pointer to the UI input event.
1089 ///
1090 /// # Returns
1091 ///
1092 /// * Returns the scale value of the pinch axis of the current axis event;
1093 /// returns <b>0</b> if any parameter error occurs.
1094 ///
1095 /// Available since API-level: 12
1096 #[cfg(feature = "api-12")]
1097 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1098 pub fn OH_ArkUI_AxisEvent_GetPinchAxisScaleValue(event: *const ArkUI_UIInputEvent) -> f64;
1099 /// Obtains the action type of the current axis event.
1100 ///
1101 /// # Arguments
1102 ///
1103 /// * `event` - Indicates the pointer to the current UI input event.
1104 ///
1105 /// # Returns
1106 ///
1107 /// * Returns the action type of the current axis event.
1108 ///
1109 /// Available since API-level: 15
1110 #[cfg(feature = "api-15")]
1111 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1112 pub fn OH_ArkUI_AxisEvent_GetAxisAction(event: *const ArkUI_UIInputEvent) -> i32;
1113 /// Sets how the component behaves during hit testing.
1114 ///
1115 /// # Arguments
1116 ///
1117 /// * `event` - Indicates the pointer to the current UI input event.
1118 ///
1119 /// * `mode` - Indicates how the component behaves during hit testing. The parameter type is [`HitTestMode`].
1120 ///
1121 /// # Returns
1122 ///
1123 /// * Returns the status code of the execution.
1124 ///
1125 /// Available since API-level: 12
1126 #[cfg(feature = "api-12")]
1127 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1128 pub fn OH_ArkUI_PointerEvent_SetInterceptHitTestMode(
1129 event: *const ArkUI_UIInputEvent,
1130 mode: HitTestMode,
1131 ) -> i32;
1132 /// Get the value of the button type for mouse events.
1133 ///
1134 /// # Arguments
1135 ///
1136 /// * `event` - Represents a pointer to the current UI input event.
1137 ///
1138 /// # Returns
1139 ///
1140 /// * Return to the mouse button type, where <b>1</b> is the left button, <b>2</b> is the right button,
1141 /// <b>3</b> is the middle button, <b>4</b> is the back button, and <b>5</b> is the forward button.
1142 ///
1143 /// Available since API-level: 12
1144 #[cfg(feature = "api-12")]
1145 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1146 pub fn OH_ArkUI_MouseEvent_GetMouseButton(event: *const ArkUI_UIInputEvent) -> i32;
1147 /// Get the value of the mouse action type for mouse events.
1148 ///
1149 /// # Arguments
1150 ///
1151 /// * `event` - Represents a pointer to the current UI input event.
1152 ///
1153 /// # Returns
1154 ///
1155 /// * Returns the type of mouse action, where <b>1</b> represents button pressed,
1156 /// <b>2</b> represents button released, and <b>3</b> represents mouse movement.
1157 ///
1158 /// Available since API-level: 12
1159 #[cfg(feature = "api-12")]
1160 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1161 pub fn OH_ArkUI_MouseEvent_GetMouseAction(event: *const ArkUI_UIInputEvent) -> i32;
1162 /// Sets whether to prevent event bubbling.
1163 ///
1164 /// # Arguments
1165 ///
1166 /// * `event` - Indicates the pointer to the current UI input event.
1167 ///
1168 /// * `stopPropagation` - Indicates whether the event is prevented from bubbling.
1169 ///
1170 /// # Returns
1171 ///
1172 /// * Returns the status code of the execution. If 0 is returned, the setting is successful.
1173 /// If 401 is returned, the execution fails.
1174 /// The possible cause of the failure is that the event parameter is abnormal, such as a null pointer.
1175 ///
1176 /// Available since API-level: 12
1177 #[cfg(feature = "api-12")]
1178 #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
1179 pub fn OH_ArkUI_PointerEvent_SetStopPropagation(
1180 event: *const ArkUI_UIInputEvent,
1181 stopPropagation: bool,
1182 ) -> i32;
1183 /// Obtains the ID of device that triggers UI input event.
1184 ///
1185 /// # Arguments
1186 ///
1187 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1188 ///
1189 /// # Returns
1190 ///
1191 /// * Returns the device ID.
1192 ///
1193 /// Available since API-level: 14
1194 #[cfg(feature = "api-14")]
1195 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1196 pub fn OH_ArkUI_UIInputEvent_GetDeviceId(event: *const ArkUI_UIInputEvent) -> i32;
1197 /// Obtains all keys that are pressed from UI input event. Only supports key events currently.
1198 ///
1199 /// # Arguments
1200 ///
1201 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1202 ///
1203 /// * `pressedKeyCodes` - Array of all keys that are pressed. You need to allocate the memory space.
1204 ///
1205 /// * `length` - Length of the passed pressedKeyCodes array (when used as an input parameter);
1206 /// number of the keys pressed (when used as an output parameter).
1207 ///
1208 /// # Returns
1209 ///
1210 /// * Returns the result code.
1211 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1212 /// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_NOT_ENOUGH`] if the giving buffer is not enough.
1213 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1214 ///
1215 /// Available since API-level: 14
1216 #[cfg(feature = "api-14")]
1217 #[cfg_attr(docsrs, doc(cfg(feature = "api-14")))]
1218 pub fn OH_ArkUI_UIInputEvent_GetPressedKeys(
1219 event: *const ArkUI_UIInputEvent,
1220 pressedKeyCodes: *mut i32,
1221 length: *mut i32,
1222 ) -> i32;
1223 /// Obtains the axis value of a focus axis event.
1224 ///
1225 /// # Arguments
1226 ///
1227 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1228 ///
1229 /// * `axis` - Axis type of the focus axis event.
1230 ///
1231 /// # Returns
1232 ///
1233 /// * Returns the axis value of the focus axis event; returns <b>0.0</b> if any parameter error occurs.
1234 ///
1235 /// Available since API-level: 15
1236 #[cfg(feature = "api-15")]
1237 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1238 pub fn OH_ArkUI_FocusAxisEvent_GetAxisValue(event: *const ArkUI_UIInputEvent, axis: i32)
1239 -> f64;
1240 /// Sets whether to prevent a focus axis event from bubbling up.
1241 ///
1242 /// # Arguments
1243 ///
1244 /// * `event` - Indicates the pointer to the current UI input event.
1245 ///
1246 /// * `stopPropagation` - Indicates whether to stop event propagation.
1247 ///
1248 /// # Returns
1249 ///
1250 /// * Returns the result code.
1251 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1252 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1253 ///
1254 /// Available since API-level: 15
1255 #[cfg(feature = "api-15")]
1256 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1257 pub fn OH_ArkUI_FocusAxisEvent_SetStopPropagation(
1258 event: *const ArkUI_UIInputEvent,
1259 stopPropagation: bool,
1260 ) -> i32;
1261 /// Obtains the width of the component hit by an event.
1262 ///
1263 /// # Arguments
1264 ///
1265 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1266 ///
1267 /// # Returns
1268 ///
1269 /// * Returns the width of the component hit by the event; returns <b>0.0f</b> if any parameter error occurs.
1270 ///
1271 /// Available since API-level: 17
1272 #[cfg(feature = "api-17")]
1273 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1274 pub fn OH_ArkUI_UIInputEvent_GetEventTargetWidth(event: *const ArkUI_UIInputEvent) -> f32;
1275 /// Obtains the height of the component hit by an event.
1276 ///
1277 /// # Arguments
1278 ///
1279 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1280 ///
1281 /// # Returns
1282 ///
1283 /// * Returns the height of the component hit by the event; returns <b>0.0f</b> if any parameter error occurs.
1284 ///
1285 /// Available since API-level: 17
1286 #[cfg(feature = "api-17")]
1287 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1288 pub fn OH_ArkUI_UIInputEvent_GetEventTargetHeight(event: *const ArkUI_UIInputEvent) -> f32;
1289 /// Obtains the X coordinate of the component hit by an event.
1290 ///
1291 /// # Arguments
1292 ///
1293 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1294 ///
1295 /// # Returns
1296 ///
1297 /// * Returns the X coordinate of the component hit by the event; returns <b>0.0f</b> if any parameter error occurs.
1298 ///
1299 /// Available since API-level: 17
1300 #[cfg(feature = "api-17")]
1301 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1302 pub fn OH_ArkUI_UIInputEvent_GetEventTargetPositionX(event: *const ArkUI_UIInputEvent) -> f32;
1303 /// Obtains the Y coordinate of the component hit by an event.
1304 ///
1305 /// # Arguments
1306 ///
1307 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1308 ///
1309 /// # Returns
1310 ///
1311 /// * Returns the Y coordinate of the component hit by the event;
1312 /// returns <b>0.0f</b> if any parameter error occurs.
1313 ///
1314 /// Available since API-level: 17
1315 #[cfg(feature = "api-17")]
1316 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1317 pub fn OH_ArkUI_UIInputEvent_GetEventTargetPositionY(event: *const ArkUI_UIInputEvent) -> f32;
1318 /// Obtains the global X coordinate of the component hit by an event.
1319 ///
1320 /// # Arguments
1321 ///
1322 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1323 ///
1324 /// # Returns
1325 ///
1326 /// * Returns the global X coordinate of the component hit by the event;
1327 /// returns <b>0.0f</b> if any parameter error occurs.
1328 ///
1329 /// Available since API-level: 17
1330 #[cfg(feature = "api-17")]
1331 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1332 pub fn OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionX(
1333 event: *const ArkUI_UIInputEvent,
1334 ) -> f32;
1335 /// Obtains the global Y coordinate of the component hit by an event.
1336 ///
1337 /// # Arguments
1338 ///
1339 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1340 ///
1341 /// # Returns
1342 ///
1343 /// * Returns the global Y coordinate of the component hit by the event;
1344 /// returns <b>0.0f</b> if any parameter error occurs.
1345 ///
1346 /// Available since API-level: 17
1347 #[cfg(feature = "api-17")]
1348 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1349 pub fn OH_ArkUI_UIInputEvent_GetEventTargetGlobalPositionY(
1350 event: *const ArkUI_UIInputEvent,
1351 ) -> f32;
1352 /// Checks whether the cursor is hovering over this component.
1353 ///
1354 /// # Arguments
1355 ///
1356 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1357 ///
1358 /// # Returns
1359 ///
1360 /// * Returns <b>true</b> if the cursor is hovering over the current component.
1361 /// Returns <b>false</b> if the cursor is not hovering over the current component.
1362 ///
1363 /// Available since API-level: 17
1364 #[cfg(feature = "api-17")]
1365 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1366 pub fn OH_ArkUI_HoverEvent_IsHovered(event: *const ArkUI_UIInputEvent) -> bool;
1367 /// Obtains the state of the modifier keys in a UI input event.
1368 ///
1369 /// # Arguments
1370 ///
1371 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1372 ///
1373 /// * `keys` - Pointer to a variable where the current combination of pressed modifier keys will be returned.
1374 /// The application can use bitwise operations to determine the state of each modifier key.
1375 ///
1376 /// # Returns
1377 ///
1378 /// * Returns the result code.
1379 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1380 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1381 ///
1382 /// Available since API-level: 17
1383 #[cfg(feature = "api-17")]
1384 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1385 pub fn OH_ArkUI_UIInputEvent_GetModifierKeyStates(
1386 event: *const ArkUI_UIInputEvent,
1387 keys: *mut u64,
1388 ) -> i32;
1389 /// Obtains the press time of a specific touch point.
1390 ///
1391 /// # Arguments
1392 ///
1393 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1394 ///
1395 /// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
1396 ///
1397 /// # Returns
1398 ///
1399 /// * Returns the press time of the specific touch point; returns <b>0</b> if any parameter error occurs.
1400 ///
1401 /// Available since API-level: 15
1402 #[cfg(feature = "api-15")]
1403 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1404 pub fn OH_ArkUI_PointerEvent_GetPressedTimeByIndex(
1405 event: *const ArkUI_UIInputEvent,
1406 pointerIndex: u32,
1407 ) -> i64;
1408 /// Obtains the x-axis offset of the mouse pointer position relative to the position in the previously reported
1409 /// mouse event. This value may be less than the difference between the two reported X coordinates when the mouse pointer
1410 /// is near the screen edge.
1411 /// # Arguments
1412 ///
1413 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1414 ///
1415 /// # Returns
1416 ///
1417 /// * Returns the x-axis offset of the mouse pointer position relative to the position in the previously reported
1418 /// mouse event; returns <b>0.0f</b> if any parameter error occurs.
1419 ///
1420 /// Available since API-level: 15
1421 #[cfg(feature = "api-15")]
1422 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1423 pub fn OH_ArkUI_MouseEvent_GetRawDeltaX(event: *const ArkUI_UIInputEvent) -> f32;
1424 /// Obtains the y-axis offset of the mouse pointer position relative to the position in the previously reported
1425 /// mouse event. This value may be less than the difference between the two reported Y coordinates when the mouse pointer
1426 /// is near the screen edge.
1427 /// # Arguments
1428 ///
1429 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1430 ///
1431 /// # Returns
1432 ///
1433 /// * Returns the y-axis offset of the mouse pointer position relative to the position in the previously reported
1434 /// mouse event; returns <b>0.0f</b> if any parameter error occurs.
1435 ///
1436 /// Available since API-level: 15
1437 #[cfg(feature = "api-15")]
1438 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1439 pub fn OH_ArkUI_MouseEvent_GetRawDeltaY(event: *const ArkUI_UIInputEvent) -> f32;
1440 /// Obtains the pressed buttons from a mouse event.
1441 ///
1442 /// # Arguments
1443 ///
1444 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1445 ///
1446 /// * `pressedButtons` - Array of the pressed buttons. An int array must be created beforehand to store the pressed
1447 /// buttons.
1448 ///
1449 /// * `length` - Length of the passed pressedButtons array (when used as an input parameter);
1450 /// number of the buttons pressed (when used as an output parameter).
1451 ///
1452 /// # Returns
1453 ///
1454 /// * Returns the result code.
1455 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1456 /// Returns [`ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR`] if the given buffer size is insufficient.
1457 ///
1458 /// Available since API-level: 15
1459 #[cfg(feature = "api-15")]
1460 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1461 pub fn OH_ArkUI_MouseEvent_GetPressedButtons(
1462 event: *const ArkUI_UIInputEvent,
1463 pressedButtons: *mut i32,
1464 length: *mut i32,
1465 ) -> i32;
1466 /// Obtains the ID of the screen where the UI input event occurs.
1467 ///
1468 /// # Arguments
1469 ///
1470 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1471 ///
1472 /// # Returns
1473 ///
1474 /// * Returns the screen ID; returns <b>0</b> if any parameter error occurs.
1475 ///
1476 /// Available since API-level: 15
1477 #[cfg(feature = "api-15")]
1478 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1479 pub fn OH_ArkUI_UIInputEvent_GetTargetDisplayId(event: *const ArkUI_UIInputEvent) -> i32;
1480 /// Sets whether to enable axis event propagation.
1481 ///
1482 /// # Arguments
1483 ///
1484 /// * `event` - Pointer to the UI input event.
1485 ///
1486 /// * `propagation` - Whether to enable event propagation.
1487 ///
1488 /// # Returns
1489 ///
1490 /// * Returns the result code.
1491 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1492 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1493 ///
1494 /// Available since API-level: 17
1495 #[cfg(feature = "api-17")]
1496 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1497 pub fn OH_ArkUI_AxisEvent_SetPropagation(
1498 event: *const ArkUI_UIInputEvent,
1499 propagation: bool,
1500 ) -> i32;
1501 /// Obtains the scroll step configuration of the mouse wheel axis event.
1502 ///
1503 /// # Arguments
1504 ///
1505 /// * `event` - Pointer to the UI input event.
1506 ///
1507 /// # Returns
1508 ///
1509 /// * Returns the scroll step configuration of the mouse wheel axis event.
1510 ///
1511 /// Available since API-level: 17
1512 #[cfg(feature = "api-17")]
1513 #[cfg_attr(docsrs, doc(cfg(feature = "api-17")))]
1514 pub fn OH_ArkUI_AxisEvent_GetScrollStep(event: *const ArkUI_UIInputEvent) -> i32;
1515 /// Creates a cloned event pointer based on an event pointer.
1516 ///
1517 /// # Arguments
1518 ///
1519 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1520 ///
1521 /// * `clonedEvent` - Pointer to the cloned <b>ArkUI_UIInputEvent</b> object.
1522 ///
1523 /// # Returns
1524 ///
1525 /// * Returns the result code.
1526 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1527 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1528 ///
1529 /// Available since API-level: 15
1530 #[cfg(feature = "api-15")]
1531 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1532 pub fn OH_ArkUI_PointerEvent_CreateClonedEvent(
1533 event: *const ArkUI_UIInputEvent,
1534 clonedEvent: *mut *mut ArkUI_UIInputEvent,
1535 ) -> i32;
1536 /// Destroys a cloned event pointer.
1537 ///
1538 /// # Arguments
1539 ///
1540 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1541 ///
1542 /// # Returns
1543 ///
1544 /// * Returns the result code.
1545 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1546 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1547 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1548 /// cloned event pointer.
1549 ///
1550 /// Available since API-level: 15
1551 #[cfg(feature = "api-15")]
1552 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1553 pub fn OH_ArkUI_PointerEvent_DestroyClonedEvent(event: *const ArkUI_UIInputEvent) -> i32;
1554 /// Sets the X and Y coordinates of a cloned event relative to the upper left corner of the current component.
1555 ///
1556 /// # Arguments
1557 ///
1558 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1559 ///
1560 /// * `x` - X coordinate of the event relative to the upper left corner of the current component.
1561 ///
1562 /// * `y` - Y coordinate of the event relative to the upper left corner of the current component.
1563 ///
1564 /// # Returns
1565 ///
1566 /// * Returns the result code.
1567 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1568 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1569 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1570 /// cloned event pointer.
1571 ///
1572 /// Available since API-level: 15
1573 #[cfg(feature = "api-15")]
1574 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1575 pub fn OH_ArkUI_PointerEvent_SetClonedEventLocalPosition(
1576 event: *const ArkUI_UIInputEvent,
1577 x: f32,
1578 y: f32,
1579 ) -> i32;
1580 /// Sets the X and Y coordinates of a specific contact point of a cloned event relative to the upper left corner
1581 /// of the current component.
1582 ///
1583 /// # Arguments
1584 ///
1585 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1586 ///
1587 /// * `x` - X coordinate of the event relative to the upper left corner of the current component.
1588 ///
1589 /// * `y` - Y coordinate of the event relative to the upper left corner of the current component.
1590 ///
1591 /// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
1592 ///
1593 /// # Returns
1594 ///
1595 /// * Returns the result code.
1596 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1597 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1598 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1599 /// cloned event pointer.
1600 ///
1601 /// Available since API-level: 15
1602 #[cfg(feature = "api-15")]
1603 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1604 pub fn OH_ArkUI_PointerEvent_SetClonedEventLocalPositionByIndex(
1605 event: *const ArkUI_UIInputEvent,
1606 x: f32,
1607 y: f32,
1608 pointerIndex: i32,
1609 ) -> i32;
1610 /// Sets the action type of a cloned event.
1611 ///
1612 /// # Arguments
1613 ///
1614 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1615 ///
1616 /// * `actionType` - Action type of the cloned event.
1617 ///
1618 /// # Returns
1619 ///
1620 /// * Returns the result code.
1621 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1622 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1623 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1624 /// cloned event pointer.
1625 ///
1626 /// Available since API-level: 15
1627 #[cfg(feature = "api-15")]
1628 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1629 pub fn OH_ArkUI_PointerEvent_SetClonedEventActionType(
1630 event: *const ArkUI_UIInputEvent,
1631 actionType: i32,
1632 ) -> i32;
1633 /// Sets the touch point ID of a cloned pointer event.
1634 ///
1635 /// # Arguments
1636 ///
1637 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1638 ///
1639 /// * `fingerId` - ID of the touch point that triggers the event.
1640 ///
1641 /// # Returns
1642 ///
1643 /// * Returns the result code.
1644 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1645 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1646 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1647 /// cloned event pointer.
1648 ///
1649 /// Available since API-level: 15
1650 #[cfg(feature = "api-15")]
1651 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1652 pub fn OH_ArkUI_PointerEvent_SetClonedEventChangedFingerId(
1653 event: *const ArkUI_UIInputEvent,
1654 fingerId: i32,
1655 ) -> i32;
1656 /// Sets the touch point ID of a specific contact point of a cloned event.
1657 ///
1658 /// # Arguments
1659 ///
1660 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1661 ///
1662 /// * `fingerId` - Touch point ID of the specific contact point.
1663 ///
1664 /// * `pointerIndex` - Index of the target touch point in the multi-touch data list.
1665 ///
1666 /// # Returns
1667 ///
1668 /// * Returns the result code.
1669 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1670 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1671 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1672 /// cloned event pointer.
1673 ///
1674 /// Available since API-level: 15
1675 #[cfg(feature = "api-15")]
1676 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1677 pub fn OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex(
1678 event: *const ArkUI_UIInputEvent,
1679 fingerId: i32,
1680 pointerIndex: i32,
1681 ) -> i32;
1682 /// Posts a cloned event to a specific node.
1683 ///
1684 /// # Arguments
1685 ///
1686 /// * `node` - Target node.
1687 ///
1688 /// * `event` - Pointer to an <b>ArkUI_UIInputEvent</b> object.
1689 ///
1690 /// # Returns
1691 ///
1692 /// * Returns the result code.
1693 /// Returns [`ARKUI_ERROR_CODE_NO_ERROR`] if the operation is successful.
1694 /// Returns [`ARKUI_ERROR_CODE_PARAM_INVALID`] if a parameter error occurs.
1695 /// Returns [`ARKUI_ERROR_CODE_NON_CLONED_POINTER_EVENT`] if the input event pointer is not a
1696 /// cloned event pointer.
1697 /// Returns [`ARKUI_ERROR_CODE_POST_CLONED_COMPONENT_STATUS_ABNORMAL`]
1698 /// if the component status abnormal.
1699 /// Returns [`ARKUI_ERROR_CODE_POST_CLONED_NO_COMPONENT_HIT_TO_RESPOND_TO_THE_EVENT`]
1700 /// if no component hit to response to the event.
1701 ///
1702 /// Available since API-level: 15
1703 #[cfg(feature = "api-15")]
1704 #[cfg_attr(docsrs, doc(cfg(feature = "api-15")))]
1705 pub fn OH_ArkUI_PointerEvent_PostClonedEvent(
1706 node: ArkUI_NodeHandle,
1707 event: *const ArkUI_UIInputEvent,
1708 ) -> i32;
1709}