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.2.0.1 */
9 /* Date (dd.mm.yyyy): 31.10.2022 Time (hh:mm): 14:12 */
10 /*******************************************************************************/
11
12
13 #define GUIX_STUDIO_GENERATED_FILE
14 #include <stddef.h>
15 #include "widget_find_resources.h"
16 #include "widget_find_specifications.h"
17
18 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
19 MAIN_SCREEN_CONTROL_BLOCK main_screen;
20 GX_DISPLAY Primary_control_block;
21 GX_WINDOW_ROOT Primary_root_window;
22 GX_CANVAS Primary_canvas_control_block;
23 extern GX_CONST GX_THEME *Primary_theme_table[];
24 extern GX_CONST GX_STRING *Primary_language_table[];
25
26 GX_STUDIO_DISPLAY_INFO widget_find_display_table[1] =
27 {
28 {
29 "Primary",
30 "Primary_canvas",
31 Primary_theme_table,
32 Primary_language_table,
33 PRIMARY_THEME_TABLE_SIZE,
34 PRIMARY_LANGUAGE_TABLE_SIZE,
35 PRIMARY_STRING_TABLE_SIZE,
36 640, /* x resolution */
37 480, /* y resolution */
38 &Primary_control_block,
39 &Primary_canvas_control_block,
40 &Primary_root_window,
41 GX_NULL, /* canvas memory area */
42 1228800, /* canvas memory size in bytes */
43 0 /* rotation angle */
44 }
45 };
46
47
gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)48 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
49 {
50 UINT status;
51 GX_PROMPT *prompt = (GX_PROMPT *) control_block;
52 GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
53 status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
54 if (status == GX_SUCCESS)
55 {
56 gx_prompt_font_set(prompt, props->font_id);
57 #if defined(GUIX_5_4_0_COMPATIBILITY)
58 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
59 #else
60 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
61 #endif
62 }
63 return status;
64 }
65
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)66 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
67 {
68 UINT status;
69 GX_WINDOW *window = (GX_WINDOW *) control_block;
70 GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
71 status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
72 if (status == GX_SUCCESS)
73 {
74 if (props->wallpaper_id)
75 {
76 gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
77 }
78 }
79 return status;
80 }
81 GX_WINDOW_PROPERTIES main_screen_properties =
82 {
83 0 /* wallpaper pixelmap id */
84 };
85 GX_WINDOW_PROPERTIES main_screen_window_1_properties =
86 {
87 0 /* wallpaper pixelmap id */
88 };
89 GX_WINDOW_PROPERTIES main_screen_window_1_1_properties =
90 {
91 0 /* wallpaper pixelmap id */
92 };
93 GX_WINDOW_PROPERTIES main_screen_window_1_1_1_properties =
94 {
95 0 /* wallpaper pixelmap id */
96 };
97 GX_PROMPT_PROPERTIES main_screen_prompt_1_1_1_1_properties =
98 {
99 GX_STRING_ID_STRING_5, /* string id */
100 GX_FONT_ID_PROMPT, /* font id */
101 GX_COLOR_ID_TEXT, /* normal text color */
102 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
103 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
104 };
105 GX_PROMPT_PROPERTIES main_screen_prompt_1_1_1_2_properties =
106 {
107 GX_STRING_ID_STRING_5, /* string id */
108 GX_FONT_ID_PROMPT, /* font id */
109 GX_COLOR_ID_TEXT, /* normal text color */
110 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
111 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
112 };
113 GX_PROMPT_PROPERTIES main_screen_prompt_1_1_1_3_properties =
114 {
115 GX_STRING_ID_STRING_5, /* string id */
116 GX_FONT_ID_PROMPT, /* font id */
117 GX_COLOR_ID_TEXT, /* normal text color */
118 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
119 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
120 };
121 GX_WINDOW_PROPERTIES main_screen_window_2_properties =
122 {
123 0 /* wallpaper pixelmap id */
124 };
125 GX_WINDOW_PROPERTIES main_screen_window_2_1_properties =
126 {
127 0 /* wallpaper pixelmap id */
128 };
129 GX_WINDOW_PROPERTIES main_screen_window_2_1_1_properties =
130 {
131 0 /* wallpaper pixelmap id */
132 };
133 GX_PROMPT_PROPERTIES main_screen_prompt_2_1_1_2_properties =
134 {
135 GX_STRING_ID_STRING_5, /* string id */
136 GX_FONT_ID_PROMPT, /* font id */
137 GX_COLOR_ID_TEXT, /* normal text color */
138 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
139 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
140 };
141 GX_PROMPT_PROPERTIES main_screen_prompt_2_1_1_1_properties =
142 {
143 GX_STRING_ID_STRING_5, /* string id */
144 GX_FONT_ID_PROMPT, /* font id */
145 GX_COLOR_ID_TEXT, /* normal text color */
146 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
147 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
148 };
149 GX_WINDOW_PROPERTIES main_screen_window_2_1_2_properties =
150 {
151 0 /* wallpaper pixelmap id */
152 };
153 GX_WINDOW_PROPERTIES main_screen_window_3_properties =
154 {
155 0 /* wallpaper pixelmap id */
156 };
157 GX_WINDOW_PROPERTIES main_screen_window_4_properties =
158 {
159 0 /* wallpaper pixelmap id */
160 };
161 GX_PROMPT_PROPERTIES main_screen_prompt_4_1_properties =
162 {
163 GX_STRING_ID_STRING_5, /* string id */
164 GX_FONT_ID_PROMPT, /* font id */
165 GX_COLOR_ID_TEXT, /* normal text color */
166 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
167 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
168 };
169 GX_PROMPT_PROPERTIES main_screen_prompt_4_2_properties =
170 {
171 GX_STRING_ID_STRING_5, /* string id */
172 GX_FONT_ID_PROMPT, /* font id */
173 GX_COLOR_ID_TEXT, /* normal text color */
174 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
175 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
176 };
177
178 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_1_1_1_3_define =
179 {
180 "prompt_1_1_1_3",
181 GX_TYPE_PROMPT, /* widget type */
182 ID_1_1_1_3, /* widget id */
183 #if defined(GX_WIDGET_USER_DATA)
184 0, /* user data */
185 #endif
186 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
187 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
188 sizeof(GX_PROMPT), /* control block size */
189 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
190 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
191 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
192 gx_studio_prompt_create, /* create function */
193 GX_NULL, /* drawing function override */
194 GX_NULL, /* event function override */
195 {108, 128, 187, 151}, /* widget size */
196 GX_NULL, /* no next widget */
197 GX_NULL, /* no child widgets */
198 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_1_1_1_3), /* control block */
199 (void *) &main_screen_prompt_1_1_1_3_properties /* extended properties */
200 };
201
202 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_1_1_1_2_define =
203 {
204 "prompt_1_1_1_2",
205 GX_TYPE_PROMPT, /* widget type */
206 ID_1_1_1_2, /* widget id */
207 #if defined(GX_WIDGET_USER_DATA)
208 0, /* user data */
209 #endif
210 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
211 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
212 sizeof(GX_PROMPT), /* control block size */
213 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
214 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
215 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
216 gx_studio_prompt_create, /* create function */
217 GX_NULL, /* drawing function override */
218 GX_NULL, /* event function override */
219 {108, 101, 187, 124}, /* widget size */
220 &main_screen_prompt_1_1_1_3_define, /* next widget definition */
221 GX_NULL, /* no child widgets */
222 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_1_1_1_2), /* control block */
223 (void *) &main_screen_prompt_1_1_1_2_properties /* extended properties */
224 };
225
226 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_1_1_1_1_define =
227 {
228 "prompt_1_1_1_1",
229 GX_TYPE_PROMPT, /* widget type */
230 ID_1_1_1_1, /* widget id */
231 #if defined(GX_WIDGET_USER_DATA)
232 0, /* user data */
233 #endif
234 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
235 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
236 sizeof(GX_PROMPT), /* control block size */
237 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
238 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
239 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
240 gx_studio_prompt_create, /* create function */
241 GX_NULL, /* drawing function override */
242 GX_NULL, /* event function override */
243 {108, 74, 187, 97}, /* widget size */
244 &main_screen_prompt_1_1_1_2_define, /* next widget definition */
245 GX_NULL, /* no child widgets */
246 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_1_1_1_1), /* control block */
247 (void *) &main_screen_prompt_1_1_1_1_properties /* extended properties */
248 };
249
250 GX_CONST GX_STUDIO_WIDGET main_screen_window_1_1_1_define =
251 {
252 "window_1_1_1",
253 GX_TYPE_WINDOW, /* widget type */
254 ID_1_1_1, /* widget id */
255 #if defined(GX_WIDGET_USER_DATA)
256 0, /* user data */
257 #endif
258 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
259 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
260 sizeof(GX_WINDOW), /* control block size */
261 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
262 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
263 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
264 gx_studio_window_create, /* create function */
265 GX_NULL, /* drawing function override */
266 GX_NULL, /* event function override */
267 {95, 62, 235, 156}, /* widget size */
268 GX_NULL, /* no next widget */
269 &main_screen_prompt_1_1_1_1_define, /* child widget definition */
270 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_1_1_1), /* control block */
271 (void *) &main_screen_window_1_1_1_properties /* extended properties */
272 };
273
274 GX_CONST GX_STUDIO_WIDGET main_screen_window_1_1_define =
275 {
276 "window_1_1",
277 GX_TYPE_WINDOW, /* widget type */
278 ID_1_1, /* widget id */
279 #if defined(GX_WIDGET_USER_DATA)
280 0, /* user data */
281 #endif
282 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
283 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
284 sizeof(GX_WINDOW), /* control block size */
285 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
286 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
287 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
288 gx_studio_window_create, /* create function */
289 GX_NULL, /* drawing function override */
290 GX_NULL, /* event function override */
291 {66, 40, 260, 176}, /* widget size */
292 GX_NULL, /* no next widget */
293 &main_screen_window_1_1_1_define, /* child widget definition */
294 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_1_1), /* control block */
295 (void *) &main_screen_window_1_1_properties /* extended properties */
296 };
297
298 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_2_1_1_1_define =
299 {
300 "prompt_2_1_1_1",
301 GX_TYPE_PROMPT, /* widget type */
302 ID_2_1_1_1, /* widget id */
303 #if defined(GX_WIDGET_USER_DATA)
304 0, /* user data */
305 #endif
306 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
307 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
308 sizeof(GX_PROMPT), /* control block size */
309 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
310 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
311 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
312 gx_studio_prompt_create, /* create function */
313 GX_NULL, /* drawing function override */
314 GX_NULL, /* event function override */
315 {344, 54, 423, 77}, /* widget size */
316 GX_NULL, /* no next widget */
317 GX_NULL, /* no child widgets */
318 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_2_1_1_1), /* control block */
319 (void *) &main_screen_prompt_2_1_1_1_properties /* extended properties */
320 };
321
322 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_2_1_1_2_define =
323 {
324 "prompt_2_1_1_2",
325 GX_TYPE_PROMPT, /* widget type */
326 ID_2_1_1_2, /* widget id */
327 #if defined(GX_WIDGET_USER_DATA)
328 0, /* user data */
329 #endif
330 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
331 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
332 sizeof(GX_PROMPT), /* control block size */
333 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
334 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
335 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
336 gx_studio_prompt_create, /* create function */
337 GX_NULL, /* drawing function override */
338 GX_NULL, /* event function override */
339 {344, 83, 423, 106}, /* widget size */
340 &main_screen_prompt_2_1_1_1_define, /* next widget definition */
341 GX_NULL, /* no child widgets */
342 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_2_1_1_2), /* control block */
343 (void *) &main_screen_prompt_2_1_1_2_properties /* extended properties */
344 };
345
346 GX_CONST GX_STUDIO_WIDGET main_screen_window_2_1_2_define =
347 {
348 "window_2_1_2",
349 GX_TYPE_WINDOW, /* widget type */
350 ID_2_1_2, /* widget id */
351 #if defined(GX_WIDGET_USER_DATA)
352 0, /* user data */
353 #endif
354 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
355 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
356 sizeof(GX_WINDOW), /* control block size */
357 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
358 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
359 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
360 gx_studio_window_create, /* create function */
361 GX_NULL, /* drawing function override */
362 GX_NULL, /* event function override */
363 {410, 95, 513, 169}, /* widget size */
364 GX_NULL, /* no next widget */
365 GX_NULL, /* no child widgets */
366 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_2_1_2), /* control block */
367 (void *) &main_screen_window_2_1_2_properties /* extended properties */
368 };
369
370 GX_CONST GX_STUDIO_WIDGET main_screen_window_2_1_1_define =
371 {
372 "window_2_1_1",
373 GX_TYPE_WINDOW, /* widget type */
374 ID_2_1_1, /* widget id */
375 #if defined(GX_WIDGET_USER_DATA)
376 0, /* user data */
377 #endif
378 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
379 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
380 sizeof(GX_WINDOW), /* control block size */
381 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
382 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
383 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
384 gx_studio_window_create, /* create function */
385 GX_NULL, /* drawing function override */
386 GX_NULL, /* event function override */
387 {335, 45, 438, 119}, /* widget size */
388 &main_screen_window_2_1_2_define, /* next widget definition */
389 &main_screen_prompt_2_1_1_2_define, /* child widget definition */
390 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_2_1_1), /* control block */
391 (void *) &main_screen_window_2_1_1_properties /* extended properties */
392 };
393
394 GX_CONST GX_STUDIO_WIDGET main_screen_window_2_1_define =
395 {
396 "window_2_1",
397 GX_TYPE_WINDOW, /* widget type */
398 ID_2_1, /* widget id */
399 #if defined(GX_WIDGET_USER_DATA)
400 0, /* user data */
401 #endif
402 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
403 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
404 sizeof(GX_WINDOW), /* control block size */
405 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
406 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
407 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
408 gx_studio_window_create, /* create function */
409 GX_NULL, /* drawing function override */
410 GX_NULL, /* event function override */
411 {323, 34, 530, 183}, /* widget size */
412 GX_NULL, /* no next widget */
413 &main_screen_window_2_1_1_define, /* child widget definition */
414 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_2_1), /* control block */
415 (void *) &main_screen_window_2_1_properties /* extended properties */
416 };
417
418 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_4_2_define =
419 {
420 "prompt_4_2",
421 GX_TYPE_PROMPT, /* widget type */
422 ID_4_2, /* widget id */
423 #if defined(GX_WIDGET_USER_DATA)
424 0, /* user data */
425 #endif
426 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
427 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
428 sizeof(GX_PROMPT), /* control block size */
429 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
430 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
431 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
432 gx_studio_prompt_create, /* create function */
433 GX_NULL, /* drawing function override */
434 GX_NULL, /* event function override */
435 {385, 304, 464, 327}, /* widget size */
436 GX_NULL, /* no next widget */
437 GX_NULL, /* no child widgets */
438 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_4_2), /* control block */
439 (void *) &main_screen_prompt_4_2_properties /* extended properties */
440 };
441
442 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_4_1_define =
443 {
444 "prompt_4_1",
445 GX_TYPE_PROMPT, /* widget type */
446 ID_4_1, /* widget id */
447 #if defined(GX_WIDGET_USER_DATA)
448 0, /* user data */
449 #endif
450 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
451 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
452 sizeof(GX_PROMPT), /* control block size */
453 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
454 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
455 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
456 gx_studio_prompt_create, /* create function */
457 GX_NULL, /* drawing function override */
458 GX_NULL, /* event function override */
459 {334, 252, 413, 275}, /* widget size */
460 &main_screen_prompt_4_2_define, /* next widget definition */
461 GX_NULL, /* no child widgets */
462 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_4_1), /* control block */
463 (void *) &main_screen_prompt_4_1_properties /* extended properties */
464 };
465
466 GX_CONST GX_STUDIO_WIDGET main_screen_window_4_define =
467 {
468 "window_4",
469 GX_TYPE_WINDOW, /* widget type */
470 ID_4, /* widget id */
471 #if defined(GX_WIDGET_USER_DATA)
472 0, /* user data */
473 #endif
474 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
475 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
476 sizeof(GX_WINDOW), /* control block size */
477 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
478 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
479 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
480 gx_studio_window_create, /* create function */
481 GX_NULL, /* drawing function override */
482 GX_NULL, /* event function override */
483 {306, 227, 543, 404}, /* widget size */
484 GX_NULL, /* no next widget */
485 &main_screen_prompt_4_1_define, /* child widget definition */
486 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_4), /* control block */
487 (void *) &main_screen_window_4_properties /* extended properties */
488 };
489
490 GX_CONST GX_STUDIO_WIDGET main_screen_window_3_define =
491 {
492 "window_3",
493 GX_TYPE_WINDOW, /* widget type */
494 ID_3, /* widget id */
495 #if defined(GX_WIDGET_USER_DATA)
496 0, /* user data */
497 #endif
498 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
499 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
500 sizeof(GX_WINDOW), /* control block size */
501 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
502 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
503 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
504 gx_studio_window_create, /* create function */
505 GX_NULL, /* drawing function override */
506 GX_NULL, /* event function override */
507 {44, 227, 281, 404}, /* widget size */
508 &main_screen_window_4_define, /* next widget definition */
509 GX_NULL, /* no child widgets */
510 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_3), /* control block */
511 (void *) &main_screen_window_3_properties /* extended properties */
512 };
513
514 GX_CONST GX_STUDIO_WIDGET main_screen_window_2_define =
515 {
516 "window_2",
517 GX_TYPE_WINDOW, /* widget type */
518 ID_2, /* widget id */
519 #if defined(GX_WIDGET_USER_DATA)
520 0, /* user data */
521 #endif
522 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
523 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
524 sizeof(GX_WINDOW), /* control block size */
525 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
526 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
527 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
528 gx_studio_window_create, /* create function */
529 GX_NULL, /* drawing function override */
530 GX_NULL, /* event function override */
531 {306, 22, 543, 199}, /* widget size */
532 &main_screen_window_3_define, /* next widget definition */
533 &main_screen_window_2_1_define, /* child widget definition */
534 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_2), /* control block */
535 (void *) &main_screen_window_2_properties /* extended properties */
536 };
537
538 GX_CONST GX_STUDIO_WIDGET main_screen_window_1_define =
539 {
540 "window_1",
541 GX_TYPE_WINDOW, /* widget type */
542 ID_1, /* widget id */
543 #if defined(GX_WIDGET_USER_DATA)
544 0, /* user data */
545 #endif
546 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
547 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
548 sizeof(GX_WINDOW), /* control block size */
549 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
550 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
551 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
552 gx_studio_window_create, /* create function */
553 GX_NULL, /* drawing function override */
554 GX_NULL, /* event function override */
555 {44, 21, 281, 198}, /* widget size */
556 &main_screen_window_2_define, /* next widget definition */
557 &main_screen_window_1_1_define, /* child widget definition */
558 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_window_1), /* control block */
559 (void *) &main_screen_window_1_properties /* extended properties */
560 };
561
562 GX_CONST GX_STUDIO_WIDGET main_screen_define =
563 {
564 "main_screen",
565 GX_TYPE_WINDOW, /* widget type */
566 GX_ID_NONE, /* widget id */
567 #if defined(GX_WIDGET_USER_DATA)
568 0, /* user data */
569 #endif
570 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
571 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
572 sizeof(MAIN_SCREEN_CONTROL_BLOCK), /* control block size */
573 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
574 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
575 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
576 gx_studio_window_create, /* create function */
577 GX_NULL, /* drawing function override */
578 (UINT (*)(GX_WIDGET *, GX_EVENT *)) main_screen_event_process, /* event function override */
579 {0, 0, 639, 479}, /* widget size */
580 GX_NULL, /* next widget */
581 &main_screen_window_1_define, /* child widget */
582 0, /* control block */
583 (void *) &main_screen_properties /* extended properties */
584 };
585 GX_CONST GX_STUDIO_WIDGET_ENTRY widget_find_widget_table[] =
586 {
587 { &main_screen_define, (GX_WIDGET *) &main_screen },
588 {GX_NULL, GX_NULL}
589 };
590
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)591 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
592 {
593 UINT status = GX_SUCCESS;
594 GX_WIDGET *widget = GX_NULL;
595 GX_VALUE list_count = 0;
596 GX_VALUE list_total_count = 0;
597
598 if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
599 {
600 list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
601 }
602
603 while(definition && status == GX_SUCCESS)
604 {
605 if (definition->create_function)
606 {
607 if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
608 {
609 status = gx_widget_allocate(&widget, definition->control_block_size);
610 if (status != GX_SUCCESS)
611 {
612 return GX_NULL;
613 }
614 }
615 else
616 {
617 if (control == GX_NULL)
618 {
619 return GX_NULL;
620 }
621 widget = (GX_WIDGET *) (control + definition->control_block_offset);
622 }
623
624 status = definition->create_function(definition, widget, parent);
625
626 if(list_count < list_total_count)
627 {
628 gx_menu_insert((GX_MENU *)parent, widget);
629 ((GX_MENU *)parent)->gx_menu_list_total_count--;
630 list_count++;
631 }
632
633 if (status == GX_SUCCESS)
634 {
635 if (definition->widget_type != GX_TYPE_TEMPLATE)
636 {
637 #if defined(GUIX_5_4_0_COMPATIBILITY)
638 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
639 #else
640 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
641 #endif
642 }
643
644 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
645 {
646 gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
647 }
648
649 if (definition->draw_function)
650 {
651 gx_widget_draw_set(widget, definition->draw_function);
652 }
653 if (definition->event_function)
654 {
655 gx_widget_event_process_set(widget, definition->event_function);
656 }
657
658 #if defined(GX_WIDGET_USER_DATA)
659 widget->gx_widget_user_data = definition->user_data;
660 #endif
661
662 if (definition->child_widget)
663 {
664 gx_studio_nested_widget_create(control, definition->child_widget, widget);
665 }
666 }
667 definition = definition->next_widget;
668 }
669 }
670 return widget;
671 }
672
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)673 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
674 {
675 GX_WIDGET *widget;
676 widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
677
678 if (parent && widget)
679 {
680 gx_widget_attach(parent, widget);
681 }
682 return widget;
683 }
684
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)685 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
686 {
687 UINT status = GX_FAILURE;
688 GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = widget_find_widget_table;
689 GX_WIDGET *widget = GX_NULL;
690
691 while(entry->widget_information)
692 {
693 if (!strcmp(name, entry->widget_information->widget_name))
694 {
695 widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
696 if (widget)
697 {
698 status = GX_SUCCESS;
699 }
700 break;
701 }
702 entry++;
703 }
704
705 if (new_widget)
706 {
707 *new_widget = widget;
708 }
709 return status;
710 }
711
712
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)713 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
714 GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
715 {
716 GX_CONST GX_THEME *theme_ptr;
717 GX_RECTANGLE size;
718
719 GX_STUDIO_DISPLAY_INFO *display_info = &widget_find_display_table[display];
720
721
722 /* create the requested display */
723
724 gx_display_create(display_info->display,
725 display_info->name,
726 driver,
727 (GX_VALUE) display_info->x_resolution,
728 (GX_VALUE) display_info->y_resolution);
729
730
731 /* install the request theme */
732
733 if(display_info->theme_table)
734 {
735 theme_ptr = display_info->theme_table[theme];
736 if(theme_ptr)
737 {
738 gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
739
740 /* install the color palette if required */
741 if (display_info->display->gx_display_driver_palette_set &&
742 theme_ptr->theme_palette != NULL)
743 {
744 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
745 }
746
747 gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
748 gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
749 gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
750 gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
751 }
752 }
753
754 /* Install the language table. */
755
756 if(display_info->language_table)
757 {
758 gx_display_language_table_set_ext(display_info->display, display_info->language_table, (GX_UBYTE) display_info->language_table_size, display_info->string_table_size);
759 gx_display_active_language_set(display_info->display, language);
760 }
761
762 /* Set screen rotation angle. */
763
764 display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
765
766 /* create the canvas for this display */
767
768 gx_canvas_create(display_info->canvas,
769 display_info->canvas_name,
770 display_info->display,
771 GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
772 display_info->x_resolution,
773 display_info->y_resolution,
774 display_info->canvas_memory,
775 display_info->canvas_memory_size);
776
777 /* Create the root window for this canvas */
778
779 gx_utility_rectangle_define(&size,
780 0, 0,
781 (GX_VALUE) (display_info->x_resolution - 1),
782 (GX_VALUE) (display_info->y_resolution - 1));
783
784 gx_window_root_create(display_info->root_window,
785 display_info->name,
786 display_info->canvas, GX_STYLE_NONE, 0, &size);
787 if (return_root)
788 {
789 *return_root = display_info->root_window;
790 }
791 return GX_SUCCESS;
792 }
793 #undef GUIX_STUDIO_GENERATED_FILE
794