1 /*******************************************************************************/
2 /*  This file is auto-generated by Azure RTOS GUIX Studio. Do not edit this    */
3 /*  file by hand. Modifications to this file should only be made by running    */
4 /*  the Azure RTOS GUIX Studio application and re-generating the application   */
5 /*  specification file(s). For more information please refer to the Azure RTOS */
6 /*  GUIX Studio User Guide, or visit our web site at azure.com/rtos            */
7 /*                                                                             */
8 /*  GUIX Studio Revision 6.2.0.1                                               */
9 /*  Date (dd.mm.yyyy): 31.10.2022   Time (hh:mm): 14:10                        */
10 /*******************************************************************************/
11 
12 
13 #ifndef _MENU_SPECIFICATIONS_H_
14 #define _MENU_SPECIFICATIONS_H_
15 
16 #include "gx_api.h"
17 
18 /* Determine if C++ compiler is being used, if so use standard C.              */
19 #ifdef __cplusplus
20 extern   "C" {
21 #endif
22 
23 /* Define widget ids                                                           */
24 
25 #define ID_TOOLBAR_SCREEN 1
26 #define ID_BACK 2
27 #define ID_HOME_BUTTON 3
28 #define ID_BOOK_SCREEN 4
29 #define ID_TEXT_VIEW 5
30 #define ID_PROMPT_BOOK 6
31 #define ID_BTN_BOOKSHELF 7
32 
33 
34 /* Define animation ids                                                        */
35 
36 #define GX_NEXT_ANIMATION_ID 1
37 
38 
39 /* Define user event ids                                                       */
40 
41 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
42 
43 
44 /* Declare properties structures for each utilized widget type                 */
45 
46 typedef struct GX_STUDIO_WIDGET_STRUCT
47 {
48    GX_CHAR *widget_name;
49    USHORT  widget_type;
50    USHORT  widget_id;
51    #if defined(GX_WIDGET_USER_DATA)
52    INT   user_data;
53    #endif
54    ULONG style;
55    ULONG status;
56    ULONG control_block_size;
57    GX_RESOURCE_ID normal_fill_color_id;
58    GX_RESOURCE_ID selected_fill_color_id;
59    GX_RESOURCE_ID disabled_fill_color_id;
60    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
61    void (*draw_function) (GX_WIDGET *);
62    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
63    GX_RECTANGLE size;
64    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
65    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
66    ULONG control_block_offset;
67    GX_CONST void *properties;
68 } GX_STUDIO_WIDGET;
69 
70 typedef struct
71 {
72     GX_CONST GX_STUDIO_WIDGET *widget_information;
73     GX_WIDGET        *widget;
74 } GX_STUDIO_WIDGET_ENTRY;
75 
76 typedef struct
77 {
78     GX_RESOURCE_ID string_id;
79     GX_RESOURCE_ID font_id;
80     GX_RESOURCE_ID normal_text_color_id;
81     GX_RESOURCE_ID selected_text_color_id;
82     GX_RESOURCE_ID disabled_text_color_id;
83 } GX_TEXT_BUTTON_PROPERTIES;
84 
85 typedef struct
86 {
87     GX_RESOURCE_ID normal_pixelmap_id;
88     GX_RESOURCE_ID selected_pixelmap_id;
89 } GX_ICON_PROPERTIES;
90 
91 typedef struct
92 {
93     GX_RESOURCE_ID string_id;
94     GX_RESOURCE_ID font_id;
95     GX_RESOURCE_ID normal_text_color_id;
96     GX_RESOURCE_ID selected_text_color_id;
97     GX_RESOURCE_ID disabled_text_color_id;
98 } GX_PROMPT_PROPERTIES;
99 
100 typedef struct
101 {
102     GX_RESOURCE_ID wallpaper_id;
103 } GX_WINDOW_PROPERTIES;
104 
105 typedef struct
106 {
107     GX_RESOURCE_ID string_id;
108     GX_RESOURCE_ID font_id;
109     GX_RESOURCE_ID normal_text_color_id;
110     GX_RESOURCE_ID selected_text_color_id;
111     GX_RESOURCE_ID disabled_text_color_id;
112     GX_UBYTE       whitespace;
113     GX_BYTE        line_space;
114 } GX_ML_TEXT_VIEW_PROPERTIES;
115 
116 
117 /* Declare top-level control blocks                                            */
118 
119 typedef struct TOOLBAR_SCREEN_CONTROL_BLOCK_STRUCT
120 {
121     GX_WINDOW_MEMBERS_DECLARE
122     GX_ICON toolbar_screen_icon_10_1;
123     GX_PROMPT toolbar_screen_prompt_11;
124     GX_TEXT_BUTTON toolbar_screen_home_2;
125 } TOOLBAR_SCREEN_CONTROL_BLOCK;
126 
127 typedef struct BOOK_SCREEN_CONTROL_BLOCK_STRUCT
128 {
129     GX_WINDOW_MEMBERS_DECLARE
130     GX_MULTI_LINE_TEXT_VIEW book_screen_text_view_1;
131     GX_SCROLLBAR book_screen_vertical_scroll_1;
132 } BOOK_SCREEN_CONTROL_BLOCK;
133 
134 typedef struct BOOKSHELF_SCREEN_CONTROL_BLOCK_STRUCT
135 {
136     GX_WINDOW_MEMBERS_DECLARE
137     GX_ICON bookshelf_screen_icon_1;
138     GX_PROMPT bookshelf_screen_prompt_10;
139     GX_ICON bookshelf_screen_icon_2;
140     GX_PROMPT bookshelf_screen_prompt_2;
141     GX_ICON bookshelf_screen_icon_3;
142     GX_PROMPT bookshelf_screen_prompt_3;
143     GX_ICON bookshelf_screen_icon_4;
144     GX_PROMPT bookshelf_screen_prompt_5;
145     GX_ICON bookshelf_screen_icon_5;
146     GX_PROMPT bookshelf_screen_prompt_4;
147     GX_ICON bookshelf_screen_icon_6;
148     GX_PROMPT bookshelf_screen_prompt_6;
149     GX_ICON bookshelf_screen_icon_7;
150     GX_PROMPT bookshelf_screen_prompt_7;
151     GX_ICON bookshelf_screen_icon_8;
152     GX_PROMPT bookshelf_screen_prompt_8;
153     GX_ICON bookshelf_screen_icon_9;
154     GX_PROMPT bookshelf_screen_prompt_9;
155     GX_ICON bookshelf_screen_icon_10;
156     GX_PROMPT bookshelf_screen_prompt_1;
157     GX_TEXT_BUTTON bookshelf_screen_home_1;
158 } BOOKSHELF_SCREEN_CONTROL_BLOCK;
159 
160 typedef struct MAIN_SCREEN_CONTROL_BLOCK_STRUCT
161 {
162     GX_WINDOW_MEMBERS_DECLARE
163     GX_TEXT_BUTTON main_screen_home;
164     GX_TEXT_BUTTON main_screen_bookshelf;
165     GX_TEXT_BUTTON main_screen_booknotes;
166     GX_TEXT_BUTTON main_screen_search;
167     GX_TEXT_BUTTON main_screen_settings;
168 } MAIN_SCREEN_CONTROL_BLOCK;
169 
170 
171 /* extern statically defined control blocks                                    */
172 
173 #ifndef GUIX_STUDIO_GENERATED_FILE
174 extern TOOLBAR_SCREEN_CONTROL_BLOCK toolbar_screen;
175 extern BOOK_SCREEN_CONTROL_BLOCK book_screen;
176 extern BOOKSHELF_SCREEN_CONTROL_BLOCK bookshelf_screen;
177 extern MAIN_SCREEN_CONTROL_BLOCK main_screen;
178 #endif
179 
180 /* Declare event process functions, draw functions, and callback functions     */
181 
182 UINT sub_menu_event(GX_WINDOW *widget, GX_EVENT *event_ptr);
183 
184 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
185 
186 
187 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
188 {
189     GX_CONST GX_CHAR *name;
190     GX_CONST GX_CHAR *canvas_name;
191     GX_CONST GX_THEME **theme_table;
192     GX_CONST GX_STRING **language_table;
193     USHORT   theme_table_size;
194     USHORT   language_table_size;
195     UINT     string_table_size;
196     UINT     x_resolution;
197     UINT     y_resolution;
198     GX_DISPLAY *display;
199     GX_CANVAS  *canvas;
200     GX_WINDOW_ROOT *root_window;
201     GX_COLOR   *canvas_memory;
202     ULONG      canvas_memory_size;
203     USHORT     rotation_angle;
204 } GX_STUDIO_DISPLAY_INFO;
205 
206 
207 /* Declare Studio-generated functions for creating top-level widgets           */
208 
209 UINT gx_studio_text_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
210 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
211 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
212 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
213 UINT gx_studio_multi_line_text_view_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
214 UINT gx_studio_vertical_scrollbar_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
215 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
216 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
217 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
218 
219 /* Determine if a C++ compiler is being used.  If so, complete the standard
220   C conditional started above.                                                 */
221 #ifdef __cplusplus
222 }
223 #endif
224 
225 #endif                                       /* sentry                         */
226