Add/fix comment
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file lv_templ.c
|
||||
* @file lv_spinbox.c
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
static bool lv_spinbox_design(lv_obj_t * templ, const lv_area_t * mask, lv_design_mode_t mode);
|
||||
static bool lv_spinbox_design(lv_obj_t * spinbox, const lv_area_t * mask, lv_design_mode_t mode);
|
||||
static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * param);
|
||||
static void lv_spinbox_updatevalue(lv_obj_t * spinbox);
|
||||
|
||||
@@ -232,7 +232,7 @@ void lv_spinbox_set_range(const lv_obj_t * spinbox, int32_t rangeMin, int32_t ra
|
||||
|
||||
/**
|
||||
* Set a style of a spinbox.
|
||||
* @param templ pointer to spinbox object
|
||||
* @param spinbox pointer to spinbox object
|
||||
* @param type which style should be set
|
||||
* @param style pointer to a style
|
||||
*/
|
||||
@@ -264,13 +264,13 @@ void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, lv_style_
|
||||
|
||||
/**
|
||||
* Get style of a spinbox.
|
||||
* @param templ pointer to spinbox object
|
||||
* @param spinbox pointer to spinbox object
|
||||
* @param type which style should be get
|
||||
* @return style pointer to the style
|
||||
*/
|
||||
lv_style_t * lv_spinbox_get_style(const lv_obj_t * templ, lv_spinbox_style_t type)
|
||||
lv_style_t * lv_spinbox_get_style(const lv_obj_t * spinbox, lv_spinbox_style_t type)
|
||||
{
|
||||
lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(templ);
|
||||
lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox);
|
||||
|
||||
switch(type) {
|
||||
default:
|
||||
@@ -302,7 +302,7 @@ int32_t lv_spinbox_get_value(const lv_obj_t * spinbox)
|
||||
|
||||
/**
|
||||
* Handle the drawing related tasks of the spinboxs
|
||||
* @param templ pointer to an object
|
||||
* @param spinbox pointer to an object
|
||||
* @param mask the object will be drawn only in this area
|
||||
* @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
|
||||
* (return 'true' if yes)
|
||||
@@ -310,7 +310,7 @@ int32_t lv_spinbox_get_value(const lv_obj_t * spinbox)
|
||||
* LV_DESIGN_DRAW_POST: drawing after every children are drawn
|
||||
* @param return true/false, depends on 'mode'
|
||||
*/
|
||||
static bool lv_spinbox_design(lv_obj_t * templ, const lv_area_t * mask, lv_design_mode_t mode)
|
||||
static bool lv_spinbox_design(lv_obj_t * spinbox, const lv_area_t * mask, lv_design_mode_t mode)
|
||||
{
|
||||
/*Return false if the object is not covers the mask_p area*/
|
||||
if(mode == LV_DESIGN_COVER_CHK) {
|
||||
@@ -330,7 +330,7 @@ static bool lv_spinbox_design(lv_obj_t * templ, const lv_area_t * mask, lv_desig
|
||||
|
||||
/**
|
||||
* Signal function of the spinbox
|
||||
* @param templ pointer to a spinbox object
|
||||
* @param spinbox pointer to a spinbox object
|
||||
* @param sign a signal type from lv_signal_t enum
|
||||
* @param param pointer to a signal specific variable
|
||||
* @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file lv_templ.h
|
||||
* @file lv_spinbox.h
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,7 @@ extern "C" {
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
/*Data of template*/
|
||||
/*Data of spinbox*/
|
||||
typedef struct {
|
||||
lv_ta_ext_t ta; /*Ext. of ancestor*/
|
||||
/*New data for this type */
|
||||
@@ -62,16 +62,35 @@ typedef uint8_t lv_spinbox_style_t;
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Create a template objects
|
||||
* @param par pointer to an object, it will be the parent of the new template
|
||||
* @param copy pointer to a template object, if not NULL then the new object will be copied from it
|
||||
* @return pointer to the created template
|
||||
* Create a spinbox objects
|
||||
* @param par pointer to an object, it will be the parent of the new spinbox
|
||||
* @param copy pointer to a spinbox object, if not NULL then the new object will be copied from it
|
||||
* @return pointer to the created spinbox
|
||||
*/
|
||||
lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy);
|
||||
|
||||
/**
|
||||
* Select next lower digit for edition by dividing the step by 10
|
||||
* @param spinbox pointer to spinbox
|
||||
*/
|
||||
void lv_spinbox_step_next(lv_obj_t * spinbox);
|
||||
|
||||
/**
|
||||
* Select next higher digit for edition by multiplying the step by 10
|
||||
* @param spinbox pointer to spinbox
|
||||
*/
|
||||
void lv_spinbox_step_previous(lv_obj_t * spinbox);
|
||||
|
||||
/**
|
||||
* Increment spinbox value by one step
|
||||
* @param spinbox pointer to spinbox
|
||||
*/
|
||||
void lv_spinbox_increment(lv_obj_t * spinbox);
|
||||
|
||||
/**
|
||||
* Decrement spinbox value by one step
|
||||
* @param spinbox pointer to spinbox
|
||||
*/
|
||||
void lv_spinbox_decrement(lv_obj_t * spinbox);
|
||||
|
||||
|
||||
@@ -85,15 +104,34 @@ void lv_spinbox_decrement(lv_obj_t * spinbox);
|
||||
*====================*/
|
||||
|
||||
/**
|
||||
* Set a style of a template.
|
||||
* Set a style of a spinbox.
|
||||
* @param templ pointer to template object
|
||||
* @param type which style should be set
|
||||
* @param style pointer to a style
|
||||
*/
|
||||
void lv_spinbox_set_style(lv_obj_t * templ, lv_spinbox_style_t type, lv_style_t *style);
|
||||
void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, lv_style_t *style);
|
||||
|
||||
/**
|
||||
* Set spinbox value
|
||||
* @param spinbox pointer to spinbox
|
||||
* @param i value to be set
|
||||
*/
|
||||
void lv_spinbox_set_value(const lv_obj_t * spinbox, int32_t i);
|
||||
|
||||
/**
|
||||
* Set spinbox digit format (digit count and decimal format)
|
||||
* @param spinbox pointer to spinbox
|
||||
* @param digit_count number of digit excluding the decimal separator and the sign
|
||||
* @param separator_position number of digit before the decimal point. If 0, decimal point is not shown
|
||||
*/
|
||||
void lv_spinbox_set_digit_format(const lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position);
|
||||
|
||||
/**
|
||||
* Set spinbox value range
|
||||
* @param spinbox pointer to spinbox
|
||||
* @param i rangeMin maximum value, inclusive
|
||||
* @param i rangeMax minimum value, inclusive
|
||||
*/
|
||||
void lv_spinbox_set_range(const lv_obj_t * spinbox, int32_t rangeMin, int32_t rangeMax);
|
||||
|
||||
|
||||
@@ -102,13 +140,18 @@ void lv_spinbox_set_range(const lv_obj_t * spinbox, int32_t rangeMin, int32_t ra
|
||||
*====================*/
|
||||
|
||||
/**
|
||||
* Get style of a template.
|
||||
* Get style of a spinbox.
|
||||
* @param templ pointer to template object
|
||||
* @param type which style should be get
|
||||
* @return style pointer to the style
|
||||
*/
|
||||
lv_style_t * lv_spinbox_get_style(const lv_obj_t * templ, lv_spinbox_style_t type);
|
||||
lv_style_t * lv_spinbox_get_style(const lv_obj_t * spinbox, lv_spinbox_style_t type);
|
||||
|
||||
/**
|
||||
* Get the spinbox numeral value (user has to convert to float according to its digit format)
|
||||
* @param spinbox pointer to spinbox
|
||||
* @return value integer value of the spinbox
|
||||
*/
|
||||
int32_t lv_spinbox_get_value(const lv_obj_t * spinbox);
|
||||
|
||||
/*=====================
|
||||
@@ -119,7 +162,7 @@ int32_t lv_spinbox_get_value(const lv_obj_t * spinbox);
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /*USE_LV_TEMPL*/
|
||||
#endif /*USE_LV_SPINBOX*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
Reference in New Issue
Block a user