1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

minor updates

This commit is contained in:
Gabor 2017-05-12 16:09:37 +02:00
parent 3a9a23b350
commit da1f4e8e2f
6 changed files with 51 additions and 39 deletions

View File

@ -173,25 +173,6 @@ typedef enum
*/
void lv_init(void);
/**
* Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task'
* @param obj pointer to an object
*/
void lv_obj_inv(lv_obj_t * obj);
/**
* Notify an object about its style is modified
* @param obj pointer to an object
*/
void lv_obj_refr_style(lv_obj_t * obj);
/**
* Notify all object if a style is modified
* @param style pinter to a style. Only objects with this style will be notified
* (NULL to notify all objects)
*/
void lv_style_refr_objs(void * style);
/**
* Create a basic object
* @param parent pointer to a parent object.
@ -216,6 +197,12 @@ void lv_obj_del(lv_obj_t * obj);
*/
bool lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
/**
* Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task'
* @param obj pointer to an object
*/
void lv_obj_inv(lv_obj_t * obj);
/**
* Load a new screen
* @param scr pointer to a screen
@ -239,7 +226,7 @@ void lv_obj_set_pos(lv_obj_t * obj, cord_t x, cord_t y);
/**
* Set relative the position of an object (relative to the parent).
* The coordinates will be upscaled to compensate LV_DOWNSCALE.
* The coordinates will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param x new distance from the left side of the parent. (will be multiplied with LV_DOWNSCALE)
* @param y new distance from the top of the parent. (will be multiplied with LV_DOWNSCALE)
@ -255,7 +242,7 @@ void lv_obj_set_x(lv_obj_t * obj, cord_t x);
/**
* Set the x coordinate of a object.
* The coordinate will be upscaled to compensate LV_DOWNSCALE.
* The coordinate will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param x new distance from the left side from the parent. (will be multiplied with LV_DOWNSCALE)
*/
@ -270,7 +257,7 @@ void lv_obj_set_y(lv_obj_t * obj, cord_t y);
/**
* Set the y coordinate of a object.
* The coordinate will be upscaled to compensate LV_DOWNSCALE.
* The coordinate will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param y new distance from the top of the parent. (will be multiplied with LV_DOWNSCALE)
*/
@ -285,7 +272,7 @@ void lv_obj_set_y_us(lv_obj_t * obj, cord_t y);
void lv_obj_set_size(lv_obj_t * obj, cord_t w, cord_t h);
/**
* Set the size of an object. The coordinates will be upscaled to compensate LV_DOWNSCALE.
* Set the size of an object. The coordinates will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param w new width (will be multiplied with LV_DOWNSCALE)
* @param h new height (will be multiplied with LV_DOWNSCALE)
@ -300,7 +287,7 @@ void lv_obj_set_size_us(lv_obj_t * obj, cord_t w, cord_t h);
void lv_obj_set_width(lv_obj_t * obj, cord_t w);
/**
* Set the width of an object. The width will be upscaled to compensate LV_DOWNSCALE
* Set the width of an object. The width will be upscaled with LV_DOWNSCALE
* @param obj pointer to an object
* @param w new width (will be multiplied with LV_DOWNSCALE)
*/
@ -314,7 +301,7 @@ void lv_obj_set_width_us(lv_obj_t * obj, cord_t w);
void lv_obj_set_height(lv_obj_t * obj, cord_t h);
/**
* Set the height of an object. The height will be upscaled to compensate LV_DOWNSCALE
* Set the height of an object. The height will be upscaled with LV_DOWNSCALE
* @param obj pointer to an object
* @param h new height (will be multiplied with LV_DOWNSCALE)
*/
@ -331,7 +318,7 @@ void lv_obj_set_height_us(lv_obj_t * obj, cord_t h);
void lv_obj_align(lv_obj_t * obj,lv_obj_t * base, lv_align_t align, cord_t x_mod, cord_t y_mod);
/**
* Align an object to an other object. The coordinates will be upscaled to compensate LV_DOWNSCALE.
* Align an object to an other object. The coordinates will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object to align
* @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
* @param align type of alignment (see 'lv_align_t' enum)
@ -354,6 +341,19 @@ void lv_obj_set_ext_size(lv_obj_t * obj, cord_t ext_size);
*/
void lv_obj_set_style(lv_obj_t * obj, lv_style_t * style);
/**
* Notify an object about its style is modified
* @param obj pointer to an object
*/
void lv_obj_refr_style(lv_obj_t * obj);
/**
* Notify all object if a style is modified
* @param style pointer to a style. Only the objects with this style will be notified
* (NULL to notify all objects)
*/
void lv_style_refr_objs(void * style);
/**
* Hide an object. It won't be visible and clickable.
* @param obj pointer to an object
@ -460,7 +460,6 @@ void lv_obj_set_free_num(lv_obj_t * obj, uint8_t free_num);
*/
void lv_obj_set_free_p(lv_obj_t * obj, void * free_p);
#endif
/**
* Animate an object
* @param obj pointer to an object to animate
@ -550,7 +549,7 @@ cord_t lv_obj_get_height(lv_obj_t * obj);
cord_t lv_obj_get_ext_size(lv_obj_t * obj);
/**
* Get the style pointer of an object
* Get the style pointer of an object (if NULL get style of the parent)
* @param obj pointer to an object
* @return pointer to a style
*/

View File

@ -107,6 +107,13 @@ void lv_mbox_set_text(lv_obj_t * mbox, const char * txt);
*/
void lv_mbox_set_styles_btn(lv_obj_t * mbox, lv_style_t * rel, lv_style_t * pr);
/**
* Set close animation duration
* @param mbox pointer to a message box object
* @param time animation length in milliseconds (0: no animation)
*/
void lv_mbox_set_anim_close_time(lv_obj_t * mbox, uint16_t time);
/**
* Automatically delete the message box after a given time
* @param mbox pointer to a message box object
@ -135,6 +142,13 @@ const char * lv_mbox_get_txt(lv_obj_t * mbox);
*/
lv_obj_t * lv_mbox_get_from_btn(lv_obj_t * btn);
/**
* Get the close animation duration
* @param mbox pointer to a message box object
* @return animation length in milliseconds (0: no animation)
*/
uint16_t lv_mbox_get_anim_close_time(lv_obj_t * mbox );
/**
* Get the style of the buttons on a message box
* @param mbox pointer to a message box object
@ -143,7 +157,6 @@ lv_obj_t * lv_mbox_get_from_btn(lv_obj_t * btn);
*/
lv_style_t * lv_mbox_get_style_btn(lv_obj_t * mbox, lv_btn_state_t state);
/**********************
* MACROS
**********************/

View File

@ -414,7 +414,7 @@ void lv_page_glue_obj(lv_obj_t * obj, bool glue)
* Focus on an object. It ensures that the object will be visible on the page.
* @param page pointer to a page object
* @param obj pointer to an object to focus (must be on the page)
* @param anim_time true: scroll animation time in milliseconds (0: no animation)
* @param anim_time scroll animation time in milliseconds (0: no animation)
*/
void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time)
{

View File

@ -122,7 +122,7 @@ void lv_page_glue_obj(lv_obj_t * obj, bool glue);
* Focus on an object. It ensures that the object will be visible on the page.
* @param page pointer to a page object
* @param obj pointer to an object to focus (must be on the page)
* @param anim_en true: scroll with animation
* @param anim_time scroll animation time in milliseconds (0: no animation)
*/
void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time);

View File

@ -271,7 +271,7 @@ void lv_win_set_cbtn_size(lv_obj_t * win, cord_t size)
/**
* Set the styles of the window control buttons in a given state
* @param win pointer to a window object
* @param rel spointer to the style in released state
* @param rel pointer to the style in released state
* @param pr pointer to the style in pressed state
*/
void lv_win_set_styles_cbtn(lv_obj_t * win, lv_style_t * rel, lv_style_t * pr)
@ -338,7 +338,7 @@ cord_t lv_win_get_cbtn_size(lv_obj_t * win)
/**
* Get width of the content area (page scrollable) of the window
* @param win pointer to a window object
* @return the width of the contetn area
* @return the width of the content area
*/
cord_t lv_win_get_width(lv_obj_t * win)
{

View File

@ -115,7 +115,7 @@ void lv_win_set_cbtn_size(lv_obj_t * win, cord_t size);
/**
* Set the styles of the window control buttons in a given state
* @param win pointer to a window object
* @param rel spointer to the style in released state
* @param rel pointer to the style in released state
* @param pr pointer to the style in pressed state
*/
void lv_win_set_styles_cbtn(lv_obj_t * win, lv_style_t * rel, lv_style_t * pr);
@ -151,17 +151,17 @@ cord_t lv_win_get_cbtn_size(lv_obj_t * win);
/**
* Get width of the content area (page scrollable) of the window
* @param win pointer to a window object
* @return the width of the contetn area
* @return the width of the content area
*/
cord_t lv_win_get_width(lv_obj_t * win);
/**
* Get the pointer of a widow from one of its control button.
* It is useful in the action of the control buttons where only button is known.
* @param cbtn pointer to a control button of a window
* @return pointer to the window of 'cbtn'
* @param ctrl_btn pointer to a control button of a window
* @return pointer to the window of 'ctrl_btn'
*/
lv_obj_t * lv_win_get_from_cbtn(lv_obj_t * cbtn);
lv_obj_t * lv_win_get_from_cbtn(lv_obj_t * ctrl_btn);
/**********************
* MACROS