indev: add get_inactive_time

This commit is contained in:
Gabor Kiss-Vamosi
2017-12-11 10:59:33 +01:00
parent 7fb2974259
commit dffc613d46
2 changed files with 17 additions and 0 deletions

View File

@@ -173,6 +173,16 @@ void lv_indev_get_vect(lv_indev_t * indev, lv_point_t * point)
point->y = indev->proc.vect.y;
}
/**
* Get elapsed time since last press
* @param indev pointer to an input device
* @return Elapsed ticks (milliseconds) since last press
*/
uint32_t lv_indev_get_inactive_time(lv_indev_t * indev)
{
return indev->proc.pr_timestamp;
}
/**
* Do nothing until the next release
* @param indev pointer to an input device

View File

@@ -94,6 +94,13 @@ bool lv_indev_is_dragging(lv_indev_t * indev);
*/
void lv_indev_get_vect(lv_indev_t * indev, lv_point_t * point);
/**
* Get elapsed time since last press
* @param indev pointer to an input device
* @return Elapsed ticks (milliseconds) since last press
*/
uint32_t lv_indev_get_inactive_time(lv_indev_t * indev);
/**
* Do nothing until the next release
* @param indev pointer to an input device