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