add lv_imgbtn
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
//#include "lv_templ.h" /*TODO uncomment this*/
|
||||
#if USE_LV_TEMPL != 0
|
||||
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@@ -59,10 +58,12 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
/*TODO modify it to the ancestor create function */
|
||||
lv_obj_t * new_templ = lv_ANCESTOR_create(par, copy);
|
||||
lv_mem_assert(new_templ);
|
||||
if(new_templ == NULL) return NULL;
|
||||
|
||||
/*Allocate the template type specific extended data*/
|
||||
lv_templ_ext_t * ext = lv_obj_allocate_ext_attr(new_templ, sizeof(lv_templ_ext_t));
|
||||
lv_mem_assert(ext);
|
||||
if(ext == NULL) return NULL;
|
||||
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_templ);
|
||||
if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_templ);
|
||||
|
||||
@@ -87,7 +88,6 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
|
||||
LV_LOG_INFO("template created");
|
||||
|
||||
|
||||
return new_templ;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
* @param templ pointer to template object
|
||||
* @param type which style should be set
|
||||
* @param style pointer to a style
|
||||
* */
|
||||
*/
|
||||
void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * style)
|
||||
{
|
||||
lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ);
|
||||
@@ -140,7 +140,7 @@ void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * st
|
||||
* @param templ pointer to template object
|
||||
* @param type which style should be get
|
||||
* @return style pointer to the style
|
||||
* */
|
||||
*/
|
||||
lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type)
|
||||
{
|
||||
lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ);
|
||||
|
||||
Reference in New Issue
Block a user