lv_indev_gesture.h

API reference for lv_indev_gesture.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_indev_gesture_private.h

Functions

lv_indev_set_pinch_up_threshold

Set the threshold for the pinch gesture scale up, when the scale factor of gesture reaches the threshold events get sent

 
void lv_indev_set_pinch_up_threshold(lv_indev_t *indev, float threshold)
Parameters
NameTypeDescription
indevlv_indev_t *pointer to the indev device containing the pinch recognizer
thresholdfloatthreshold for a pinch up gesture to be recognized

lv_indev_set_pinch_down_threshold

Set the threshold for the pinch gesture scale down, when the scale factor of gesture reaches the threshold events get sent

 
void lv_indev_set_pinch_down_threshold(lv_indev_t *indev, float threshold)
Parameters
NameTypeDescription
indevlv_indev_t *pointer to the indev device containing the pinch recognizer
thresholdfloatthreshold for a pinch down gesture to be recognized

lv_indev_set_rotation_rad_threshold

Set the rotation threshold in radian for the rotation gesture

 
void lv_indev_set_rotation_rad_threshold(lv_indev_t *indev, float threshold)
Parameters
NameTypeDescription
indevlv_indev_t *pointer to the indev device containing the rotation recognizer
thresholdfloatthreshold in radian for a rotation gesture to be recognized

lv_indev_set_gesture_data

Sets the state of the recognizer to a indev data structure, it is usually called from the indev read callback

 
void lv_indev_set_gesture_data(lv_indev_data_t *data, lv_indev_gesture_recognizer_t *recognizer, lv_indev_gesture_type_t type)
Parameters
NameTypeDescription
datalv_indev_data_t *the indev data
recognizerlv_indev_gesture_recognizer_t *pointer to a gesture recognizer
typelv_indev_gesture_type_t

lv_indev_gesture_recognizers_set_data

Set the lv_indev_data_t struct from the recognizer data. To be called in the indev read_cb.

 
void lv_indev_gesture_recognizers_set_data(lv_indev_t *indev, lv_indev_data_t *data)
Parameters

Enums

lv_indev_gesture_state_t

NameValue
LV_INDEV_GESTURE_STATE_NONE0
LV_INDEV_GESTURE_STATE_ONGOING
LV_INDEV_GESTURE_STATE_RECOGNIZED
LV_INDEV_GESTURE_STATE_ENDED
LV_INDEV_GESTURE_STATE_CANCELED

Structs

struct

lv_indev_touch_data

MemberTypeDescription
pointlv_point_t
statelv_indev_state_t
iduint8_t
timestampuint32_t
struct

lv_indev_gesture_recognizer

MemberTypeDescription
typelv_indev_gesture_type_t
statelv_indev_gesture_state_t
infolv_indev_gesture_t *
scalefloat
rotationfloat
distancefloat
speedfloat
two_fingers_swipe_dirlv_dir_t
configlv_indev_gesture_configuration_t *
recog_fnlv_recognizer_func_t

Typedefs

lv_indev_gesture_recognizer_t

 
typedef struct lv_indev_gesture_recognizer lv_indev_gesture_recognizer_t
Used by 7 functions
  • lv_indev_gesture_detect_pinch — param recognizer
  • lv_indev_gesture_detect_rotation — param recognizer
  • lv_indev_gesture_detect_two_fingers_swipe — param recognizer
  • lv_indev_set_gesture_data — param recognizer
  • lv_indev_get_gesture_center_point — param recognizer
  • lv_indev_get_gesture_primary_point — param recognizer
  • lv_indev_recognizer_is_active — param recognizer

lv_indev_touch_data_t

 
typedef struct lv_indev_touch_data lv_indev_touch_data_t
Used by 4 functions
  • lv_indev_gesture_detect_pinch — param touches
  • lv_indev_gesture_detect_rotation — param touches
  • lv_indev_gesture_detect_two_fingers_swipe — param touches
  • lv_indev_gesture_recognizers_update — param touches

lv_indev_gesture_t

 
typedef struct lv_indev_gesture lv_indev_gesture_t

lv_indev_gesture_configuration_t

 
typedef struct lv_indev_gesture_configuration lv_indev_gesture_configuration_t

lv_recognizer_func_t

 
typedef void(* lv_recognizer_func_t) (lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t)

Dependencies

How is this guide?

Last updated on

On this page