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.1.12.0                                              */
9 /*  Date (dd.mm.yyyy): 25. 8.2022   Time (hh:mm): 18:22                        */
10 /*******************************************************************************/
11 
12 
13 #ifndef _GUIX_SHAPES_SPECIFICATIONS_H_
14 #define _GUIX_SHAPES_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 TEXT_WIN_8BPP 1
26 #define TEXT_WIN_4BPP 2
27 #define TEXT_WIN_1BPP 3
28 #define DYNAMIC_TEXT_WINDOW 4
29 #define ID_ROTATION_ANGLE_VAL 5
30 #define ID_ROTATION_ANGLE_SLIDER 6
31 #define ID_AUTO_ROTATE 7
32 #define ID_AUTO_SHIFT 8
33 #define ID_RED_TEXT 9
34 #define ID_BLUE_TEXT 10
35 #define ID_GREEN_TEXT 11
36 #define ID_SHAPES_SCREEN 12
37 #define ID_CIRCLE 13
38 #define ID_ARC 14
39 #define ID_PIE 15
40 #define ID_POLYGON 16
41 #define ID_ELLIPSE 17
42 #define ID_RECTANGLE 18
43 #define ID_TEXT 19
44 #define ID_SHAPES_WINDOW 20
45 #define ID_GRAPHICS_WINDOW 21
46 #define ID_RADIUS_PROMPT_VAL 22
47 #define ID_RADIUS_SLIDER 23
48 #define ID_BRUSH_WIDTH_VAL 24
49 #define ID_BRUSH_WIDTH 25
50 #define ID_ANTI_ALIASED 26
51 #define ID_ROUND_END 27
52 #define ID_SOLID_FILL 28
53 #define ID_PIXELMAP_FILL 29
54 
55 
56 /* Define animation ids                                                        */
57 
58 #define GX_NEXT_ANIMATION_ID 1
59 
60 
61 /* Define user event ids                                                       */
62 
63 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
64 
65 
66 /* Declare properties structures for each utilized widget type                 */
67 
68 typedef struct GX_STUDIO_WIDGET_STRUCT
69 {
70    GX_CHAR *widget_name;
71    USHORT  widget_type;
72    USHORT  widget_id;
73    #if defined(GX_WIDGET_USER_DATA)
74    INT   user_data;
75    #endif
76    ULONG style;
77    ULONG status;
78    ULONG control_block_size;
79    GX_RESOURCE_ID normal_fill_color_id;
80    GX_RESOURCE_ID selected_fill_color_id;
81    GX_RESOURCE_ID disabled_fill_color_id;
82    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
83    void (*draw_function) (GX_WIDGET *);
84    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
85    GX_RECTANGLE size;
86    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
87    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
88    ULONG control_block_offset;
89    GX_CONST void *properties;
90 } GX_STUDIO_WIDGET;
91 
92 typedef struct
93 {
94     GX_CONST GX_STUDIO_WIDGET *widget_information;
95     GX_WIDGET        *widget;
96 } GX_STUDIO_WIDGET_ENTRY;
97 
98 typedef struct
99 {
100     GX_RESOURCE_ID string_id;
101     GX_RESOURCE_ID font_id;
102     GX_RESOURCE_ID normal_text_color_id;
103     GX_RESOURCE_ID selected_text_color_id;
104     GX_RESOURCE_ID disabled_text_color_id;
105     GX_RESOURCE_ID unchecked_pixelmap_id;
106     GX_RESOURCE_ID checked_pixelmap_id;
107     GX_RESOURCE_ID unchecked_disabled_pixelmap_id;
108     GX_RESOURCE_ID checked_disabled_pixelmap_id;
109 } GX_CHECKBOX_PROPERTIES;
110 
111 typedef struct
112 {
113     GX_RESOURCE_ID string_id;
114     GX_RESOURCE_ID font_id;
115     GX_RESOURCE_ID normal_text_color_id;
116     GX_RESOURCE_ID selected_text_color_id;
117     GX_RESOURCE_ID disabled_text_color_id;
118     GX_RESOURCE_ID off_pixelmap_id;
119     GX_RESOURCE_ID on_pixelmap_id;
120     GX_RESOURCE_ID off_disabled_pixelmap_id;
121     GX_RESOURCE_ID on_disabled_pixelmap_id;
122 } GX_RADIO_BUTTON_PROPERTIES;
123 
124 typedef struct
125 {
126     GX_RESOURCE_ID normal_pixelmap_id;
127     GX_RESOURCE_ID selected_pixelmap_id;
128 } GX_ICON_PROPERTIES;
129 
130 typedef struct
131 {
132     int min_val;
133     int max_val;
134     int current_val;
135     int increment;
136     GX_VALUE min_travel;
137     GX_VALUE max_travel;
138     GX_VALUE needle_width;
139     GX_VALUE needle_height;
140     GX_VALUE needle_inset;
141     GX_VALUE needle_hotspot;
142     GX_RESOURCE_ID lower_pixelmap;
143     GX_RESOURCE_ID upper_pixelmap;
144     GX_RESOURCE_ID needle_pixelmap;
145 } GX_PIXELMAP_SLIDER_PROPERTIES;
146 
147 typedef struct
148 {
149     GX_RESOURCE_ID string_id;
150     GX_RESOURCE_ID font_id;
151     GX_RESOURCE_ID normal_text_color_id;
152     GX_RESOURCE_ID selected_text_color_id;
153     GX_RESOURCE_ID disabled_text_color_id;
154 } GX_PROMPT_PROPERTIES;
155 
156 typedef struct
157 {
158     GX_RESOURCE_ID string_id;
159     GX_RESOURCE_ID font_id;
160     GX_RESOURCE_ID normal_text_color_id;
161     GX_RESOURCE_ID selected_text_color_id;
162     GX_RESOURCE_ID disabled_text_color_id;
163     GX_RESOURCE_ID left_map_id;
164     GX_RESOURCE_ID fill_map_id;
165     GX_RESOURCE_ID right_map_id;
166     GX_RESOURCE_ID selected_left_map_id;
167     GX_RESOURCE_ID selected_fill_map_id;
168     GX_RESOURCE_ID selected_right_map_id;
169 } GX_PIXELMAP_PROMPT_PROPERTIES;
170 
171 typedef struct
172 {
173     GX_RESOURCE_ID wallpaper_id;
174 } GX_WINDOW_PROPERTIES;
175 
176 
177 /* Declare top-level control blocks                                            */
178 
179 typedef struct TEXT_ROTAION_WINDOW_CONTROL_BLOCK_STRUCT
180 {
181     GX_WINDOW_MEMBERS_DECLARE
182     GX_WINDOW Text_Rotaion_Window_Text_Window;
183     GX_WINDOW Text_Rotaion_Window_text_window_8bpp;
184     GX_WINDOW Text_Rotaion_Window_text_window_4bpp;
185     GX_WINDOW Text_Rotaion_Window_text_window_1bpp;
186     GX_WINDOW Text_Rotaion_Window_dynamic_text_window;
187     GX_PROMPT Text_Rotaion_Window_prompt_rotate_angle;
188     GX_PIXELMAP_PROMPT Text_Rotaion_Window_rotation_angle_value;
189     GX_PIXELMAP_SLIDER Text_Rotaion_Window_Rotation_Angle_slider;
190     GX_CHECKBOX Text_Rotaion_Window_checkbox_auto_rotate;
191     GX_CHECKBOX Text_Rotaion_Window_checkbox_auto_shift;
192     GX_WINDOW Text_Rotaion_Window_color_group_window;
193     GX_PROMPT Text_Rotaion_Window_prompt_text_color;
194     GX_RADIO_BUTTON Text_Rotaion_Window_radio_button_red;
195     GX_RADIO_BUTTON Text_Rotaion_Window_radio_button_blue;
196     GX_RADIO_BUTTON Text_Rotaion_Window_radio_button_greeb;
197 } TEXT_ROTAION_WINDOW_CONTROL_BLOCK;
198 
199 typedef struct SHAPES_SCREEN_CONTROL_BLOCK_STRUCT
200 {
201     GX_WINDOW_MEMBERS_DECLARE
202     GX_WINDOW Shapes_Screen_shape_type_container;
203     GX_RADIO_BUTTON Shapes_Screen_radio_button_circle;
204     GX_RADIO_BUTTON Shapes_Screen_radio_button_arc;
205     GX_RADIO_BUTTON Shapes_Screen_radio_button_pie;
206     GX_RADIO_BUTTON Shapes_Screen_radio_button_polygon;
207     GX_RADIO_BUTTON Shapes_Screen_radio_button_ellipse;
208     GX_RADIO_BUTTON Shapes_Screen_radio_button_rectangle;
209     GX_RADIO_BUTTON Shapes_Screen_radio_button_text;
210     GX_WINDOW Shapes_Screen_Shapes_Window;
211     GX_WINDOW Shapes_Screen_graphics_window;
212     GX_PROMPT Shapes_Screen_prompt_radius;
213     GX_PIXELMAP_PROMPT Shapes_Screen_radius_val;
214     GX_PIXELMAP_SLIDER Shapes_Screen_radius_slider;
215     GX_PROMPT Shapes_Screen_prompt_brush_width;
216     GX_PIXELMAP_PROMPT Shapes_Screen_brush_width_val;
217     GX_PIXELMAP_SLIDER Shapes_Screen_brush_width_slider;
218     GX_PROMPT Shapes_Screen_prompt_brush_style;
219     GX_CHECKBOX Shapes_Screen_checkbox_anti_alised;
220     GX_CHECKBOX Shapes_Screen_checkbox_round_end;
221     GX_CHECKBOX Shapes_Screen_checkbox_fill;
222     GX_CHECKBOX Shapes_Screen_checkbox_pixelmap_fill;
223     GX_ICON Shapes_Screen_express_icon;
224 } SHAPES_SCREEN_CONTROL_BLOCK;
225 
226 
227 /* extern statically defined control blocks                                    */
228 
229 #ifndef GUIX_STUDIO_GENERATED_FILE
230 extern TEXT_ROTAION_WINDOW_CONTROL_BLOCK Text_Rotaion_Window;
231 extern SHAPES_SCREEN_CONTROL_BLOCK Shapes_Screen;
232 #endif
233 
234 /* Declare event process functions, draw functions, and callback functions     */
235 
236 UINT Text_Rotation_Window_event_handler(GX_WINDOW *widget, GX_EVENT *event_ptr);
237 VOID text_window_draw(GX_WINDOW *widget);
238 UINT ShapesScreen_event_handler(GX_WINDOW *widget, GX_EVENT *event_ptr);
239 VOID graphics_draw(GX_WINDOW *widget);
240 
241 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
242 
243 
244 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
245 {
246     GX_CONST GX_CHAR *name;
247     GX_CONST GX_CHAR *canvas_name;
248     GX_CONST GX_THEME **theme_table;
249     GX_CONST GX_STRING **language_table;
250     USHORT   theme_table_size;
251     USHORT   language_table_size;
252     UINT     string_table_size;
253     UINT     x_resolution;
254     UINT     y_resolution;
255     GX_DISPLAY *display;
256     GX_CANVAS  *canvas;
257     GX_WINDOW_ROOT *root_window;
258     GX_COLOR   *canvas_memory;
259     ULONG      canvas_memory_size;
260     USHORT     rotation_angle;
261 } GX_STUDIO_DISPLAY_INFO;
262 
263 
264 /* Declare Studio-generated functions for creating top-level widgets           */
265 
266 UINT gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
267 UINT gx_studio_radio_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
268 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
269 UINT gx_studio_pixelmap_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
270 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
271 UINT gx_studio_pixelmap_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
272 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
273 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
274 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
275 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
276 
277 /* Determine if a C++ compiler is being used.  If so, complete the standard
278   C conditional started above.                                                 */
279 #ifdef __cplusplus
280 }
281 #endif
282 
283 #endif                                       /* sentry                         */
284