-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_new_template_with_flow.eez-project
215 lines (215 loc) · 10.3 KB
/
test_new_template_with_flow.eez-project
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
{
"lvglStyles": {
"objID": "a31bd004-35c5-b3fb-5c8b-78ea5c7693b8",
"styles": [],
"defaultStyles": {}
},
"objID": "6666cd76-f969-5646-9e7b-e39d750cc7d9",
"settings": {
"objID": "e007d988-9fba-797d-72e9-efc33ca6d05c",
"general": {
"objID": "fd434352-2277-c4a8-e87e-e96cfcbf2305",
"projectVersion": "v3",
"projectType": "lvgl",
"lvglVersion": "8.3",
"extensions": [],
"imports": [],
"flowSupport": true,
"displayWidth": 800,
"displayHeight": 480,
"colorFormat": "BGR",
"resourceFiles": []
},
"build": {
"objID": "72794a43-a0fc-13c2-7eb5-67dd952141a4",
"configurations": [
{
"objID": "bba0546c-06b8-604d-c43e-ecf1963e7492",
"name": "Default"
}
],
"files": [
{
"objID": "2a67a8d8-9156-4bb1-889e-b73584f6dccd",
"fileName": "screens.h",
"template": "#ifndef EEZ_LVGL_UI_SCREENS_H\r\n#define EEZ_LVGL_UI_SCREENS_H\r\n\r\n//${eez-studio LVGL_INCLUDE}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n//${eez-studio LVGL_SCREENS_DECL}\r\n//${eez-studio LVGL_SCREENS_DECL_EXT}\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /*EEZ_LVGL_UI_SCREENS_H*/"
},
{
"objID": "193f554a-f73c-4031-f9ef-40c6b8fa91cb",
"fileName": "screens.c",
"template": "#include \"screens.h\"\n#include \"images.h\"\n#include \"fonts.h\"\n#include \"actions.h\"\n#include \"vars.h\"\n#include \"styles.h\"\n#include \"ui.h\"\n\n//${eez-studio LVGL_SCREENS_DEF}\n//${eez-studio LVGL_SCREENS_DEF_EXT}"
},
{
"objID": "91b43df1-6cb7-4a99-bd74-e5c45ffd2ce0",
"fileName": "actions.h",
"template": "#ifndef EEZ_LVGL_UI_EVENTS_H\r\n#define EEZ_LVGL_UI_EVENTS_H\r\n\r\n//${eez-studio LVGL_INCLUDE}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n//${eez-studio LVGL_ACTIONS_DECL}\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /*EEZ_LVGL_UI_EVENTS_H*/"
},
{
"objID": "8a35b666-288c-4d34-f0d4-1efb449b36c0",
"fileName": "vars.h",
"template": "#ifndef EEZ_LVGL_UI_VARS_H\r\n#define EEZ_LVGL_UI_VARS_H\r\n\r\n#include <stdint.h>\r\n#include <stdbool.h>\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n// enum declarations\r\n\r\n//${eez-studio FLOW_ENUMS}\r\n\r\n// Flow global variables\r\n\r\n//${eez-studio FLOW_GLOBAL_VARIABLES_ENUM}\r\n\r\n// Native global variables\r\n\r\n//${eez-studio LVGL_VARS_DECL}\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /*EEZ_LVGL_UI_VARS_H*/"
},
{
"objID": "ad2ecd2a-1abc-4849-859e-8c2dfc85bae3",
"fileName": "structs.h",
"template": "#ifndef EEZ_LVGL_UI_STRUCTS_H\n#define EEZ_LVGL_UI_STRUCTS_H\n\n//${eez-studio EEZ_FOR_LVGL_CHECK}\n\n#if defined(EEZ_FOR_LVGL)\n\n#include <eez/flow/flow.h>\n#include <stdint.h>\n#include <stdbool.h>\n\n#include \"vars.h\"\n\nusing namespace eez;\n\n//${eez-studio FLOW_STRUCTS}\n\n//${eez-studio FLOW_STRUCT_VALUES}\n\n#endif\n\n#endif /*EEZ_LVGL_UI_STRUCTS_H*/\n"
},
{
"objID": "5b64564d-4729-4edb-f066-4d9763392913",
"fileName": "images.h",
"template": "#ifndef EEZ_LVGL_UI_IMAGES_H\r\n#define EEZ_LVGL_UI_IMAGES_H\r\n\r\n//${eez-studio LVGL_INCLUDE}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n//${eez-studio LVGL_IMAGES_DECL}\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /*EEZ_LVGL_UI_IMAGES_H*/"
},
{
"objID": "19c2457a-4b90-4026-9522-b3b98b123611",
"fileName": "images.c",
"template": "#include \"images.h\"\n\n//${eez-studio LVGL_IMAGES_DEF}"
},
{
"objID": "8936f21c-2b2e-4d65-bd0d-678e608f28c6",
"fileName": "fonts.h",
"template": "#ifndef EEZ_LVGL_UI_FONTS_H\r\n#define EEZ_LVGL_UI_FONTS_H\r\n\r\n//${eez-studio LVGL_INCLUDE}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n//${eez-studio LVGL_FONTS_DECL}\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /*EEZ_LVGL_UI_FONTS_H*/"
},
{
"objID": "ecb07688-f34e-4b0b-9439-6474ec57cc76",
"fileName": "styles.h",
"template": "#ifndef EEZ_LVGL_UI_STYLES_H\r\n#define EEZ_LVGL_UI_STYLES_H\r\n\r\n//${eez-studio LVGL_INCLUDE}\r\n\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n//${eez-studio LVGL_STYLES_DECL}\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif /*EEZ_LVGL_UI_STYLES_H*/"
},
{
"objID": "eb2779fe-25d2-4550-cea7-205c16831328",
"fileName": "styles.c",
"template": "#include \"styles.h\"\n#include \"images.h\"\n#include \"fonts.h\"\n\n//${eez-studio LVGL_STYLES_DEF}\n"
},
{
"objID": "32f371a0-0675-4c5d-bc15-ee665cef237a",
"fileName": "ui.h",
"template": "#ifndef EEZ_LVGL_UI_GUI_H\n#define EEZ_LVGL_UI_GUI_H\n\n//${eez-studio LVGL_INCLUDE}\n\n//${eez-studio EEZ_FOR_LVGL_CHECK}\n\n#if defined(EEZ_FOR_LVGL)\n#include <eez/flow/lvgl_api.h>\n#endif\n\n#if !defined(EEZ_FOR_LVGL)\n#include \"screens.h\"\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n//${eez-studio GUI_ASSETS_DECL}\n\nvoid ui_init();\nvoid ui_tick();\n\n#if !defined(EEZ_FOR_LVGL)\nvoid loadScreen(enum ScreensEnum screenId);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // EEZ_LVGL_UI_GUI_H"
},
{
"objID": "e2bf846e-7141-41c0-c5a1-194a22bc8b1c",
"fileName": "ui.c",
"template": "#if defined(EEZ_FOR_LVGL)\n#include <eez/core/vars.h>\n#endif\n\n#include \"ui.h\"\n#include \"screens.h\"\n#include \"images.h\"\n#include \"actions.h\"\n#include \"vars.h\"\n\n//${eez-studio GUI_ASSETS_DEF}\n\n//${eez-studio LVGL_NATIVE_VARS_TABLE_DEF}\n\n//${eez-studio LVGL_ACTIONS_ARRAY_DEF}\n\n#if defined(EEZ_FOR_LVGL)\n\nvoid ui_init() {\n eez_flow_init(assets, sizeof(assets), (lv_obj_t **)&objects, sizeof(objects), images, sizeof(images), actions);\n}\n\nvoid ui_tick() {\n eez_flow_tick();\n tick_screen(g_currentScreen);\n}\n\n#else\n\nstatic int16_t currentScreen = -1;\n\nstatic lv_obj_t *getLvglObjectFromIndex(int32_t index) {\n if (index == -1) {\n return 0;\n }\n return ((lv_obj_t **)&objects)[index];\n}\n\nstatic const void *getLvglImageByName(const char *name) {\n for (size_t imageIndex = 0; imageIndex < sizeof(images) / sizeof(ext_img_desc_t); imageIndex++) {\n if (strcmp(images[imageIndex].name, name) == 0) {\n return images[imageIndex].img_dsc;\n }\n }\n return 0;\n}\n\nvoid loadScreen(enum ScreensEnum screenId) {\n currentScreen = screenId - 1;\n lv_obj_t *screen = getLvglObjectFromIndex(currentScreen);\n lv_scr_load_anim(screen, LV_SCR_LOAD_ANIM_FADE_IN, 200, 0, false);\n}\n\nvoid ui_init() {\n create_screens();\n loadScreen(SCREEN_ID_MAIN);\n}\n\nvoid ui_tick() {\n tick_screen(currentScreen);\n}\n\n#endif\n"
}
],
"destinationFolder": "src\\ui",
"lvglInclude": "lvgl/lvgl.h"
}
},
"variables": {
"objID": "c6c71e16-53e1-217f-d03b-cef56c6b037a",
"globalVariables": [],
"structures": [],
"enums": []
},
"actions": [],
"userPages": [
{
"objID": "4b40eba7-b31a-468a-b887-11dfd0b6637f",
"components": [
{
"objID": "f90b60d0-0665-1f2d-d7bb-8672ca4b6e2e",
"type": "LVGLScreenWidget",
"left": 0,
"top": 0,
"width": 800,
"height": 480,
"customInputs": [],
"customOutputs": [],
"style": {
"objID": "fb6a8ebf-ffb2-c572-e37b-06078605c72c",
"useStyle": "default",
"conditionalStyles": [],
"childStyles": []
},
"timeline": [],
"eventHandlers": [],
"leftUnit": "px",
"topUnit": "px",
"widthUnit": "px",
"heightUnit": "px",
"children": [
{
"objID": "6b272cb8-48b4-467f-c130-a1edc1f930b7",
"type": "LVGLLabelWidget",
"left": 356,
"top": 232,
"width": 89,
"height": 16,
"customInputs": [],
"customOutputs": [],
"style": {
"objID": "a9bf737e-205d-4003-aae9-0ca3b6710d43",
"useStyle": "default",
"conditionalStyles": [],
"childStyles": []
},
"timeline": [],
"eventHandlers": [],
"leftUnit": "px",
"topUnit": "px",
"widthUnit": "content",
"heightUnit": "content",
"children": [],
"flags": "PRESS_LOCK|CLICK_FOCUSABLE|GESTURE_BUBBLE|SNAPPABLE|SCROLLABLE|SCROLL_ELASTIC|SCROLL_MOMENTUM|SCROLL_CHAIN",
"hiddenFlagType": "literal",
"clickableFlagType": "literal",
"scrollbarMode": "auto",
"scrollDirection": "all",
"checkedStateType": "literal",
"disabledStateType": "literal",
"states": "",
"localStyles": {
"objID": "b70b99db-02c2-420a-cbdf-e6366dc84e67"
},
"text": "Hello, world!",
"textType": "literal",
"longMode": "WRAP",
"recolor": false
}
],
"flags": "PRESS_LOCK|CLICK_FOCUSABLE|GESTURE_BUBBLE|SNAPPABLE|SCROLL_ELASTIC|SCROLL_MOMENTUM|SCROLL_CHAIN",
"hiddenFlagType": "literal",
"clickableFlag": true,
"clickableFlagType": "literal",
"scrollbarMode": "auto",
"scrollDirection": "all",
"checkedStateType": "literal",
"disabledStateType": "literal",
"states": "",
"localStyles": {
"objID": "8eb86917-c831-b762-5685-8d01972e8a22"
}
}
],
"connectionLines": [],
"localVariables": [],
"name": "Main",
"left": 0,
"top": 0,
"width": 800,
"height": 480
}
],
"userWidgets": [],
"fonts": [],
"bitmaps": [],
"colors": [
{
"objID": "a3333659-ca35-4e6c-e434-d9dd1aa3b7d8",
"name": "color"
},
{
"objID": "f111d279-a86c-40ff-8739-063e95629d7f",
"name": "background_color"
}
],
"themes": [
{
"objID": "728af2e4-0a31-4f5c-b5cf-8fbdc345e872",
"name": "default",
"colors": [
"#ffffff",
"#404040"
]
}
]
}