-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(property): add property name #6329
Conversation
Property ID contains the property index number and property type. Check if the property index is in range or not. Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
0975b05
to
6b311c2
Compare
LGTM |
It seems to be very useful for us with the editor too. It looks good to me, but @coevin @liamHowatt and @richardgazdik could you also take look at it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool metaprogramming and use of bsearch 🙂
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
Since now lv_point_t is a basic property value type, pivot can be treated as a normal value instead of void * pointer. Add a test for it Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
{"flag_checkable", LV_PROPERTY_OBJ_FLAG_CHECKABLE,}, | ||
{"flag_click_focusable", LV_PROPERTY_OBJ_FLAG_CLICK_FOCUSABLE,}, | ||
{"flag_clickable", LV_PROPERTY_OBJ_FLAG_CLICKABLE,}, | ||
{"flag_end", LV_PROPERTY_OBJ_FLAG_END,}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid adding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you concerned about the flash size? flag
is treated as a property so it's automatically included here. Maybe we should remove the flag
property totally?
{"flag_checkable", LV_PROPERTY_OBJ_FLAG_CHECKABLE,}, | ||
{"flag_click_focusable", LV_PROPERTY_OBJ_FLAG_CLICK_FOCUSABLE,}, | ||
{"flag_clickable", LV_PROPERTY_OBJ_FLAG_CLICKABLE,}, | ||
{"flag_end", LV_PROPERTY_OBJ_FLAG_END,}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you concerned about the flash size? flag
is treated as a property so it's automatically included here. Maybe we should remove the flag
property totally?
Description of the feature or fix
Binding language like
lua
orjs
prefer to use name to set property.This patch is one of the series to make bindings easier to set widget property.
Added a table to convert property name to ID. The name table is generated automatically though
properties.py
script, based on the property ID definitions.If the name is not provided for specified widget, then recursively looking up its base classes.
bsearch
is used to match up strings.The test has passed.
This API is experimental and is subject to change if binding language requires differently.
Notes
lv_conf_template.h
run lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py
(astyle version v3.4.12 needs to be installed) and follow the Code Conventions.