BigW Consortium Gitlab

Commit 39af8d82 by Kiss-Vamosi Gabor

Update the function documentation in the header files

parent f089ce39
......@@ -9,6 +9,7 @@
/*********************
* INCLUDES
*********************/
#include "lvgl/lvgl.h"
#if LV_APP_ENABLE != 0
......@@ -82,7 +83,6 @@ typedef struct {
lv_labels_t sc_title_style;
lv_labels_t sc_txt_style;
opa_t menu_opa;
opa_t menu_btn_opa;
opa_t sc_opa;
......@@ -101,28 +101,130 @@ typedef struct {
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the application system
*/
void lv_app_init(void);
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to an application specific configuration structure or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
lv_app_inst_t * lv_app_run(const lv_app_dsc_t * app_dsc, void * conf);
/**
* Close a running application. Close the Window and the Shortcut too if opened.
* @param app pointer to an application
*/
void lv_app_close(lv_app_inst_t * app);
uint16_t lv_app_com_send(lv_app_inst_t * app_send, lv_app_com_type_t type , const void * data, uint32_t size);
/**
* Open a shortcut for an application
* @param app pointer to an application
* @return pointer to the shortcut
*/
lv_obj_t * lv_app_sc_open(lv_app_inst_t * app);
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
void lv_app_sc_close(lv_app_inst_t * app);
/**
* Open the application in a window
* @param app pointer to an application
* @return pointer to the shortcut
*/
lv_obj_t * lv_app_win_open(lv_app_inst_t * app);
/**
* Close the window of an application
* @param app pointer to an application
*/
void lv_app_win_close(lv_app_inst_t * app);
lv_obj_t * lv_app_win_get_from_obj(lv_obj_t * obj);
const lv_app_dsc_t * lv_app_dsc_get(const char * name);
/**
* Send data to other applications
* @param app_send pointer to the application which is sending the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
* @return number application which were received the message
*/
uint16_t lv_app_com_send(lv_app_inst_t * app_send, lv_app_com_type_t type , const void * data, uint32_t size);
/**
* Test an application communication connection
* @param sender pointer to an application which sends data
* @param receiver pointer to an application which receives data
* @return false: no connection, true: there is connection
*/
bool lv_app_con_check(lv_app_inst_t * sender, lv_app_inst_t * receiver);
/**
* Create a new connection between two applications
* @param sender pointer to a data sender application
* @param receiver pointer to a data receiver application
*/
void lv_app_con_set(lv_app_inst_t * sender, lv_app_inst_t * receiver);
/**
* Delete a communication connection
* @param sender pointer to a data sender application or NULL to be true for all sender
* @param receiver pointer to a data receiver application or NULL to be true for all receiver
*/
void lv_app_con_del(lv_app_inst_t * sender, lv_app_inst_t * receiver);
lv_app_style_t * lv_app_style_get(void);
/**
* Get the application descriptor from its name
* @param name name of the app. dsc.
* @return pointer to the app. dsc.
*/
const lv_app_dsc_t * lv_app_dsc_get(const char * name);
/**
* Rename an application
* @param app pointer to an application
* @param name a string with the new name
*/
void lv_app_rename(lv_app_inst_t * app, const char * name);
void lv_app_style_refr(void);
/**
* Get the window object from an object located on the window
* @param obj pointer to an object on the window
* @return pointer to the window of 'obj'
*/
lv_obj_t * lv_app_win_get_from_obj(lv_obj_t * obj);
/**
* Read the list of the running applications. (Get he next element)
* @param prev the previous application (at the first call give NULL to get the first application)
* @param dsc pointer to an application descriptor to filer the applications (NULL to do not filter)
* @return pointer to the next running application or NULL if no more
*/
lv_app_inst_t * lv_app_get_next(lv_app_inst_t * prev, lv_app_dsc_t * dsc);
/**
* Read the list of applications descriptors. (Get he next element)
* @param prev the previous application descriptors(at the first call give NULL to get the first)
* @return pointer to the next application descriptors or NULL if no more
*/
lv_app_dsc_t ** lv_app_dsc_get_next(lv_app_dsc_t ** prev);
const lv_app_dsc_t * lv_app_example_init(void);
/**
* Refresh the style of the applications
* */
void lv_app_style_refr(void);
/**
* Get a pointer to the application style structure. If modified then 'lv_app_refr_style' should be called
* @return pointer to the application style structure
*/
lv_app_style_t * lv_app_style_get(void);
/**********************
* MACROS
......
......@@ -23,9 +23,27 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the File selector utility
*/
void lv_app_fsel_init(void);
void lv_app_fsel_open(const char * path, const char * filter, void * param, void (*ok_action)(void *, const char *));
void lv_app_fsel_close();
/**
* Open the File selector
* @param path start path
* @param filter show only files with a specific extension, e.g. "wav".
* "/" means filter to folders.
* @param param a free parameter which will be added to 'ok_action'
* @param ok_action an action to call when a file or folder is chosen
*/
void lv_app_fsel_open(const char * path, const char * filter, void * param,
void (*ok_action)(void *, const char *));
/**
* Close the File selector
*/
void lv_app_fsel_close(void);
/**********************
* MACROS
......
......@@ -73,6 +73,9 @@ static lv_btnms_t kb_btnms;
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application keyboard
*/
void lv_app_kb_init(void)
{
lv_btnms_get(LV_BTNMS_DEF, &kb_btnms);
......
......@@ -28,8 +28,25 @@ typedef enum
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the application keyboard
*/
void lv_app_kb_init(void);
/**
* Open a keyboard for a text area object
* @param ta pointer to a text area object
* @param mode 'OR'd values of 'lv_app_kb_mode_t' enum
* @param close a function to call when the keyboard is closed
* @param ok a function to called when the "Ok" button is pressed
*/
void lv_app_kb_open(lv_obj_t * ta, lv_app_kb_mode_t mode, void (*close)(lv_obj_t *), void (*ok)(lv_obj_t *));
/**
* Close the keyboard
* @param ok true: call the ok function, false: call the close function
*/
void lv_app_kb_close(bool ok);
/**********************
......
......@@ -24,7 +24,17 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the Notifications
*/
void lv_app_notice_init(void);
/**
* Add a notification with a given text
* @param format pritntf-like format string
* @return pointer the notice which is a message box (lv_mbox) object
*/
lv_obj_t * lv_app_notice_add(const char * format, ...);
/**********************
......
......@@ -28,25 +28,57 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw a rectangle
* @param cords_p the coordinates of the rectangle
* @param mask_p the rectangle will be drawn only in this mask
* @param rects_p pointer to a rectangle style
* @param opa the opacity of the rectangle (0..255)
*/
#if USE_LV_RECT != 0
void lv_draw_rect(const area_t * cords_p, const area_t * mask_p,
const lv_rects_t * rects_p, opa_t opa);
const lv_rects_t * rects_p, opa_t opa);
#endif
/**
* Write a text
* @param cords_p coordinates of the label
* @param mask_p the label will be drawn only in this area
* @param labels_p pointer to a label style
* @param opa opacity of the text (0..255)
* @param txt 0 terminated text to write
*/
#if USE_LV_LABEL != 0
void lv_draw_label(const area_t * cords_p,const area_t * mask_p,
const lv_labels_t * labels_p, opa_t opa, const char * txt);
const lv_labels_t * labels_p, opa_t opa, const char * txt);
#endif
#if USE_LV_LINE != 0
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
const lv_lines_t * lines_p, opa_t opa);
/**
* Draw an image
* @param cords_p the coordinates of the image
* @param mask_p the image will be drawn only in this area
* @param map_p pointer to a color_t array which contains the pixels of the image
* @param opa opacity of the image (0..255)
*/
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
const lv_imgs_t * imgs_p, opa_t opa, const char * fn);
#endif
#if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
const lv_imgs_t * imgs_p, opa_t opa, const char * fn);
/**
* Draw a line
* @param p1 first point of the line
* @param p2 second point of the line
* @param mask_pthe line will be drawn only on this area
* @param lines_p pointer to a line style
* @param opa opacity of the line (0..255)
*/
#if USE_LV_LINE != 0
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
const lv_lines_t * lines_p, opa_t opa);
#endif
/**********************
* MACROS
**********************/
......
......@@ -24,14 +24,44 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_rfill(const area_t * area_p, const area_t * mask_p,
color_t color, opa_t opa);
void lv_rletter(const point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa);
/**
* Fill an area on the display
* @param cords_p coordinates of the area to fill
* @param mask_p fill only o this mask
* @param color fill color
* @param opa opacity (ignored, only for compatibility with lv_vfill)
*/
void lv_rfill(const area_t * cords_p, const area_t * mask_p,
color_t color, opa_t opa);
/**
* Draw a letter to the display
* @param pos_p left-top coordinate of the latter
* @param mask_p the letter will be drawn only on this area
* @param font_p pointer to font
* @param letter a letter to draw
* @param color color of letter
* @param opa opacity of letter (ignored, only for compatibility with lv_vletter)
*/
void lv_rletter(const point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa);
/**
* Draw a color map to the display
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a color_t array
* @param opa opacity of the map (ignored, only for compatibility with lv_vmap)
* @param transp true: enable transparency of LV_IMG_COLOR_TRANSP color pixels
* @param upscale true: upscale to double size (not supported)
* @param recolor mix the pixels with this color (not supported)
* @param recolor_opa the intense of recoloring (not supported)
*/
void lv_rmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa);
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa);
/**********************
* MACROS
**********************/
......
......@@ -28,16 +28,44 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_vfill(const area_t * cords_p, const area_t * mask_p,
color_t color, opa_t opa);
void lv_vletter(const point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa);
/**
* Fill an area in the Virtual Display Buffer
* @param cords_p coordinates of the area to fill
* @param mask_p fill only o this mask
* @param color fill color
* @param opa opacity of the area (0..255)
*/
void lv_vfill(const area_t * cords_p, const area_t * mask_p,
color_t color, opa_t opa);
void lv_vmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa);
/**
* Draw a letter in the Virtual Display Buffer
* @param pos_p left-top coordinate of the latter
* @param mask_p the letter will be drawn only on this area
* @param font_p pointer to font
* @param letter a letter to draw
* @param color color of letter
* @param opa opacity of letter (0..255)
*/
void lv_vletter(const point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa);
/**
* Draw a color map to the display
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a color_t array
* @param opa opacity of the map (ignored, only for compatibility with lv_vmap)
* @param transp true: enable transparency of LV_IMG_COLOR_TRANSP color pixels
* @param upscale true: upscale to double size
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_vmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa);
/**********************
......
......@@ -51,12 +51,43 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Init. the animation module
*/
void anim_init(void);
/**
* Create an animation
* @param anim_p an initialized 'anim_t' variable. Not required after call.
*/
void anim_create(anim_t * anim_p);
anim_path_t * anim_get_path(anim_path_name_t type);
/**
* Delete an animation for a variable with a given animatior function
* @param var pointer to variable
* @param fp a function pointer which is animating 'var',
* or NULL to ignore it and delete all animation with 'var
* @return true: at least 1 animation is deleted, false: no animation is deleted
*/
bool anim_del(void * var, anim_fp_t fp);
/**
* Calculate the time of an animation with a given speed and the start and end values
* @param speed speed of animation in unit/sec
* @param start start value of the animation
* @param end end value of the animation
* @return the required time [ms] for the animation with the given parameters
*/
uint16_t anim_speed_to_time(uint16_t speed, int32_t start, int32_t end);
/**
* Get a predefine animation path
* @param name name of the path from 'anim_path_name_t'
* @return pointer to the path array
*/
anim_path_t * anim_get_path(anim_path_name_t name);
/**********************
* MACROS
**********************/
......
......@@ -49,16 +49,32 @@ void area_set(area_t * area_p, cord_t x1, cord_t y1, cord_t x2, cord_t y2)
area_p->y2 = y2;
}
/**
* Set the width of an area
* @param area_p pointer to an area
* @param w the new width of the area (w == 1 makes x1 == x2)
*/
void area_set_width(area_t * area_p, cord_t w)
{
area_p->x2 = area_p->x1 + w - 1;
}
/**
* Set the height of an area
* @param area_p pointer to an area
* @param h the new height of the area (h == 1 makes y1 == y2)
*/
void area_set_height(area_t * area_p, cord_t h)
{
area_p->y2 = area_p->y1 + h - 1;
}
/**
* Set the position of an area (width and height will be kept)
* @param area_p pointer to an area
* @param x the new x coordinate of the area
* @param y the new y coordinate of the area
*/
void area_set_pos(area_t * area_p, cord_t x, cord_t y)
{
cord_t w = area_get_width(area_p);
......@@ -146,7 +162,8 @@ bool area_is_point_on(const area_t * a_p, const point_t * p_p)
* Check if two area has common parts
* @param a1_p pointer to an area.
* @param a2_p pointer to an other area
* @return false: a1_p and a2_p has no common parts */
* @return false: a1_p and a2_p has no common parts
*/
bool area_is_on(const area_t * a1_p, const area_t * a2_p)
{
/*Two area are on each other if... */
......
......@@ -41,31 +41,115 @@ typedef struct
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize an area
* @param area_p pointer to an area
* @param x1 left coordinate of the area
* @param y1 top coordinate of the area
* @param x2 right coordinate of the area
* @param y2 bottom coordinate of the area
*/
void area_set(area_t * area_p, cord_t x1, cord_t y1, cord_t x2, cord_t y2);
/**
* Copy an area
* @param dest pointer to the destination area
* @param src pointer to the source area
*/
static void inline area_cpy(area_t * dest, const area_t * src)
{
memcpy(dest, src, sizeof(area_t));
}
/**
* Get the width of an area
* @param area_p pointer to an area
* @return the width of the area (if x1 == x2 -> width = 1)
*/
static inline cord_t area_get_width(const area_t * area_p)
{
return area_p->x2 - area_p->x1 + 1;
}
/**
* Get the height of an area
* @param area_p pointer to an area
* @return the height of the area (if y1 == y2 -> height = 1)
*/
static inline cord_t area_get_height(const area_t * area_p)
{
return area_p->y2 - area_p->y1 + 1;
}
void area_set(area_t * area_p, cord_t x1, cord_t y1, cord_t x2, cord_t y2);
/**
* Set the width of an area
* @param area_p pointer to an area
* @param w the new width of the area (w == 1 makes x1 == x2)
*/
void area_set_width(area_t * area_p, cord_t w);
/**
* Set the height of an area
* @param area_p pointer to an area
* @param h the new height of the area (h == 1 makes y1 == y2)
*/
void area_set_height(area_t * area_p, cord_t h);
/**
* Set the position of an area (width and height will be kept)
* @param area_p pointer to an area
* @param x the new x coordinate of the area
* @param y the new y coordinate of the area
*/
void area_set_pos(area_t * area_p, cord_t x, cord_t y);
/**
* Return with area of an area (x * y)
* @param area_p pointer to an area
* @return size of area
*/
uint32_t area_get_size(const area_t * area_p);
/**
* Get the common parts of two areas
* @param res_p pointer to an area, the result will be stored her
* @param a1_p pointer to the first area
* @param a2_p pointer to the second area
* @return false: the two area has NO common parts, res_p is invalid
*/
bool area_union(area_t * res_p, const area_t * a1_p, const area_t * a2_p);
/**
* Join two areas into a third which involves the other two
* @param res_p pointer to an area, the result will be stored here
* @param a1_p pointer to the first area
* @param a2_p pointer to the second area
*/
void area_join(area_t * a_res_p, const area_t * a1_p, const area_t * a2_p);
/**
* Check if a point is on an area
* @param a_p pointer to an area
* @param p_p pointer to a point
* @return false:the point is out of the area
*/
bool area_is_point_on(const area_t * a_p, const point_t * p_p);
/**
* Check if two area has common parts
* @param a1_p pointer to an area.
* @param a2_p pointer to an other area
* @return false: a1_p and a2_p has no common parts
*/
bool area_is_on(const area_t * a1_p, const area_t * a2_p);
bool area_is_in(const area_t * a_in, const area_t * a_holder);
/**
* Check if an area is fully on an other
* @param ain_p pointer to an area which could be on aholder_p
* @param aholder pointer to an area which could involve ain_p
* @return
*/
bool area_is_in(const area_t * ain_p, const area_t * aholder_p);
/**********************
* MACROS
......
......@@ -40,8 +40,27 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the circle drawing
* @param c pointer to a point. The coordinates will be calculated here
* @param tmp point to a variable. It will store temporary data
* @param radius radius of the circle
*/
void circ_init(point_t * c, cord_t * tmp, cord_t radius);
/**
* Test the circle drawing is ready or not
* @param c same as in circ_init
* @return true if the circle is not ready yet
*/
bool circ_cont(point_t * c);
/**
* Get the next point from the circle
* @param c same as in circ_init. The next point stored here.
* @param tmp same as in circ_init.
*/
void circ_next(point_t * c, cord_t * tmp);
/**********************
......
......@@ -107,6 +107,40 @@ const font_t * font_get(font_types_t font_id)
return font_p;
}
/**
* Return with the bitmap of a font.
* @param font_p pointer to a font
* @param letter a letter
* @return pointer to the bitmap of the letter
*/
const uint8_t * font_get_bitmap(const font_t * font_p, uint8_t letter)
{
if(letter < font_p->start_ascii || letter >= font_p->start_ascii + font_p->letter_cnt) return NULL;
uint32_t index = (letter - font_p->start_ascii) * font_p->height_row * font_p->width_byte;
return &font_p->bitmaps_a[index];
}
/**
* Get the width of a letter in a font
* @param font_p pointer to a font
* @param letter a letter
* @return the width of a letter
*/
uint8_t font_get_width(const font_t * font_p, uint8_t letter)
{
if(letter < font_p->start_ascii) return 0;
letter -= font_p->start_ascii;
uint8_t w = 0;
if(letter < font_p->letter_cnt) {
w = font_p->fixed_width != 0 ? font_p->fixed_width :
font_p->width_bit_a[letter];
}
return w;
}
/**********************
* STATIC FUNCTIONS
**********************/
......
......@@ -64,25 +64,22 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
const font_t * font_get(font_types_t letter);
/**********************
* MACROS
**********************/
/**
* Get the font from its id
* @param font_id: the id of a font (an element of font_types_t enum)
* @return pointer to a font descriptor
*/
const font_t * font_get(font_types_t font_id);
/**
* Return with the bitmap of a font.
* Return with the bitmap of a font.
* @param font_p pointer to a font
* @param letter a letter
* @return pointer to the bitmap of the letter
*/
static inline const uint8_t * font_get_bitmap(const font_t * font_p, uint8_t letter)
{
if(letter < font_p->start_ascii || letter >= font_p->start_ascii + font_p->letter_cnt) return NULL;
uint32_t index = (letter - font_p->start_ascii) * font_p->height_row * font_p->width_byte;
return &font_p->bitmaps_a[index];
}
const uint8_t * font_get_bitmap(const font_t * font_p, uint8_t letter);
/**
* Get the height of a font
......@@ -94,24 +91,19 @@ static inline uint8_t font_get_height(const font_t * font_p)
return font_p->height_row;
}
/**
* Get the width of a letter in a font
* @param font_p pointer to a font
* @param letter a letter
* @return the width of a letter
*/
static inline uint8_t font_get_width(const font_t * font_p, uint8_t letter)
{
if(letter < font_p->start_ascii) return 0;
letter -= font_p->start_ascii;
uint8_t w = 0;
if(letter < font_p->letter_cnt) {
w = font_p->fixed_width != 0 ? font_p->fixed_width :
font_p->width_bit_a[letter];
}
return w;
}
uint8_t font_get_width(const font_t * font_p, uint8_t letter);
/**********************
* MACROS
**********************/
#endif
......@@ -35,6 +35,15 @@ static bool txt_is_break_char(char letter);
* GLOBAL FUNCTIONS
**********************/
/**
* Get size of a text
* @param size_res pointer to a 'point_t' variable to store the result
* @param text pointer to a text
* @param font pinter to font of the text
* @param letter_space letter space of the text
* @param line_space line space of the text
* @param max_width max with of the text (break the lines to fit this size) Set LV_CORD_MAX to avoid line breaks
*/
void txt_get_size(point_t * size_res, const char * text, const font_t * font,
uint16_t letter_space, uint16_t line_space, cord_t max_width)
{
......
......@@ -26,10 +26,40 @@
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Get size of a text
* @param size_res pointer to a 'point_t' variable to store the result
* @param text pointer to a text
* @param font pinter to font of the text
* @param letter_space letter space of the text
* @param line_space line space of the text
* @param max_width max with of the text (break the lines to fit this size) Set LV_CORD_MAX to avoid line breaks
*/
void txt_get_size(point_t * size_res, const char * text, const font_t * font,
uint16_t letter_space, uint16_t line_space, cord_t max_width);
uint16_t txt_get_next_line(const char * txt, const font_t * font_p, uint16_t letter_space, cord_t max_l);
cord_t txt_get_width(const char * txt, uint16_t char_num, const font_t * font_p, uint16_t letter_space);
uint16_t letter_space, uint16_t line_space, cord_t max_width);
/**
* Get the next line of text. Check line length and break chars too.
* @param txt a '\0' terminated string
* @param font_p pointer to a font
* @param letter_space letter space
* @param max_l max line length
* @return the index of the first char of the new line
*/
uint16_t txt_get_next_line(const char * txt, const font_t * font_p,
uint16_t letter_space, cord_t max_l);
/**
* Give the length of a text with a given font
* @param txt a '\0' terminate string
* @param char_num number of characters in 'txt'
* @param font_p pointer to a font
* @param letter_space letter sapce
* @return length of a char_num long text
*/
cord_t txt_get_width(const char * txt, uint16_t char_num,
const font_t * font_p, uint16_t letter_space);
/**********************
* MACROS
......
......@@ -48,13 +48,49 @@ typedef lv_action_res_t ( * lv_action_t) (struct __LV_OBJ_T * obj, lv_dispi_t *
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the display input subsystem
*/
void lv_dispi_init(void);
/**
* Reset all display inputs
*/
void lv_dispi_reset(void);
/**
* Reset the long press state of a display input
* @param dispi pointer to a display input
*/
void lv_dispi_reset_lpr(lv_dispi_t * dispi);
bool lv_dispi_is_dragging(lv_dispi_t * dispi_p);
void lv_dispi_get_point(lv_dispi_t * dispi_p, point_t * point_p);
void lv_dispi_get_vect(lv_dispi_t * dispi_p, point_t * point_p);
void lv_dispi_wait_release(lv_dispi_t * dispi_p);
/**
* Get the last point on display input
* @param dispi pointer to a display input
* @param point pointer to a point to store the result
*/
void lv_dispi_get_point(lv_dispi_t * dispi, point_t * point);
/**
* Check if there is dragging on display input or not
* @param dispi pointer to a display input
* @return true: drag is in progress
*/
bool lv_dispi_is_dragging(lv_dispi_t * dispi);
/**
* Get the vector of dragging on a display input
* @param dispi pointer to a display input
* @param point pointer to a point to store the vector
*/
void lv_dispi_get_vect(lv_dispi_t * dispi, point_t * point);
/**
* Do nothing until the next release
* @param dispi pointer to a display input
*/
void lv_dispi_wait_release(lv_dispi_t * dispi);
/**********************
* MACROS
......
......@@ -105,64 +105,6 @@ 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)
{
/*Invalidate the object only if it belongs to the 'act_scr'*/
lv_obj_t * act_scr_p = lv_scr_act();
if(lv_obj_get_scr(obj) == act_scr_p) {
/*Truncate recursively to the parents*/
area_t area_trunc;
lv_obj_t * par = lv_obj_get_parent(obj);
bool union_ok = true;
/*Start with the original coordinates*/
cord_t ext_size = obj->ext_size;
area_cpy(&area_trunc, &obj->cords);
area_trunc.x1 -= ext_size;
area_trunc.y1 -= ext_size;
area_trunc.x2 += ext_size;
area_trunc.y2 += ext_size;
/*Check through all parents*/
while(par != NULL) {
union_ok = area_union(&area_trunc, &area_trunc, &par->cords);
if(union_ok == false) break; /*If no common parts with parent break;*/
par = lv_obj_get_parent(par);
}
if(union_ok != false) lv_inv_area(&area_trunc);
}
}
/**
* Notify an object about its style is modified
* @param obj pointer to an object
*/
void lv_obj_refr_style(lv_obj_t * obj)
{
lv_obj_inv(obj);
obj->signal_f(obj, LV_SIGNAL_STYLE_CHG, NULL);
lv_obj_inv(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_all(void * style)
{
lv_obj_t * i;
LL_READ(scr_ll, i) {
lv_style_refr_core(style, i);
}
}
/*--------------------
* Create and delete
*-------------------*/
......@@ -410,6 +352,42 @@ lv_objs_t * lv_objs_get(lv_objs_builtin_t style, lv_objs_t * copy_p)
return style_p;
}
/**
* 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)
{
/*Invalidate the object only if it belongs to the 'act_scr'*/
lv_obj_t * act_scr_p = lv_scr_act();
if(lv_obj_get_scr(obj) == act_scr_p) {
/*Truncate recursively to the parents*/
area_t area_trunc;
lv_obj_t * par = lv_obj_get_parent(obj);
bool union_ok = true;
/*Start with the original coordinates*/
cord_t ext_size = obj->ext_size;
area_cpy(&area_trunc, &obj->cords);
area_trunc.x1 -= ext_size;
area_trunc.y1 -= ext_size;
area_trunc.x2 += ext_size;
area_trunc.y2 += ext_size;
/*Check through all parents*/
while(par != NULL) {
union_ok = area_union(&area_trunc, &area_trunc, &par->cords);
if(union_ok == false) break; /*If no common parts with parent break;*/
par = lv_obj_get_parent(par);
}
if(union_ok != false) lv_inv_area(&area_trunc);
}
}
/*=====================
* Setter functions
*====================*/
......@@ -459,9 +437,9 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
lv_obj_inv(obj);
}
/*-------------------------------------------
* Coordinate set (cord_chk_f will be called)
* -----------------------------------------*/
/*--------------------
* Coordinate set
* ------------------*/
/**
* Set relative the position of an object (relative to the parent)
......@@ -895,6 +873,33 @@ void lv_obj_set_opar(lv_obj_t * obj, uint8_t opa)
lv_obj_inv(obj);
}
/**
* Notify an object about its style is modified
* @param obj pointer to an object
*/
void lv_obj_refr_style(lv_obj_t * obj)
{
lv_obj_inv(obj);
obj->signal_f(obj, LV_SIGNAL_STYLE_CHG, NULL);
lv_obj_inv(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_all(void * style)
{
lv_obj_t * i;
LL_READ(scr_ll, i) {
lv_style_refr_core(style, i);
}
}
/*-----------------
* Attribute set
*----------------*/
......@@ -1425,7 +1430,7 @@ bool lv_obj_is_protected(lv_obj_t * obj, uint8_t prot)
* @param obj pointer to an object
* @return the signal function
*/
lv_signal_f_t lv_obj_get_signal_f(lv_obj_t * obj)
lv_signal_f_t lv_obj_get_signal_f(lv_obj_t * obj)
{
return obj->signal_f;
}
......
......@@ -32,9 +32,18 @@
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the screen refresh subsystem
*/
void lv_refr_init(void);
/**
* Invalidate an area
* @param area_p pointer to area which should be invalidated
*/
void lv_inv_area(const area_t * area_p);
/**********************
* STATIC FUNCTIONS
**********************/
\ No newline at end of file
**********************/
......@@ -37,8 +37,17 @@ typedef struct
* GLOBAL PROTOTYPES
**********************/
/**
* Get the vdb variable
* @return pointer to the vdb variable
*/
lv_vdb_t * lv_vdb_get(void);
/**
* Flush the content of the vdb
*/
void lv_vdb_flush(void);
/**********************
* MACROS
**********************/
......
......@@ -83,22 +83,87 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/*Create function*/
/**
* Create a button objects
* @param par pointer to an object, it will be the parent of the new button
* @param copy pointer to a button object, if not NULL then the new object will be copied from it
* @return pointer to the created button
*/
lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the button
* @param btn pointer to a button object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param);
lv_btns_t * lv_btns_get(lv_btns_builtin_t style, lv_btns_t * copy);
/**
* Enable the toggled states
* @param btn pointer to a button object
* @param tgl true: enable toggled states, false: disable
*/
void lv_btn_set_tgl(lv_obj_t * btn, bool tgl);
/**
* Set the state of the button
* @param btn pointer to a button object
* @param state the new state of the button (from lv_btn_state_t enum)
*/
void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state);
/**
* Set a function to call when the button is pressed
* @param btn pointer to a button object
* @param pr_action pointer to function
*/
void lv_btn_set_pr_action(lv_obj_t * btn, lv_action_t pr_action);
/**
* Set a function to call when the button is released
* @param btn pointer to a button object
* @param rel_action pointer to functionREL
*/
void lv_btn_set_rel_action(lv_obj_t * btn, lv_action_t rel_action);
/**
* Set a function to call when the button is long pressed
* @param btn pointer to a button object
* @param lpr_action pointer to function
*/
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_action_t lpr_action);
/**
* Set a function to called periodically after long press.
* @param btn pointer to a button object
* @param lpr_rep_action pointer to function
*/
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_action_t lpr_rep_action);
bool lv_btn_get_tgl(lv_obj_t * btn);
/**
* Get the current state of the button
* @param btn pointer to a button object
* @return the state of the button (from lv_btn_state_t enum)
*/
lv_btn_state_t lv_btn_get_state(lv_obj_t * btn);
/**
* Get the toggle enable attribute of the button
* @param btn pointer to a button object
* @return ture: toggle enabled, false: disabled
*/
bool lv_btn_get_tgl(lv_obj_t * btn);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_btns_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_btns_t style
*/
lv_btns_t * lv_btns_get(lv_btns_builtin_t style, lv_btns_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -70,15 +70,65 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a button matrix objects
* @param par pointer to an object, it will be the parent of the new button matrix
* @param copy pointer to a button matrix object, if not NULL then the new object will be copied from it
* @return pointer to the created button matrix
*/
lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the button matrix
* @param btnm pointer to a button matrix object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param);
lv_btnms_t * lv_btnms_get(lv_btnms_builtin_t style, lv_btnms_t * copy);
/**
* Set a new map. Buttons will be created/deleted according to the map.
* @param btnm pointer to a button matrix object
* @param map pointer a string array. The last string has to be: "".
* Use "\n" to begin a new line.
* Use octal numbers (e.g. "\003") to set the relative
* width of a button. (max. 9 -> \011)
* (e.g. const char * str[] = {"a", "b", "\n", "\004c", "d", ""}).
* The button do not copy the array so it can not be a local variable.
*/
void lv_btnm_set_map(lv_obj_t * btnm, const char ** map);
/**
* Set a new callback function for the buttons (It will be called when a button is released)
* @param btnm: pointer to button matrix object
* @param cb pointer to a callback function
*/
void lv_btnm_set_cb(lv_obj_t * btnm, lv_btnm_callback_t cb);
/**
* Get the current map of a button matrix
* @param btnm pointer to a button matrix object
* @return the current map
*/
const char ** lv_btnm_get_map(lv_obj_t * btnm);
/**
* Get a the callback function of the buttons on a button matrix
* @param btnm: pointer to button matrix object
* @return pointer to the callback function
*/
lv_btnm_callback_t lv_btnm_get_cb(lv_obj_t * btnm);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_btnms_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_btnms_t style
*/
lv_btnms_t * lv_btnms_get(lv_btnms_builtin_t style, lv_btnms_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -60,10 +60,43 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a check box objects
* @param par pointer to an object, it will be the parent of the new check box
* @param copy pointer to a check box object, if not NULL then the new object will be copied from it
* @return pointer to the created check box
*/
lv_obj_t * lv_cb_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the check box
* @param cb pointer to a check box object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param);
/**
* Set the text of a check box
* @param cb pointer to a check box
* @param txt the text of the check box
*/
void lv_cb_set_text(lv_obj_t * cb, const char * txt);
/**
* Get the text of a check box
* @param cb pointer to check box object
* @return pointer to the text of the check box
*/
const char * lv_cb_get_text(lv_obj_t * cb);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_cbs_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_cbs_t style
*/
lv_cbs_t * lv_cbs_get(lv_cbs_builtin_t style, lv_cbs_t * copy);
/**********************
......
......@@ -269,6 +269,30 @@ void lv_chart_set_next(lv_obj_t * chart, cord_t * dl, cord_t y)
*====================*/
/**
* Get the type of a chart
* @param chart pointer to chart object
* @return type of the chart (from 'lv_chart_t' enum)
*/
lv_chart_type_t lv_chart_get_type(lv_obj_t * chart)
{
lv_chart_ext_t * ext = lv_obj_get_ext(chart);
return ext->type;
}
/**
* Get the data point number per data line on chart
* @param chart pointer to chart object
* @return point number on each data line
*/
uint16_t lv_chart_get_pnum(lv_obj_t * chart)
{
lv_chart_ext_t * ext = lv_obj_get_ext(chart);
return ext->pnum;
}
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_charts_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
......@@ -305,30 +329,6 @@ lv_charts_t * lv_charts_get(lv_charts_builtin_t style, lv_charts_t * copy)
return style_p;
}
/**
* Get the type of a chart
* @param chart pointer to chart object
* @return type of the chart (from 'lv_chart_t' enum)
*/
lv_chart_type_t lv_chart_get_type(lv_obj_t * chart)
{
lv_chart_ext_t * ext = lv_obj_get_ext(chart);
return ext->type;
}
/**
* Get the data point number per data line on chart
* @param chart pointer to chart object
* @return point number on each data line
*/
uint16_t lv_chart_get_pnum(lv_obj_t * chart)
{
lv_chart_ext_t * ext = lv_obj_get_ext(chart);
return ext->pnum;
}
/**********************
* STATIC FUNCTIONS
**********************/
......
......@@ -79,23 +79,98 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a chart background objects
* @param par pointer to an object, it will be the parent of the new chart background
* @param copy pointer to a chart background object, if not NULL then the new object will be copied from it
* @return pointer to the created chart background
*/
lv_obj_t * lv_chart_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the chart background
* @param chart pointer to a chart background object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param);
lv_charts_t * lv_charts_get(lv_charts_builtin_t style, lv_charts_t * copy);
/**
* Allocate and add a data line to the chart
* @param chart pointer to a chart object
* @return pointer to the allocated data lie (an array for the data points)
*/
cord_t * lv_chart_add_dataline(lv_obj_t * chart);
/**
* Refresh a chart if its data line has changed
* @param chart pointer to chart object
*/
void lv_chart_refr(lv_obj_t * chart);
void lv_chart_set_type(lv_obj_t * chart, lv_chart_type_t type);
/**
* Set the number of horizontal and vertical division lines
* @param chart pointer to a graph background object
* @param hdiv number of horizontal division lines
* @param vdiv number of vertical division lines
*/
void lv_chart_set_hvdiv(lv_obj_t * chart, uint8_t hdiv, uint8_t vdiv);
/**
* Set the minimal and maximal x and y values
* @param chart pointer to a graph background object
* @param xmin x minimum value
* @param xmax x maximum value
* @param ymin y minimum value
* @param ymax y maximum value
*/
void lv_chart_set_range(lv_obj_t * chart, cord_t ymin, cord_t ymax);
/**
* Set a new type for a chart
* @param chart pointer to a chart object
* @param type new type of the chart (from 'lv_chart_type_t' enum)
*/
void lv_chart_set_type(lv_obj_t * chart, lv_chart_type_t type);
/**
* Set the number of points on a data line on a chart
* @param chart pointer r to chart object
* @param pnum new number of points on the data lines
*/
void lv_chart_set_pnum(lv_obj_t * chart, uint16_t pnum);
/**
* Shift all data right and set the most right data on a data line
* @param chart pointer to chart object
* @param dl pointer to a data line on 'chart'
* @param y the new value of the most right data
*/
void lv_chart_set_next(lv_obj_t * chart, cord_t * dl, cord_t y);
/**
* Get the type of a chart
* @param chart pointer to chart object
* @return type of the chart (from 'lv_chart_t' enum)
*/
lv_chart_type_t lv_chart_get_type(lv_obj_t * chart);
/**
* Get the data point number per data line on chart
* @param chart pointer to chart object
* @return point number on each data line
*/
uint16_t lv_chart_get_pnum(lv_obj_t * chart);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_charts_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_charts_t style
*/
lv_charts_t * lv_charts_get(lv_charts_builtin_t style, lv_charts_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -3,13 +3,6 @@
*
*/
/*Search an replace: gauge -> object normal name with lower case (e.g. button, label etc.)
* gauge -> object short name with lower case(e.g. btn, label etc)
* GAUGE -> object short name with upper case (e.g. BTN, LABEL etc.)
*
*/
#ifndef LV_GAUGE_H
#define LV_GAUGE_H
......@@ -77,21 +70,100 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a gauge objects
* @param par pointer to an object, it will be the parent of the new gauge
* @param copy pointer to a gauge object, if not NULL then the new object will be copied from it
* @return pointer to the created gauge
*/
lv_obj_t * lv_gauge_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the gauge
* @param gauge pointer to a gauge object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_gauge_signal(lv_obj_t * gauge, lv_signal_t sign, void * param);
lv_gauges_t * lv_gauges_get(lv_gauges_builtin_t style, lv_gauges_t * copy);
void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle, int16_t value);
/**
* Set the number of needles (should be <= LV_GAUGE_MAX_NEEDLE)
* @param gauge pointer to gauge object
* @param num number of needles
*/
void lv_gauge_set_needle_num(lv_obj_t * gauge, uint8_t num);
/**
* Set the range of a gauge
* @param gauge pointer to gauge object
* @param min min value
* @param max max value
*/
void lv_gauge_set_range(lv_obj_t * gauge, int16_t min, int16_t max);
/**
* Set the value of a needle
* @param gauge pointer to gauge
* @param needle the id of the needle
* @param value the new value
*/
void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle, int16_t value);
/**
* Set text on a gauge
* @param gauge pinter to a gauge object
* @param txt a printf like format string
* with 1 place for a number (e.g. "Value: %d");
*/
void lv_gauge_set_text(lv_obj_t * gauge, const char * txt);
/**
* Set which value is more critical (lower or higher)
* @param gauge pointer to a gauge object
* @param low false: higher / true: lower value is more critical
*/
void lv_gauge_set_low_critical(lv_obj_t * gauge, bool low);
/**
* Get the number of needles on a gauge
* @param gauge pointer to gauge
* @return number of needles
*/
uint8_t lv_gauge_get_needle_num(lv_obj_t * gauge);
/**
* Get the value of a needle
* @param gauge pointer to gauge object
* @param needle the id of the needle
* @return the value of the needle [min,max]
*/
int16_t lv_gauge_get_value(lv_obj_t * gauge, uint8_t needle);
/**
* Get the text of a gauge
* @param gauge pointer to gauge
* @return the set text. (not with the current value)
*/
const char * lv_gauge_get_text(lv_obj_t * gauge);
/**
* Get which value is more critical (lower or higher)
* @param gauge pointer to a gauge object
* @param low false: higher / true: lower value is more critical
*/
bool lv_gauge_get_low_critical(lv_obj_t * gauge);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_gauges_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_gauges_t style
*/
lv_gauges_t * lv_gauges_get(lv_gauges_builtin_t style, lv_gauges_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -68,20 +68,92 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/*Create function*/
/**
* Create a label objects
* @param par pointer to an object, it will be the parent of the new label
* @param copy pointer to a button object, if not NULL then the new object will be copied from it
* @return pointer to the created button
*/
lv_obj_t * lv_label_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the label
* @param label pointer to a label object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param);
lv_labels_t * lv_labels_get(lv_labels_builtin_t style, lv_labels_t * copy);
/**
* Set a new text for a label. Memory will be allocated to store the text by the label.
* @param label pointer to a label object
* @param text '\0' terminated character string. NULL to refresh with the current text.
*/
void lv_label_set_text(lv_obj_t * label, const char * text);
/**
* Set a new text for a label from a character array. The array don't has to be '\0' terminated.
* Memory will be allocated to store the array by the label.
* @param label pointer to a label object
* @param array array of characters or NULL to refresh the label
* @param size the size of 'array' in bytes
*/
void lv_label_set_text_array(lv_obj_t * label, const char * array, uint16_t size);
/**
* Set a static text. It will not be saved by the label so the 'text' variable
* has to be 'alive' while the label exist.
* @param label pointer to a label object
* @param text pointer to a text. NULL to refresh with the current text.
*/
void lv_label_set_text_static(lv_obj_t * label, const char * text);
/**
* Set the behavior of the label with longer text then the object size
* @param label pointer to a label object
* @param long_mode the new mode from 'lv_label_long_mode' enum.
*/
void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode);
/**
* Get the text of a label
* @param label pointer to a label object
* @return the text of the label
*/
const char * lv_label_get_text(lv_obj_t * label);
/**
* Get the fix width attribute of a label
* @param label pointer to a label object
* @return true: fix width is enabled
*/
lv_label_long_mode_t lv_label_get_long_mode(lv_obj_t * label);
/**
* Get the relative x and y coordinates of a letter
* @param label pointer to a label object
* @param index index of the letter (0 ... text length)
* @param pos store the result here (E.g. index = 0 gives 0;0 coordinates)
*/
void lv_label_get_letter_pos(lv_obj_t * label, uint16_t index, point_t * pos);
/**
* Get the index of letter on a relative point of a label
* @param label pointer to label object
* @param pos pointer to point with coordinates on a the label
* @return the index of the letter on the 'pos_p' point (E.g. on 0;0 is the 0. letter)
*/
uint16_t lv_label_get_letter_on(lv_obj_t * label, point_t * pos);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_labels_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_labels_t style
*/
lv_labels_t * lv_labels_get(lv_labels_builtin_t style, lv_labels_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -53,17 +53,64 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a led objects
* @param par pointer to an object, it will be the parent of the new led
* @param copy pointer to a led object, if not NULL then the new object will be copied from it
* @return pointer to the created led
*/
lv_obj_t * lv_led_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the led
* @param led pointer to a led object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_led_signal(lv_obj_t * led, lv_signal_t sign, void * param);
lv_leds_t * lv_leds_get(lv_leds_builtin_t style, lv_leds_t * copy);
/**
* Set the brightness of a LED object
* @param led pointer to a LED object
* @param bright 0 (max. dark) ... 255 (max. light)
*/
void lv_led_set_bright(lv_obj_t * led, uint8_t bright);
uint8_t lv_led_get_bright(lv_obj_t * led);
/**
* Light on a LED
* @param led pointer to a LED object
*/
void lv_led_on(lv_obj_t * led);
/**
* Light off a LED
* @param led pointer to a LED object
*/
void lv_led_off(lv_obj_t * led);
/**
* Toggle the state of a LED
* @param led pointer to a LED object
*/
void lv_led_tgl(lv_obj_t * led);
/**
* Get the brightness of a LEd object
* @param led pointer to LED object
* @return bright 0 (max. dark) ... 255 (max. light)
*/
uint8_t lv_led_get_bright(lv_obj_t * led);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_leds_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_leds_t style
*/
lv_leds_t * lv_leds_get(lv_leds_builtin_t style, lv_leds_t * copy);
/**********************
* MACROS
......
......@@ -51,17 +51,85 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a line objects
* @param par pointer to an object, it will be the parent of the new line
* @return pointer to the created line
*/
lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the line
* @param line pointer to a line object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param);
lv_lines_t * lv_lines_get(lv_lines_builtin_t style, lv_lines_t * copy);
/**
* Set an array of points. The line object will connect these points.
* @param line pointer to a line object
* @param point_a an array of points. Only the address is saved,
* so the array can be a local variable which will be destroyed
* @param point_num number of points in 'point_a'
*/
void lv_line_set_points(lv_obj_t * line, const point_t * point_a, uint16_t point_num);
/**
* Enable (or disable) the auto-size option. The size of the object will fit to its points.
* (set width to x max and height to y max)
* @param line pointer to a line object
* @param autosize true: auto size is enabled, false: auto size is disabled
*/
void lv_line_set_auto_size(lv_obj_t * line, bool autosize);
/**
* Enable (or disable) the y coordinate inversion.
* If enabled then y will be subtracted from the height of the object,
* therefore the y=0 coordinate will be on the bottom.
* @param line pointer to a line object
* @param yinv true: enable the y inversion, false:disable the y inversion
*/
void lv_line_set_y_inv(lv_obj_t * line, bool yinv);
/**
* Enable (or disable) the point coordinate upscaling (compensate LV_DOWNSCALE).
* @param line pointer to a line object
* @param unscale true: enable the point coordinate upscaling
*/
void lv_line_set_upscale(lv_obj_t * line, bool unscale);
/**
* Get the auto size attribute
* @param line pointer to a line object
* @return true: auto size is enabled, false: disabled
*/
bool lv_line_get_auto_size(lv_obj_t * line);
/**
* Get the y inversion attribute
* @param line pointer to a line object
* @return true: y inversion is enabled, false: disabled
*/
bool lv_line_get_y_inv(lv_obj_t * line);
/**
* Get the point upscale enable attribute
* @param obj pointer to a line object
* @return true: point coordinate upscale is enabled, false: disabled
*/
bool lv_line_get_upscale(lv_obj_t * line);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_lines_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_lines_t style
*/
lv_lines_t * lv_lines_get(lv_lines_builtin_t style, lv_lines_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -114,7 +114,6 @@ bool lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param)
lv_obj_t * lv_list_add(lv_obj_t * list, const char * img_fn, const char * txt, lv_action_t rel_action)
{
lv_lists_t * lists = lv_obj_get_style(list);
lv_list_ext_t * ext = lv_obj_get_ext(list);
/*Create a list element with the image an the text*/
lv_obj_t * liste;
......
......@@ -70,15 +70,60 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a list objects
* @param par pointer to an object, it will be the parent of the new list
* @param copy pointer to a list object, if not NULL then the new object will be copied from it
* @return pointer to the created list
*/
lv_obj_t * lv_list_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the list
* @param list pointer to a list object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param);
/**
* Add a list element to the list
* @param list pointer to list object
* @param img_fn file name of an image before the text (NULL if unused)
* @param txt text of the list element (NULL if unused)
* @param rel_action pointer to release action function (like with lv_btn)
* @return pointer to the new list element which can be customized (a button)
*/
lv_obj_t * lv_list_add(lv_obj_t * list, const char * img_fn, const char * txt, lv_action_t rel_action);
lv_lists_t * lv_lists_get(lv_lists_builtin_t style, lv_lists_t * copy);
void lv_list_down(lv_obj_t * list);
/**
* Move the list elements up by one
* @param list pointer a to list object
*/
void lv_list_up(lv_obj_t * list);
/**
* Move the list elements down by one
* @param list pointer to a list object
*/
void lv_list_down(lv_obj_t * list);
/**
* Get the text of a list element
* @param liste pointer to list element
* @return pointer to the text
*/
const char * lv_list_element_get_txt(lv_obj_t * liste);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_lists_builtin_t enum
* @param copy_p copy the style to this variable. (NULL if unused)
* @return pointer to an lv_lists_t style
*/
lv_lists_t * lv_lists_get(lv_lists_builtin_t style, lv_lists_t * list);
/**********************
* MACROS
**********************/
......
......@@ -74,20 +74,91 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a message box objects
* @param par pointer to an object, it will be the parent of the new message box
* @param copy pointer to a message box object, if not NULL then the new object will be copied from it
* @return pointer to the created message box
*/
lv_obj_t * lv_mbox_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the message box
* @param mbox pointer to a message box object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param);
lv_mboxs_t * lv_mboxs_get(lv_mboxs_builtin_t style, lv_mboxs_t * copy);
/**
* Add a button to the message box
* @param mbox pointer to message box object
* @param btn_txt the text of the button
* @param rel_action a function which will be called when the button is relesed
* @return pointer to the created button (lv_btn)
*/
lv_obj_t * lv_mbox_add_btn(lv_obj_t * mbox, const char * btn_txt, lv_action_t rel_action);
bool lv_mbox_close_action (lv_obj_t * mbox, lv_dispi_t *dispi);
/**
* A release action which can be assigned to a message box button to close it
* @param btn pointer to the released button
* @param dispi pointer to the caller display input
* @return always false because the button is deleted with the mesage box
*/
bool lv_mbox_close_action(lv_obj_t * btn, lv_dispi_t * dispi);
/**
* Automatically delete the message box after a given time
* @param mbox pointer to a message box object
* @param tout a time (in milliseconds) to wait before delete the message box
*/
void lv_mbox_auto_close(lv_obj_t * mbox, uint16_t tout);
/**
* Set the title of the message box
* @param mbox pointer to a message box
* @param title a '\0' terminated character string which will be the message box title
*/
void lv_mbox_set_title(lv_obj_t * mbox, const char * title);
/**
* Set the text of the message box
* @param mbox pointer to a message box
* @param txt a '\0' terminated character string which will be the message box text
*/
void lv_mbox_set_txt(lv_obj_t * mbox, const char * txt);
/**
* get the title of the message box
* @param mbox pointer to a message box object
* @return pointer to the title of the message box
*/
const char * lv_mbox_get_title(lv_obj_t * mbox);
/**
* Get the text of the message box
* @param mbox pointer to a message box object
* @return pointer to the text of the message box
*/
const char * lv_mbox_get_txt(lv_obj_t * mbox);
/**
* Get the message box object from one of its button.
* It is useful in the button release actions where only the button is known
* @param btn pointer to a button of a message box
* @return pointer to the button's message box
*/
lv_obj_t * lv_mbox_get_from_btn(lv_obj_t * btn);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_mboxs_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_mboxs_t style
*/
lv_mboxs_t * lv_mboxs_get(lv_mboxs_builtin_t style, lv_mboxs_t * copy);
/**********************
* MACROS
......
......@@ -52,8 +52,30 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* 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
*/
lv_obj_t * lv_templ_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the template
* @param templ pointer to a template object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_templs_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_templs_t style
*/
lv_templs_t * lv_templs_get(lv_templs_builtin_t style, lv_templs_t * copy);
/**********************
......
......@@ -74,17 +74,67 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/*Create function*/
/**
* Create a page objects
* @param par pointer to an object, it will be the parent of the new page
* @param copy pointer to a page object, if not NULL then the new object will be copied from it
* @return pointer to the created page
*/
lv_obj_t * lv_page_create(lv_obj_t * par, lv_obj_t * copy);
lv_pages_t * lv_pages_get(lv_pages_builtin_t style, lv_pages_t * copy);
bool lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param);
/**
* Signal function of the page
* @param page pointer to a page object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param);
/**
* Set a release action for the page
* @param page pointer to a page object
* @param rel_action a function to call when the page is released
*/
void lv_page_set_rel_action(lv_obj_t * page, lv_action_t rel_action);
/**
* Set a press action for the page
* @param page pointer to a page object
* @param pr_action a function to call when the page is pressed
*/
void lv_page_set_pr_action(lv_obj_t * page, lv_action_t pr_action);
/**
* Glue the object to the page. After it the page can be moved (dragged) with this object too.
* @param obj pointer to an object on a page
* @param glue true: enable glue, false: disable glue
*/
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
*/
void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, bool anim_en);
/**
* Get the scrollable object of a page-
* @param page pointer to page object
* @return pointer to rectangle which is the scrollable part of the page
*/
lv_obj_t * lv_page_get_scrl(lv_obj_t * page);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_pages_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_pages_t style
*/
lv_pages_t * lv_pages_get(lv_pages_builtin_t style, lv_pages_t * copy);
/**********************
* MACROS
**********************/
......
......@@ -62,13 +62,59 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a progress bar objects
* @param par pointer to an object, it will be the parent of the new progress bar
* @param copy pointer to a progress bar object, if not NULL then the new object will be copied from it
* @return pointer to the created progress bar
*/
lv_obj_t * lv_pb_create(lv_obj_t * par, lv_obj_t * copy);
bool lv_pb_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
void lv_pb_set_value(lv_obj_t * obj, uint16_t value);
void lv_pb_set_min_max_value(lv_obj_t * obj, uint16_t min, uint16_t max);
void lv_pb_set_format_str(lv_obj_t * obj, const char * format);
uint16_t lv_pb_get_value(lv_obj_t * obj);
lv_pbs_t * lv_pbs_get(lv_pbs_builtin_t style, lv_pbs_t * copy_p);
/**
* Signal function of the progress bar
* @param pb pointer to a progress bar object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_pb_signal(lv_obj_t * pb, lv_signal_t sign, void * param);
/**
* Set a new value on the progress bar
* @param pb pointer to a progress bar object
* @param value new value
*/
void lv_pb_set_value(lv_obj_t * pb, uint16_t value);
/**
* Set minimum and the maximum values of a progress bar
* @param pb pointer to he progress bar object
* @param min minimum value
* @param max maximum value
*/
void lv_pb_set_min_max_value(lv_obj_t * pb, uint16_t min, uint16_t max);
/**
* Set format string for the label of the progress bar
* @param pb pointer to progress bar object
* @param format a printf-like format string with one number (e.g. "Loading (%d)")
*/
void lv_pb_set_format_str(lv_obj_t * pb, const char * format);
/**
* Get the value of a progress bar
* @param pb pointer to a progress bar object
* @return the value of the progress bar
*/
uint16_t lv_pb_get_value(lv_obj_t * pb);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_pbs_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_pbs_t style
*/
lv_pbs_t * lv_pbs_get(lv_pbs_builtin_t style, lv_pbs_t * copy);
/**********************
* MACROS
......
......@@ -66,10 +66,10 @@ static lv_rects_t lv_rects_border;
*-----------------*/
/**
* Create a label objects
* @param par pointer to an object, it will be the parent of the new label
* Create a rectangle objects
* @param par pointer to an object, it will be the parent of the new rectangle
* @param copy pointer to a rectangle object, if not NULL then the new object will be copied from it
* @return pointer to the created label
* @return pointer to the created rectangle
*/
lv_obj_t * lv_rect_create(lv_obj_t * par, lv_obj_t * copy)
{
......@@ -670,7 +670,7 @@ static void lv_rect_layout_grid(lv_obj_t * rect)
* Handle auto fit. Set the size of the object to involve all children.
* @param rect pointer to an object which size will be modified
*/
void lv_rect_refr_autofit(lv_obj_t * rect)
static void lv_rect_refr_autofit(lv_obj_t * rect)
{
lv_rect_ext_t * ext = lv_obj_get_ext(rect);
......
......@@ -77,16 +77,66 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/*Create function*/
/**
* Create a rectangle objects
* @param par pointer to an object, it will be the parent of the new rectangle
* @param copy pointer to a rectangle object, if not NULL then the new object will be copied from it
* @return pointer to the created rectangle
*/
lv_obj_t * lv_rect_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the rectangle
* @param rect pointer to a rectangle object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_rect_signal(lv_obj_t * rect, lv_signal_t sign, void * param);
void lv_rect_set_fit(lv_obj_t * rect, bool hor_en, bool ver_en);
/**
* Set the layout on a rectangle
* @param rect pointer to a rectangle object
* @param layout a layout from 'lv_rect_layout_t'
*/
void lv_rect_set_layout(lv_obj_t * rect, lv_rect_layout_t layout);
/**
* Enable the horizontal or vertical fit.
* The rectangle size will be set to involve the children horizontally or vertically.
* @param rect pointer to a rectangle object
* @param hor_en true: enable the horizontal padding
* @param ver_en true: enable the vertical padding
*/
void lv_rect_set_fit(lv_obj_t * rect, bool hor_en, bool ver_en);
/**
* Get the layout of a rectangle
* @param rect pointer to rectangle object
* @return the layout from 'lv_rect_layout_t'
*/
lv_rect_layout_t lv_rect_get_layout(lv_obj_t * rect);
/**
* Get horizontal fit enable attribute of a rectangle
* @param rect pointer to a rectangle object
* @return true: horizontal padding is enabled
*/
bool lv_rect_get_hfit(lv_obj_t * rect);
/**
* Get vertical fit enable attribute of a rectangle
* @param obj pointer to a rectangle object
* @return true: vertical padding is enabled
*/
bool lv_rect_get_vfit(lv_obj_t * rect);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_rects_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_rects_t style
*/
lv_rects_t * lv_rects_get(lv_rects_builtin_t style, lv_rects_t * copy);
/**********************
......
......@@ -67,24 +67,105 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a text area objects
* @param par pointer to an object, it will be the parent of the new text area
* @param copy pointer to a text area object, if not NULL then the new object will be copied from it
* @return pointer to the created text area
*/
lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the text area
* @param ta pointer to a text area object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param);
lv_tas_t * lv_tas_get(lv_tas_builtin_t style, lv_tas_t * copy);
/**
* Insert a character to the current cursor position
* @param ta pointer to a text area object
* @param c a character
*/
void lv_ta_add_char(lv_obj_t * ta, char c);
/**
* Insert a text to the current cursor position
* @param ta pointer to a text area object
* @param txt a '\0' terminated string to insert
*/
void lv_ta_add_text(lv_obj_t * ta, const char * txt);
/**
* Set the text of a text area
* @param ta pointer to a text area
* @param txt pointer to the text
*/
void lv_ta_set_text(lv_obj_t * ta, const char * txt);
/**
* Delete a the left character from the current cursor position
* @param ta pointer to a text area object
*/
void lv_ta_del(lv_obj_t * ta);
/**
* Set the cursor position
* @param obj pointer to a text area object
* @param pos the new cursor position in character index
* < 0 : index from the end of the text
* LV_TA_CUR_LAST: go after the last character
*/
void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos);
void lv_ta_cursor_right (lv_obj_t * ta);
void lv_ta_cursor_left(lv_obj_t * taj);
/**
* Move the cursor one character right
* @param ta pointer to a text area object
*/
void lv_ta_cursor_right(lv_obj_t * ta);
/**
* Move the cursor one character left
* @param ta pointer to a text area object
*/
void lv_ta_cursor_left(lv_obj_t * ta);
/**
* Move the cursor one line down
* @param ta pointer to a text area object
*/
void lv_ta_cursor_down(lv_obj_t * ta);
/**
* Move the cursor one line up
* @param ta pointer to a text area object
*/
void lv_ta_cursor_up(lv_obj_t * ta);
/**
* Get the text of the i the text area
* @param ta obj pointer to a text area object
* @return pointer to the text
*/
const char * lv_ta_get_txt(lv_obj_t * ta);
/**
* Get the current cursor position in character index
* @param ta pointer to a text area object
* @return the cursor position
*/
uint16_t lv_ta_get_cursor_pos(lv_obj_t * ta);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_tas_builtin_t enum
* @param copy copy the style to this variable. (NULL if unused)
* @return pointer to an lv_tas_t style
*/
lv_tas_t * lv_tas_get(lv_tas_builtin_t style, lv_tas_t * copy);
/**********************
* MACROS
......
......@@ -88,16 +88,74 @@ typedef struct
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a window objects
* @param par pointer to an object, it will be the parent of the new window
* @param copy pointer to a window object, if not NULL then
lv_win_add_ctrl_btn(app->win, "U:/close", lv_app_win_close_action);
lv_win_add_ctrl_btn(app->win, "U:/close", lv_app_win_close_action);
lv_win_add_ctrl_btn(app->win, "U:/close", lv_app_win_close_action);the new object will be copied from it
* @return pointer to the created window
*/
lv_obj_t * lv_win_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the window
* @param win pointer to a window object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param);
lv_wins_t * lv_wins_get(lv_wins_builtin_t style, lv_wins_t * copy);
lv_obj_t * lv_win_add_ctrl_btn(lv_obj_t * win, const char * img, lv_action_t rel_action);
/**
* Add control button to the header of the window
* @param win pointer to a window object
* @param img_path path of an image on the control button
* @param rel_action a function pointer to call when the button is released
* @return pointer to the created button object
*/
lv_obj_t * lv_win_add_ctrl_btn(lv_obj_t * win, const char * img_path, lv_action_t rel_action);
/**
* A release action which can be assigned to a window control button to close it
* @param btn pointer to the released button
* @param dispi pointer to the caller display input
* @return always false because the button is deleted with the window
*/
bool lv_win_close_action(lv_obj_t * btn, lv_dispi_t * dispi);
/**
* Set the title of a window
* @param win pointer to a window object
* @param title string of the new title
*/
void lv_win_set_title(lv_obj_t * win, const char * title);
/**
* Get the title of a window
* @param win pointer to a window object
* @return title string of the window
*/
const char * lv_win_get_title(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 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_ctrl_btn(lv_obj_t * ctrl_btn);
/**
* Return with a pointer to a built-in style and/or copy it to a variable
* @param style a style name from lv_wins_builtin_t enum
* @param copy_p copy the style to this variable. (NULL if unused)
* @return pointer to an lv_wins_t style
*/
lv_wins_t * lv_wins_get(lv_wins_builtin_t style, lv_wins_t * copy);
/**********************
* MACROS
**********************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment