harmony 鸿蒙native_gesture.h
native_gesture.h
Overview
Declares the APIs of NativeGesture.
Library: libace_ndk.z.so
File to include:
System capability: SystemCapability.ArkUI.ArkUI.Full
Since: 12
Related module: ArkUI_NativeModule
Summary
Structs
Name | Description |
---|---|
struct ArkUI_NativeGestureAPI_1 | Defines a struct for the gesture APIs. |
struct ArkUI_NativeGestureAPI_2 | Defines a struct for the gesture APIs. |
Types
Name | Description |
---|---|
typedef uint32_t ArkUI_GestureEventActionTypeMask | Defines a set of gesture event types. |
typedef uint32_t ArkUI_GestureDirectionMask | Defines a set of gesture directions. |
typedef ArkUI_GestureRecognizer * ArkUI_GestureRecognizerHandle | Defines the gesture recognizer handle. |
typedef ArkUI_GestureRecognizerHandle * ArkUI_GestureRecognizerHandleArray | Defines the gesture recognizer handle array. |
typedef ArkUI_TouchRecognizer * ArkUI_TouchRecognizerHandle | Defines the gesture recognizer handle. |
typedef ArkUI_TouchRecognizerHandle * ArkUI_TouchRecognizerHandleArray | Defines an array of gesture recognizer handles. |
typedef struct ArkUI_GestureEventTargetInfo ArkUI_GestureEventTargetInfo | Defines a GestureEventTargetInfo object that provides information about a gesture event target. |
typedef struct ArkUI_ParallelInnerGestureEvent ArkUI_ParallelInnerGestureEvent | Defines a parallel internal gesture event. |
typedef struct ArkUI_GestureInterruptInfo ArkUI_GestureInterruptInfo | Obtains the custom data from a gesture interruption event. |
typedef void(* ArkUI_GestureRecognizerDestructNotifyCallback) (ArkUI_GestureRecognizer *recognizer, void *userData) | Defines a callback function for notifying gesture recognizer destruction. |
Enums
Functions
Name | Description |
---|---|
bool OH_ArkUI_GestureInterruptInfo_GetSystemFlag (const ArkUI_GestureInterruptInfo *event) | Checks whether a gesture is a built-in gesture of the component. |
ArkUI_GestureRecognizer * OH_ArkUI_GestureInterruptInfo_GetRecognizer (const ArkUI_GestureInterruptInfo *event) | Returns the pointer to interrupted gesture recognizer. |
ArkUI_GestureEvent * OH_ArkUI_GestureInterruptInfo_GetGestureEvent (const ArkUI_GestureInterruptInfo *event) | Obtains the pointer to the interrupted gesture event. |
int32_t OH_ArkUI_GestureInterruptInfo_GetSystemRecognizerType (const ArkUI_GestureInterruptInfo *event) | Obtains the type of the system gesture to trigger. |
int32_t OH_ArkUI_GestureInterruptInfo_GetTouchRecognizers (const ArkUI_GestureInterruptInfo* info, ArkUI_TouchRecognizerHandleArray* recognizers, int32_t* size) | Obtains touch recognizers from gesture interruption information. |
int32_t OH_ArkUI_TouchRecognizer_GetNodeHandle (const ArkUI_TouchRecognizerHandle recognizer) | Obtains the component handle corresponding to a touch recognizer. |
int32_t OH_ArkUI_TouchRecognizer_CancelTouch (ArkUI_TouchRecognizerHandle recognizer, ArkUI_GestureInterruptInfo* info) | Sends a cancel touch event to a touch recognizer in a gesture interruption callback. |
ArkUI_GestureEventActionType OH_ArkUI_GestureEvent_GetActionType (const ArkUI_GestureEvent *event) | Obtains the gesture event type. |
ArkUI_NodeHandle OH_ArkUI_GestureEvent_GetResponseNode (ArkUI_GestureEvent *event) | Obtains the node that responds to the gesture. |
const ArkUI_UIInputEvent * OH_ArkUI_GestureEvent_GetRawInputEvent (const ArkUI_GestureEvent *event) | Obtains gesture input. |
int32_t OH_ArkUI_LongPress_GetRepeatCount (const ArkUI_GestureEvent *event) | Obtains the number of times that a long press gesture is triggered periodically. |
float OH_ArkUI_PanGesture_GetVelocity (const ArkUI_GestureEvent *event) | Obtains the velocity of a pan gesture along the main axis. |
float OH_ArkUI_PanGesture_GetVelocityX (const ArkUI_GestureEvent *event) | Obtains the velocity of a pan gesture along the x-axis. |
float OH_ArkUI_PanGesture_GetVelocityY (const ArkUI_GestureEvent *event) | Obtains the velocity of a pan gesture along the y-axis. |
float OH_ArkUI_PanGesture_GetOffsetX (const ArkUI_GestureEvent *event) | Obtains the relative offset of a pan gesture along the x-axis. |
float OH_ArkUI_PanGesture_GetOffsetY (const ArkUI_GestureEvent *event) | Obtains the relative offset of a pan gesture along the y-axis. |
float OH_ArkUI_SwipeGesture_GetAngle (const ArkUI_GestureEvent *event) | Obtains the angle information of the swipe gesture. |
float OH_ArkUI_SwipeGesture_GetVelocity (const ArkUI_GestureEvent *event) | Obtains the average velocity of all fingers used in the swipe gesture. |
float OH_ArkUI_RotationGesture_GetAngle (const ArkUI_GestureEvent *event) | Obtains the angle information of a rotation gesture. |
float OH_ArkUI_PinchGesture_GetScale (const ArkUI_GestureEvent *event) | Obtains the scale ratio of a pinch gesture. |
float OH_ArkUI_PinchGesture_GetCenterX (const ArkUI_GestureEvent *event) | Obtains the X coordinate of the center of the pinch gesture, in vp, relative to the upper left corner of the current component. |
float OH_ArkUI_PinchGesture_GetCenterY (const ArkUI_GestureEvent *event) | Obtains the Y coordinate of the center of the pinch gesture, in vp, relative to the upper left corner of the current component. |
ArkUI_NodeHandle OH_ArkUI_GestureEvent_GetNode (const ArkUI_GestureEvent *event) | Obtains the ArkUI component to which the gesture is bound. |
int32_t OH_ArkUI_GetResponseRecognizersFromInterruptInfo (const ArkUI_GestureInterruptInfo *event, ArkUI_GestureRecognizerHandleArray *responseChain, int32_t *count) | Obtains information about a gesture response chain. |
int32_t OH_ArkUI_SetGestureRecognizerEnabled (ArkUI_GestureRecognizer *recognizer, bool enabled) | Sets the enabled state of a gesture recognizer. |
int32_t(* OH_ArkUI_SetGestureRecognizerLimitFingerCount )(ArkUI_GestureRecognizer *recognizer, bool limitFingerCount) | Sets whether to check the number of fingers touching the screen. |
bool OH_ArkUI_GetGestureRecognizerEnabled (ArkUI_GestureRecognizer *recognizer) | Obtains the enabled state of a gesture recognizer. |
int32_t OH_ArkUI_GetGestureRecognizerState (ArkUI_GestureRecognizer *recognizer, ArkUI_GestureRecognizerState *state) | Obtains the state of a gesture recognizer. |
int32_t OH_ArkUI_GetGestureEventTargetInfo (ArkUI_GestureRecognizer *recognizer, ArkUI_GestureEventTargetInfo **info) | Obtains the information about a gesture event target. |
int32_t OH_ArkUI_GestureEventTargetInfo_IsScrollBegin (ArkUI_GestureEventTargetInfo *info, bool *ret) | Obtains whether this scroll container is scrolled to the top. |
int32_t OH_ArkUI_GestureEventTargetInfo_IsScrollEnd (ArkUI_GestureEventTargetInfo *info, bool *ret) | Obtains whether this scroll container is scrolled to the bottom. |
int32_t OH_ArkUI_GetPanGestureDirectionMask (ArkUI_GestureRecognizer *recognizer, ArkUI_GestureDirectionMask *directionMask) | Obtains the direction of a pan gesture. |
bool OH_ArkUI_IsBuiltInGesture (ArkUI_GestureRecognizer *recognizer) | Obtains whether a gesture is a built-in gesture. |
int32_t OH_ArkUI_GetGestureTag (ArkUI_GestureRecognizer *recognizer, char *buffer, int32_t bufferSize, int32_t *result) | Obtains the tag of a gesture recognizer. |
int32_t OH_ArkUI_GetGestureBindNodeId (ArkUI_GestureRecognizer *recognizer, char *nodeId, int32_t size, int32_t *result) | Obtains the ID of the component linked to a gesture recognizer. |
bool OH_ArkUI_IsGestureRecognizerValid (ArkUI_GestureRecognizer *recognizer) | Obtains whether a gesture recognizer is valid. |
void * OH_ArkUI_ParallelInnerGestureEvent_GetUserData (ArkUI_ParallelInnerGestureEvent *event) | Obtains custom data in the parallel internal gesture event. |
void* OH_ArkUI_GestureInterrupter_GetUserData(ArkUI_GestureInterruptInfo* event) | Obtains the custom data from a gesture interruption event. |
ArkUI_GestureRecognizer * OH_ArkUI_ParallelInnerGestureEvent_GetCurrentRecognizer (ArkUI_ParallelInnerGestureEvent *event) | Obtains the current gesture recognizer in a parallel internal gesture event. |
int32_t OH_ArkUI_ParallelInnerGestureEvent_GetConflictRecognizers (ArkUI_ParallelInnerGestureEvent *event, ArkUI_GestureRecognizerHandleArray *array, int32_t *size) | Obtains the conflicting gesture recognizers in a parallel internal gesture event. |
int32_t OH_ArkUI_SetArkUIGestureRecognizerDisposeNotify (ArkUI_GestureRecognizer *recognizer, ArkUI_GestureRecognizerDestructNotifyCallback callback, void *userData) | Sets a callback function for notifying gesture recognizer destruction. |
int32_t OH_ArkUI_GetGestureParam_DirectMask (ArkUI_GestureRecognizer *recognizer, ArkUI_GestureDirectionMask *directMask) | Obtains the swipe direction of a gesture recognizer. |
int32_t OH_ArkUI_GetGestureParam_FingerCount (ArkUI_GestureRecognizer *recognizer, int *finger) | Obtains the number of fingers used by a gesture recognizer. |
int32_t OH_ArkUI_GetGestureParam_limitFingerCount (ArkUI_GestureRecognizer *recognizer, bool *isLimited) | Checks whether a gesture recognizer has a finger count limit. |
int32_t OH_ArkUI_GetGestureParam_repeat (ArkUI_GestureRecognizer *recognizer, bool *isRepeat) | Checks whether a gesture recognizer supports repeated event callbacks. |
int32_t OH_ArkUI_GetGestureParam_distance (ArkUI_GestureRecognizer *recognizer, double *distance) | Obtains the allowed movement distance range for a gesture recognizer. |
int32_t OH_ArkUI_GetGestureParam_speed (ArkUI_GestureRecognizer *recognizer, double *speed) | Obtains the minimum swipe speed recognized by a gesture recognizer. |
int32_t OH_ArkUI_GetGestureParam_duration (ArkUI_GestureRecognizer *recognizer, int *duration) | Obtains the minimum duration required to trigger a long press by a gesture recognizer. |
int32_t OH_ArkUI_GetGestureParam_angle (ArkUI_GestureRecognizer *recognizer, double *angle) | Obtains the minimum angle change required for a rotation gesture to be recognized by a gesture recognizer. |
int32_t OH_ArkUI_GetGestureParam_distanceThreshold (ArkUI_GestureRecognizer *recognizer, double *distanceThreshold) | Obtains the movement threshold for gestures to be recognized by a gesture recognizer. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent
harmony 鸿蒙ARKUI_TextPickerRangeContent
harmony 鸿蒙ArkUI_AnimateCompleteCallback
harmony 鸿蒙ArkUI_ContextCallback
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦