1 /*******************************************************************************/
2 /*  This file is auto-generated by Azure RTOS GUIX Studio. Do not edit this    */
3 /*  file by hand. Modifications to this file should only be made by running    */
4 /*  the Azure RTOS GUIX Studio application and re-generating the application   */
5 /*  specification file(s). For more information please refer to the Azure RTOS */
6 /*  GUIX Studio User Guide, or visit our web site at azure.com/rtos            */
7 /*                                                                             */
8 /*  GUIX Studio Revision 6.1.12.0                                              */
9 /*  Date (dd.mm.yyyy): 25. 8.2022   Time (hh:mm): 18:23                        */
10 /*******************************************************************************/
11 
12 
13 #ifndef _DEMO_GUIX_WASHING_MACHINE_SPECIFICATIONS_H_
14 #define _DEMO_GUIX_WASHING_MACHINE_SPECIFICATIONS_H_
15 
16 #include "gx_api.h"
17 
18 /* Determine if C++ compiler is being used, if so use standard C.              */
19 #ifdef __cplusplus
20 extern   "C" {
21 #endif
22 
23 /* Define widget ids                                                           */
24 
25 #define ID_BTN_QUICK 1
26 #define ID_BTN_DEEP 2
27 #define ID_BTN_QUICK_SMALL 3
28 #define ID_BTN_DEEP_SMALL 4
29 #define ID_BTN_ECO 5
30 #define ID_BTN_ECO_SMALL 6
31 #define ID_WATER_LEVEL_SLIDER 7
32 #define ID_BTN_MAX 8
33 #define ID_BTN_HIGH 9
34 #define ID_BTN_MEDIUM 10
35 #define ID_BTN_LOW 11
36 #define ID_BTN_MIN 12
37 #define ID_TEMPERATURE_SLIDER 13
38 #define ID_WASH_CYCLE_SLIDER 14
39 #define ID_BTN_WASH_CYCLE 15
40 #define ID_BTN_TEMPERATURE 16
41 #define ID_BTN_WATER_LEVEL 17
42 #define ID_BTN_PLAY 18
43 
44 
45 /* Define animation ids                                                        */
46 
47 #define GX_NEXT_ANIMATION_ID 1
48 
49 
50 /* Define user event ids                                                       */
51 
52 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
53 
54 
55 /* Declare properties structures for each utilized widget type                 */
56 
57 typedef struct GX_STUDIO_WIDGET_STRUCT
58 {
59    GX_CHAR *widget_name;
60    USHORT  widget_type;
61    USHORT  widget_id;
62    #if defined(GX_WIDGET_USER_DATA)
63    INT   user_data;
64    #endif
65    ULONG style;
66    ULONG status;
67    ULONG control_block_size;
68    GX_RESOURCE_ID normal_fill_color_id;
69    GX_RESOURCE_ID selected_fill_color_id;
70    GX_RESOURCE_ID disabled_fill_color_id;
71    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
72    void (*draw_function) (GX_WIDGET *);
73    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
74    GX_RECTANGLE size;
75    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
76    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
77    ULONG control_block_offset;
78    GX_CONST void *properties;
79 } GX_STUDIO_WIDGET;
80 
81 typedef struct
82 {
83     GX_CONST GX_STUDIO_WIDGET *widget_information;
84     GX_WIDGET        *widget;
85 } GX_STUDIO_WIDGET_ENTRY;
86 
87 typedef struct
88 {
89     GX_RESOURCE_ID string_id;
90     GX_RESOURCE_ID font_id;
91     GX_RESOURCE_ID normal_text_color_id;
92     GX_RESOURCE_ID selected_text_color_id;
93     GX_RESOURCE_ID disabled_text_color_id;
94 } GX_TEXT_BUTTON_PROPERTIES;
95 
96 typedef struct
97 {
98     GX_RESOURCE_ID normal_pixelmap_id;
99     GX_RESOURCE_ID selected_pixelmap_id;
100     GX_RESOURCE_ID disabled_pixelmap_id;
101 } GX_PIXELMAP_BUTTON_PROPERTIES;
102 
103 typedef struct
104 {
105     GX_RESOURCE_ID normal_pixelmap_id;
106     GX_RESOURCE_ID selected_pixelmap_id;
107 } GX_ICON_PROPERTIES;
108 
109 typedef struct
110 {
111     GX_VALUE       xcenter;
112     GX_VALUE       ycenter;
113     USHORT         radius;
114     USHORT         track_width;
115     GX_VALUE       needle_offset;
116     GX_VALUE       current_angle;
117     GX_VALUE       min_angle;
118     GX_VALUE       max_angle;
119     GX_RESOURCE_ID background_pixelmap;
120     GX_RESOURCE_ID needle_pixelmap;
121     USHORT         animation_total_steps;
122     USHORT         animation_delay;
123     USHORT         animation_style;
124     VOID         (*animation_update_callback)(struct GX_RADIAL_SLIDER_STRUCT *slider);
125 } GX_RADIAL_SLIDER_PROPERTIES;
126 
127 typedef struct
128 {
129     GX_RESOURCE_ID string_id;
130     GX_RESOURCE_ID font_id;
131     GX_RESOURCE_ID normal_text_color_id;
132     GX_RESOURCE_ID selected_text_color_id;
133     GX_RESOURCE_ID disabled_text_color_id;
134 } GX_PROMPT_PROPERTIES;
135 
136 typedef struct
137 {
138     GX_RESOURCE_ID string_id;
139     GX_RESOURCE_ID font_id;
140     GX_RESOURCE_ID normal_text_color_id;
141     GX_RESOURCE_ID selected_text_color_id;
142     GX_RESOURCE_ID disabled_text_color_id;
143     VOID (*format_func)(GX_NUMERIC_PROMPT *, INT);
144     INT            numeric_prompt_value;
145 } GX_NUMERIC_PROMPT_PROPERTIES;
146 
147 typedef struct
148 {
149     GX_RESOURCE_ID wallpaper_id;
150 } GX_WINDOW_PROPERTIES;
151 
152 typedef struct
153 {
154    GX_CONST GX_STUDIO_WIDGET *base_info;
155    UINT (*base_create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
156    GX_RECTANGLE size;
157 } GX_TEMPLATE_PROPERTIES;
158 
159 
160 /* Declare top-level control blocks                                            */
161 
162 typedef struct TEMPLATE_MODE_BTN_SMALL_CONTROL_BLOCK_STRUCT
163 {
164     GX_PIXELMAP_BUTTON_MEMBERS_DECLARE
165     GX_PROMPT template_mode_btn_small_mode_label;
166     GX_PROMPT template_mode_btn_small_mode_label_4;
167     GX_NUMERIC_PROMPT template_mode_btn_small_total_time;
168     GX_PROMPT template_mode_btn_small_mode_label_5;
169 } TEMPLATE_MODE_BTN_SMALL_CONTROL_BLOCK;
170 
171 typedef struct TEMPLATE_MODE_BTN_CONTROL_BLOCK_STRUCT
172 {
173     GX_PIXELMAP_BUTTON_MEMBERS_DECLARE
174     GX_PROMPT template_mode_btn_mode_label;
175     GX_PROMPT template_mode_btn_wash_label;
176     GX_PROMPT template_mode_btn_min_label;
177     GX_NUMERIC_PROMPT template_mode_btn_total_time;
178     GX_RADIAL_PROGRESS_BAR template_mode_btn_mode_progress_bar;
179     GX_NUMERIC_PROMPT template_mode_btn_minute;
180     GX_NUMERIC_PROMPT template_mode_btn_second;
181     GX_PROMPT template_mode_btn_prompt_3;
182     GX_PROMPT template_mode_btn_prompt_2;
183 } TEMPLATE_MODE_BTN_CONTROL_BLOCK;
184 
185 typedef struct MODE_SELECT_WINDOW_CONTROL_BLOCK_STRUCT
186 {
187     GX_WINDOW_MEMBERS_DECLARE
188     TEMPLATE_MODE_BTN_CONTROL_BLOCK mode_select_window_btn_quick;
189     TEMPLATE_MODE_BTN_CONTROL_BLOCK mode_select_window_btn_deep;
190     TEMPLATE_MODE_BTN_SMALL_CONTROL_BLOCK mode_select_window_btn_quick_small;
191     TEMPLATE_MODE_BTN_SMALL_CONTROL_BLOCK mode_select_window_btn_deep_small;
192     TEMPLATE_MODE_BTN_CONTROL_BLOCK mode_select_window_btn_eco;
193     TEMPLATE_MODE_BTN_SMALL_CONTROL_BLOCK mode_select_window_btn_eco_small;
194 } MODE_SELECT_WINDOW_CONTROL_BLOCK;
195 
196 typedef struct WATER_LEVEL_WINDOW_CONTROL_BLOCK_STRUCT
197 {
198     GX_WINDOW_MEMBERS_DECLARE
199     GX_RADIAL_SLIDER water_level_window_water_level_slider;
200     GX_NUMERIC_PROMPT water_level_window_water_level_value;
201     GX_PROMPT water_level_window_percentage_flag;
202     GX_TEXT_BUTTON water_level_window_btn_max;
203     GX_TEXT_BUTTON water_level_window_btn_high;
204     GX_TEXT_BUTTON water_level_window_btn_medium;
205     GX_TEXT_BUTTON water_level_window_btn_low;
206     GX_TEXT_BUTTON water_level_window_btn_min;
207 } WATER_LEVEL_WINDOW_CONTROL_BLOCK;
208 
209 typedef struct TEMPERATURE_WINDOW_CONTROL_BLOCK_STRUCT
210 {
211     GX_WINDOW_MEMBERS_DECLARE
212     GX_RADIAL_SLIDER temperature_window_temperature_slider;
213     GX_NUMERIC_PROMPT temperature_window_temperature_value;
214     GX_PROMPT temperature_window_temperature_flag;
215 } TEMPERATURE_WINDOW_CONTROL_BLOCK;
216 
217 typedef struct WASH_CYCLE_WINDOW_CONTROL_BLOCK_STRUCT
218 {
219     GX_WINDOW_MEMBERS_DECLARE
220     GX_RADIAL_SLIDER wash_cycle_window_wash_cycle_slider;
221     GX_NUMERIC_PROMPT wash_cycle_window_minute;
222     GX_NUMERIC_PROMPT wash_cycle_window_second;
223     GX_ICON wash_cycle_window_icon_1;
224     GX_ICON wash_cycle_window_icon_2;
225 } WASH_CYCLE_WINDOW_CONTROL_BLOCK;
226 
227 typedef struct MAIN_SCREEN_CONTROL_BLOCK_STRUCT
228 {
229     GX_WINDOW_MEMBERS_DECLARE
230     GX_ICON main_screen_logo;
231     GX_BUTTON main_screen_btn_wash_cycle;
232     GX_PROMPT main_screen_wash_cycle_mode;
233     GX_PROMPT main_screen_wash_cycle_lable;
234     GX_BUTTON main_screen_btn_temperature;
235     GX_PROMPT main_screen_prompt_2;
236     GX_PROMPT main_screen_temperature_lable;
237     GX_NUMERIC_PROMPT main_screen_temperature_value;
238     GX_BUTTON main_screen_btn_water_level;
239     GX_PROMPT main_screen_prompt_4;
240     GX_PROMPT main_screen_water_level_label;
241     GX_NUMERIC_PROMPT main_screen_water_level_value;
242     GX_PIXELMAP_BUTTON main_screen_btn_play;
243     GX_PROGRESS_BAR main_screen_wash_cycle_progress_bar;
244     GX_PROMPT main_screen_label_1_soak;
245     GX_PROMPT main_screen_label_2_spin;
246     GX_PROMPT main_screen_label_3_wash;
247     GX_PROMPT main_screen_label_4_spin;
248     GX_PROMPT main_screen_label_5_rinse;
249     GX_PROMPT main_screen_label_6_spin;
250 } MAIN_SCREEN_CONTROL_BLOCK;
251 
252 
253 /* extern statically defined control blocks                                    */
254 
255 #ifndef GUIX_STUDIO_GENERATED_FILE
256 extern TEMPLATE_MODE_BTN_SMALL_CONTROL_BLOCK template_mode_btn_small;
257 extern TEMPLATE_MODE_BTN_CONTROL_BLOCK template_mode_btn;
258 extern MODE_SELECT_WINDOW_CONTROL_BLOCK mode_select_window;
259 extern WATER_LEVEL_WINDOW_CONTROL_BLOCK water_level_window;
260 extern TEMPERATURE_WINDOW_CONTROL_BLOCK temperature_window;
261 extern WASH_CYCLE_WINDOW_CONTROL_BLOCK wash_cycle_window;
262 extern MAIN_SCREEN_CONTROL_BLOCK main_screen;
263 #endif
264 
265 /* Declare event process functions, draw functions, and callback functions     */
266 
267 VOID time_format(GX_NUMERIC_PROMPT *, INT);
268 UINT mode_select_window_event_process(GX_WINDOW *widget, GX_EVENT *event_ptr);
269 UINT water_level_window_event_process(GX_WINDOW *widget, GX_EVENT *event_ptr);
270 UINT temperature_window_event_process(GX_WINDOW *widget, GX_EVENT *event_ptr);
271 VOID temperature_window_draw(GX_WINDOW *widget);
272 VOID temperature_slider_animation_callback(GX_RADIAL_SLIDER *slider);
273 UINT wash_cycle_window_event_process(GX_WINDOW *widget, GX_EVENT *event_ptr);
274 VOID wash_cycle_window_draw(GX_WINDOW *widget);
275 VOID wash_cycle_slider_draw(GX_RADIAL_SLIDER *widget);
276 UINT main_screen_event_process(GX_WINDOW *widget, GX_EVENT *event_ptr);
277 VOID btn_text_draw(GX_PROMPT *widget);
278 VOID btn_numeric_text_draw(GX_NUMERIC_PROMPT *widget);
279 VOID wash_cycle_progress_bar_draw(GX_PROGRESS_BAR *widget);
280 
281 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
282 
283 
284 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
285 {
286     GX_CONST GX_CHAR *name;
287     GX_CONST GX_CHAR *canvas_name;
288     GX_CONST GX_THEME **theme_table;
289     GX_CONST GX_STRING **language_table;
290     USHORT   theme_table_size;
291     USHORT   language_table_size;
292     UINT     string_table_size;
293     UINT     x_resolution;
294     UINT     y_resolution;
295     GX_DISPLAY *display;
296     GX_CANVAS  *canvas;
297     GX_WINDOW_ROOT *root_window;
298     GX_COLOR   *canvas_memory;
299     ULONG      canvas_memory_size;
300     USHORT     rotation_angle;
301 } GX_STUDIO_DISPLAY_INFO;
302 
303 
304 /* Declare Studio-generated functions for creating top-level widgets           */
305 
306 UINT gx_studio_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
307 UINT gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
308 UINT gx_studio_pixelmap_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
309 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
310 UINT gx_studio_progress_bar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
311 UINT gx_studio_radial_progress_bar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
312 UINT gx_studio_radial_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
313 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
314 UINT gx_studio_numeric_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
315 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
316 UINT gx_studio_template_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
317 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
318 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
319 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
320 
321 /* Determine if a C++ compiler is being used.  If so, complete the standard
322   C conditional started above.                                                 */
323 #ifdef __cplusplus
324 }
325 #endif
326 
327 #endif                                       /* sentry                         */
328