#[repr(C)]pub struct ArkUI_NativeGestureAPI_2 {
pub gestureApi1: *mut ArkUI_NativeGestureAPI_1,
pub setGestureInterrupterToNode: Option<unsafe extern "C" fn(node: ArkUI_NodeHandle, userData: *mut c_void, interrupter: Option<unsafe extern "C" fn(info: *mut ArkUI_GestureInterruptInfo) -> ArkUI_GestureInterruptResult>) -> i32>,
}Available on crate features
api-12 and api-18 only.Expand description
Defines the gesture APIs.
Available since API-level: 18
Fields§
§gestureApi1: *mut ArkUI_NativeGestureAPI_1Pointer to the ArkUI_NativeGestureAPI_1 struct.
setGestureInterrupterToNode: Option<unsafe extern "C" fn(node: ArkUI_NodeHandle, userData: *mut c_void, interrupter: Option<unsafe extern "C" fn(info: *mut ArkUI_GestureInterruptInfo) -> ArkUI_GestureInterruptResult>) -> i32>Sets the callback for gesture interruption events.
§Arguments
-
node- Node for which you want to set a gesture interruption callback. -
userData- Custom data. -
interrupter- Gesture interruption callback to set. info indicates the gesture interruption data. If interrupter returns GESTURE_INTERRUPT_RESULT_CONTINUE, the gesture recognition process proceeds properly. If it returns GESTURE_INTERRUPT_RESULT_REJECT, the gesture recognition process is paused.
§Returns
- Returns 0 if success. Returns 401 if a parameter error occurs.
Trait Implementations§
Source§impl Clone for ArkUI_NativeGestureAPI_2
impl Clone for ArkUI_NativeGestureAPI_2
Source§fn clone(&self) -> ArkUI_NativeGestureAPI_2
fn clone(&self) -> ArkUI_NativeGestureAPI_2
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArkUI_NativeGestureAPI_2
impl Debug for ArkUI_NativeGestureAPI_2
impl Copy for ArkUI_NativeGestureAPI_2
Auto Trait Implementations§
impl Freeze for ArkUI_NativeGestureAPI_2
impl RefUnwindSafe for ArkUI_NativeGestureAPI_2
impl !Send for ArkUI_NativeGestureAPI_2
impl !Sync for ArkUI_NativeGestureAPI_2
impl Unpin for ArkUI_NativeGestureAPI_2
impl UnwindSafe for ArkUI_NativeGestureAPI_2
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)