Skip to content

Commit

Permalink
#570 eez-flow latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 8, 2024
1 parent 242ceef commit ffe1519
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 17 deletions.
68 changes: 52 additions & 16 deletions resources/eez-framework-amalgamation/eez-flow.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Autogenerated on October 5, 2024 1:15:05 PM from eez-framework commit 0a0ef0e436676cb8b65d35398a878294623528c6 */
/* Autogenerated on October 8, 2024 8:26:20 AM from eez-framework commit 85345abb5051f25daa824fb7a125d6d3ac0196ba */
/*
* eez-framework
*
Expand Down Expand Up @@ -3768,21 +3768,21 @@ void executeLoopComponent(FlowState *flowState, unsigned componentIndex) {
#if defined(EEZ_FOR_LVGL)
namespace eez {
namespace flow {
void anim_callback_set_x(lv_anim_t * a, int32_t v) { lv_obj_set_x((lv_obj_t *)a->user_data, v); }
void anim_callback_set_x(void *obj, int32_t v) { lv_obj_set_x((lv_obj_t *)obj, v); }
int32_t anim_callback_get_x(lv_anim_t * a) { return lv_obj_get_x_aligned((lv_obj_t *)a->user_data); }
void anim_callback_set_y(lv_anim_t * a, int32_t v) { lv_obj_set_y((lv_obj_t *)a->user_data, v); }
void anim_callback_set_y(void *obj, int32_t v) { lv_obj_set_y((lv_obj_t *)obj, v); }
int32_t anim_callback_get_y(lv_anim_t * a) { return lv_obj_get_y_aligned((lv_obj_t *)a->user_data); }
void anim_callback_set_width(lv_anim_t * a, int32_t v) { lv_obj_set_width((lv_obj_t *)a->user_data, v); }
void anim_callback_set_width(void *obj, int32_t v) { lv_obj_set_width((lv_obj_t *)obj, v); }
int32_t anim_callback_get_width(lv_anim_t * a) { return lv_obj_get_width((lv_obj_t *)a->user_data); }
void anim_callback_set_height(lv_anim_t * a, int32_t v) { lv_obj_set_height((lv_obj_t *)a->user_data, v); }
void anim_callback_set_height(void *obj, int32_t v) { lv_obj_set_height((lv_obj_t *)obj, v); }
int32_t anim_callback_get_height(lv_anim_t * a) { return lv_obj_get_height((lv_obj_t *)a->user_data); }
void anim_callback_set_opacity(lv_anim_t * a, int32_t v) { lv_obj_set_style_opa((lv_obj_t *)a->user_data, v, 0); }
void anim_callback_set_opacity(void *obj, int32_t v) { lv_obj_set_style_opa((lv_obj_t *)obj, v, 0); }
int32_t anim_callback_get_opacity(lv_anim_t * a) { return lv_obj_get_style_opa((lv_obj_t *)a->user_data, 0); }
void anim_callback_set_image_zoom(lv_anim_t * a, int32_t v) { lv_img_set_zoom((lv_obj_t *)a->user_data, v); }
void anim_callback_set_image_zoom(void *obj, int32_t v) { lv_img_set_zoom((lv_obj_t *)obj, v); }
int32_t anim_callback_get_image_zoom(lv_anim_t * a) { return lv_img_get_zoom((lv_obj_t *)a->user_data); }
void anim_callback_set_image_angle(lv_anim_t * a, int32_t v) { lv_img_set_angle((lv_obj_t *)a->user_data, v); }
void anim_callback_set_image_angle(void *obj, int32_t v) { lv_img_set_angle((lv_obj_t *)obj, v); }
int32_t anim_callback_get_image_angle(lv_anim_t * a) { return lv_img_get_angle((lv_obj_t *)a->user_data); }
void (*anim_set_callbacks[])(lv_anim_t *a, int32_t v) = {
lv_anim_exec_xcb_t anim_set_callbacks[] = {
anim_callback_set_x,
anim_callback_set_y,
anim_callback_set_width,
Expand All @@ -3791,7 +3791,7 @@ void (*anim_set_callbacks[])(lv_anim_t *a, int32_t v) = {
anim_callback_set_image_zoom,
anim_callback_set_image_angle
};
int32_t (*anim_get_callbacks[])(lv_anim_t *a) = {
lv_anim_get_value_cb_t anim_get_callbacks[] = {
anim_callback_get_x,
anim_callback_get_y,
anim_callback_get_width,
Expand Down Expand Up @@ -3868,7 +3868,8 @@ void executeLVGLComponent(FlowState *flowState, unsigned componentIndex) {
lv_anim_init(&anim);
lv_anim_set_time(&anim, specific->time);
lv_anim_set_user_data(&anim, target);
lv_anim_set_custom_exec_cb(&anim, anim_set_callbacks[specific->property]);
lv_anim_set_var(&anim, target);
lv_anim_set_exec_cb(&anim, anim_set_callbacks[specific->property]);
lv_anim_set_values(&anim, specific->start, specific->end);
lv_anim_set_path_cb(&anim, anim_path_callbacks[specific->path]);
lv_anim_set_delay(&anim, specific->delay);
Expand Down Expand Up @@ -4289,6 +4290,15 @@ ACTION_START(objSetX)
lv_obj_set_x(obj, (lv_coord_t)x);
#endif
ACTION_END
ACTION_START(objGetX)
WIDGET_PROP(obj);
#if LVGL_VERSION_MAJOR >= 9
int32_t x = (int32_t)lv_obj_get_x(obj);
#else
int32_t x = lv_obj_get_x(obj);
#endif
RESULT(result, Value(x, VALUE_TYPE_INT32));
ACTION_END
ACTION_START(objSetY)
WIDGET_PROP(obj);
INT32_PROP(y);
Expand All @@ -4298,6 +4308,15 @@ ACTION_START(objSetY)
lv_obj_set_y(obj, (lv_coord_t)y);
#endif
ACTION_END
ACTION_START(objGetY)
WIDGET_PROP(obj);
#if LVGL_VERSION_MAJOR >= 9
int32_t y = (int32_t)lv_obj_get_y(obj);
#else
int32_t y = lv_obj_get_y(obj);
#endif
RESULT(result, Value(y, VALUE_TYPE_INT32));
ACTION_END
ACTION_START(objSetWidth)
WIDGET_PROP(obj);
INT32_PROP(width);
Expand Down Expand Up @@ -4325,11 +4344,25 @@ ACTION_START(objSetHeight)
lv_obj_set_height(obj, (lv_coord_t)height);
#endif
ACTION_END
ACTION_START(objGetHeight)
WIDGET_PROP(obj);
#if LVGL_VERSION_MAJOR >= 9
int32_t height = (int32_t)lv_obj_get_height(obj);
#else
int32_t height = lv_obj_get_height(obj);
#endif
RESULT(result, Value(height, VALUE_TYPE_INT32));
ACTION_END
ACTION_START(objSetStyleOpa)
WIDGET_PROP(obj);
INT32_PROP(opa);
lv_obj_set_style_opa(obj, (lv_opa_t)opa, 0);
ACTION_END
ACTION_START(objGetStyleOpa)
WIDGET_PROP(obj);
int32_t opa = (int32_t)lv_obj_get_style_opa(obj, 0);
RESULT(result, Value(opa, VALUE_TYPE_INT32));
ACTION_END
ACTION_START(objAddStyle)
WIDGET_PROP(obj);
STYLE_PROP(style);
Expand Down Expand Up @@ -4498,8 +4531,6 @@ ACTION_END
BOOL_PROP(relative); \
BOOL_PROP(instant); \
INT32_PROP(path);
typedef void (*AnimSetCallback)(lv_anim_t * a, int32_t v);
typedef int32_t (*AnimGetCallback)(lv_anim_t * a);
void playAnimation(lv_obj_t *obj,
int32_t start,
int32_t end,
Expand All @@ -4508,14 +4539,15 @@ void playAnimation(lv_obj_t *obj,
bool relative,
bool instant,
int32_t path,
AnimSetCallback set_callback,
AnimGetCallback get_callback
lv_anim_exec_xcb_t set_callback,
lv_anim_get_value_cb_t get_callback
) {
lv_anim_t anim;
lv_anim_init(&anim);
lv_anim_set_time(&anim, time);
lv_anim_set_user_data(&anim, obj);
lv_anim_set_custom_exec_cb(&anim, set_callback);
lv_anim_set_var(&anim, obj);
lv_anim_set_exec_cb(&anim, set_callback);
lv_anim_set_values(&anim, start, end);
lv_anim_set_path_cb(&anim, anim_path_callbacks[path]);
lv_anim_set_delay(&anim, delay);
Expand Down Expand Up @@ -4558,11 +4590,15 @@ static ActionType actions[] = {
&changeScreen,
&changeToPreviousScreen,
&objSetX,
&objGetX,
&objSetY,
&objGetY,
&objSetWidth,
&objGetWidth,
&objSetHeight,
&objGetHeight,
&objSetStyleOpa,
&objGetStyleOpa,
&objAddStyle,
&objRemoveStyle,
&objSetFlagHidden,
Expand Down
2 changes: 1 addition & 1 deletion resources/eez-framework-amalgamation/eez-flow.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Autogenerated on October 5, 2024 1:15:05 PM from eez-framework commit 0a0ef0e436676cb8b65d35398a878294623528c6 */
/* Autogenerated on October 8, 2024 8:26:20 AM from eez-framework commit 85345abb5051f25daa824fb7a125d6d3ac0196ba */
/*
* eez-framework
*
Expand Down

0 comments on commit ffe1519

Please sign in to comment.