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 "text_draw_resources.h"
16 #include "text_draw_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 display_1_control_block;
21 GX_WINDOW_ROOT display_1_root_window;
22 GX_CANVAS display_1_canvas_control_block;
23 ULONG display_1_canvas_memory[153600];
24
25 extern GX_CONST GX_THEME *display_1_theme_table[];
26 extern GX_CONST GX_STRING *display_1_language_table[];
27
28 GX_STUDIO_DISPLAY_INFO text_draw_display_table[1] =
29 {
30 {
31 "display_1",
32 "display_1_canvas",
33 display_1_theme_table,
34 display_1_language_table,
35 DISPLAY_1_THEME_TABLE_SIZE,
36 DISPLAY_1_LANGUAGE_TABLE_SIZE,
37 DISPLAY_1_STRING_TABLE_SIZE,
38 640, /* x resolution */
39 480, /* y resolution */
40 &display_1_control_block,
41 &display_1_canvas_control_block,
42 &display_1_root_window,
43 display_1_canvas_memory, /* canvas memory area */
44 614400, /* canvas memory size in bytes */
45 GX_SCREEN_ROTATION_NONE /* rotation angle */
46 }
47 };
48
49
gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)50 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
51 {
52 UINT status;
53 GX_PROMPT *prompt = (GX_PROMPT *) control_block;
54 GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
55 status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
56 if (status == GX_SUCCESS)
57 {
58 gx_prompt_font_set(prompt, props->font_id);
59 #if defined(GUIX_5_4_0_COMPATIBILITY)
60 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
61 #else
62 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
63 #endif
64 }
65 return status;
66 }
67
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)68 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
69 {
70 UINT status;
71 GX_WINDOW *window = (GX_WINDOW *) control_block;
72 GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
73 status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
74 if (status == GX_SUCCESS)
75 {
76 if (props->wallpaper_id)
77 {
78 gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
79 }
80 }
81 return status;
82 }
83 GX_WINDOW_PROPERTIES main_screen_properties =
84 {
85 0 /* wallpaper pixelmap id */
86 };
87 GX_PROMPT_PROPERTIES main_screen_prompt_4_properties =
88 {
89 GX_STRING_ID_STRING_6, /* string id */
90 GX_FONT_ID_PROMPT, /* font id */
91 GX_COLOR_ID_TEXT, /* normal text color */
92 GX_COLOR_ID_TEXT, /* selected text color */
93 GX_COLOR_ID_TEXT /* disabled text color */
94 };
95 GX_PROMPT_PROPERTIES main_screen_prompt_properties =
96 {
97 GX_STRING_ID_STRING_3, /* string id */
98 GX_FONT_ID_PROMPT, /* font id */
99 GX_COLOR_ID_TEXT, /* normal text color */
100 GX_COLOR_ID_TEXT, /* selected text color */
101 GX_COLOR_ID_TEXT /* disabled text color */
102 };
103 GX_PROMPT_PROPERTIES main_screen_prompt_left_aligned_properties =
104 {
105 GX_STRING_ID_STRING_1, /* string id */
106 GX_FONT_ID_PROMPT, /* font id */
107 GX_COLOR_ID_TEXT, /* normal text color */
108 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
109 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
110 };
111 GX_PROMPT_PROPERTIES main_screen_prompt_2_properties =
112 {
113 GX_STRING_ID_STRING_4, /* string id */
114 GX_FONT_ID_PROMPT, /* font id */
115 GX_COLOR_ID_TEXT, /* normal text color */
116 GX_COLOR_ID_TEXT, /* selected text color */
117 GX_COLOR_ID_TEXT /* disabled text color */
118 };
119 GX_PROMPT_PROPERTIES main_screen_prompt_3_properties =
120 {
121 GX_STRING_ID_STRING_5, /* string id */
122 GX_FONT_ID_PROMPT, /* font id */
123 GX_COLOR_ID_TEXT, /* normal text color */
124 GX_COLOR_ID_TEXT, /* selected text color */
125 GX_COLOR_ID_TEXT /* disabled text color */
126 };
127 GX_PROMPT_PROPERTIES main_screen_prompt_center_aligned_properties =
128 {
129 GX_STRING_ID_STRING_1, /* string id */
130 GX_FONT_ID_PROMPT, /* font id */
131 GX_COLOR_ID_TEXT, /* normal text color */
132 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
133 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
134 };
135 GX_PROMPT_PROPERTIES main_screen_prompt_right_aligned_properties =
136 {
137 GX_STRING_ID_STRING_1, /* string id */
138 GX_FONT_ID_PROMPT, /* font id */
139 GX_COLOR_ID_TEXT, /* normal text color */
140 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
141 GX_COLOR_ID_DISABLED_TEXT /* disabled text color */
142 };
143
144 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_right_aligned_define =
145 {
146 "prompt_right_aligned",
147 GX_TYPE_PROMPT, /* widget type */
148 GX_ID_NONE, /* widget id */
149 #if defined(GX_WIDGET_USER_DATA)
150 0, /* user data */
151 #endif
152 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
153 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
154 sizeof(GX_PROMPT), /* control block size */
155 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
156 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
157 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
158 gx_studio_prompt_create, /* create function */
159 (VOID (*)(GX_WIDGET *)) prompt_right_aligned_draw, /* drawing function override */
160 GX_NULL, /* event function override */
161 {183, 220, 477, 263}, /* widget size */
162 GX_NULL, /* no next widget */
163 GX_NULL, /* no child widgets */
164 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_right_aligned), /* control block */
165 (void *) &main_screen_prompt_right_aligned_properties /* extended properties */
166 };
167
168 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_center_aligned_define =
169 {
170 "prompt_center_aligned",
171 GX_TYPE_PROMPT, /* widget type */
172 GX_ID_NONE, /* widget id */
173 #if defined(GX_WIDGET_USER_DATA)
174 0, /* user data */
175 #endif
176 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
177 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
178 sizeof(GX_PROMPT), /* control block size */
179 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
180 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
181 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
182 gx_studio_prompt_create, /* create function */
183 (VOID (*)(GX_WIDGET *)) prompt_center_aligned_draw, /* drawing function override */
184 GX_NULL, /* event function override */
185 {183, 158, 477, 201}, /* widget size */
186 &main_screen_prompt_right_aligned_define, /* next widget definition */
187 GX_NULL, /* no child widgets */
188 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_center_aligned), /* control block */
189 (void *) &main_screen_prompt_center_aligned_properties /* extended properties */
190 };
191
192 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_3_define =
193 {
194 "prompt_3",
195 GX_TYPE_PROMPT, /* widget type */
196 GX_ID_NONE, /* widget id */
197 #if defined(GX_WIDGET_USER_DATA)
198 0, /* user data */
199 #endif
200 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
201 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
202 sizeof(GX_PROMPT), /* control block size */
203 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
204 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
205 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
206 gx_studio_prompt_create, /* create function */
207 GX_NULL, /* drawing function override */
208 GX_NULL, /* event function override */
209 {47, 172, 154, 189}, /* widget size */
210 &main_screen_prompt_center_aligned_define, /* next widget definition */
211 GX_NULL, /* no child widgets */
212 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_3), /* control block */
213 (void *) &main_screen_prompt_3_properties /* extended properties */
214 };
215
216 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_2_define =
217 {
218 "prompt_2",
219 GX_TYPE_PROMPT, /* widget type */
220 GX_ID_NONE, /* widget id */
221 #if defined(GX_WIDGET_USER_DATA)
222 0, /* user data */
223 #endif
224 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
225 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
226 sizeof(GX_PROMPT), /* control block size */
227 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
228 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
229 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
230 gx_studio_prompt_create, /* create function */
231 GX_NULL, /* drawing function override */
232 GX_NULL, /* event function override */
233 {47, 111, 131, 128}, /* widget size */
234 &main_screen_prompt_3_define, /* next widget definition */
235 GX_NULL, /* no child widgets */
236 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_2), /* control block */
237 (void *) &main_screen_prompt_2_properties /* extended properties */
238 };
239
240 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_left_aligned_define =
241 {
242 "prompt_left_aligned",
243 GX_TYPE_PROMPT, /* widget type */
244 GX_ID_NONE, /* widget id */
245 #if defined(GX_WIDGET_USER_DATA)
246 0, /* user data */
247 #endif
248 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
249 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
250 sizeof(GX_PROMPT), /* control block size */
251 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
252 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
253 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
254 gx_studio_prompt_create, /* create function */
255 (VOID (*)(GX_WIDGET *)) prompt_left_aligned_draw, /* drawing function override */
256 GX_NULL, /* event function override */
257 {183, 96, 477, 139}, /* widget size */
258 &main_screen_prompt_2_define, /* next widget definition */
259 GX_NULL, /* no child widgets */
260 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_left_aligned), /* control block */
261 (void *) &main_screen_prompt_left_aligned_properties /* extended properties */
262 };
263
264 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_define =
265 {
266 "prompt",
267 GX_TYPE_PROMPT, /* widget type */
268 GX_ID_NONE, /* widget id */
269 #if defined(GX_WIDGET_USER_DATA)
270 0, /* user data */
271 #endif
272 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
273 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
274 sizeof(GX_PROMPT), /* control block size */
275 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
276 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
277 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
278 gx_studio_prompt_create, /* create function */
279 GX_NULL, /* drawing function override */
280 GX_NULL, /* event function override */
281 {212, 34, 402, 55}, /* widget size */
282 &main_screen_prompt_left_aligned_define, /* next widget definition */
283 GX_NULL, /* no child widgets */
284 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt), /* control block */
285 (void *) &main_screen_prompt_properties /* extended properties */
286 };
287
288 GX_CONST GX_STUDIO_WIDGET main_screen_prompt_4_define =
289 {
290 "prompt_4",
291 GX_TYPE_PROMPT, /* widget type */
292 GX_ID_NONE, /* widget id */
293 #if defined(GX_WIDGET_USER_DATA)
294 0, /* user data */
295 #endif
296 GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
297 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
298 sizeof(GX_PROMPT), /* control block size */
299 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
300 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
301 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
302 gx_studio_prompt_create, /* create function */
303 GX_NULL, /* drawing function override */
304 GX_NULL, /* event function override */
305 {47, 233, 141, 250}, /* widget size */
306 &main_screen_prompt_define, /* next widget definition */
307 GX_NULL, /* no child widgets */
308 offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_prompt_4), /* control block */
309 (void *) &main_screen_prompt_4_properties /* extended properties */
310 };
311
312 GX_CONST GX_STUDIO_WIDGET main_screen_define =
313 {
314 "main_screen",
315 GX_TYPE_WINDOW, /* widget type */
316 GX_ID_NONE, /* widget id */
317 #if defined(GX_WIDGET_USER_DATA)
318 0, /* user data */
319 #endif
320 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED, /* style flags */
321 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
322 sizeof(MAIN_SCREEN_CONTROL_BLOCK), /* control block size */
323 GX_COLOR_ID_WINDOW_FILL, /* normal color id */
324 GX_COLOR_ID_WINDOW_FILL, /* selected color id */
325 GX_COLOR_ID_DISABLED_FILL, /* disabled color id */
326 gx_studio_window_create, /* create function */
327 GX_NULL, /* drawing function override */
328 GX_NULL, /* event function override */
329 {0, 0, 639, 479}, /* widget size */
330 GX_NULL, /* next widget */
331 &main_screen_prompt_4_define, /* child widget */
332 0, /* control block */
333 (void *) &main_screen_properties /* extended properties */
334 };
335 GX_CONST GX_STUDIO_WIDGET_ENTRY text_draw_widget_table[] =
336 {
337 { &main_screen_define, (GX_WIDGET *) &main_screen },
338 {GX_NULL, GX_NULL}
339 };
340
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)341 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
342 {
343 UINT status = GX_SUCCESS;
344 GX_WIDGET *widget = GX_NULL;
345 GX_VALUE list_count = 0;
346 GX_VALUE list_total_count = 0;
347
348 if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
349 {
350 list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
351 }
352
353 while(definition && status == GX_SUCCESS)
354 {
355 if (definition->create_function)
356 {
357 if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
358 {
359 status = gx_widget_allocate(&widget, definition->control_block_size);
360 if (status != GX_SUCCESS)
361 {
362 return GX_NULL;
363 }
364 }
365 else
366 {
367 if (control == GX_NULL)
368 {
369 return GX_NULL;
370 }
371 widget = (GX_WIDGET *) (control + definition->control_block_offset);
372 }
373
374 status = definition->create_function(definition, widget, parent);
375
376 if(list_count < list_total_count)
377 {
378 gx_menu_insert((GX_MENU *)parent, widget);
379 ((GX_MENU *)parent)->gx_menu_list_total_count--;
380 list_count++;
381 }
382
383 if (status == GX_SUCCESS)
384 {
385 if (definition->widget_type != GX_TYPE_TEMPLATE)
386 {
387 #if defined(GUIX_5_4_0_COMPATIBILITY)
388 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
389 #else
390 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
391 #endif
392 }
393
394 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
395 {
396 gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
397 }
398
399 if (definition->draw_function)
400 {
401 gx_widget_draw_set(widget, definition->draw_function);
402 }
403 if (definition->event_function)
404 {
405 gx_widget_event_process_set(widget, definition->event_function);
406 }
407
408 #if defined(GX_WIDGET_USER_DATA)
409 widget->gx_widget_user_data = definition->user_data;
410 #endif
411
412 if (definition->child_widget)
413 {
414 gx_studio_nested_widget_create(control, definition->child_widget, widget);
415 }
416 }
417 definition = definition->next_widget;
418 }
419 }
420 return widget;
421 }
422
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)423 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
424 {
425 GX_WIDGET *widget;
426 widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
427
428 if (parent && widget)
429 {
430 gx_widget_attach(parent, widget);
431 }
432 return widget;
433 }
434
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)435 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
436 {
437 UINT status = GX_FAILURE;
438 GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = text_draw_widget_table;
439 GX_WIDGET *widget = GX_NULL;
440
441 while(entry->widget_information)
442 {
443 if (!strcmp(name, entry->widget_information->widget_name))
444 {
445 widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
446 if (widget)
447 {
448 status = GX_SUCCESS;
449 }
450 break;
451 }
452 entry++;
453 }
454
455 if (new_widget)
456 {
457 *new_widget = widget;
458 }
459 return status;
460 }
461
462
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)463 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
464 GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
465 {
466 GX_CONST GX_THEME *theme_ptr;
467 GX_RECTANGLE size;
468
469 GX_STUDIO_DISPLAY_INFO *display_info = &text_draw_display_table[display];
470
471
472 /* create the requested display */
473
474 gx_display_create(display_info->display,
475 display_info->name,
476 driver,
477 (GX_VALUE) display_info->x_resolution,
478 (GX_VALUE) display_info->y_resolution);
479
480
481 /* install the request theme */
482
483 if(display_info->theme_table)
484 {
485 theme_ptr = display_info->theme_table[theme];
486 if(theme_ptr)
487 {
488 gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
489
490 /* install the color palette if required */
491 if (display_info->display->gx_display_driver_palette_set &&
492 theme_ptr->theme_palette != NULL)
493 {
494 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
495 }
496
497 gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
498 gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
499 gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
500 gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
501 }
502 }
503
504 /* Install the language table. */
505
506 if(display_info->language_table)
507 {
508 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);
509 gx_display_active_language_set(display_info->display, language);
510 }
511
512 /* Set screen rotation angle. */
513
514 display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
515
516 /* create the canvas for this display */
517
518 gx_canvas_create(display_info->canvas,
519 display_info->canvas_name,
520 display_info->display,
521 GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
522 display_info->x_resolution,
523 display_info->y_resolution,
524 display_info->canvas_memory,
525 display_info->canvas_memory_size);
526
527 /* Create the root window for this canvas */
528
529 gx_utility_rectangle_define(&size,
530 0, 0,
531 (GX_VALUE) (display_info->x_resolution - 1),
532 (GX_VALUE) (display_info->y_resolution - 1));
533
534 gx_window_root_create(display_info->root_window,
535 display_info->name,
536 display_info->canvas, GX_STYLE_NONE, 0, &size);
537 if (return_root)
538 {
539 *return_root = display_info->root_window;
540 }
541 return GX_SUCCESS;
542 }
543 #undef GUIX_STUDIO_GENERATED_FILE
544