aboutsummaryrefslogtreecommitdiff
path: root/scripts/style_api_gen.py
diff options
context:
space:
mode:
authorLiam <30486941+liamHowatt@users.noreply.github.com>2024-08-02 01:46:42 -0400
committerGitHub <noreply@github.com>2024-08-02 07:46:42 +0200
commit1d14386b99cdff731cc3367d1d8b5e96ffb8fcea (patch)
tree6c0ac804a785f54efebd372fd7070a5e2f840036 /scripts/style_api_gen.py
parenta8c8275b560fa74b8bdd72d1d180c98d22a33fc8 (diff)
downloadlvgl-1d14386b99cdff731cc3367d1d8b5e96ffb8fcea.tar.gz
lvgl-1d14386b99cdff731cc3367d1d8b5e96ffb8fcea.zip
refactor(API): don't expose private symbols in lvgl.h. phase-out "_lv*" names (#6068)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Diffstat (limited to 'scripts/style_api_gen.py')
-rwxr-xr-xscripts/style_api_gen.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py
index ad665f209..784763218 100755
--- a/scripts/style_api_gen.py
+++ b/scripts/style_api_gen.py
@@ -492,7 +492,7 @@ def obj_style_get(p):
if 'filtered' in p and p['filtered']:
print("static inline " + p['var_type'] + " lv_obj_get_style_" + p['name'].lower() +"_filtered(const lv_obj_t * obj, lv_part_t part)")
print("{")
- print(" lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_" + p['name'] + "));")
+ print(" lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_" + p['name'] + "));")
print(" return " + cast + "v." + p['style_type'] + ";")
print("}")
print("")
@@ -518,15 +518,12 @@ def style_set_c(p):
print(" };")
print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", v);")
print("}")
- print("")
- print("const lv_style_prop_t _lv_style_const_prop_id_" + p['name'] + " = LV_STYLE_" + p['name'] + ";")
def style_set_h(p):
if 'section' in p: return
print("void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value);")
- print("LV_ATTRIBUTE_EXTERN_DATA extern const lv_style_prop_t _lv_style_const_prop_id_" + p['name'] + ";")
def local_style_set_c(p):
@@ -555,7 +552,7 @@ def style_const_set(p):
print("")
print("#define LV_STYLE_CONST_" + p['name'] + "(val) \\")
print(" { \\")
- print(" .prop_ptr = &_lv_style_const_prop_id_" + p['name'] + ", .value = { ." + p['style_type'] +" = " + cast + "val } \\")
+ print(" .prop = LV_STYLE_" + p['name'] + ", .value = { ." + p['style_type'] +" = " + cast + "val } \\")
print(" }")
@@ -643,6 +640,7 @@ extern "C" {
print("#include \"../misc/lv_area.h\"")
print("#include \"../misc/lv_style.h\"")
print("#include \"../core/lv_obj_style.h\"")
+print("#include \"../misc/lv_types.h\"")
print()
guard = ""