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.1                                               */
9 /*  Date (dd.mm.yyyy): 22.12.2023   Time (hh:mm): 16:06                        */
10 /*******************************************************************************/
11 
12 
13 #define GUIX_STUDIO_GENERATED_FILE
14 #include <stddef.h>
15 #include "system_screen_stack_resources.h"
16 #include "system_screen_stack_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 LANGUAGE_SCREEN_CONTROL_BLOCK language_screen;
20 BOOK_SCREEN_CONTROL_BLOCK book_screen;
21 BOOKSHELF_SCREEN_CONTROL_BLOCK bookshelf_screen;
22 MAIN_SCREEN_CONTROL_BLOCK main_screen;
23 GX_CONST GX_STUDIO_WIDGET setting_screen_define;
24 GX_DISPLAY Main_Display_control_block;
25 GX_WINDOW_ROOT Main_Display_root_window;
26 GX_CANVAS  Main_Display_canvas_control_block;
27 ULONG      Main_Display_canvas_memory[76800];
28 
29 extern GX_CONST GX_THEME *Main_Display_theme_table[];
30 extern GX_CONST GX_STRING *Main_Display_language_table[];
31 
32 GX_STUDIO_DISPLAY_INFO system_screen_stack_display_table[1] =
33 {
34     {
35     "Main_Display",
36     "Main_Display_canvas",
37     Main_Display_theme_table,
38     Main_Display_language_table,
39     MAIN_DISPLAY_THEME_TABLE_SIZE,
40     MAIN_DISPLAY_LANGUAGE_TABLE_SIZE,
41     MAIN_DISPLAY_STRING_TABLE_SIZE,
42     240,                                     /* x resolution                   */
43     320,                                     /* y resolution                   */
44     &Main_Display_control_block,
45     &Main_Display_canvas_control_block,
46     &Main_Display_root_window,
47     Main_Display_canvas_memory,              /* canvas memory area             */
48     307200,                                  /* canvas memory size in bytes    */
49     0                                        /* rotation angle                 */
50     }
51 };
52 
gx_studio_action_target_get(GX_WIDGET * current,GX_CONST GX_STUDIO_ACTION * action)53 static GX_WIDGET *gx_studio_action_target_get(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action)
54 {
55     GX_WIDGET *parent = GX_NULL;
56     GX_WIDGET *target = GX_NULL;
57     INT        search_depth;
58     GX_STUDIO_WIDGET *widget_define;
59 
60     if (action->flags & GX_ACTION_FLAG_DYNAMIC_TARGET)
61     {
62                                              /* dynamically create the target widget */
63         widget_define = (GX_STUDIO_WIDGET *) action->target;
64         if(action->flags & GX_ACTION_FLAG_DYNAMIC_PARENT)
65         {
66             gx_window_root_find(current, (GX_WINDOW_ROOT **)&parent);
67             search_depth = GX_SEARCH_DEPTH_INFINITE;
68         }
69         else
70         {
71             parent = (GX_WIDGET *)action->parent;
72             search_depth = 1;
73         }
74         gx_widget_find(parent, widget_define->widget_id, search_depth, &target);
75         if (target == GX_NULL)
76         {
77             target = gx_studio_widget_create(GX_NULL, widget_define, GX_NULL);
78         }
79         if (target)
80         {
81             target->gx_widget_status |= GX_STATUS_STUDIO_CREATED;
82         }
83     }
84     else
85     {
86         target = (GX_WIDGET *) action->target;
87     }
88     return target;
89 }
90 
gx_studio_action_target_find(GX_WIDGET * current,GX_CONST GX_STUDIO_ACTION * action)91 static GX_WIDGET *gx_studio_action_target_find(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action)
92 {
93     GX_WIDGET *parent = GX_NULL;
94     GX_WIDGET *target = GX_NULL;
95     GX_STUDIO_WIDGET *widget_define;
96 
97     if (action->flags & GX_ACTION_FLAG_DYNAMIC_TARGET)
98     {
99                                              /* Find the dynamically created target */
100         widget_define = (GX_STUDIO_WIDGET *) action->target;
101         if(action->flags & GX_ACTION_FLAG_DYNAMIC_PARENT)
102         {
103             gx_window_root_find(current, (GX_WINDOW_ROOT **)&parent);
104         }
105         else
106         {
107             parent = (GX_WIDGET *)action->parent;
108         }
109         gx_widget_find(parent, widget_define->widget_id, GX_SEARCH_DEPTH_INFINITE, &target);
110     }
111     else
112     {
113         target = (GX_WIDGET *) action->target;
114     }
115     return target;
116 }
117 
gx_studio_action_parent_find(GX_WIDGET * current,GX_CONST GX_STUDIO_ACTION * action)118 static GX_WIDGET *gx_studio_action_parent_find(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action)
119 {
120 GX_WIDGET *parent = GX_NULL;
121 GX_STUDIO_WIDGET *widget_define;
122 
123     if (action->flags & GX_ACTION_FLAG_DYNAMIC_PARENT)
124     {
125                                              /* Find the dynamically created target */
126         widget_define = (GX_STUDIO_WIDGET *)action->parent;
127         gx_window_root_find(current, (GX_WINDOW_ROOT **)&parent);
128         gx_widget_find(parent, widget_define->widget_id, GX_SEARCH_DEPTH_INFINITE, &parent);
129     }
130     else
131     {
132         parent = (GX_WIDGET *)action->parent;
133     }
134     return parent;
135 }
136 
gx_studio_animation_execute(GX_WIDGET * current,GX_CONST GX_STUDIO_ACTION * action)137 static VOID gx_studio_animation_execute(GX_WIDGET *current, GX_CONST GX_STUDIO_ACTION *action)
138 {
139     GX_ANIMATION *animation;
140     GX_ANIMATION_INFO animation_info;
141     GX_WIDGET *parent = GX_NULL;
142     GX_WIDGET *target = GX_NULL;
143     gx_system_animation_get(&animation);
144     if (animation)
145     {
146         animation_info = *action->animation;
147 
148         if((action->flags & GX_ACTION_FLAG_POP_TARGET) ||
149            (action->flags & GX_ACTION_FLAG_POP_PARENT))
150         {
151             gx_system_screen_stack_get((GX_WIDGET **)&parent, &target);
152         }
153 
154         if(action->flags & GX_ACTION_FLAG_POP_TARGET)
155         {
156             animation_info.gx_animation_target = target;
157         }
158 
159         if(action->flags & GX_ACTION_FLAG_POP_PARENT)
160         {
161             animation_info.gx_animation_parent = (GX_WIDGET *)parent;
162         }
163 
164         if ((!animation_info.gx_animation_target) &&
165             (action->flags & GX_ACTION_FLAG_DYNAMIC_TARGET))
166         {
167             target = gx_studio_action_target_get(current, action);
168             animation_info.gx_animation_target = target;
169         }
170 
171         if (!animation_info.gx_animation_parent)
172         {
173             animation_info.gx_animation_parent = gx_studio_action_parent_find(current, action);
174         }
175 
176         if (animation_info.gx_animation_target &&
177             animation_info.gx_animation_parent)
178         {
179             gx_animation_start(animation, &animation_info);
180         }
181     }
182 }
183 
gx_studio_auto_event_handler(GX_WIDGET * widget,GX_EVENT * event_ptr,GX_CONST GX_STUDIO_EVENT_PROCESS * record)184 UINT gx_studio_auto_event_handler(GX_WIDGET *widget, GX_EVENT *event_ptr, GX_CONST GX_STUDIO_EVENT_PROCESS *record)
185 {
186     UINT status = GX_SUCCESS;
187     GX_CONST GX_STUDIO_ACTION *action;
188     GX_CONST GX_WIDGET *parent = GX_NULL;
189     GX_WIDGET *target = GX_NULL;
190     GX_CONST GX_STUDIO_EVENT_ENTRY *entry = record->event_table;
191 
192     while(entry->event_type)
193     {
194         if (entry->event_type == event_ptr->gx_event_type)
195         {
196             if((entry->event_type == GX_EVENT_ANIMATION_COMPLETE) &&
197                (entry->event_sender != event_ptr->gx_event_sender))
198             {
199                 entry++;
200                 continue;
201             }
202             action = entry->action_list;
203 
204             while(action->opcode)
205             {
206                 switch(action->opcode)
207                 {
208                 case GX_ACTION_TYPE_ATTACH:
209                     if((action->flags & GX_ACTION_FLAG_POP_TARGET) ||
210                        (action->flags & GX_ACTION_FLAG_POP_PARENT))
211                     {
212                         gx_system_screen_stack_get((GX_WIDGET **)&parent, &target);
213                     }
214 
215                     if(!(action->flags & GX_ACTION_FLAG_POP_PARENT))
216                     {
217                         parent = action->parent;
218                     }
219                     if(!(action->flags & GX_ACTION_FLAG_POP_TARGET))
220                     {
221                         target = gx_studio_action_target_get(widget, action);
222                     }
223                     if (parent && target)
224                     {
225                         gx_widget_attach(parent, target);
226                     }
227                     break;
228 
229                 case GX_ACTION_TYPE_DETACH:
230                     target = gx_studio_action_target_find(widget, action);
231                     if (target)
232                     {
233                         gx_widget_detach(target);
234                         if (target->gx_widget_status & GX_STATUS_STUDIO_CREATED)
235                         {
236                             if (widget == target)
237                             {
238                                 widget = GX_NULL;
239                             }
240 
241                             gx_widget_delete(target);
242                         }
243                     }
244                     break;
245 
246                 case GX_ACTION_TYPE_TOGGLE:
247                     if(action->flags & GX_ACTION_FLAG_POP_TARGET)
248                     {
249                        gx_system_screen_stack_get(GX_NULL, &target);
250                     }
251                     else
252                     {
253                         target = gx_studio_action_target_get(widget, action);
254                     }
255                     parent = widget->gx_widget_parent;
256                     if (parent)
257                     {
258                         gx_widget_detach(widget);
259                         gx_widget_attach(parent, target);
260                         if (widget->gx_widget_status & GX_STATUS_STUDIO_CREATED)
261                         {
262                             gx_widget_delete(widget);
263                             widget = GX_NULL;
264                         }
265                     }
266                     break;
267 
268                 case GX_ACTION_TYPE_SHOW:
269                     target = gx_studio_action_target_get(widget, action);
270                     if(target)
271                     {
272                         gx_widget_show(target);
273                     }
274                     break;
275 
276                 case GX_ACTION_TYPE_HIDE:
277                     target = gx_studio_action_target_find(widget, action);
278                     if(target)
279                     {
280                         gx_widget_hide(target);
281                     }
282                     break;
283 
284                 case GX_ACTION_TYPE_ANIMATION:
285                     gx_studio_animation_execute(widget, action);
286                     break;
287 
288                 case GX_ACTION_TYPE_WINDOW_EXECUTE:
289                     if((action->flags & GX_ACTION_FLAG_POP_TARGET) ||
290                        (action->flags & GX_ACTION_FLAG_POP_PARENT))
291                     {
292                         gx_system_screen_stack_get((GX_WIDGET **)&parent, &target);
293                     }
294 
295                     if(!(action->flags & GX_ACTION_FLAG_POP_PARENT))
296                     {
297                         parent = widget->gx_widget_parent;
298                     }
299                     if(!(action->flags & GX_ACTION_FLAG_POP_TARGET))
300                     {
301                         target = gx_studio_action_target_get(widget, action);
302                     }
303                     if (parent && target)
304                     {
305                         gx_widget_attach(parent, target);
306                         gx_window_execute((GX_WINDOW *) target, GX_NULL);
307                     }
308                     break;
309 
310                 case GX_ACTION_TYPE_WINDOW_EXECUTE_STOP:
311                     return event_ptr->gx_event_sender;
312 
313                 case GX_ACTION_TYPE_SCREEN_STACK_PUSH:
314                     target = gx_studio_action_target_get(widget, action);
315                     if(target)
316                     {
317                         gx_system_screen_stack_push(target);
318                     }
319                     break;
320 
321                 case GX_ACTION_TYPE_SCREEN_STACK_POP:
322                     gx_system_screen_stack_pop();
323                     break;
324 
325                 case GX_ACTION_TYPE_SCREEN_STACK_RESET:
326                     gx_system_screen_stack_reset();
327                     break;
328 
329                 default:
330                     break;
331                 }
332                 action++;
333             }
334         }
335         entry++;
336     }
337 
338     if (widget && record->chain_event_handler)
339     {
340         status = record->chain_event_handler(widget, event_ptr);
341     }
342     return status;
343 }
344 
345 
gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)346 UINT gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
347 {
348     UINT status;
349     GX_TEXT_BUTTON *button = (GX_TEXT_BUTTON *) control_block;
350     GX_TEXT_BUTTON_PROPERTIES *props = (GX_TEXT_BUTTON_PROPERTIES *) info->properties;
351     status = gx_text_button_create(button, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
352     if (status == GX_SUCCESS)
353     {
354         gx_text_button_font_set(button, props->font_id);
355 #if defined(GUIX_5_4_0_COMPATIBILITY)
356         gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id);
357 #else
358         gx_text_button_text_color_set(button, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
359 #endif
360     }
361     return status;
362 }
363 
gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)364 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
365 {
366     UINT status;
367     GX_ICON *icon = (GX_ICON *) control_block;
368     GX_ICON_PROPERTIES *props = (GX_ICON_PROPERTIES *) info->properties;
369     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);
370     if (props->selected_pixelmap_id)
371     {
372         gx_icon_pixelmap_set(icon, props->normal_pixelmap_id, props->selected_pixelmap_id);
373     }
374     else
375     {
376         gx_widget_resize((GX_WIDGET *)icon, (GX_RECTANGLE *)&info->size);
377     }
378     return status;
379 }
380 
gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)381 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
382 {
383     UINT status;
384     GX_PROMPT *prompt = (GX_PROMPT *) control_block;
385     GX_PROMPT_PROPERTIES *props = (GX_PROMPT_PROPERTIES *) info->properties;
386     status = gx_prompt_create(prompt, info->widget_name, parent, props->string_id, info->style, info->widget_id, &info->size);
387     if (status == GX_SUCCESS)
388     {
389         gx_prompt_font_set(prompt, props->font_id);
390 #if defined(GUIX_5_4_0_COMPATIBILITY)
391         gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id);
392 #else
393         gx_prompt_text_color_set(prompt, props->normal_text_color_id, props->selected_text_color_id, props->disabled_text_color_id);
394 #endif
395     }
396     return status;
397 }
398 
gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET * info,GX_WIDGET * control_block,GX_WIDGET * parent)399 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent)
400 {
401     UINT status;
402     GX_WINDOW *window = (GX_WINDOW *) control_block;
403     GX_WINDOW_PROPERTIES *props = (GX_WINDOW_PROPERTIES *) info->properties;
404     status = gx_window_create(window, info->widget_name, parent, info->style, info->widget_id, &info->size);
405     if (status == GX_SUCCESS)
406     {
407         if (props->wallpaper_id)
408         {
409             gx_window_wallpaper_set(window, props->wallpaper_id, info->style & GX_STYLE_TILE_WALLPAPER);
410         }
411     }
412     return status;
413 }
414 GX_WINDOW_PROPERTIES language_screen_properties =
415 {
416     0                                        /* wallpaper pixelmap id          */
417 };
418 GX_ICON_PROPERTIES language_screen_icon_10_2_properties =
419 {
420     GX_PIXELMAP_ID_ARROW,                    /* normal pixelmap id             */
421     0                                        /* selected pixelmap id           */
422 };
423 GX_PROMPT_PROPERTIES language_screen_prompt_properties =
424 {
425     GX_STRING_ID_STRING_12,                  /* string id                      */
426     GX_FONT_ID_PROMPT,                       /* font id                        */
427     GX_COLOR_ID_TEXT,                        /* normal text color              */
428     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
429     GX_COLOR_ID_TEXT                         /* disabled text color            */
430 };
431 GX_TEXT_BUTTON_PROPERTIES language_screen_home_1_properties =
432 {
433     GX_STRING_ID_STRING_52,                  /* string id                      */
434     GX_FONT_ID_BUTTON,                       /* font id                        */
435     GX_COLOR_ID_WHITE,                       /* normal text color              */
436     GX_COLOR_ID_WHITE,                       /* selected text color            */
437     GX_COLOR_ID_WHITE                        /* disabled text color            */
438 };
439 
440 GX_CONST GX_STUDIO_WIDGET language_screen_home_1_define =
441 {
442     "home_1",
443     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
444     ID_HOME_BUTTON,                          /* widget id                      */
445     #if defined(GX_WIDGET_USER_DATA)
446     0,                                       /* user data                      */
447     #endif
448     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
449     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
450     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
451     GX_COLOR_ID_BLACK,                       /* normal color id                */
452     GX_COLOR_ID_BLACK,                       /* selected color id              */
453     GX_COLOR_ID_BLACK,                       /* disabled color id              */
454     gx_studio_text_button_create,            /* create function                */
455     GX_NULL,                                 /* drawing function override      */
456     GX_NULL,                                 /* event function override        */
457     {137, 5, 225, 29},                       /* widget size                    */
458     GX_NULL,                                 /* no next widget                 */
459     GX_NULL,                                 /* no child widgets               */
460     offsetof(LANGUAGE_SCREEN_CONTROL_BLOCK, language_screen_home_1), /* control block */
461     (void *) &language_screen_home_1_properties /* extended properties         */
462 };
463 
464 GX_CONST GX_STUDIO_WIDGET language_screen_prompt_define =
465 {
466     "prompt",
467     GX_TYPE_PROMPT,                          /* widget type                    */
468     GX_ID_NONE,                              /* widget id                      */
469     #if defined(GX_WIDGET_USER_DATA)
470     0,                                       /* user data                      */
471     #endif
472     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_TEXT_CENTER,   /* style flags */
473     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
474     sizeof(GX_PROMPT),                       /* control block size             */
475     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
476     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
477     GX_COLOR_ID_DISABLED_FILL,               /* disabled color id              */
478     gx_studio_prompt_create,                 /* create function                */
479     GX_NULL,                                 /* drawing function override      */
480     GX_NULL,                                 /* event function override        */
481     {63, 94, 191, 111},                      /* widget size                    */
482     &language_screen_home_1_define,          /* next widget definition         */
483     GX_NULL,                                 /* no child widgets               */
484     offsetof(LANGUAGE_SCREEN_CONTROL_BLOCK, language_screen_prompt), /* control block */
485     (void *) &language_screen_prompt_properties /* extended properties         */
486 };
487 
488 GX_CONST GX_STUDIO_WIDGET language_screen_icon_10_2_define =
489 {
490     "icon_10_2",
491     GX_TYPE_ICON,                            /* widget type                    */
492     ID_BACK,                                 /* widget id                      */
493     #if defined(GX_WIDGET_USER_DATA)
494     0,                                       /* user data                      */
495     #endif
496     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
497     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
498     sizeof(GX_ICON),                         /* control block size             */
499     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
500     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
501     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
502     gx_studio_icon_create,                   /* create function                */
503     GX_NULL,                                 /* drawing function override      */
504     GX_NULL,                                 /* event function override        */
505     {15, 7, 44, 26},                         /* widget size                    */
506     &language_screen_prompt_define,          /* next widget definition         */
507     GX_NULL,                                 /* no child widgets               */
508     offsetof(LANGUAGE_SCREEN_CONTROL_BLOCK, language_screen_icon_10_2), /* control block */
509     (void *) &language_screen_icon_10_2_properties /* extended properties      */
510 };
511 
512 GX_ANIMATION_INFO language_screen_animation_1 = {
513     (GX_WIDGET *) &main_screen,
514     (GX_WIDGET *) &Main_Display_root_window,
515     GX_NULL,
516     GX_ANIMATION_TRANSLATE, ID_SLIDE_IN_MAIN_SCREEN, 0, 1,
517     {-240, 0}, {0, 0}, 255, 255, 10
518 };
519 
520 
521 GX_STUDIO_ACTION language_screen__id_back_gx_event_clicked_actions[2] = {
522     {GX_ACTION_TYPE_TOGGLE, GX_ACTION_FLAG_POP_TARGET|GX_ACTION_FLAG_POP_PARENT, GX_NULL, GX_NULL, GX_NULL},
523     {0, 0, GX_NULL, GX_NULL, GX_NULL}
524 };
525 
526 
527 GX_STUDIO_ACTION language_screen__id_home_button_gx_event_clicked_actions[4] = {
528     {GX_ACTION_TYPE_SCREEN_STACK_RESET, 0, &Main_Display_root_window, GX_NULL, GX_NULL},
529     {GX_ACTION_TYPE_ANIMATION, 0, &Main_Display_root_window, &main_screen, &language_screen_animation_1},
530     {GX_ACTION_TYPE_DETACH, 0, &Main_Display_root_window, &language_screen, GX_NULL},
531     {0, 0, GX_NULL, GX_NULL, GX_NULL}
532 };
533 
534 static GX_STUDIO_EVENT_ENTRY gx_studio_language_screen_event_table[] = {
535     {GX_SIGNAL(ID_BACK, GX_EVENT_CLICKED), 0, language_screen__id_back_gx_event_clicked_actions},
536     {GX_SIGNAL(ID_HOME_BUTTON, GX_EVENT_CLICKED), 0, language_screen__id_home_button_gx_event_clicked_actions},
537     {0, 0, GX_NULL}
538 };
539 
540 GX_STUDIO_EVENT_PROCESS language_screen_event_chain = {gx_studio_language_screen_event_table, (UINT (*)(GX_WIDGET *, GX_EVENT *))gx_window_event_process};
gx_studio_language_screen_event_process(GX_WIDGET * target,GX_EVENT * event_ptr)541 static UINT gx_studio_language_screen_event_process(GX_WIDGET *target, GX_EVENT *event_ptr)
542 {
543     return (gx_studio_auto_event_handler(target, event_ptr, &language_screen_event_chain));
544 }
545 
546 
547 GX_CONST GX_STUDIO_WIDGET language_screen_define =
548 {
549     "language_screen",
550     GX_TYPE_WINDOW,                          /* widget type                    */
551     GX_ID_NONE,                              /* widget id                      */
552     #if defined(GX_WIDGET_USER_DATA)
553     0,                                       /* user data                      */
554     #endif
555     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED,   /* style flags                    */
556     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
557     sizeof(LANGUAGE_SCREEN_CONTROL_BLOCK),   /* control block size             */
558     GX_COLOR_ID_WINDOW_FILL,                 /* normal color id                */
559     GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
560     GX_COLOR_ID_DISABLED_FILL,               /* disabled color id              */
561     gx_studio_window_create,                 /* create function                */
562     GX_NULL,                                 /* drawing function override      */
563     (UINT (*)(GX_WIDGET *, GX_EVENT *)) gx_studio_language_screen_event_process, /* event function override */
564     {0, 0, 239, 319},                        /* widget size                    */
565     GX_NULL,                                 /* next widget                    */
566     &language_screen_icon_10_2_define,       /* child widget                   */
567     0,                                       /* control block                  */
568     (void *) &language_screen_properties     /* extended properties            */
569 };
570 GX_WINDOW_PROPERTIES book_screen_properties =
571 {
572     0                                        /* wallpaper pixelmap id          */
573 };
574 GX_ICON_PROPERTIES book_screen_icon_10_2_properties =
575 {
576     GX_PIXELMAP_ID_ARROW,                    /* normal pixelmap id             */
577     0                                        /* selected pixelmap id           */
578 };
579 GX_TEXT_BUTTON_PROPERTIES book_screen_settings_properties =
580 {
581     GX_STRING_ID_STRING_60,                  /* string id                      */
582     GX_FONT_ID_BUTTON,                       /* font id                        */
583     GX_COLOR_ID_WHITE,                       /* normal text color              */
584     GX_COLOR_ID_WHITE,                       /* selected text color            */
585     GX_COLOR_ID_WHITE                        /* disabled text color            */
586 };
587 GX_TEXT_BUTTON_PROPERTIES book_screen_home_1_properties =
588 {
589     GX_STRING_ID_STRING_52,                  /* string id                      */
590     GX_FONT_ID_BUTTON,                       /* font id                        */
591     GX_COLOR_ID_WHITE,                       /* normal text color              */
592     GX_COLOR_ID_WHITE,                       /* selected text color            */
593     GX_COLOR_ID_WHITE                        /* disabled text color            */
594 };
595 
596 GX_CONST GX_STUDIO_WIDGET book_screen_home_1_define =
597 {
598     "home_1",
599     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
600     ID_HOME_BUTTON,                          /* widget id                      */
601     #if defined(GX_WIDGET_USER_DATA)
602     0,                                       /* user data                      */
603     #endif
604     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
605     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
606     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
607     GX_COLOR_ID_BLACK,                       /* normal color id                */
608     GX_COLOR_ID_BLACK,                       /* selected color id              */
609     GX_COLOR_ID_BLACK,                       /* disabled color id              */
610     gx_studio_text_button_create,            /* create function                */
611     GX_NULL,                                 /* drawing function override      */
612     GX_NULL,                                 /* event function override        */
613     {137, 5, 225, 29},                       /* widget size                    */
614     GX_NULL,                                 /* no next widget                 */
615     GX_NULL,                                 /* no child widgets               */
616     offsetof(BOOK_SCREEN_CONTROL_BLOCK, book_screen_home_1), /* control block  */
617     (void *) &book_screen_home_1_properties  /* extended properties            */
618 };
619 
620 GX_CONST GX_STUDIO_WIDGET book_screen_settings_define =
621 {
622     "settings",
623     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
624     ID_SETTING,                              /* widget id                      */
625     #if defined(GX_WIDGET_USER_DATA)
626     0,                                       /* user data                      */
627     #endif
628     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
629     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
630     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
631     GX_COLOR_ID_BLACK,                       /* normal color id                */
632     GX_COLOR_ID_BLACK,                       /* selected color id              */
633     GX_COLOR_ID_BLACK,                       /* disabled color id              */
634     gx_studio_text_button_create,            /* create function                */
635     GX_NULL,                                 /* drawing function override      */
636     GX_NULL,                                 /* event function override        */
637     {29, 59, 201, 99},                       /* widget size                    */
638     &book_screen_home_1_define,              /* next widget definition         */
639     GX_NULL,                                 /* no child widgets               */
640     offsetof(BOOK_SCREEN_CONTROL_BLOCK, book_screen_settings), /* control block */
641     (void *) &book_screen_settings_properties /* extended properties           */
642 };
643 
644 GX_CONST GX_STUDIO_WIDGET book_screen_icon_10_2_define =
645 {
646     "icon_10_2",
647     GX_TYPE_ICON,                            /* widget type                    */
648     ID_BACK,                                 /* widget id                      */
649     #if defined(GX_WIDGET_USER_DATA)
650     0,                                       /* user data                      */
651     #endif
652     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
653     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
654     sizeof(GX_ICON),                         /* control block size             */
655     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
656     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
657     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
658     gx_studio_icon_create,                   /* create function                */
659     GX_NULL,                                 /* drawing function override      */
660     GX_NULL,                                 /* event function override        */
661     {15, 7, 44, 26},                         /* widget size                    */
662     &book_screen_settings_define,            /* next widget definition         */
663     GX_NULL,                                 /* no child widgets               */
664     offsetof(BOOK_SCREEN_CONTROL_BLOCK, book_screen_icon_10_2), /* control block */
665     (void *) &book_screen_icon_10_2_properties /* extended properties          */
666 };
667 
668 GX_ANIMATION_INFO book_screen_animation_1 = {
669     (GX_WIDGET *) &main_screen,
670     (GX_WIDGET *) &Main_Display_root_window,
671     GX_NULL,
672     GX_ANIMATION_TRANSLATE, ID_SLIDE_IN_MAIN_SCREEN, 0, 1,
673     {-240, 0}, {0, 0}, 255, 255, 10
674 };
675 
676 
677 GX_STUDIO_ACTION book_screen__id_setting_gx_event_clicked_actions[3] = {
678     {GX_ACTION_TYPE_SCREEN_STACK_PUSH, 0, &Main_Display_root_window, &book_screen, GX_NULL},
679     {GX_ACTION_TYPE_ATTACH, GX_ACTION_FLAG_DYNAMIC_TARGET, &Main_Display_root_window,  &setting_screen_define, GX_NULL},
680     {0, 0, GX_NULL, GX_NULL, GX_NULL}
681 };
682 
683 
684 GX_STUDIO_ACTION book_screen__id_back_gx_event_clicked_actions[3] = {
685     {GX_ACTION_TYPE_SCREEN_STACK_POP, 0, &Main_Display_root_window, GX_NULL, GX_NULL},
686     {GX_ACTION_TYPE_DETACH, 0, &Main_Display_root_window, &book_screen, GX_NULL},
687     {0, 0, GX_NULL, GX_NULL, GX_NULL}
688 };
689 
690 
691 GX_STUDIO_ACTION book_screen__id_home_button_gx_event_clicked_actions[4] = {
692     {GX_ACTION_TYPE_SCREEN_STACK_RESET, 0, &Main_Display_root_window, GX_NULL, GX_NULL},
693     {GX_ACTION_TYPE_ANIMATION, 0, &Main_Display_root_window, &main_screen, &book_screen_animation_1},
694     {GX_ACTION_TYPE_DETACH, 0, &Main_Display_root_window, &book_screen, GX_NULL},
695     {0, 0, GX_NULL, GX_NULL, GX_NULL}
696 };
697 
698 static GX_STUDIO_EVENT_ENTRY gx_studio_book_screen_event_table[] = {
699     {GX_SIGNAL(ID_SETTING, GX_EVENT_CLICKED), 0, book_screen__id_setting_gx_event_clicked_actions},
700     {GX_SIGNAL(ID_BACK, GX_EVENT_CLICKED), 0, book_screen__id_back_gx_event_clicked_actions},
701     {GX_SIGNAL(ID_HOME_BUTTON, GX_EVENT_CLICKED), 0, book_screen__id_home_button_gx_event_clicked_actions},
702     {0, 0, GX_NULL}
703 };
704 
705 GX_STUDIO_EVENT_PROCESS book_screen_event_chain = {gx_studio_book_screen_event_table, (UINT (*)(GX_WIDGET *, GX_EVENT *))gx_window_event_process};
gx_studio_book_screen_event_process(GX_WIDGET * target,GX_EVENT * event_ptr)706 static UINT gx_studio_book_screen_event_process(GX_WIDGET *target, GX_EVENT *event_ptr)
707 {
708     return (gx_studio_auto_event_handler(target, event_ptr, &book_screen_event_chain));
709 }
710 
711 
712 GX_CONST GX_STUDIO_WIDGET book_screen_define =
713 {
714     "book_screen",
715     GX_TYPE_WINDOW,                          /* widget type                    */
716     GX_ID_NONE,                              /* widget id                      */
717     #if defined(GX_WIDGET_USER_DATA)
718     0,                                       /* user data                      */
719     #endif
720     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED,   /* style flags                    */
721     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
722     sizeof(BOOK_SCREEN_CONTROL_BLOCK),       /* control block size             */
723     GX_COLOR_ID_WINDOW_FILL,                 /* normal color id                */
724     GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
725     GX_COLOR_ID_DISABLED_FILL,               /* disabled color id              */
726     gx_studio_window_create,                 /* create function                */
727     GX_NULL,                                 /* drawing function override      */
728     (UINT (*)(GX_WIDGET *, GX_EVENT *)) gx_studio_book_screen_event_process, /* event function override */
729     {0, 0, 239, 319},                        /* widget size                    */
730     GX_NULL,                                 /* next widget                    */
731     &book_screen_icon_10_2_define,           /* child widget                   */
732     0,                                       /* control block                  */
733     (void *) &book_screen_properties         /* extended properties            */
734 };
735 GX_WINDOW_PROPERTIES setting_screen_properties =
736 {
737     0                                        /* wallpaper pixelmap id          */
738 };
739 GX_ICON_PROPERTIES setting_screen_icon_10_2_properties =
740 {
741     GX_PIXELMAP_ID_ARROW,                    /* normal pixelmap id             */
742     0                                        /* selected pixelmap id           */
743 };
744 GX_TEXT_BUTTON_PROPERTIES setting_screen_home_1_properties =
745 {
746     GX_STRING_ID_STRING_52,                  /* string id                      */
747     GX_FONT_ID_BUTTON,                       /* font id                        */
748     GX_COLOR_ID_WHITE,                       /* normal text color              */
749     GX_COLOR_ID_WHITE,                       /* selected text color            */
750     GX_COLOR_ID_WHITE                        /* disabled text color            */
751 };
752 GX_TEXT_BUTTON_PROPERTIES setting_screen_settings_properties =
753 {
754     GX_STRING_ID_STRING_10,                  /* string id                      */
755     GX_FONT_ID_BUTTON,                       /* font id                        */
756     GX_COLOR_ID_WHITE,                       /* normal text color              */
757     GX_COLOR_ID_WHITE,                       /* selected text color            */
758     GX_COLOR_ID_WHITE                        /* disabled text color            */
759 };
760 
761 GX_CONST GX_STUDIO_WIDGET setting_screen_settings_define =
762 {
763     "settings",
764     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
765     ID_LANGUAGE,                             /* widget id                      */
766     #if defined(GX_WIDGET_USER_DATA)
767     0,                                       /* user data                      */
768     #endif
769     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
770     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
771     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
772     GX_COLOR_ID_BLACK,                       /* normal color id                */
773     GX_COLOR_ID_BLACK,                       /* selected color id              */
774     GX_COLOR_ID_BLACK,                       /* disabled color id              */
775     gx_studio_text_button_create,            /* create function                */
776     GX_NULL,                                 /* drawing function override      */
777     GX_NULL,                                 /* event function override        */
778     {29, 59, 201, 99},                       /* widget size                    */
779     GX_NULL,                                 /* no next widget                 */
780     GX_NULL,                                 /* no child widgets               */
781     0,                                       /* runtime control block          */
782     (void *) &setting_screen_settings_properties /* extended properties        */
783 };
784 
785 GX_CONST GX_STUDIO_WIDGET setting_screen_home_1_define =
786 {
787     "home_1",
788     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
789     ID_HOME_BUTTON,                          /* widget id                      */
790     #if defined(GX_WIDGET_USER_DATA)
791     0,                                       /* user data                      */
792     #endif
793     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_TEXT_CENTER,   /* style flags */
794     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
795     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
796     GX_COLOR_ID_BLACK,                       /* normal color id                */
797     GX_COLOR_ID_BLACK,                       /* selected color id              */
798     GX_COLOR_ID_BLACK,                       /* disabled color id              */
799     gx_studio_text_button_create,            /* create function                */
800     GX_NULL,                                 /* drawing function override      */
801     GX_NULL,                                 /* event function override        */
802     {137, 5, 225, 29},                       /* widget size                    */
803     &setting_screen_settings_define,         /* next widget definition         */
804     GX_NULL,                                 /* no child widgets               */
805     0,                                       /* runtime control block          */
806     (void *) &setting_screen_home_1_properties /* extended properties          */
807 };
808 
809 GX_CONST GX_STUDIO_WIDGET setting_screen_icon_10_2_define =
810 {
811     "icon_10_2",
812     GX_TYPE_ICON,                            /* widget type                    */
813     ID_BACK,                                 /* widget id                      */
814     #if defined(GX_WIDGET_USER_DATA)
815     0,                                       /* user data                      */
816     #endif
817     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
818     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
819     sizeof(GX_ICON),                         /* control block size             */
820     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
821     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
822     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
823     gx_studio_icon_create,                   /* create function                */
824     GX_NULL,                                 /* drawing function override      */
825     GX_NULL,                                 /* event function override        */
826     {15, 7, 44, 26},                         /* widget size                    */
827     &setting_screen_home_1_define,           /* next widget definition         */
828     GX_NULL,                                 /* no child widgets               */
829     0,                                       /* runtime control block          */
830     (void *) &setting_screen_icon_10_2_properties /* extended properties       */
831 };
832 
833 GX_ANIMATION_INFO setting_screen_animation_1 = {
834     (GX_WIDGET *) &main_screen,
835     (GX_WIDGET *) &Main_Display_root_window,
836     GX_NULL,
837     GX_ANIMATION_TRANSLATE, ID_SLIDE_IN_MAIN_SCREEN, 0, 1,
838     {-240, 0}, {0, 0}, 255, 255, 10
839 };
840 
841 
842 GX_STUDIO_ACTION setting_screen__id_back_gx_event_clicked_actions[3] = {
843     {GX_ACTION_TYPE_ATTACH, GX_ACTION_FLAG_POP_TARGET|GX_ACTION_FLAG_POP_PARENT, GX_NULL, GX_NULL, GX_NULL},
844     {GX_ACTION_TYPE_DETACH, GX_ACTION_FLAG_DYNAMIC_TARGET, &Main_Display_root_window,  &setting_screen_define, GX_NULL},
845     {0, 0, GX_NULL, GX_NULL, GX_NULL}
846 };
847 
848 
849 GX_STUDIO_ACTION setting_screen__id_home_button_gx_event_clicked_actions[4] = {
850     {GX_ACTION_TYPE_SCREEN_STACK_RESET, 0, &Main_Display_root_window, GX_NULL, GX_NULL},
851     {GX_ACTION_TYPE_ANIMATION, 0, &Main_Display_root_window, &main_screen, &setting_screen_animation_1},
852     {GX_ACTION_TYPE_DETACH, GX_ACTION_FLAG_DYNAMIC_TARGET, &Main_Display_root_window,  &setting_screen_define, GX_NULL},
853     {0, 0, GX_NULL, GX_NULL, GX_NULL}
854 };
855 
856 
857 GX_STUDIO_ACTION setting_screen__id_language_gx_event_clicked_actions[3] = {
858     {GX_ACTION_TYPE_SCREEN_STACK_PUSH, GX_ACTION_FLAG_DYNAMIC_TARGET, &Main_Display_root_window,  &setting_screen_define, GX_NULL},
859     {GX_ACTION_TYPE_ATTACH, 0, &Main_Display_root_window, &language_screen, GX_NULL},
860     {0, 0, GX_NULL, GX_NULL, GX_NULL}
861 };
862 
863 static GX_STUDIO_EVENT_ENTRY gx_studio_setting_screen_event_table[] = {
864     {GX_SIGNAL(ID_BACK, GX_EVENT_CLICKED), 0, setting_screen__id_back_gx_event_clicked_actions},
865     {GX_SIGNAL(ID_HOME_BUTTON, GX_EVENT_CLICKED), 0, setting_screen__id_home_button_gx_event_clicked_actions},
866     {GX_SIGNAL(ID_LANGUAGE, GX_EVENT_CLICKED), 0, setting_screen__id_language_gx_event_clicked_actions},
867     {0, 0, GX_NULL}
868 };
869 
870 GX_STUDIO_EVENT_PROCESS setting_screen_event_chain = {gx_studio_setting_screen_event_table, (UINT (*)(GX_WIDGET *, GX_EVENT *))gx_window_event_process};
gx_studio_setting_screen_event_process(GX_WIDGET * target,GX_EVENT * event_ptr)871 static UINT gx_studio_setting_screen_event_process(GX_WIDGET *target, GX_EVENT *event_ptr)
872 {
873     return (gx_studio_auto_event_handler(target, event_ptr, &setting_screen_event_chain));
874 }
875 
876 
877 GX_CONST GX_STUDIO_WIDGET setting_screen_define =
878 {
879     "setting_screen",
880     GX_TYPE_WINDOW,                          /* widget type                    */
881     ID_SETTING_SCREEN,                       /* widget id                      */
882     #if defined(GX_WIDGET_USER_DATA)
883     0,                                       /* user data                      */
884     #endif
885     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_DYNAMICALLY_ALLOCATED,   /* style flags */
886     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
887     sizeof(SETTING_SCREEN_CONTROL_BLOCK),    /* control block size             */
888     GX_COLOR_ID_WINDOW_FILL,                 /* normal color id                */
889     GX_COLOR_ID_WINDOW_FILL,                 /* selected color id              */
890     GX_COLOR_ID_DISABLED_FILL,               /* disabled color id              */
891     gx_studio_window_create,                 /* create function                */
892     GX_NULL,                                 /* drawing function override      */
893     (UINT (*)(GX_WIDGET *, GX_EVENT *)) gx_studio_setting_screen_event_process, /* event function override */
894     {0, 0, 239, 319},                        /* widget size                    */
895     GX_NULL,                                 /* next widget                    */
896     &setting_screen_icon_10_2_define,        /* child widget                   */
897     0,                                       /* control block                  */
898     (void *) &setting_screen_properties      /* extended properties            */
899 };
900 GX_WINDOW_PROPERTIES bookshelf_screen_properties =
901 {
902     0                                        /* wallpaper pixelmap id          */
903 };
904 GX_ICON_PROPERTIES bookshelf_screen_icon_1_properties =
905 {
906     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
907     0                                        /* selected pixelmap id           */
908 };
909 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_10_properties =
910 {
911     GX_STRING_ID_STRING_6,                   /* string id                      */
912     GX_FONT_ID_SMALL,                        /* font id                        */
913     GX_COLOR_ID_WHITE,                       /* normal text color              */
914     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
915     GX_COLOR_ID_WHITE                        /* disabled text color            */
916 };
917 GX_ICON_PROPERTIES bookshelf_screen_icon_2_properties =
918 {
919     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
920     0                                        /* selected pixelmap id           */
921 };
922 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_2_properties =
923 {
924     GX_STRING_ID_STRING_6,                   /* string id                      */
925     GX_FONT_ID_SMALL,                        /* font id                        */
926     GX_COLOR_ID_WHITE,                       /* normal text color              */
927     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
928     GX_COLOR_ID_WHITE                        /* disabled text color            */
929 };
930 GX_ICON_PROPERTIES bookshelf_screen_icon_3_properties =
931 {
932     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
933     0                                        /* selected pixelmap id           */
934 };
935 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_3_properties =
936 {
937     GX_STRING_ID_STRING_6,                   /* string id                      */
938     GX_FONT_ID_SMALL,                        /* font id                        */
939     GX_COLOR_ID_WHITE,                       /* normal text color              */
940     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
941     GX_COLOR_ID_WHITE                        /* disabled text color            */
942 };
943 GX_ICON_PROPERTIES bookshelf_screen_icon_4_properties =
944 {
945     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
946     0                                        /* selected pixelmap id           */
947 };
948 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_5_properties =
949 {
950     GX_STRING_ID_STRING_6,                   /* string id                      */
951     GX_FONT_ID_SMALL,                        /* font id                        */
952     GX_COLOR_ID_WHITE,                       /* normal text color              */
953     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
954     GX_COLOR_ID_WHITE                        /* disabled text color            */
955 };
956 GX_ICON_PROPERTIES bookshelf_screen_icon_5_properties =
957 {
958     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
959     0                                        /* selected pixelmap id           */
960 };
961 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_4_properties =
962 {
963     GX_STRING_ID_STRING_6,                   /* string id                      */
964     GX_FONT_ID_SMALL,                        /* font id                        */
965     GX_COLOR_ID_WHITE,                       /* normal text color              */
966     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
967     GX_COLOR_ID_WHITE                        /* disabled text color            */
968 };
969 GX_ICON_PROPERTIES bookshelf_screen_icon_6_properties =
970 {
971     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
972     0                                        /* selected pixelmap id           */
973 };
974 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_6_properties =
975 {
976     GX_STRING_ID_STRING_6,                   /* string id                      */
977     GX_FONT_ID_SMALL,                        /* font id                        */
978     GX_COLOR_ID_WHITE,                       /* normal text color              */
979     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
980     GX_COLOR_ID_WHITE                        /* disabled text color            */
981 };
982 GX_ICON_PROPERTIES bookshelf_screen_icon_7_properties =
983 {
984     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
985     0                                        /* selected pixelmap id           */
986 };
987 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_7_properties =
988 {
989     GX_STRING_ID_STRING_6,                   /* string id                      */
990     GX_FONT_ID_SMALL,                        /* font id                        */
991     GX_COLOR_ID_WHITE,                       /* normal text color              */
992     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
993     GX_COLOR_ID_WHITE                        /* disabled text color            */
994 };
995 GX_ICON_PROPERTIES bookshelf_screen_icon_8_properties =
996 {
997     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
998     0                                        /* selected pixelmap id           */
999 };
1000 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_8_properties =
1001 {
1002     GX_STRING_ID_STRING_6,                   /* string id                      */
1003     GX_FONT_ID_SMALL,                        /* font id                        */
1004     GX_COLOR_ID_WHITE,                       /* normal text color              */
1005     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
1006     GX_COLOR_ID_WHITE                        /* disabled text color            */
1007 };
1008 GX_ICON_PROPERTIES bookshelf_screen_icon_9_properties =
1009 {
1010     GX_PIXELMAP_ID_BOOK2,                    /* normal pixelmap id             */
1011     0                                        /* selected pixelmap id           */
1012 };
1013 GX_PROMPT_PROPERTIES bookshelf_screen_prompt_9_properties =
1014 {
1015     GX_STRING_ID_STRING_6,                   /* string id                      */
1016     GX_FONT_ID_SMALL,                        /* font id                        */
1017     GX_COLOR_ID_WHITE,                       /* normal text color              */
1018     GX_COLOR_ID_SELECTED_TEXT,               /* selected text color            */
1019     GX_COLOR_ID_WHITE                        /* disabled text color            */
1020 };
1021 GX_ICON_PROPERTIES bookshelf_screen_icon_10_properties =
1022 {
1023     GX_PIXELMAP_ID_ARROW,                    /* normal pixelmap id             */
1024     0                                        /* selected pixelmap id           */
1025 };
1026 GX_TEXT_BUTTON_PROPERTIES bookshelf_screen_home_1_properties =
1027 {
1028     GX_STRING_ID_STRING_52,                  /* string id                      */
1029     GX_FONT_ID_BUTTON,                       /* font id                        */
1030     GX_COLOR_ID_WHITE,                       /* normal text color              */
1031     GX_COLOR_ID_WHITE,                       /* selected text color            */
1032     GX_COLOR_ID_WHITE                        /* disabled text color            */
1033 };
1034 
1035 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_10_define =
1036 {
1037     "prompt_10",
1038     GX_TYPE_PROMPT,                          /* widget type                    */
1039     ID_PROMPT_BOOK,                          /* widget id                      */
1040     #if defined(GX_WIDGET_USER_DATA)
1041     0,                                       /* user data                      */
1042     #endif
1043     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1044     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1045     sizeof(GX_PROMPT),                       /* control block size             */
1046     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1047     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1048     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1049     gx_studio_prompt_create,                 /* create function                */
1050     GX_NULL,                                 /* drawing function override      */
1051     GX_NULL,                                 /* event function override        */
1052     {20, 39, 63, 97},                        /* widget size                    */
1053     GX_NULL,                                 /* no next widget                 */
1054     GX_NULL,                                 /* no child widgets               */
1055     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_10), /* control block */
1056     (void *) &bookshelf_screen_prompt_10_properties /* extended properties     */
1057 };
1058 
1059 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_2_define =
1060 {
1061     "prompt_2",
1062     GX_TYPE_PROMPT,                          /* widget type                    */
1063     ID_PROMPT_BOOK,                          /* widget id                      */
1064     #if defined(GX_WIDGET_USER_DATA)
1065     0,                                       /* user data                      */
1066     #endif
1067     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1068     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1069     sizeof(GX_PROMPT),                       /* control block size             */
1070     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1071     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1072     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1073     gx_studio_prompt_create,                 /* create function                */
1074     GX_NULL,                                 /* drawing function override      */
1075     GX_NULL,                                 /* event function override        */
1076     {88, 39, 131, 97},                       /* widget size                    */
1077     GX_NULL,                                 /* no next widget                 */
1078     GX_NULL,                                 /* no child widgets               */
1079     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_2), /* control block */
1080     (void *) &bookshelf_screen_prompt_2_properties /* extended properties      */
1081 };
1082 
1083 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_3_define =
1084 {
1085     "prompt_3",
1086     GX_TYPE_PROMPT,                          /* widget type                    */
1087     ID_PROMPT_BOOK,                          /* widget id                      */
1088     #if defined(GX_WIDGET_USER_DATA)
1089     0,                                       /* user data                      */
1090     #endif
1091     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1092     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1093     sizeof(GX_PROMPT),                       /* control block size             */
1094     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1095     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1096     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1097     gx_studio_prompt_create,                 /* create function                */
1098     GX_NULL,                                 /* drawing function override      */
1099     GX_NULL,                                 /* event function override        */
1100     {157, 39, 200, 97},                      /* widget size                    */
1101     GX_NULL,                                 /* no next widget                 */
1102     GX_NULL,                                 /* no child widgets               */
1103     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_3), /* control block */
1104     (void *) &bookshelf_screen_prompt_3_properties /* extended properties      */
1105 };
1106 
1107 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_5_define =
1108 {
1109     "prompt_5",
1110     GX_TYPE_PROMPT,                          /* widget type                    */
1111     ID_PROMPT_BOOK,                          /* widget id                      */
1112     #if defined(GX_WIDGET_USER_DATA)
1113     0,                                       /* user data                      */
1114     #endif
1115     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1116     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1117     sizeof(GX_PROMPT),                       /* control block size             */
1118     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1119     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1120     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1121     gx_studio_prompt_create,                 /* create function                */
1122     GX_NULL,                                 /* drawing function override      */
1123     GX_NULL,                                 /* event function override        */
1124     {89, 128, 132, 186},                     /* widget size                    */
1125     GX_NULL,                                 /* no next widget                 */
1126     GX_NULL,                                 /* no child widgets               */
1127     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_5), /* control block */
1128     (void *) &bookshelf_screen_prompt_5_properties /* extended properties      */
1129 };
1130 
1131 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_4_define =
1132 {
1133     "prompt_4",
1134     GX_TYPE_PROMPT,                          /* widget type                    */
1135     ID_PROMPT_BOOK,                          /* widget id                      */
1136     #if defined(GX_WIDGET_USER_DATA)
1137     0,                                       /* user data                      */
1138     #endif
1139     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1140     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1141     sizeof(GX_PROMPT),                       /* control block size             */
1142     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1143     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1144     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1145     gx_studio_prompt_create,                 /* create function                */
1146     GX_NULL,                                 /* drawing function override      */
1147     GX_NULL,                                 /* event function override        */
1148     {21, 126, 64, 184},                      /* widget size                    */
1149     GX_NULL,                                 /* no next widget                 */
1150     GX_NULL,                                 /* no child widgets               */
1151     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_4), /* control block */
1152     (void *) &bookshelf_screen_prompt_4_properties /* extended properties      */
1153 };
1154 
1155 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_6_define =
1156 {
1157     "prompt_6",
1158     GX_TYPE_PROMPT,                          /* widget type                    */
1159     ID_PROMPT_BOOK,                          /* widget id                      */
1160     #if defined(GX_WIDGET_USER_DATA)
1161     0,                                       /* user data                      */
1162     #endif
1163     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1164     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1165     sizeof(GX_PROMPT),                       /* control block size             */
1166     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1167     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1168     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1169     gx_studio_prompt_create,                 /* create function                */
1170     GX_NULL,                                 /* drawing function override      */
1171     GX_NULL,                                 /* event function override        */
1172     {156, 128, 199, 186},                    /* widget size                    */
1173     GX_NULL,                                 /* no next widget                 */
1174     GX_NULL,                                 /* no child widgets               */
1175     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_6), /* control block */
1176     (void *) &bookshelf_screen_prompt_6_properties /* extended properties      */
1177 };
1178 
1179 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_7_define =
1180 {
1181     "prompt_7",
1182     GX_TYPE_PROMPT,                          /* widget type                    */
1183     ID_PROMPT_BOOK,                          /* widget id                      */
1184     #if defined(GX_WIDGET_USER_DATA)
1185     0,                                       /* user data                      */
1186     #endif
1187     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1188     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1189     sizeof(GX_PROMPT),                       /* control block size             */
1190     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1191     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1192     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1193     gx_studio_prompt_create,                 /* create function                */
1194     GX_NULL,                                 /* drawing function override      */
1195     GX_NULL,                                 /* event function override        */
1196     {21, 215, 64, 273},                      /* widget size                    */
1197     GX_NULL,                                 /* no next widget                 */
1198     GX_NULL,                                 /* no child widgets               */
1199     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_7), /* control block */
1200     (void *) &bookshelf_screen_prompt_7_properties /* extended properties      */
1201 };
1202 
1203 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_8_define =
1204 {
1205     "prompt_8",
1206     GX_TYPE_PROMPT,                          /* widget type                    */
1207     ID_PROMPT_BOOK,                          /* widget id                      */
1208     #if defined(GX_WIDGET_USER_DATA)
1209     0,                                       /* user data                      */
1210     #endif
1211     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1212     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1213     sizeof(GX_PROMPT),                       /* control block size             */
1214     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1215     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1216     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1217     gx_studio_prompt_create,                 /* create function                */
1218     GX_NULL,                                 /* drawing function override      */
1219     GX_NULL,                                 /* event function override        */
1220     {90, 216, 133, 274},                     /* widget size                    */
1221     GX_NULL,                                 /* no next widget                 */
1222     GX_NULL,                                 /* no child widgets               */
1223     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_8), /* control block */
1224     (void *) &bookshelf_screen_prompt_8_properties /* extended properties      */
1225 };
1226 
1227 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_prompt_9_define =
1228 {
1229     "prompt_9",
1230     GX_TYPE_PROMPT,                          /* widget type                    */
1231     ID_PROMPT_BOOK,                          /* widget id                      */
1232     #if defined(GX_WIDGET_USER_DATA)
1233     0,                                       /* user data                      */
1234     #endif
1235     GX_STYLE_BORDER_NONE|GX_STYLE_TRANSPARENT|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1236     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1237     sizeof(GX_PROMPT),                       /* control block size             */
1238     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1239     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1240     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1241     gx_studio_prompt_create,                 /* create function                */
1242     GX_NULL,                                 /* drawing function override      */
1243     GX_NULL,                                 /* event function override        */
1244     {158, 217, 201, 275},                    /* widget size                    */
1245     GX_NULL,                                 /* no next widget                 */
1246     GX_NULL,                                 /* no child widgets               */
1247     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_prompt_9), /* control block */
1248     (void *) &bookshelf_screen_prompt_9_properties /* extended properties      */
1249 };
1250 
1251 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_home_1_define =
1252 {
1253     "home_1",
1254     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1255     ID_HOME_BUTTON,                          /* widget id                      */
1256     #if defined(GX_WIDGET_USER_DATA)
1257     0,                                       /* user data                      */
1258     #endif
1259     GX_STYLE_BORDER_RAISED|GX_STYLE_DRAW_SELECTED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1260     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1261     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1262     GX_COLOR_ID_BLACK,                       /* normal color id                */
1263     GX_COLOR_ID_BLACK,                       /* selected color id              */
1264     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1265     gx_studio_text_button_create,            /* create function                */
1266     GX_NULL,                                 /* drawing function override      */
1267     GX_NULL,                                 /* event function override        */
1268     {137, 5, 225, 29},                       /* widget size                    */
1269     GX_NULL,                                 /* no next widget                 */
1270     GX_NULL,                                 /* no child widgets               */
1271     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_home_1), /* control block */
1272     (void *) &bookshelf_screen_home_1_properties /* extended properties        */
1273 };
1274 
1275 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_10_define =
1276 {
1277     "icon_10",
1278     GX_TYPE_ICON,                            /* widget type                    */
1279     ID_BACK,                                 /* widget id                      */
1280     #if defined(GX_WIDGET_USER_DATA)
1281     0,                                       /* user data                      */
1282     #endif
1283     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1284     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1285     sizeof(GX_ICON),                         /* control block size             */
1286     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1287     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1288     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1289     gx_studio_icon_create,                   /* create function                */
1290     GX_NULL,                                 /* drawing function override      */
1291     GX_NULL,                                 /* event function override        */
1292     {15, 7, 44, 26},                         /* widget size                    */
1293     &bookshelf_screen_home_1_define,         /* next widget definition         */
1294     GX_NULL,                                 /* no child widgets               */
1295     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_10), /* control block */
1296     (void *) &bookshelf_screen_icon_10_properties /* extended properties       */
1297 };
1298 
1299 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_9_define =
1300 {
1301     "icon_9",
1302     GX_TYPE_ICON,                            /* widget type                    */
1303     GX_ID_NONE,                              /* widget id                      */
1304     #if defined(GX_WIDGET_USER_DATA)
1305     0,                                       /* user data                      */
1306     #endif
1307     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1308     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1309     sizeof(GX_ICON),                         /* control block size             */
1310     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1311     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1312     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1313     gx_studio_icon_create,                   /* create function                */
1314     GX_NULL,                                 /* drawing function override      */
1315     GX_NULL,                                 /* event function override        */
1316     {158, 217, 207, 281},                    /* widget size                    */
1317     &bookshelf_screen_icon_10_define,        /* next widget definition         */
1318     &bookshelf_screen_prompt_9_define,       /* child widget definition        */
1319     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_9), /* control block */
1320     (void *) &bookshelf_screen_icon_9_properties /* extended properties        */
1321 };
1322 
1323 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_8_define =
1324 {
1325     "icon_8",
1326     GX_TYPE_ICON,                            /* widget type                    */
1327     GX_ID_NONE,                              /* widget id                      */
1328     #if defined(GX_WIDGET_USER_DATA)
1329     0,                                       /* user data                      */
1330     #endif
1331     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1332     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1333     sizeof(GX_ICON),                         /* control block size             */
1334     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1335     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1336     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1337     gx_studio_icon_create,                   /* create function                */
1338     GX_NULL,                                 /* drawing function override      */
1339     GX_NULL,                                 /* event function override        */
1340     {90, 218, 139, 282},                     /* widget size                    */
1341     &bookshelf_screen_icon_9_define,         /* next widget definition         */
1342     &bookshelf_screen_prompt_8_define,       /* child widget definition        */
1343     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_8), /* control block */
1344     (void *) &bookshelf_screen_icon_8_properties /* extended properties        */
1345 };
1346 
1347 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_7_define =
1348 {
1349     "icon_7",
1350     GX_TYPE_ICON,                            /* widget type                    */
1351     GX_ID_NONE,                              /* widget id                      */
1352     #if defined(GX_WIDGET_USER_DATA)
1353     0,                                       /* user data                      */
1354     #endif
1355     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1356     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1357     sizeof(GX_ICON),                         /* control block size             */
1358     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1359     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1360     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1361     gx_studio_icon_create,                   /* create function                */
1362     GX_NULL,                                 /* drawing function override      */
1363     GX_NULL,                                 /* event function override        */
1364     {22, 218, 71, 282},                      /* widget size                    */
1365     &bookshelf_screen_icon_8_define,         /* next widget definition         */
1366     &bookshelf_screen_prompt_7_define,       /* child widget definition        */
1367     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_7), /* control block */
1368     (void *) &bookshelf_screen_icon_7_properties /* extended properties        */
1369 };
1370 
1371 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_6_define =
1372 {
1373     "icon_6",
1374     GX_TYPE_ICON,                            /* widget type                    */
1375     GX_ID_NONE,                              /* widget id                      */
1376     #if defined(GX_WIDGET_USER_DATA)
1377     0,                                       /* user data                      */
1378     #endif
1379     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1380     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1381     sizeof(GX_ICON),                         /* control block size             */
1382     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1383     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1384     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1385     gx_studio_icon_create,                   /* create function                */
1386     GX_NULL,                                 /* drawing function override      */
1387     GX_NULL,                                 /* event function override        */
1388     {158, 129, 207, 193},                    /* widget size                    */
1389     &bookshelf_screen_icon_7_define,         /* next widget definition         */
1390     &bookshelf_screen_prompt_6_define,       /* child widget definition        */
1391     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_6), /* control block */
1392     (void *) &bookshelf_screen_icon_6_properties /* extended properties        */
1393 };
1394 
1395 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_5_define =
1396 {
1397     "icon_5",
1398     GX_TYPE_ICON,                            /* widget type                    */
1399     GX_ID_NONE,                              /* widget id                      */
1400     #if defined(GX_WIDGET_USER_DATA)
1401     0,                                       /* user data                      */
1402     #endif
1403     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1404     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1405     sizeof(GX_ICON),                         /* control block size             */
1406     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1407     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1408     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1409     gx_studio_icon_create,                   /* create function                */
1410     GX_NULL,                                 /* drawing function override      */
1411     GX_NULL,                                 /* event function override        */
1412     {22, 130, 71, 194},                      /* widget size                    */
1413     &bookshelf_screen_icon_6_define,         /* next widget definition         */
1414     &bookshelf_screen_prompt_4_define,       /* child widget definition        */
1415     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_5), /* control block */
1416     (void *) &bookshelf_screen_icon_5_properties /* extended properties        */
1417 };
1418 
1419 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_4_define =
1420 {
1421     "icon_4",
1422     GX_TYPE_ICON,                            /* widget type                    */
1423     GX_ID_NONE,                              /* widget id                      */
1424     #if defined(GX_WIDGET_USER_DATA)
1425     0,                                       /* user data                      */
1426     #endif
1427     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1428     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1429     sizeof(GX_ICON),                         /* control block size             */
1430     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1431     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1432     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1433     gx_studio_icon_create,                   /* create function                */
1434     GX_NULL,                                 /* drawing function override      */
1435     GX_NULL,                                 /* event function override        */
1436     {90, 130, 139, 194},                     /* widget size                    */
1437     &bookshelf_screen_icon_5_define,         /* next widget definition         */
1438     &bookshelf_screen_prompt_5_define,       /* child widget definition        */
1439     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_4), /* control block */
1440     (void *) &bookshelf_screen_icon_4_properties /* extended properties        */
1441 };
1442 
1443 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_3_define =
1444 {
1445     "icon_3",
1446     GX_TYPE_ICON,                            /* widget type                    */
1447     GX_ID_NONE,                              /* widget id                      */
1448     #if defined(GX_WIDGET_USER_DATA)
1449     0,                                       /* user data                      */
1450     #endif
1451     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1452     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1453     sizeof(GX_ICON),                         /* control block size             */
1454     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1455     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1456     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1457     gx_studio_icon_create,                   /* create function                */
1458     GX_NULL,                                 /* drawing function override      */
1459     GX_NULL,                                 /* event function override        */
1460     {158, 41, 207, 105},                     /* widget size                    */
1461     &bookshelf_screen_icon_4_define,         /* next widget definition         */
1462     &bookshelf_screen_prompt_3_define,       /* child widget definition        */
1463     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_3), /* control block */
1464     (void *) &bookshelf_screen_icon_3_properties /* extended properties        */
1465 };
1466 
1467 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_2_define =
1468 {
1469     "icon_2",
1470     GX_TYPE_ICON,                            /* widget type                    */
1471     GX_ID_NONE,                              /* widget id                      */
1472     #if defined(GX_WIDGET_USER_DATA)
1473     0,                                       /* user data                      */
1474     #endif
1475     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1476     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1477     sizeof(GX_ICON),                         /* control block size             */
1478     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1479     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1480     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1481     gx_studio_icon_create,                   /* create function                */
1482     GX_NULL,                                 /* drawing function override      */
1483     GX_NULL,                                 /* event function override        */
1484     {90, 42, 139, 106},                      /* widget size                    */
1485     &bookshelf_screen_icon_3_define,         /* next widget definition         */
1486     &bookshelf_screen_prompt_2_define,       /* child widget definition        */
1487     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_2), /* control block */
1488     (void *) &bookshelf_screen_icon_2_properties /* extended properties        */
1489 };
1490 
1491 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_icon_1_define =
1492 {
1493     "icon_1",
1494     GX_TYPE_ICON,                            /* widget type                    */
1495     GX_ID_NONE,                              /* widget id                      */
1496     #if defined(GX_WIDGET_USER_DATA)
1497     0,                                       /* user data                      */
1498     #endif
1499     GX_STYLE_BORDER_NONE|GX_STYLE_ENABLED|GX_STYLE_HALIGN_LEFT|GX_STYLE_VALIGN_TOP,   /* style flags */
1500     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1501     sizeof(GX_ICON),                         /* control block size             */
1502     GX_COLOR_ID_WIDGET_FILL,                 /* normal color id                */
1503     GX_COLOR_ID_SELECTED_FILL,               /* selected color id              */
1504     GX_COLOR_ID_WIDGET_FILL,                 /* disabled color id              */
1505     gx_studio_icon_create,                   /* create function                */
1506     GX_NULL,                                 /* drawing function override      */
1507     GX_NULL,                                 /* event function override        */
1508     {22, 42, 71, 106},                       /* widget size                    */
1509     &bookshelf_screen_icon_2_define,         /* next widget definition         */
1510     &bookshelf_screen_prompt_10_define,      /* child widget definition        */
1511     offsetof(BOOKSHELF_SCREEN_CONTROL_BLOCK, bookshelf_screen_icon_1), /* control block */
1512     (void *) &bookshelf_screen_icon_1_properties /* extended properties        */
1513 };
1514 
1515 GX_ANIMATION_INFO bookshelf_screen_animation_1 = {
1516     GX_NULL,
1517     GX_NULL,
1518     GX_NULL,
1519     GX_ANIMATION_TRANSLATE, 0, 0, 1,
1520     {0, 0}, {0, 0}, 0, 255, 20
1521 };
1522 
1523 
1524 GX_ANIMATION_INFO bookshelf_screen_animation_2 = {
1525     (GX_WIDGET *) &main_screen,
1526     (GX_WIDGET *) &Main_Display_root_window,
1527     GX_NULL,
1528     GX_ANIMATION_TRANSLATE, ID_SLIDE_IN_MAIN_SCREEN, 0, 1,
1529     {-240, 0}, {0, 0}, 0, 255, 10
1530 };
1531 
1532 
1533 GX_STUDIO_ACTION bookshelf_screen__id_back_gx_event_clicked_actions[3] = {
1534     {GX_ACTION_TYPE_ANIMATION, GX_ACTION_FLAG_POP_TARGET|GX_ACTION_FLAG_POP_PARENT, GX_NULL, GX_NULL, &bookshelf_screen_animation_1},
1535     {GX_ACTION_TYPE_DETACH, 0, &Main_Display_root_window, &bookshelf_screen, GX_NULL},
1536     {0, 0, GX_NULL, GX_NULL, GX_NULL}
1537 };
1538 
1539 
1540 GX_STUDIO_ACTION bookshelf_screen__id_home_button_gx_event_clicked_actions[4] = {
1541     {GX_ACTION_TYPE_SCREEN_STACK_RESET, 0, &Main_Display_root_window, GX_NULL, GX_NULL},
1542     {GX_ACTION_TYPE_DETACH, 0, &Main_Display_root_window, &bookshelf_screen, GX_NULL},
1543     {GX_ACTION_TYPE_ANIMATION, 0, &Main_Display_root_window, &main_screen, &bookshelf_screen_animation_2},
1544     {0, 0, GX_NULL, GX_NULL, GX_NULL}
1545 };
1546 
1547 
1548 GX_STUDIO_ACTION bookshelf_screen__id_prompt_book_gx_event_clicked_actions[3] = {
1549     {GX_ACTION_TYPE_SCREEN_STACK_PUSH, 0, &Main_Display_root_window, &bookshelf_screen, GX_NULL},
1550     {GX_ACTION_TYPE_ATTACH, 0, &Main_Display_root_window, &book_screen, GX_NULL},
1551     {0, 0, GX_NULL, GX_NULL, GX_NULL}
1552 };
1553 
1554 static GX_STUDIO_EVENT_ENTRY gx_studio_bookshelf_screen_event_table[] = {
1555     {GX_SIGNAL(ID_BACK, GX_EVENT_CLICKED), 0, bookshelf_screen__id_back_gx_event_clicked_actions},
1556     {GX_SIGNAL(ID_HOME_BUTTON, GX_EVENT_CLICKED), 0, bookshelf_screen__id_home_button_gx_event_clicked_actions},
1557     {GX_SIGNAL(ID_PROMPT_BOOK, GX_EVENT_CLICKED), 0, bookshelf_screen__id_prompt_book_gx_event_clicked_actions},
1558     {0, 0, GX_NULL}
1559 };
1560 
1561 GX_STUDIO_EVENT_PROCESS bookshelf_screen_event_chain = {gx_studio_bookshelf_screen_event_table, (UINT (*)(GX_WIDGET *, GX_EVENT *))gx_window_event_process};
gx_studio_bookshelf_screen_event_process(GX_WIDGET * target,GX_EVENT * event_ptr)1562 static UINT gx_studio_bookshelf_screen_event_process(GX_WIDGET *target, GX_EVENT *event_ptr)
1563 {
1564     return (gx_studio_auto_event_handler(target, event_ptr, &bookshelf_screen_event_chain));
1565 }
1566 
1567 
1568 GX_CONST GX_STUDIO_WIDGET bookshelf_screen_define =
1569 {
1570     "bookshelf_screen",
1571     GX_TYPE_WINDOW,                          /* widget type                    */
1572     GX_ID_NONE,                              /* widget id                      */
1573     #if defined(GX_WIDGET_USER_DATA)
1574     0,                                       /* user data                      */
1575     #endif
1576     GX_STYLE_BORDER_NONE,                    /* style flags                    */
1577     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1578     sizeof(BOOKSHELF_SCREEN_CONTROL_BLOCK),  /* control block size             */
1579     GX_COLOR_ID_GRAY,                        /* normal color id                */
1580     GX_COLOR_ID_GRAY,                        /* selected color id              */
1581     GX_COLOR_ID_GRAY,                        /* disabled color id              */
1582     gx_studio_window_create,                 /* create function                */
1583     GX_NULL,                                 /* drawing function override      */
1584     (UINT (*)(GX_WIDGET *, GX_EVENT *)) gx_studio_bookshelf_screen_event_process, /* event function override */
1585     {0, 0, 239, 319},                        /* widget size                    */
1586     GX_NULL,                                 /* next widget                    */
1587     &bookshelf_screen_icon_1_define,         /* child widget                   */
1588     0,                                       /* control block                  */
1589     (void *) &bookshelf_screen_properties    /* extended properties            */
1590 };
1591 GX_WINDOW_PROPERTIES main_screen_properties =
1592 {
1593     0                                        /* wallpaper pixelmap id          */
1594 };
1595 GX_TEXT_BUTTON_PROPERTIES main_screen_bookshelf_properties =
1596 {
1597     GX_STRING_ID_STRING_57,                  /* string id                      */
1598     GX_FONT_ID_BUTTON,                       /* font id                        */
1599     GX_COLOR_ID_WHITE,                       /* normal text color              */
1600     GX_COLOR_ID_WHITE,                       /* selected text color            */
1601     GX_COLOR_ID_WHITE                        /* disabled text color            */
1602 };
1603 GX_TEXT_BUTTON_PROPERTIES main_screen_settings_properties =
1604 {
1605     GX_STRING_ID_STRING_60,                  /* string id                      */
1606     GX_FONT_ID_BUTTON,                       /* font id                        */
1607     GX_COLOR_ID_WHITE,                       /* normal text color              */
1608     GX_COLOR_ID_WHITE,                       /* selected text color            */
1609     GX_COLOR_ID_WHITE                        /* disabled text color            */
1610 };
1611 GX_TEXT_BUTTON_PROPERTIES main_screen_home_properties =
1612 {
1613     GX_STRING_ID_STRING_52,                  /* string id                      */
1614     GX_FONT_ID_BUTTON,                       /* font id                        */
1615     GX_COLOR_ID_WHITE,                       /* normal text color              */
1616     GX_COLOR_ID_WHITE,                       /* selected text color            */
1617     GX_COLOR_ID_WHITE                        /* disabled text color            */
1618 };
1619 
1620 GX_CONST GX_STUDIO_WIDGET main_screen_home_define =
1621 {
1622     "home",
1623     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1624     ID_HOME_BUTTON,                          /* widget id                      */
1625     #if defined(GX_WIDGET_USER_DATA)
1626     0,                                       /* user data                      */
1627     #endif
1628     GX_STYLE_BORDER_RAISED|GX_STYLE_TRANSPARENT|GX_STYLE_DRAW_SELECTED|GX_STYLE_TEXT_CENTER,   /* style flags */
1629     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1630     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1631     GX_COLOR_ID_BLACK,                       /* normal color id                */
1632     GX_COLOR_ID_BLACK,                       /* selected color id              */
1633     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1634     gx_studio_text_button_create,            /* create function                */
1635     GX_NULL,                                 /* drawing function override      */
1636     GX_NULL,                                 /* event function override        */
1637     {57, 28, 173, 68},                       /* widget size                    */
1638     GX_NULL,                                 /* no next widget                 */
1639     GX_NULL,                                 /* no child widgets               */
1640     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_home), /* control block    */
1641     (void *) &main_screen_home_properties    /* extended properties            */
1642 };
1643 
1644 GX_CONST GX_STUDIO_WIDGET main_screen_settings_define =
1645 {
1646     "settings",
1647     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1648     ID_SETTING,                              /* widget id                      */
1649     #if defined(GX_WIDGET_USER_DATA)
1650     0,                                       /* user data                      */
1651     #endif
1652     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1653     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1654     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1655     GX_COLOR_ID_BLACK,                       /* normal color id                */
1656     GX_COLOR_ID_BLACK,                       /* selected color id              */
1657     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1658     gx_studio_text_button_create,            /* create function                */
1659     GX_NULL,                                 /* drawing function override      */
1660     GX_NULL,                                 /* event function override        */
1661     {18, 175, 225, 215},                     /* widget size                    */
1662     &main_screen_home_define,                /* next widget definition         */
1663     GX_NULL,                                 /* no child widgets               */
1664     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_settings), /* control block */
1665     (void *) &main_screen_settings_properties /* extended properties           */
1666 };
1667 
1668 GX_CONST GX_STUDIO_WIDGET main_screen_bookshelf_define =
1669 {
1670     "bookshelf",
1671     GX_TYPE_TEXT_BUTTON,                     /* widget type                    */
1672     ID_BTN_BOOKSHELF,                        /* widget id                      */
1673     #if defined(GX_WIDGET_USER_DATA)
1674     0,                                       /* user data                      */
1675     #endif
1676     GX_STYLE_BORDER_RAISED|GX_STYLE_ENABLED|GX_STYLE_TEXT_CENTER,   /* style flags */
1677     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1678     sizeof(GX_TEXT_BUTTON),                  /* control block size             */
1679     GX_COLOR_ID_BLACK,                       /* normal color id                */
1680     GX_COLOR_ID_BLACK,                       /* selected color id              */
1681     GX_COLOR_ID_BLACK,                       /* disabled color id              */
1682     gx_studio_text_button_create,            /* create function                */
1683     GX_NULL,                                 /* drawing function override      */
1684     GX_NULL,                                 /* event function override        */
1685     {19, 116, 226, 156},                     /* widget size                    */
1686     &main_screen_settings_define,            /* next widget definition         */
1687     GX_NULL,                                 /* no child widgets               */
1688     offsetof(MAIN_SCREEN_CONTROL_BLOCK, main_screen_bookshelf), /* control block */
1689     (void *) &main_screen_bookshelf_properties /* extended properties          */
1690 };
1691 
1692 GX_ANIMATION_INFO main_screen_animation_1 = {
1693     (GX_WIDGET *) &bookshelf_screen,
1694     (GX_WIDGET *) &Main_Display_root_window,
1695     GX_NULL,
1696     GX_ANIMATION_TRANSLATE, ID_FADE_IN_BOOKSELF, 0, 1,
1697     {0, 0}, {0, 0}, 0, 255, 20
1698 };
1699 
1700 
1701 GX_ANIMATION_INFO main_screen_animation_2 = {
1702     (GX_WIDGET *) &main_screen,
1703     (GX_WIDGET *) &Main_Display_root_window,
1704     GX_NULL,
1705     GX_ANIMATION_TRANSLATE|GX_ANIMATION_PUSH_STACK, ID_SLIDE_OUT_MAIN_SCREEN, 0, 1,
1706     {0, 0}, {-240, 0}, 255, 255, 10
1707 };
1708 
1709 
1710 GX_STUDIO_ACTION main_screen__id_btn_bookshelf_gx_event_clicked_actions[3] = {
1711     {GX_ACTION_TYPE_ANIMATION, 0, &Main_Display_root_window, &bookshelf_screen, &main_screen_animation_1},
1712     {GX_ACTION_TYPE_ANIMATION, 0, &Main_Display_root_window, &main_screen, &main_screen_animation_2},
1713     {0, 0, GX_NULL, GX_NULL, GX_NULL}
1714 };
1715 
1716 
1717 GX_STUDIO_ACTION main_screen__id_setting_gx_event_clicked_actions[3] = {
1718     {GX_ACTION_TYPE_SCREEN_STACK_PUSH, 0, &Main_Display_root_window, &main_screen, GX_NULL},
1719     {GX_ACTION_TYPE_ATTACH, GX_ACTION_FLAG_DYNAMIC_TARGET, &Main_Display_root_window,  &setting_screen_define, GX_NULL},
1720     {0, 0, GX_NULL, GX_NULL, GX_NULL}
1721 };
1722 
1723 static GX_STUDIO_EVENT_ENTRY gx_studio_main_screen_event_table[] = {
1724     {GX_SIGNAL(ID_BTN_BOOKSHELF, GX_EVENT_CLICKED), 0, main_screen__id_btn_bookshelf_gx_event_clicked_actions},
1725     {GX_SIGNAL(ID_SETTING, GX_EVENT_CLICKED), 0, main_screen__id_setting_gx_event_clicked_actions},
1726     {0, 0, GX_NULL}
1727 };
1728 
1729 GX_STUDIO_EVENT_PROCESS main_screen_event_chain = {gx_studio_main_screen_event_table, (UINT (*)(GX_WIDGET *, GX_EVENT *))gx_window_event_process};
gx_studio_main_screen_event_process(GX_WIDGET * target,GX_EVENT * event_ptr)1730 static UINT gx_studio_main_screen_event_process(GX_WIDGET *target, GX_EVENT *event_ptr)
1731 {
1732     return (gx_studio_auto_event_handler(target, event_ptr, &main_screen_event_chain));
1733 }
1734 
1735 
1736 GX_CONST GX_STUDIO_WIDGET main_screen_define =
1737 {
1738     "main_screen",
1739     GX_TYPE_WINDOW,                          /* widget type                    */
1740     GX_ID_NONE,                              /* widget id                      */
1741     #if defined(GX_WIDGET_USER_DATA)
1742     0,                                       /* user data                      */
1743     #endif
1744     GX_STYLE_BORDER_NONE,                    /* style flags                    */
1745     GX_STATUS_ACCEPTS_FOCUS,                 /* status flags                   */
1746     sizeof(MAIN_SCREEN_CONTROL_BLOCK),       /* control block size             */
1747     GX_COLOR_ID_GRAY,                        /* normal color id                */
1748     GX_COLOR_ID_GRAY,                        /* selected color id              */
1749     GX_COLOR_ID_GRAY,                        /* disabled color id              */
1750     gx_studio_window_create,                 /* create function                */
1751     GX_NULL,                                 /* drawing function override      */
1752     (UINT (*)(GX_WIDGET *, GX_EVENT *)) gx_studio_main_screen_event_process, /* event function override */
1753     {0, 0, 239, 319},                        /* widget size                    */
1754     GX_NULL,                                 /* next widget                    */
1755     &main_screen_bookshelf_define,           /* child widget                   */
1756     0,                                       /* control block                  */
1757     (void *) &main_screen_properties         /* extended properties            */
1758 };
1759 GX_CONST GX_STUDIO_WIDGET_ENTRY system_screen_stack_widget_table[] =
1760 {
1761     { &language_screen_define, (GX_WIDGET *) &language_screen },
1762     { &book_screen_define, (GX_WIDGET *) &book_screen },
1763     { &setting_screen_define, GX_NULL },
1764     { &bookshelf_screen_define, (GX_WIDGET *) &bookshelf_screen },
1765     { &main_screen_define, (GX_WIDGET *) &main_screen },
1766     {GX_NULL, GX_NULL}
1767 };
1768 
gx_studio_nested_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)1769 static GX_WIDGET *gx_studio_nested_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
1770 {
1771     UINT status = GX_SUCCESS;
1772     GX_WIDGET *widget = GX_NULL;
1773     GX_VALUE   list_count = 0;
1774     GX_VALUE   list_total_count = 0;
1775 
1776     if(parent && (parent->gx_widget_type == GX_TYPE_MENU))
1777     {
1778         list_total_count = ((GX_MENU *)parent)->gx_menu_list_total_count;
1779     }
1780 
1781     while(definition && status == GX_SUCCESS)
1782     {
1783         if (definition->create_function)
1784         {
1785             if (definition->style & GX_STYLE_DYNAMICALLY_ALLOCATED)
1786             {
1787                 status = gx_widget_allocate(&widget, definition->control_block_size);
1788                 if (status != GX_SUCCESS)
1789                 {
1790                     return GX_NULL;
1791                 }
1792             }
1793             else
1794             {
1795                 if (control == GX_NULL)
1796                 {
1797                     return GX_NULL;
1798                 }
1799                 widget = (GX_WIDGET *) (control + definition->control_block_offset);
1800             }
1801 
1802             status = definition->create_function(definition, widget, parent);
1803 
1804             if(list_count < list_total_count)
1805             {
1806                 gx_menu_insert((GX_MENU *)parent, widget);
1807                 ((GX_MENU *)parent)->gx_menu_list_total_count--;
1808                 list_count++;
1809             }
1810 
1811             if (status == GX_SUCCESS)
1812             {
1813                 if (definition->widget_type != GX_TYPE_TEMPLATE)
1814                 {
1815 #if defined(GUIX_5_4_0_COMPATIBILITY)
1816                     gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id);
1817 #else
1818                     gx_widget_fill_color_set(widget, definition->normal_fill_color_id, definition->selected_fill_color_id, definition->disabled_fill_color_id);
1819 #endif
1820                 }
1821 
1822                 if (!(definition->status & GX_STATUS_ACCEPTS_FOCUS))
1823                 {
1824                     gx_widget_status_remove(widget, GX_STATUS_ACCEPTS_FOCUS);
1825                 }
1826 
1827                 if (definition->draw_function)
1828                 {
1829                     gx_widget_draw_set(widget, definition->draw_function);
1830                 }
1831                 if (definition->event_function)
1832                 {
1833                     gx_widget_event_process_set(widget, definition->event_function);
1834                 }
1835 
1836                 #if defined(GX_WIDGET_USER_DATA)
1837                 widget->gx_widget_user_data = definition->user_data;
1838                 #endif
1839 
1840                 if (definition->child_widget)
1841                 {
1842                     gx_studio_nested_widget_create(control, definition->child_widget, widget);
1843                 }
1844             }
1845             definition = definition->next_widget;
1846         }
1847     }
1848     return widget;
1849 }
1850 
gx_studio_widget_create(GX_BYTE * control,GX_CONST GX_STUDIO_WIDGET * definition,GX_WIDGET * parent)1851 GX_WIDGET *gx_studio_widget_create(GX_BYTE *control, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent)
1852 {
1853     GX_WIDGET *widget;
1854     widget = gx_studio_nested_widget_create(control, definition, GX_NULL);
1855 
1856     if (parent && widget)
1857     {
1858         gx_widget_attach(parent, widget);
1859     }
1860     return widget;
1861 }
1862 
gx_studio_named_widget_create(char * name,GX_WIDGET * parent,GX_WIDGET ** new_widget)1863 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget)
1864 {
1865     UINT status = GX_FAILURE;
1866     GX_CONST GX_STUDIO_WIDGET_ENTRY *entry = system_screen_stack_widget_table;
1867     GX_WIDGET *widget = GX_NULL;
1868 
1869     while(entry->widget_information)
1870     {
1871         if (!strcmp(name, entry->widget_information->widget_name))
1872         {
1873             widget = gx_studio_widget_create((GX_BYTE *) entry->widget, entry->widget_information, parent);
1874             if (widget)
1875             {
1876                 status = GX_SUCCESS;
1877             }
1878             break;
1879         }
1880         entry++;
1881     }
1882 
1883     if (new_widget)
1884     {
1885         *new_widget = widget;
1886     }
1887     return status;
1888 }
1889 
1890 
gx_studio_display_configure(USHORT display,UINT (* driver)(GX_DISPLAY *),GX_UBYTE language,USHORT theme,GX_WINDOW_ROOT ** return_root)1891 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *),
1892     GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root)
1893 {
1894     GX_CONST GX_THEME *theme_ptr;
1895     GX_RECTANGLE size;
1896 
1897     GX_STUDIO_DISPLAY_INFO *display_info = &system_screen_stack_display_table[display];
1898 
1899 
1900 /* create the requested display                                                */
1901 
1902     gx_display_create(display_info->display,
1903                       display_info->name,
1904                       driver,
1905                       (GX_VALUE) display_info->x_resolution,
1906                       (GX_VALUE) display_info->y_resolution);
1907 
1908 
1909 /* install the request theme                                                   */
1910 
1911     if(display_info->theme_table)
1912     {
1913         theme_ptr = display_info->theme_table[theme];
1914         if(theme_ptr)
1915         {
1916             gx_display_color_table_set(display_info->display, theme_ptr->theme_color_table, theme_ptr->theme_color_table_size);
1917 
1918 /* install the color palette if required                                       */
1919             if (display_info->display->gx_display_driver_palette_set &&
1920                 theme_ptr->theme_palette != NULL)
1921             {
1922                 display_info->display->gx_display_driver_palette_set(display_info->display, theme_ptr->theme_palette, theme_ptr->theme_palette_size);
1923             }
1924 
1925             gx_display_font_table_set(display_info->display, theme_ptr->theme_font_table, theme_ptr->theme_font_table_size);
1926             gx_display_pixelmap_table_set(display_info->display, theme_ptr->theme_pixelmap_table, theme_ptr->theme_pixelmap_table_size);
1927             gx_system_scroll_appearance_set(theme_ptr->theme_vertical_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_vertical_scrollbar_appearance);
1928             gx_system_scroll_appearance_set(theme_ptr->theme_horizontal_scroll_style, (GX_SCROLLBAR_APPEARANCE *) &theme_ptr->theme_horizontal_scrollbar_appearance);
1929         }
1930     }
1931 
1932 /* Install the language table.                                                 */
1933 
1934     if(display_info->language_table)
1935     {
1936         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);
1937         gx_display_active_language_set(display_info->display, language);
1938     }
1939 
1940 /* Set screen rotation angle.                                                  */
1941 
1942     display_info->display->gx_display_rotation_angle = display_info->rotation_angle;
1943 
1944 /* create the canvas for this display                                          */
1945 
1946     gx_canvas_create(display_info->canvas,
1947                      display_info->canvas_name,
1948                      display_info->display,
1949                      GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE,
1950                      display_info->x_resolution,
1951                      display_info->y_resolution,
1952                      display_info->canvas_memory,
1953                      display_info->canvas_memory_size);
1954 
1955 /* Create the root window for this canvas                                      */
1956 
1957     gx_utility_rectangle_define(&size,
1958                                 0, 0,
1959                                 (GX_VALUE) (display_info->x_resolution - 1),
1960                                 (GX_VALUE) (display_info->y_resolution - 1));
1961 
1962     gx_window_root_create(display_info->root_window,
1963                           display_info->name,
1964                           display_info->canvas, GX_STYLE_NONE, 0, &size);
1965     if (return_root)
1966     {
1967         *return_root = display_info->root_window;
1968     }
1969     return GX_SUCCESS;
1970 }
1971 #undef GUIX_STUDIO_GENERATED_FILE
1972