From 448a1d475614cf4424b5d6d558e08301b871801b Mon Sep 17 00:00:00 2001 From: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:59:46 +1100 Subject: [PATCH] feat(indev): add setter for long press repeat time (#7235) --- 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 cad96151f..6c34c1a58 100644 --- a/src/indev/lv_indev.c +++ b/src/indev/lv_indev.c @@ -369,6 +369,13 @@ void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time) indev->long_press_time = long_press_time; } +void lv_indev_set_long_press_repeat_time(lv_indev_t * indev, uint16_t long_press_repeat_time) +{ + if(indev == NULL) return; + + indev->long_press_repeat_time = long_press_repeat_time; +} + void lv_indev_set_scroll_limit(lv_indev_t * indev, uint8_t scroll_limit) { if(indev == NULL) return; diff --git a/src/indev/lv_indev.h b/src/indev/lv_indev.h index 6c3cc727e..7267c5034 100644 --- a/src/indev/lv_indev.h +++ b/src/indev/lv_indev.h @@ -152,6 +152,13 @@ void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp); */ void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time); +/** + * Set long press repeat time to indev + * @param indev pointer to input device + * @param long_press_repeat_time long press repeat time in ms + */ +void lv_indev_set_long_press_repeat_time(lv_indev_t * indev, uint16_t long_press_repeat_time); + /** * Set scroll limit to the input device * @param indev pointer to an input device