api(style) add lv_style_selector_t instead of lv_part_t and lv_state_t in style API

This commit is contained in:
Gabor Kiss-Vamosi
2021-03-31 19:57:14 +02:00
parent 0527874f8d
commit 663bcfd030
63 changed files with 763 additions and 734 deletions

View File

@@ -116,12 +116,12 @@ def style_set(p):
def local_style_set(p):
func_cast = get_func_cast(p['style_type'])
print("static inline void lv_obj_set_style_" + p['name'].lower() + "(struct _lv_obj_t * obj, uint32_t part, uint32_t state, " + p['var_type'] +" value)")
print("static inline void lv_obj_set_style_" + p['name'].lower() + "(struct _lv_obj_t * obj, " + p['var_type'] +" value, lv_style_selector_t selector)")
print("{")
print(" lv_style_value_t v = {")
print(" ." + p['style_type'] +" = " + func_cast + "value")
print(" };")
print(" lv_obj_set_local_style_prop(obj, part, state, LV_STYLE_" + p['name'] +", v);")
print(" lv_obj_set_local_style_prop(obj, LV_STYLE_" + p['name'] +", v, selector);")
print("}")
print("")