Skip to content

Commit

Permalink
feat(gen): add lvgl_private.h to the binding
Browse files Browse the repository at this point in the history
see #6068
  • Loading branch information
kisvegabor committed May 20, 2024
1 parent 8aba1e9 commit 918326f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion gen/gen_mpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from itertools import chain
from functools import lru_cache
import json
import os

def memoize(func):
@lru_cache(maxsize=1000000)
Expand Down Expand Up @@ -722,6 +723,18 @@ def register_int_ptr_type(convertor, *types):
# Emit Header
#

headers = args.input
for header in headers:
if 'lvgl.h' in header:
path, _ = os.path.split(header)
if path and path != 'lvgl.h':
path = os.path.join(path, 'src', 'lvgl_private.h')
else:
path = 'src/lvgl_private.h'

headers.append(path)
break

print ("""
/*
* Auto-Generated file, DO NOT EDIT!
Expand Down Expand Up @@ -760,7 +773,7 @@ def register_int_ptr_type(convertor, *types):
cmd_line=' '.join(argv),
pp_cmd=pp_cmd,
objs=", ".join(['%s(%s)' % (objname, parent_obj_names[objname]) for objname in obj_names]),
lv_headers='\n'.join('#include "%s"' % header for header in args.input)))
lv_headers='\n'.join('#include "%s"' % header for header in headers)))

#
# Enable objects, if supported
Expand Down

0 comments on commit 918326f

Please sign in to comment.