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:10 */
10 /*******************************************************************************/
11
12
13 #define GUIX_STUDIO_GENERATED_FILE
14 #include <stddef.h>
15 #include "keyboard_8bpp_resources.h"
16 #include "keyboard_8bpp_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 KEYBOARD_SCREEN_CONTROL_BLOCK keyboard_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[32640];
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 keyboard_8bpp_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 480, /* x resolution */
39 272, /* 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 130560, /* canvas memory size in bytes */
45 0 /* 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_pixelmap_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)80 UINT gx_studio_pixelmap_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
81 {
82 UINT status;
83 GX_PIXELMAP_PROMPT *pix_prompt = (GX_PIXELMAP_PROMPT *) control_block;
84 GX_PROMPT *prompt = (GX_PROMPT *) pix_prompt;
85 GX_PIXELMAP_PROMPT_PROPERTIES *props = (GX_PIXELMAP_PROMPT_PROPERTIES *) info->properties;
86 status = gx_pixelmap_prompt_create(pix_prompt, info->widget_name, parent,
87 props->string_id,
88 props->fill_map_id,
89 info->style, info->widget_id, &info->size);
90
91 if (status == GX_SUCCESS)
92 {
93 gx_pixelmap_prompt_pixelmap_set(pix_prompt,
94 props->left_map_id,
95 props->fill_map_id,
96 props->right_map_id,
97 props->selected_left_map_id,
98 props->selected_fill_map_id,
99 props->selected_right_map_id);
100 gx_prompt_font_set(prompt, props->font_id);
101 #if defined(GUIX_5_4_0_COMPATIBILITY)
102 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
103 #else
104 gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
105 #endif
106 }
107 return status;
108 }
109
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)110 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
111 {
112 UINT status;
113 GX_WINDOW *window = (GX_WINDOW *) control_block;
114 GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
115 status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
116 if (status == GX_SUCCESS)
117 {
118 if (props->wallpaper_id)
119 {
120 gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
121 }
122 }
123 return status;
124 }
125
gx_studio_text_input_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)126 UINT gx_studio_text_input_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
127 {
128 UINT status;
129 GX_STRING text;
130 GX_SINGLE_LINE_TEXT_INPUT *input = (GX_SINGLE_LINE_TEXT_INPUT *) control_block;
131 GX_PROMPT *prompt = (GX_PROMPT *) input;
132 GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES *props = (GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES *) info->properties;
133 status = gx_single_line_text_input_create(input, info->widget_name, parent, props->buffer, props->buffer_size, info->style, info->widget_id, &info->size);
134 if (status == GX_SUCCESS)
135 {
136 gx_prompt_font_set(prompt, props->font_id);
137 gx_single_line_text_input_text_color_set(input, props->normal_text_color_id, props->selected_text_color_id,
138 props->disabled_text_color_id, props->readonly_text_color_id);
139 gx_single_line_text_input_fill_color_set(input, input->gx_widget_normal_fill_color, input->gx_widget_selected_fill_color,
140 input->gx_widget_disabled_fill_color, props->readonly_fill_color_id);
141 if (props->buffer && props->buffer_size > 0 && props->string_id)
142 {
143 gx_display_string_get_ext(keyboard_8bpp_display_table[0].display, props->string_id, &text);
144
145 if (text.gx_string_ptr)
146 {
147 gx_single_line_text_input_text_set_ext(input, &text);
148 }
149 }
150 }
151 return status;
152 }
153 GX_WINDOW_PROPERTIES keyboard_screen_properties =
154 {
155 0 /* wallpaper pixelmap id */
156 };
157 GX_PIXELMAP_PROMPT_PROPERTIES keyboard_screen_prompt_1_properties =
158 {
159 GX_STRING_ID_STRING_1, /* string id */
160 GX_FONT_ID_MIDSIZE, /* font id */
161 GX_COLOR_ID_WHITE, /* normal text color */
162 GX_COLOR_ID_SELECTED_TEXT, /* selected text color */
163 GX_COLOR_ID_WHITE, /* disabled text color */
164 0, /* left pixelmap id */
165 0, /* fill pixelmap id */
166 0, /* right pixelmap id */
167 0, /* selected left pixelmap id */
168 0, /* selected fill pixelmap id */
169 0 /* selected right pixelmap id */
170 };
171 GX_ICON_PROPERTIES keyboard_screen_icon_1_properties =
172 {
173 GX_PIXELMAP_ID_HOME, /* normal pixelmap id */
174 0 /* selected pixelmap id */
175 };
176 GX_CHAR keyboard_screen_keyboard_input_field_buffer[100];
177 GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES keyboard_screen_keyboard_input_field_properties =
178 {
179 GX_STRING_ID_STRING_2, /* string id */
180 GX_FONT_ID_MIDSIZE, /* font id */
181 GX_COLOR_ID_DARK_GRAY, /* normal text color */
182 GX_COLOR_ID_DARK_GRAY, /* selected text color */
183 GX_COLOR_ID_DARK_GRAY, /* disabled text color */
184 GX_COLOR_ID_READONLY_FILL, /* readonly fill color */
185 GX_COLOR_ID_READONLY_TEXT, /* readonly text color */
186 keyboard_screen_keyboard_input_field_buffer, /* buffer */
187 100, /* buffer size */
188 };
189 GX_WINDOW_PROPERTIES keyboard_screen_keyboard_frame_properties =
190 {
191 0 /* wallpaper pixelmap id */
192 };
193 GX_PIXELMAP_BUTTON_PROPERTIES keyboard_screen_pixelmap_button_1_properties =
194 {
195 GX_PIXELMAP_ID_B_BACKSPACE, /* normal pixelmap id */
196 GX_PIXELMAP_ID_B_BACKSPACE_H, /* selected pixelmap id */
197 0 /* disabled pixelmap id */
198 };
199
200 GX_CONST GX_STUDIO_WIDGET keyboard_screen_icon_1_define =
201 {
202 "icon_1",
203 GX_TYPE_ICON, /* widget type */
204 GX_ID_NONE, /* widget id */
205 #if defined(GX_WIDGET_USER_DATA)
206 0, /* user data */
207 #endif
208 GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP, /* style flags */
209 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
210 sizeof(GX_ICON), /* control block size */
211 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
212 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
213 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
214 gx_studio_icon_create, /* create function */
215 GX_NULL, /* drawing function override */
216 GX_NULL, /* event function override */
217 {8, 4, 39, 33}, /* widget size */
218 GX_NULL, /* no next widget */
219 GX_NULL, /* no child widgets */
220 offsetof(KEYBOARD_SCREEN_CONTROL_BLOCK, keyboard_screen_icon_1), /* control block */
221 (void *) &keyboard_screen_icon_1_properties /* extended properties */
222 };
223
224 GX_CONST GX_STUDIO_WIDGET keyboard_screen_pixelmap_button_1_define =
225 {
226 "pixelmap_button_1",
227 GX_TYPE_PIXELMAP_BUTTON, /* widget type */
228 IDB_BACKSPACE, /* widget id */
229 #if defined(GX_WIDGET_USER_DATA)
230 0, /* user data */
231 #endif
232 GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_RIGHT|GX_STYLE_VALIGN_CENTER, /* style flags */
233 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
234 sizeof(GX_PIXELMAP_BUTTON), /* control block size */
235 GX_COLOR_ID_BTN_LOWER, /* normal color id */
236 GX_COLOR_ID_BTN_UPPER, /* selected color id */
237 GX_COLOR_ID_BTN_LOWER, /* disabled color id */
238 gx_studio_pixelmap_button_create, /* create function */
239 GX_NULL, /* drawing function override */
240 GX_NULL, /* event function override */
241 {402, 48, 472, 79}, /* widget size */
242 GX_NULL, /* no next widget */
243 GX_NULL, /* no child widgets */
244 offsetof(KEYBOARD_SCREEN_CONTROL_BLOCK, keyboard_screen_pixelmap_button_1), /* control block */
245 (void *) &keyboard_screen_pixelmap_button_1_properties /* extended properties */
246 };
247
248 GX_CONST GX_STUDIO_WIDGET keyboard_screen_keyboard_frame_define =
249 {
250 "keyboard_frame",
251 GX_TYPE_WINDOW, /* widget type */
252 GX_ID_NONE, /* widget id */
253 #if defined(GX_WIDGET_USER_DATA)
254 0, /* user data */
255 #endif
256 GX_STYLE_BORDER_NONE, /* style flags */
257 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
258 sizeof(GX_WINDOW), /* control block size */
259 GX_COLOR_ID_DARK_GRAY, /* normal color id */
260 GX_COLOR_ID_DARK_GRAY, /* selected color id */
261 GX_COLOR_ID_DARK_GRAY, /* disabled color id */
262 gx_studio_window_create, /* create function */
263 GX_NULL, /* drawing function override */
264 (UINT (*)(GX_WIDGET *, GX_EVENT *)) keyboard_frame_event_handler, /* event function override */
265 {0, 80, 479, 269}, /* widget size */
266 &keyboard_screen_pixelmap_button_1_define, /* next widget definition */
267 GX_NULL, /* no child widgets */
268 offsetof(KEYBOARD_SCREEN_CONTROL_BLOCK, keyboard_screen_keyboard_frame), /* control block */
269 (void *) &keyboard_screen_keyboard_frame_properties /* extended properties */
270 };
271
272 GX_CONST GX_STUDIO_WIDGET keyboard_screen_keyboard_input_field_define =
273 {
274 "keyboard_input_field",
275 GX_TYPE_SINGLE_LINE_TEXT_INPUT, /* widget type */
276 ID_INPUT_FIELD, /* widget id */
277 #if defined(GX_WIDGET_USER_DATA)
278 0, /* user data */
279 #endif
280 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_LEFT, /* style flags */
281 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
282 sizeof(GX_SINGLE_LINE_TEXT_INPUT), /* control block size */
283 GX_COLOR_ID_TEXT_INPUT_FILL, /* normal color id */
284 GX_COLOR_ID_TEXT_INPUT_FILL, /* selected color id */
285 GX_COLOR_ID_TEXT_INPUT_FILL, /* disabled color id */
286 gx_studio_text_input_create, /* create function */
287 GX_NULL, /* drawing function override */
288 (UINT (*)(GX_WIDGET *, GX_EVENT *)) input_field_event_process, /* event function override */
289 {5, 48, 406, 77}, /* widget size */
290 &keyboard_screen_keyboard_frame_define, /* next widget definition */
291 GX_NULL, /* no child widgets */
292 offsetof(KEYBOARD_SCREEN_CONTROL_BLOCK, keyboard_screen_keyboard_input_field), /* control block */
293 (void *) &keyboard_screen_keyboard_input_field_properties /* extended properties */
294 };
295
296 GX_CONST GX_STUDIO_WIDGET keyboard_screen_prompt_1_define =
297 {
298 "prompt_1",
299 GX_TYPE_PIXELMAP_PROMPT, /* widget type */
300 GX_ID_NONE, /* widget id */
301 #if defined(GX_WIDGET_USER_DATA)
302 0, /* user data */
303 #endif
304 GX_STYLE_BORDER_THIN|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER, /* style flags */
305 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
306 sizeof(GX_PIXELMAP_PROMPT), /* control block size */
307 GX_COLOR_ID_WIDGET_FILL, /* normal color id */
308 GX_COLOR_ID_SELECTED_FILL, /* selected color id */
309 GX_COLOR_ID_WIDGET_FILL, /* disabled color id */
310 gx_studio_pixelmap_prompt_create, /* create function */
311 GX_NULL, /* drawing function override */
312 GX_NULL, /* event function override */
313 {0, 0, 479, 38}, /* widget size */
314 &keyboard_screen_keyboard_input_field_define, /* next widget definition */
315 &keyboard_screen_icon_1_define, /* child widget definition */
316 offsetof(KEYBOARD_SCREEN_CONTROL_BLOCK, keyboard_screen_prompt_1), /* control block */
317 (void *) &keyboard_screen_prompt_1_properties /* extended properties */
318 };
319
320 GX_CONST GX_STUDIO_WIDGET keyboard_screen_define =
321 {
322 "keyboard_screen",
323 GX_TYPE_WINDOW, /* widget type */
324 GX_ID_NONE, /* widget id */
325 #if defined(GX_WIDGET_USER_DATA)
326 0, /* user data */
327 #endif
328 GX_STYLE_BORDER_NONE, /* style flags */
329 GX_STATUS_ACCEPTS_FOCUS, /* status flags */
330 sizeof(KEYBOARD_SCREEN_CONTROL_BLOCK), /* control block size */
331 GX_COLOR_ID_CANVAS, /* normal color id */
332 GX_COLOR_ID_CANVAS, /* selected color id */
333 GX_COLOR_ID_CANVAS, /* disabled color id */
334 gx_studio_window_create, /* create function */
335 GX_NULL, /* drawing function override */
336 GX_NULL, /* event function override */
337 {0, 0, 479, 271}, /* widget size */
338 GX_NULL, /* next widget */
339 &keyboard_screen_prompt_1_define, /* child widget */
340 0, /* control block */
341 (void *) &keyboard_screen_properties /* extended properties */
342 };
343 GX_CONST GX_STUDIO_WIDGET_ENTRY keyboard_8bpp_widget_table[] =
344 {
345 { &keyboard_screen_define, (GX_WIDGET *) &keyboard_screen },
346 {GX_NULL, GX_NULL}
347 };
348
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)349 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
350 {
351 UINT status = GX_SUCCESS;
352 GX_WIDGET *widget = GX_NULL;
353 GX_VALUE list_count = 0;
354 GX_VALUE list_total_count = 0;
355
356 if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
357 {
358 list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
359 }
360
361 while(definition && status == GX_SUCCESS)
362 {
363 if (definition->create_function)
364 {
365 if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
366 {
367 status = gx_widget_allocate(&widget, definition->control_block_size);
368 if (status != GX_SUCCESS)
369 {
370 return GX_NULL;
371 }
372 }
373 else
374 {
375 if (control == GX_NULL)
376 {
377 return GX_NULL;
378 }
379 widget = (GX_WIDGET *) (control + definition->control_block_offset);
380 }
381
382 status = definition->create_function(definition, widget, parent);
383
384 if(list_count < list_total_count)
385 {
386 gx_menu_insert((GX_MENU *)parent, widget);
387 ((GX_MENU *)parent)->gx_menu_list_total_count--;
388 list_count++;
389 }
390
391 if (status == GX_SUCCESS)
392 {
393 if (definition->widget_type != GX_TYPE_TEMPLATE)
394 {
395 #if defined(GUIX_5_4_0_COMPATIBILITY)
396 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
397 #else
398 gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
399 #endif
400 }
401
402 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
403 {
404 gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
405 }
406
407 if (definition->draw_function)
408 {
409 gx_widget_draw_set(widget, definition->draw_function);
410 }
411 if (definition->event_function)
412 {
413 gx_widget_event_process_set(widget, definition->event_function);
414 }
415
416 #if defined(GX_WIDGET_USER_DATA)
417 widget->gx_widget_user_data = definition->user_data;
418 #endif
419
420 if (definition->child_widget)
421 {
422 gx_studio_nested_widget_create(control, definition->child_widget, widget);
423 }
424 }
425 definition = definition->next_widget;
426 }
427 }
428 return widget;
429 }
430
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)431 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
432 {
433 GX_WIDGET *widget;
434 widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
435
436 if (parent && widget)
437 {
438 gx_widget_attach(parent, widget);
439 }
440 return widget;
441 }
442
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)443 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
444 {
445 UINT status = GX_FAILURE;
446 GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = keyboard_8bpp_widget_table;
447 GX_WIDGET *widget = GX_NULL;
448
449 while(entry->widget_information)
450 {
451 if (!strcmp(name, entry->widget_information->widget_name))
452 {
453 widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
454 if (widget)
455 {
456 status = GX_SUCCESS;
457 }
458 break;
459 }
460 entry++;
461 }
462
463 if (new_widget)
464 {
465 *new_widget = widget;
466 }
467 return status;
468 }
469
470
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)471 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
472 GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
473 {
474 GX_CONST GX_THEME *theme_ptr;
475 GX_RECTANGLE size;
476
477 GX_STUDIO_DISPLAY_INFO *display_info = &keyboard_8bpp_display_table[display];
478
479
480 /* create the requested display */
481
482 gx_display_create(display_info->display,
483 display_info->name,
484 driver,
485 (GX_VALUE) display_info->x_resolution,
486 (GX_VALUE) display_info->y_resolution);
487
488
489 /* install the request theme */
490
491 if(display_info->theme_table)
492 {
493 theme_ptr = display_info->theme_table[theme];
494 if(theme_ptr)
495 {
496 gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
497
498 /* install the color palette if required */
499 if (display_info->display->gx_display_driver_palette_set &&
500 theme_ptr->theme_palette != NULL)
501 {
502 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
503 }
504
505 gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
506 gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
507 gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
508 gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
509 }
510 }
511
512 /* Install the language table. */
513
514 if(display_info->language_table)
515 {
516 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);
517 gx_display_active_language_set(display_info->display, language);
518 }
519
520 /* Set screen rotation angle. */
521
522 display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
523
524 /* create the canvas for this display */
525
526 gx_canvas_create(display_info->canvas,
527 display_info->canvas_name,
528 display_info->display,
529 GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
530 display_info->x_resolution,
531 display_info->y_resolution,
532 display_info->canvas_memory,
533 display_info->canvas_memory_size);
534
535 /* Create the root window for this canvas */
536
537 gx_utility_rectangle_define(&size,
538 0, 0,
539 (GX_VALUE) (display_info->x_resolution - 1),
540 (GX_VALUE) (display_info->y_resolution - 1));
541
542 gx_window_root_create(display_info->root_window,
543 display_info->name,
544 display_info->canvas, GX_STYLE_NONE, 0, &size);
545 if (return_root)
546 {
547 *return_root = display_info->root_window;
548 }
549 return GX_SUCCESS;
550 }
551 #undef GUIX_STUDIO_GENERATED_FILE
552