From 90cfb6c61ba612e89afbbad79cdd34f08e724d91 Mon Sep 17 00:00:00 2001 From: Antoine Villeret Date: Tue, 13 Aug 2024 04:20:15 +0200 Subject: feat(indev): add long press time setter (#6664) --- src/indev/lv_indev.c | 7 +++++++ src/indev/lv_indev.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/indev/lv_indev.c b/src/indev/lv_indev.c index 016a2f3c6..340688431 100644 --- a/src/indev/lv_indev.c +++ b/src/indev/lv_indev.c @@ -360,6 +360,13 @@ void lv_indev_set_display(lv_indev_t * indev, lv_display_t * disp) indev->disp = disp; } +void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time) +{ + if(indev == NULL) return; + + indev->long_press_time = long_press_time; +} + void * lv_indev_get_user_data(const lv_indev_t * indev) { if(indev == NULL) return NULL; diff --git a/src/indev/lv_indev.h b/src/indev/lv_indev.h index c7206edb6..991407b64 100644 --- a/src/indev/lv_indev.h +++ b/src/indev/lv_indev.h @@ -145,6 +145,13 @@ void lv_indev_set_driver_data(lv_indev_t * indev, void * driver_data); */ void lv_indev_set_display(lv_indev_t * indev, struct lv_display_t * disp); +/** + * Set long press time to the indev + * @param indev pointer to an input device + * @param time long press time in ms + */ +void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time); + /** * Get the type of an input device * @param indev pointer to an input device -- cgit v1.2.3