BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
05fe9b6b
Commit
05fe9b6b
authored
Feb 28, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add lv_obj_get_type
parent
e4b677be
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
254 additions
and
13 deletions
+254
-13
lv_obj.c
lv_core/lv_obj.c
+42
-13
lv_obj.h
lv_core/lv_obj.h
+16
-0
lv_bar.c
lv_objx/lv_bar.c
+8
-0
lv_btn.c
lv_objx/lv_btn.c
+8
-0
lv_btnm.c
lv_objx/lv_btnm.c
+8
-0
lv_cb.c
lv_objx/lv_cb.c
+8
-0
lv_chart.c
lv_objx/lv_chart.c
+8
-0
lv_cont.c
lv_objx/lv_cont.c
+8
-0
lv_ddlist.c
lv_objx/lv_ddlist.c
+8
-0
lv_gauge.c
lv_objx/lv_gauge.c
+8
-0
lv_img.c
lv_objx/lv_img.c
+8
-0
lv_kb.c
lv_objx/lv_kb.c
+8
-0
lv_label.c
lv_objx/lv_label.c
+8
-0
lv_led.c
lv_objx/lv_led.c
+10
-0
lv_line.c
lv_objx/lv_line.c
+10
-0
lv_list.c
lv_objx/lv_list.c
+8
-0
lv_lmeter.c
lv_objx/lv_lmeter.c
+8
-0
lv_mbox.c
lv_objx/lv_mbox.c
+8
-0
lv_objx_templ.c
lv_objx/lv_objx_templ.c
+8
-0
lv_page.c
lv_objx/lv_page.c
+8
-0
lv_roller.c
lv_objx/lv_roller.c
+8
-0
lv_slider.c
lv_objx/lv_slider.c
+8
-0
lv_sw.c
lv_objx/lv_sw.c
+8
-0
lv_ta.c
lv_objx/lv_ta.c
+8
-0
lv_tabview.c
lv_objx/lv_tabview.c
+8
-0
lv_win.c
lv_objx/lv_win.c
+8
-0
No files found.
lv_core/lv_obj.c
View file @
05fe9b6b
...
...
@@ -1353,6 +1353,34 @@ void * lv_obj_get_ext_attr(lv_obj_t * obj)
return
obj
->
ext_attr
;
}
/**
* Get object's and its ancestors type. Put their name in `type_buf` starting with the current type.
* E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj"
* @param obj pointer to an object which type should be get
* @param buf pointer to an `lv_obj_type_t` buffer to store the types
*/
void
lv_obj_get_type
(
lv_obj_t
*
obj
,
lv_obj_type_t
*
buf
)
{
lv_obj_type_t
tmp
;
memset
(
buf
,
0
,
sizeof
(
lv_obj_type_t
));
memset
(
&
tmp
,
0
,
sizeof
(
lv_obj_type_t
));
obj
->
signal_func
(
obj
,
LV_SIGNAL_GET_TYPE
,
&
tmp
);
uint8_t
cnt
;
for
(
cnt
=
0
;
cnt
<
LV_MAX_ANCESTOR_NUM
;
cnt
++
)
{
if
(
tmp
.
type
[
cnt
]
==
NULL
)
break
;
}
/*Swap the order. The real type comes first*/
uint8_t
i
;
for
(
i
=
0
;
i
<
cnt
;
i
++
)
{
buf
->
type
[
i
]
=
tmp
.
type
[
cnt
-
1
-
i
];
}
}
#ifdef LV_OBJ_FREE_NUM_TYPE
/**
* Get the free number
...
...
@@ -1377,6 +1405,7 @@ void * lv_obj_get_free_ptr(lv_obj_t * obj)
}
#endif
#if USE_LV_GROUP
/**
* Get the group of the object
...
...
@@ -1451,19 +1480,19 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
lv_res_t
res
=
LV_RES_OK
;
lv_style_t
*
style
=
lv_obj_get_style
(
obj
);
switch
(
sign
)
{
case
LV_SIGNAL_CHILD_CHG
:
/*Return 'invalid' if the child change signal is not enabled*/
if
(
lv_obj_is_protected
(
obj
,
LV_PROTECT_CHILD_CHG
)
!=
false
)
res
=
LV_RES_INV
;
break
;
case
LV_SIGNAL_REFR_EXT_SIZE
:
if
(
style
->
body
.
shadow
.
width
>
obj
->
ext_size
)
obj
->
ext_size
=
style
->
body
.
shadow
.
width
;
break
;
case
LV_SIGNAL_STYLE_CHG
:
lv_obj_refresh_ext_size
(
obj
);
break
;
default:
break
;
if
(
sign
==
LV_SIGNAL_CHILD_CHG
)
{
/*Return 'invalid' if the child change signal is not enabled*/
if
(
lv_obj_is_protected
(
obj
,
LV_PROTECT_CHILD_CHG
)
!=
false
)
res
=
LV_RES_INV
;
}
else
if
(
sign
==
LV_SIGNAL_REFR_EXT_SIZE
)
{
if
(
style
->
body
.
shadow
.
width
>
obj
->
ext_size
)
obj
->
ext_size
=
style
->
body
.
shadow
.
width
;
}
else
if
(
sign
==
LV_SIGNAL_STYLE_CHG
)
{
lv_obj_refresh_ext_size
(
obj
);
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
buf
->
type
[
0
]
=
"lv_obj"
;
}
return
res
;
...
...
lv_core/lv_obj.h
View file @
05fe9b6b
...
...
@@ -52,6 +52,7 @@ extern "C" {
#define LV_ANIM_OUT 0x80
/*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/
#define LV_ANIM_DIR_MASK 0x80
/*ANIM_IN/ANIM_OUT mask*/
#define LV_MAX_ANCESTOR_NUM 8
/**********************
* TYPEDEFS
**********************/
...
...
@@ -81,6 +82,7 @@ typedef enum
LV_SIGNAL_CORD_CHG
,
LV_SIGNAL_STYLE_CHG
,
LV_SIGNAL_REFR_EXT_SIZE
,
LV_SIGNAL_GET_TYPE
,
/*Input device related*/
LV_SIGNAL_PRESSED
,
...
...
@@ -151,6 +153,12 @@ typedef enum
LV_PROTECT_PRESS_LOST
=
0x10
,
/*TODO */
}
lv_protect_t
;
/*Used by `lv_obj_get_type()`. The object's and its ancestor types are stored here*/
typedef
struct
{
const
char
*
type
[
LV_MAX_ANCESTOR_NUM
];
/*[0]: the actual type, [1]: ancestor, [2] #1's ancestor ... [x]: "lv_obj" */
}
lv_obj_type_t
;
typedef
enum
{
LV_ALIGN_CENTER
=
0
,
...
...
@@ -677,6 +685,14 @@ lv_design_func_t lv_obj_get_design_func(lv_obj_t * obj);
*/
void
*
lv_obj_get_ext_attr
(
lv_obj_t
*
obj
);
/**
* Get object's and its ancestors type. Put their name in `type_buf` starting with the current type.
* E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj"
* @param obj pointer to an object which type should be get
* @param buf pointer to an `lv_obj_type_t` buffer to store the types
*/
void
lv_obj_get_type
(
lv_obj_t
*
obj
,
lv_obj_type_t
*
buf
);
#ifdef LV_OBJ_FREE_NUM_TYPE
/**
* Get the free number
...
...
lv_objx/lv_bar.c
View file @
05fe9b6b
...
...
@@ -318,6 +318,14 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param)
lv_style_t
*
style_indic
=
lv_bar_get_style
(
bar
,
LV_BAR_STYLE_INDIC
);
if
(
style_indic
->
body
.
shadow
.
width
>
bar
->
ext_size
)
bar
->
ext_size
=
style_indic
->
body
.
shadow
.
width
;
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_bar"
;
}
return
res
;
}
...
...
lv_objx/lv_btn.c
View file @
05fe9b6b
...
...
@@ -388,6 +388,14 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
}
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_btn"
;
}
return
res
;
}
...
...
lv_objx/lv_btnm.c
View file @
05fe9b6b
...
...
@@ -593,6 +593,14 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
}
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_btnm"
;
}
}
return
res
;
...
...
lv_objx/lv_cb.c
View file @
05fe9b6b
...
...
@@ -309,6 +309,14 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param)
lv_btn_set_state
(
ext
->
bullet
,
lv_btn_get_state
(
cb
));
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_cb"
;
}
return
res
;
}
...
...
lv_objx/lv_chart.c
View file @
05fe9b6b
...
...
@@ -436,6 +436,14 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param
}
lv_ll_clear
(
&
ext
->
series_ll
);
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_chart"
;
}
return
res
;
}
...
...
lv_objx/lv_cont.c
View file @
05fe9b6b
...
...
@@ -207,6 +207,14 @@ static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param)
lv_cont_refr_autofit
(
cont
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_cont"
;
}
return
res
;
}
...
...
lv_objx/lv_ddlist.c
View file @
05fe9b6b
...
...
@@ -537,6 +537,14 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
lv_ddlist_refr_size
(
ddlist
,
true
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_ddlist"
;
}
return
res
;
}
...
...
lv_objx/lv_gauge.c
View file @
05fe9b6b
...
...
@@ -308,6 +308,14 @@ static lv_res_t lv_gauge_signal(lv_obj_t * gauge, lv_signal_t sign, void * param
lv_mem_free
(
ext
->
values
);
ext
->
values
=
NULL
;
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_gauge"
;
}
return
res
;
}
...
...
lv_objx/lv_img.c
View file @
05fe9b6b
...
...
@@ -352,6 +352,14 @@ static lv_res_t lv_img_signal(lv_obj_t * img, lv_signal_t sign, void * param)
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_img"
;
}
return
res
;
}
...
...
lv_objx/lv_kb.c
View file @
05fe9b6b
...
...
@@ -346,6 +346,14 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param)
if
(
sign
==
LV_SIGNAL_CLEANUP
)
{
/*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_kb"
;
}
return
res
;
}
...
...
lv_objx/lv_label.c
View file @
05fe9b6b
...
...
@@ -714,6 +714,14 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param
label
->
ext_size
=
LV_MATH_MAX
(
label
->
ext_size
,
style
->
body
.
padding
.
ver
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_label"
;
}
return
res
;
}
...
...
lv_objx/lv_led.c
View file @
05fe9b6b
...
...
@@ -219,6 +219,16 @@ static lv_res_t lv_led_signal(lv_obj_t * led, lv_signal_t sign, void * param)
res
=
ancestor_signal
(
led
,
sign
,
param
);
if
(
res
!=
LV_RES_OK
)
return
res
;
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_led"
;
}
return
res
;
}
#endif
lv_objx/lv_line.c
View file @
05fe9b6b
...
...
@@ -246,6 +246,16 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param)
res
=
ancestor_signal
(
line
,
sign
,
param
);
if
(
res
!=
LV_RES_OK
)
return
res
;
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_line"
;
}
return
res
;
}
#endif
lv_objx/lv_list.c
View file @
05fe9b6b
...
...
@@ -575,6 +575,14 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param)
if
(
rel_action
!=
NULL
)
rel_action
(
btn
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_list"
;
}
}
return
res
;
}
...
...
lv_objx/lv_lmeter.c
View file @
05fe9b6b
...
...
@@ -326,6 +326,14 @@ static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * par
if
(
sign
==
LV_SIGNAL_CLEANUP
)
{
/*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_lmeter"
;
}
return
res
;
}
...
...
lv_objx/lv_mbox.c
View file @
05fe9b6b
...
...
@@ -365,6 +365,14 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param)
ext
->
btnm
->
signal_func
(
ext
->
btnm
,
sign
,
param
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_mbox"
;
}
return
res
;
}
...
...
lv_objx/lv_objx_templ.c
View file @
05fe9b6b
...
...
@@ -210,6 +210,14 @@ static lv_res_t lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param
if
(
sign
==
LV_SIGNAL_CLEANUP
)
{
/*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_templ"
;
}
return
res
;
}
...
...
lv_objx/lv_page.c
View file @
05fe9b6b
...
...
@@ -517,6 +517,14 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param)
if
(
page
->
ext_size
<
(
-
ext
->
sb
.
style
->
body
.
padding
.
hor
))
page
->
ext_size
=
-
ext
->
sb
.
style
->
body
.
padding
.
hor
;
if
(
page
->
ext_size
<
(
-
ext
->
sb
.
style
->
body
.
padding
.
ver
))
page
->
ext_size
=
-
ext
->
sb
.
style
->
body
.
padding
.
ver
;
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_page"
;
}
return
res
;
}
...
...
lv_objx/lv_roller.c
View file @
05fe9b6b
...
...
@@ -312,6 +312,14 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
}
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_roller"
;
}
return
res
;
}
...
...
lv_objx/lv_slider.c
View file @
05fe9b6b
...
...
@@ -443,6 +443,14 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par
if
(
ext
->
action
!=
NULL
)
ext
->
action
(
slider
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_slider"
;
}
return
res
;
}
...
...
lv_objx/lv_sw.c
View file @
05fe9b6b
...
...
@@ -236,6 +236,14 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
ext
->
changed
=
0
;
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_sw"
;
}
/*Restore the callback*/
ext
->
slider
.
action
=
slider_cb
;
...
...
lv_objx/lv_ta.c
View file @
05fe9b6b
...
...
@@ -958,6 +958,14 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param)
#endif
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_ta"
;
}
return
res
;
}
...
...
lv_objx/lv_tabview.c
View file @
05fe9b6b
...
...
@@ -516,6 +516,14 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p
ext
->
btns
->
signal_func
(
ext
->
btns
,
sign
,
param
);
}
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_tabview"
;
}
return
res
;
}
...
...
lv_objx/lv_win.c
View file @
05fe9b6b
...
...
@@ -453,6 +453,14 @@ static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param)
ext
->
page
=
NULL
;
ext
->
title
=
NULL
;
}
else
if
(
sign
==
LV_SIGNAL_GET_TYPE
)
{
lv_obj_type_t
*
buf
=
param
;
uint8_t
i
;
for
(
i
=
0
;
i
<
LV_MAX_ANCESTOR_NUM
-
1
;
i
++
)
{
/*Find the last set data*/
if
(
buf
->
type
[
i
]
==
NULL
)
break
;
}
buf
->
type
[
i
]
=
"lv_win"
;
}
return
res
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment