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 _LINES_SPECIFICATIONS_H_
14 #define _LINES_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_LINE_WIDTH 1
26 #define ID_LINE_ANGLE 2
27 #define ID_WIDTH_DISPLAY 3
28 #define ID_ANGLE_DISPLAY 4
29 #define ID_ANTI_ALIASED 5
30 #define ID_ROUNDED 6
31 #define ID_LINE_WINDOW 7
32 #define ID_COLOR_LIST 8
33 #define ID_BRUSH_ALPHA_SLIDER 9
34 #define ID_BRUSH_ALPHA_PROMPT 10
35 
36 
37 /* Define animation ids                                                        */
38 
39 #define GX_NEXT_ANIMATION_ID 1
40 
41 
42 /* Define user event ids                                                       */
43 
44 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
45 
46 
47 /* Declare properties structures for each utilized widget type                 */
48 
49 typedef struct GX_STUDIO_WIDGET_STRUCT
50 {
51    GX_CHAR *widget_name;
52    USHORT  widget_type;
53    USHORT  widget_id;
54    #if defined(GX_WIDGET_USER_DATA)
55    INT   user_data;
56    #endif
57    ULONG style;
58    ULONG status;
59    ULONG control_block_size;
60    GX_RESOURCE_ID normal_fill_color_id;
61    GX_RESOURCE_ID selected_fill_color_id;
62    GX_RESOURCE_ID disabled_fill_color_id;
63    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
64    void (*draw_function) (GX_WIDGET *);
65    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
66    GX_RECTANGLE size;
67    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
68    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
69    ULONG control_block_offset;
70    GX_CONST void *properties;
71 } GX_STUDIO_WIDGET;
72 
73 typedef struct
74 {
75     GX_CONST GX_STUDIO_WIDGET *widget_information;
76     GX_WIDGET        *widget;
77 } GX_STUDIO_WIDGET_ENTRY;
78 
79 typedef struct
80 {
81     GX_RESOURCE_ID string_id;
82     GX_RESOURCE_ID font_id;
83     GX_RESOURCE_ID normal_text_color_id;
84     GX_RESOURCE_ID selected_text_color_id;
85     GX_RESOURCE_ID disabled_text_color_id;
86     GX_RESOURCE_ID unchecked_pixelmap_id;
87     GX_RESOURCE_ID checked_pixelmap_id;
88     GX_RESOURCE_ID unchecked_disabled_pixelmap_id;
89     GX_RESOURCE_ID checked_disabled_pixelmap_id;
90 } GX_CHECKBOX_PROPERTIES;
91 
92 typedef struct
93 {
94     int tickmark_count;
95     int minval;
96     int maxval;
97     int current_val;
98     int increment;
99     GX_VALUE min_travel;
100     GX_VALUE max_travel;
101     GX_VALUE needle_width;
102     GX_VALUE needle_height;
103     GX_VALUE needle_inset;
104     GX_VALUE needle_hotspot;
105 } GX_SLIDER_PROPERTIES;
106 
107 typedef struct
108 {
109     GX_RESOURCE_ID string_id;
110     GX_RESOURCE_ID font_id;
111     GX_RESOURCE_ID normal_text_color_id;
112     GX_RESOURCE_ID selected_text_color_id;
113     GX_RESOURCE_ID disabled_text_color_id;
114 } GX_PROMPT_PROPERTIES;
115 
116 typedef struct
117 {
118     GX_RESOURCE_ID wallpaper_id;
119 } GX_WINDOW_PROPERTIES;
120 
121 typedef struct
122 {
123     GX_RESOURCE_ID pixelmap_id;
124     GX_RESOURCE_ID wallpaper_id;
125     VOID (*callback)(GX_VERTICAL_LIST *, GX_WIDGET *, INT);
126     int total_rows;
127     int open_height;
128 } GX_DROP_LIST_PROPERTIES;
129 
130 
131 /* Declare top-level control blocks                                            */
132 
133 typedef struct MAIN_WINDOW_CONTROL_BLOCK_STRUCT
134 {
135     GX_WINDOW_MEMBERS_DECLARE
136     GX_PROMPT main_window_prompt_1;
137     GX_SLIDER main_window_line_width_slider;
138     GX_PROMPT main_window_prompt_2;
139     GX_SLIDER main_window_line_angle_slider;
140     GX_PROMPT main_window_width_display;
141     GX_PROMPT main_window_angle_display;
142     GX_CHECKBOX main_window_aa_box;
143     GX_CHECKBOX main_window_rounded_box;
144     GX_WINDOW main_window_line_window;
145     GX_PROMPT main_window_color_label;
146     GX_DROP_LIST main_window_color_list;
147     GX_PROMPT main_window_prompt;
148     GX_SLIDER main_window_brush_alpha_slider;
149     GX_PROMPT main_window_brush_alpha_prompt;
150 } MAIN_WINDOW_CONTROL_BLOCK;
151 
152 
153 /* extern statically defined control blocks                                    */
154 
155 #ifndef GUIX_STUDIO_GENERATED_FILE
156 extern MAIN_WINDOW_CONTROL_BLOCK main_window;
157 #endif
158 
159 /* Declare event process functions, draw functions, and callback functions     */
160 
161 UINT main_event_handler(GX_WINDOW *widget, GX_EVENT *event_ptr);
162 VOID line_win_draw(GX_WINDOW *widget);
163 VOID drop_list_color_create(GX_VERTICAL_LIST *, GX_WIDGET *, INT);
164 
165 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
166 
167 
168 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
169 {
170     GX_CONST GX_CHAR *name;
171     GX_CONST GX_CHAR *canvas_name;
172     GX_CONST GX_THEME **theme_table;
173     GX_CONST GX_STRING **language_table;
174     USHORT   theme_table_size;
175     USHORT   language_table_size;
176     UINT     string_table_size;
177     UINT     x_resolution;
178     UINT     y_resolution;
179     GX_DISPLAY *display;
180     GX_CANVAS  *canvas;
181     GX_WINDOW_ROOT *root_window;
182     GX_COLOR   *canvas_memory;
183     ULONG      canvas_memory_size;
184     USHORT     rotation_angle;
185 } GX_STUDIO_DISPLAY_INFO;
186 
187 
188 /* Declare Studio-generated functions for creating top-level widgets           */
189 
190 UINT gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
191 UINT gx_studio_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
192 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
193 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
194 UINT gx_studio_drop_list_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
195 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
196 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
197 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
198 
199 /* Determine if a C++ compiler is being used.  If so, complete the standard
200   C conditional started above.                                                 */
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif                                       /* sentry                         */
206