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:23                        */
10 /*******************************************************************************/
11 
12 
13 #ifndef _GUIX_SPRITE_SPECIFICATIONS_H_
14 #define _GUIX_SPRITE_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_BIRD_SPRITE 1
26 #define ID_BACKGROUND_SIZE 2
27 #define ID_ALPHA_SLIDER 3
28 
29 
30 /* Define animation ids                                                        */
31 
32 #define GX_NEXT_ANIMATION_ID 1
33 
34 
35 /* Define user event ids                                                       */
36 
37 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
38 
39 
40 /* Declare properties structures for each utilized widget type                 */
41 
42 typedef struct GX_STUDIO_WIDGET_STRUCT
43 {
44    GX_CHAR *widget_name;
45    USHORT  widget_type;
46    USHORT  widget_id;
47    #if defined(GX_WIDGET_USER_DATA)
48    INT   user_data;
49    #endif
50    ULONG style;
51    ULONG status;
52    ULONG control_block_size;
53    GX_RESOURCE_ID normal_fill_color_id;
54    GX_RESOURCE_ID selected_fill_color_id;
55    GX_RESOURCE_ID disabled_fill_color_id;
56    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
57    void (*draw_function) (GX_WIDGET *);
58    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
59    GX_RECTANGLE size;
60    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
61    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
62    ULONG control_block_offset;
63    GX_CONST void *properties;
64 } GX_STUDIO_WIDGET;
65 
66 typedef struct
67 {
68     GX_CONST GX_STUDIO_WIDGET *widget_information;
69     GX_WIDGET        *widget;
70 } GX_STUDIO_WIDGET_ENTRY;
71 
72 typedef struct
73 {
74     GX_RESOURCE_ID normal_pixelmap_id;
75     GX_RESOURCE_ID selected_pixelmap_id;
76 } GX_ICON_PROPERTIES;
77 
78 typedef struct
79 {
80     int min_val;
81     int max_val;
82     int current_val;
83     int increment;
84     GX_VALUE min_travel;
85     GX_VALUE max_travel;
86     GX_VALUE needle_width;
87     GX_VALUE needle_height;
88     GX_VALUE needle_inset;
89     GX_VALUE needle_hotspot;
90     GX_RESOURCE_ID lower_pixelmap;
91     GX_RESOURCE_ID upper_pixelmap;
92     GX_RESOURCE_ID needle_pixelmap;
93 } GX_PIXELMAP_SLIDER_PROPERTIES;
94 
95 typedef struct
96 {
97     GX_SPRITE_FRAME *frame_list;
98     USHORT           frame_count;
99 } GX_SPRITE_PROPERTIES;
100 
101 typedef struct
102 {
103     GX_RESOURCE_ID string_id;
104     GX_RESOURCE_ID font_id;
105     GX_RESOURCE_ID normal_text_color_id;
106     GX_RESOURCE_ID selected_text_color_id;
107     GX_RESOURCE_ID disabled_text_color_id;
108 } GX_PROMPT_PROPERTIES;
109 
110 typedef struct
111 {
112     GX_RESOURCE_ID wallpaper_id;
113 } GX_WINDOW_PROPERTIES;
114 
115 
116 /* Declare top-level control blocks                                            */
117 
118 typedef struct MAIN_WINDOW_CONTROL_BLOCK_STRUCT
119 {
120     GX_WINDOW_MEMBERS_DECLARE
121     GX_SPRITE main_window_bird_sprite;
122     GX_ICON main_window_icon_1;
123     GX_PIXELMAP_SLIDER main_window_slider_background_size;
124     GX_PIXELMAP_SLIDER main_window_slider_alpha_value;
125     GX_PROMPT main_window_size_prompt;
126     GX_PROMPT main_window_fade_prompt;
127 } MAIN_WINDOW_CONTROL_BLOCK;
128 
129 
130 /* extern statically defined control blocks                                    */
131 
132 #ifndef GUIX_STUDIO_GENERATED_FILE
133 extern MAIN_WINDOW_CONTROL_BLOCK main_window;
134 #endif
135 
136 /* Declare event process functions, draw functions, and callback functions     */
137 
138 UINT MainWindowEventProcess(GX_WINDOW *widget, GX_EVENT *event_ptr);
139 VOID MainWindowDraw(GX_WINDOW *widget);
140 
141 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
142 
143 
144 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
145 {
146     GX_CONST GX_CHAR *name;
147     GX_CONST GX_CHAR *canvas_name;
148     GX_CONST GX_THEME **theme_table;
149     GX_CONST GX_STRING **language_table;
150     USHORT   theme_table_size;
151     USHORT   language_table_size;
152     UINT     string_table_size;
153     UINT     x_resolution;
154     UINT     y_resolution;
155     GX_DISPLAY *display;
156     GX_CANVAS  *canvas;
157     GX_WINDOW_ROOT *root_window;
158     GX_COLOR   *canvas_memory;
159     ULONG      canvas_memory_size;
160     USHORT     rotation_angle;
161 } GX_STUDIO_DISPLAY_INFO;
162 
163 
164 /* Declare Studio-generated functions for creating top-level widgets           */
165 
166 UINT gx_studio_icon_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
167 UINT gx_studio_pixelmap_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
168 UINT gx_studio_sprite_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
169 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
170 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
171 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
172 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
173 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
174 
175 /* Determine if a C++ compiler is being used.  If so, complete the standard
176   C conditional started above.                                                 */
177 #ifdef __cplusplus
178 }
179 #endif
180 
181 #endif                                       /* sentry                         */
182