add 'const' attribute to pointer where possible

This commit is contained in:
Gabor Kiss-Vamosi
2018-07-30 06:52:29 +02:00
parent a005d832cb
commit 769c7b28ff
63 changed files with 454 additions and 433 deletions

View File

@@ -46,7 +46,7 @@ lv_indev_t * lv_indev_get_act(void);
* @param indev pointer to an input device
* @return the type of the input device from `lv_hal_indev_type_t` (`LV_INDEV_TYPE_...`)
*/
lv_hal_indev_type_t lv_indev_get_type(lv_indev_t * indev);
lv_hal_indev_type_t lv_indev_get_type(const lv_indev_t * indev);
/**
* Reset one or all input devices
@@ -96,27 +96,27 @@ void lv_indev_set_button_points(lv_indev_t *indev, lv_point_t *points);
* @param indev pointer to an input device
* @param point pointer to a point to store the result
*/
void lv_indev_get_point(lv_indev_t * indev, lv_point_t * point);
void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point);
/**
* Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
* @param indev pointer to an input device
* @return true: drag is in progress
*/
bool lv_indev_is_dragging(lv_indev_t * indev);
bool lv_indev_is_dragging(const lv_indev_t * indev);
/**
* Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
* @param indev pointer to an input device
* @param point pointer to a point to store the vector
*/
void lv_indev_get_vect(lv_indev_t * indev, lv_point_t * point);
void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point);
/**
* Get elapsed time since last press
* @param indev pointer to an input device (NULL to get the overall smallest inactivity)
* @return Elapsed ticks (milliseconds) since last press
*/
uint32_t lv_indev_get_inactive_time(lv_indev_t * indev);
uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev);
/**
* Do nothing until the next release