From 44dc7a5b5e117656d2038c30dff62b7b919c3d7a Mon Sep 17 00:00:00 2001 From: C47D Date: Mon, 5 Feb 2024 13:22:24 -0600 Subject: [PATCH] docs(indev): Add missing docs to functions --- src/indev/lv_indev.h | 54 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/indev/lv_indev.h b/src/indev/lv_indev.h index a5b647b95df3..d500cfe9a356 100644 --- a/src/indev/lv_indev.h +++ b/src/indev/lv_indev.h @@ -113,12 +113,34 @@ lv_indev_t * lv_indev_active(void); */ void lv_indev_set_type(lv_indev_t * indev, lv_indev_type_t indev_type); +/** + * Set a function pointer to read input device data to the indev + * @param indev pointer to an input device + * @param read_cb pointer to function pointer to read input device data + */ void lv_indev_set_read_cb(lv_indev_t * indev, lv_indev_read_cb_t read_cb); +/** + * Set user data to the indev + * @param indev pointer to an input device + * @param user_data pointer to user data + */ void lv_indev_set_user_data(lv_indev_t * indev, void * user_data); +/** + * Set driver data to the indev + * @param indev pointer to an input device + * @param driver_data pointer to driver data + */ void lv_indev_set_driver_data(lv_indev_t * indev, void * driver_data); +/** + * Assign a display to the indev + * @param indev pointer to an input device + * @param disp pointer to an display + */ +void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp); + /** * Get the type of an input device * @param indev pointer to an input device @@ -126,18 +148,46 @@ void lv_indev_set_driver_data(lv_indev_t * indev, void * driver_data); */ lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev); +/** + * Get a pointer to the function to read input device data to the indev + * @param indev pointer to an input device + * @return Pointer to function pointer to read input device data or NULL if indev is NULL + */ lv_indev_read_cb_t lv_indev_get_read_cb(lv_indev_t * indev); +/** + * Get the indev state + * @param indev pointer to an input device + * @return Indev state or LV_INDEV_STATE_RELEASED if indev is NULL + */ lv_indev_state_t lv_indev_get_state(const lv_indev_t * indev); +/** + * Get the indev assigned group + * @param indev pointer to an input device + * @return Pointer to indev assigned group or NULL if indev is NULL + */ lv_group_t * lv_indev_get_group(const lv_indev_t * indev); -void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp); - +/** + * Get a pointer to the assigned display of the indev + * @param indev pointer to an input device + * @return pointer to the assigned display or NULL if indev is NULL + */ lv_display_t * lv_indev_get_display(const lv_indev_t * indev); +/** + * Get a pointer to the user data of the indev + * @param indev pointer to an input device + * @return pointer to the user data or NULL if indev is NULL + */ void * lv_indev_get_user_data(const lv_indev_t * indev); +/** + * Get a pointer to the driver data of the indev + * @param indev pointer to an input device + * @return pointer to the driver data or NULL if indev is NULL + */ void * lv_indev_get_driver_data(const lv_indev_t * indev); /**