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:11                        */
10 /*******************************************************************************/
11 
12 
13 #ifndef _SYNERGY_GLYPH_DRAW_16BPP_SCREEN_SPECIFICATIONS_H_
14 #define _SYNERGY_GLYPH_DRAW_16BPP_SCREEN_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_HORIZONTAL_SLIDER 1
26 #define ID_VERTICAL_SLIDER 2
27 #define ID_HSLIDER_INPUT 3
28 #define ID_VSLIDER_INPUT 4
29 #define ID_HCLIP_INPUT 5
30 #define ID_VCLIP_INPUT 6
31 
32 
33 /* Define animation ids                                                        */
34 
35 #define GX_NEXT_ANIMATION_ID 1
36 
37 
38 /* Define user event ids                                                       */
39 
40 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
41 
42 
43 /* Declare properties structures for each utilized widget type                 */
44 
45 typedef struct GX_STUDIO_WIDGET_STRUCT
46 {
47    GX_CHAR *widget_name;
48    USHORT  widget_type;
49    USHORT  widget_id;
50    #if defined(GX_WIDGET_USER_DATA)
51    INT   user_data;
52    #endif
53    ULONG style;
54    ULONG status;
55    ULONG control_block_size;
56    GX_RESOURCE_ID normal_fill_color_id;
57    GX_RESOURCE_ID selected_fill_color_id;
58    GX_RESOURCE_ID disabled_fill_color_id;
59    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
60    void (*draw_function) (GX_WIDGET *);
61    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
62    GX_RECTANGLE size;
63    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
64    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
65    ULONG control_block_offset;
66    GX_CONST void *properties;
67 } GX_STUDIO_WIDGET;
68 
69 typedef struct
70 {
71     GX_CONST GX_STUDIO_WIDGET *widget_information;
72     GX_WIDGET        *widget;
73 } GX_STUDIO_WIDGET_ENTRY;
74 
75 typedef struct
76 {
77     int tickmark_count;
78     int minval;
79     int maxval;
80     int current_val;
81     int increment;
82     GX_VALUE min_travel;
83     GX_VALUE max_travel;
84     GX_VALUE needle_width;
85     GX_VALUE needle_height;
86     GX_VALUE needle_inset;
87     GX_VALUE needle_hotspot;
88 } GX_SLIDER_PROPERTIES;
89 
90 typedef struct
91 {
92     GX_RESOURCE_ID string_id;
93     GX_RESOURCE_ID font_id;
94     GX_RESOURCE_ID normal_text_color_id;
95     GX_RESOURCE_ID selected_text_color_id;
96     GX_RESOURCE_ID disabled_text_color_id;
97 } GX_PROMPT_PROPERTIES;
98 
99 typedef struct
100 {
101     GX_RESOURCE_ID wallpaper_id;
102 } GX_WINDOW_PROPERTIES;
103 
104 typedef struct
105 {
106     GX_RESOURCE_ID string_id;
107     GX_RESOURCE_ID font_id;
108     GX_RESOURCE_ID normal_text_color_id;
109     GX_RESOURCE_ID selected_text_color_id;
110     GX_RESOURCE_ID disabled_text_color_id;
111     GX_RESOURCE_ID readonly_fill_color_id;
112     GX_RESOURCE_ID readonly_text_color_id;
113     GX_CHAR *buffer;
114     UINT buffer_size;
115 } GX_SINGLE_LINE_TEXT_INPUT_PROPERTIES;
116 
117 
118 /* Declare top-level control blocks                                            */
119 
120 typedef struct WINDOW_CONTROL_BLOCK_STRUCT
121 {
122     GX_WINDOW_MEMBERS_DECLARE
123     GX_PROMPT window_prompt_2;
124     GX_PROMPT window_prompt_3;
125     GX_SLIDER window_horizontal_slider;
126     GX_SLIDER window_vertical_slider;
127     GX_PROMPT window_prompt__1;
128     GX_PROMPT window_prompt__2;
129     GX_PROMPT window_prompt_1;
130     GX_PROMPT window_prompt_4;
131     GX_PROMPT window_prompt_5;
132     GX_PROMPT window_prompt_6;
133     GX_SINGLE_LINE_TEXT_INPUT window_text_input_hslider_val;
134     GX_SINGLE_LINE_TEXT_INPUT window_text_input_vslider_val;
135     GX_PROMPT window_prompt_7;
136     GX_PROMPT window_prompt_8;
137     GX_PROMPT window_prompt_9;
138     GX_PROMPT window_prompt_10;
139     GX_SINGLE_LINE_TEXT_INPUT window_hclip_width;
140     GX_SINGLE_LINE_TEXT_INPUT window_vclip_width;
141     GX_PROMPT window_prompt_11;
142     GX_PROMPT window_prompt_11_1;
143     GX_WINDOW window_horizontal_clip;
144     GX_WINDOW window_horizontal_clip_1;
145     GX_WINDOW window_vertical_clip;
146     GX_WINDOW window_vertical_clip_1;
147     GX_PROMPT window_prompt_12;
148     GX_PROMPT window_prompt_13;
149 } WINDOW_CONTROL_BLOCK;
150 
151 
152 /* extern statically defined control blocks                                    */
153 
154 #ifndef GUIX_STUDIO_GENERATED_FILE
155 extern WINDOW_CONTROL_BLOCK window;
156 #endif
157 
158 /* Prototype Dave2D display driver specific functions                          */
159 
160 UINT _gx_synergy_display_driver_setup(GX_DISPLAY *display);
161 #if defined(GX_TARGET_WIN32) || defined(GX_TARGET_LINUX)
162 UINT win32_dave2d_graphics_driver_setup_565rgb(GX_DISPLAY *display);
163 #else
164 VOID _gx_display_driver_565rgb_setup(GX_DISPLAY *display, VOID *aux_data,
165                            VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas,
166                            GX_RECTANGLE *dirty_area));
167 VOID _gx_dave2d_horizontal_pattern_line_draw_565(GX_DRAW_CONTEXT *context, INT xstart, INT xend, INT ypos);
168 VOID _gx_dave2d_vertical_pattern_line_draw_565(GX_DRAW_CONTEXT *context, INT ystart, INT yend, INT xpos);
169 VOID _gx_dave2d_pixel_write_565(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR color);
170 VOID _gx_dave2d_pixel_blend_565(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR fcolor, GX_UBYTE alpha);
171 VOID _gx_dave2d_pixelmap_rotate_16bpp(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap, INT angle, INT rot_cx, INT rot_cy);
172 VOID _gx_dave2d_drawing_initiate(GX_DISPLAY *display, GX_CANVAS *canvas);
173 VOID _gx_dave2d_drawing_complete(GX_DISPLAY *display, GX_CANVAS *canvas);
174 VOID _gx_dave2d_horizontal_line(GX_DRAW_CONTEXT *context,
175                              INT xstart, INT xend, INT ypos, INT width, GX_COLOR color);
176 VOID _gx_dave2d_vertical_line(GX_DRAW_CONTEXT *context,
177                              INT ystart, INT yend, INT xpos, INT width, GX_COLOR color);
178 VOID _gx_dave2d_canvas_copy(GX_CANVAS *canvas, GX_CANVAS *composite);
179 VOID _gx_dave2d_canvas_blend(GX_CANVAS *canvas, GX_CANVAS *composite);
180 VOID _gx_dave2d_simple_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT ystart, INT xend, INT yend);
181 VOID _gx_dave2d_simple_wide_line(GX_DRAW_CONTEXT *context, INT xstart, INT ystart,
182                                 INT xend, INT yend);
183 VOID _gx_dave2d_aliased_line(GX_DRAW_CONTEXT *context, INT xstart, INT ystart, INT xend, INT yend);
184 VOID _gx_dave2d_aliased_wide_line(GX_DRAW_CONTEXT *context, INT xstart,
185                                         INT ystart, INT xend, INT yend);
186 VOID _gx_dave2d_pixelmap_draw(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap);
187 VOID _gx_dave2d_horizontal_pixelmap_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT xend, INT y, GX_FILL_PIXELMAP_INFO *info);
188 VOID _gx_dave2d_pixelmap_blend(GX_DRAW_CONTEXT *context, INT xpos, INT ypos,
189                                       GX_PIXELMAP *pixelmap, GX_UBYTE alpha);
190 VOID _gx_dave2d_polygon_draw(GX_DRAW_CONTEXT *context, GX_POINT *vertex, INT num);
191 VOID _gx_dave2d_polygon_fill(GX_DRAW_CONTEXT *context, GX_POINT *vertex, INT num);
192 VOID _gx_dave2d_block_move(GX_DRAW_CONTEXT *context,
193                           GX_RECTANGLE *block, INT xshift, INT yshift);
194 VOID _gx_dave2d_alphamap_draw(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap);
195 VOID _gx_dave2d_compressed_glyph_8bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
196 VOID _gx_dave2d_raw_glyph_8bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
197 VOID _gx_dave2d_compressed_glyph_4bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
198 VOID _gx_dave2d_raw_glyph_4bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
199 VOID _gx_dave2d_compressed_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
200 VOID _gx_dave2d_raw_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
201 VOID _gx_dave2d_buffer_toggle(GX_CANVAS *canvas, GX_RECTANGLE *dirty);
202 #if defined(GX_ARC_DRAWING_SUPPORT)
203 VOID _gx_dave2d_aliased_circle_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r);
204 VOID _gx_dave2d_circle_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r);
205 VOID _gx_dave2d_circle_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r);
206 VOID _gx_dave2d_pie_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
207 VOID _gx_dave2d_aliased_arc_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
208 VOID _gx_dave2d_arc_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
209 VOID _gx_dave2d_arc_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
210 VOID _gx_dave2d_aliased_ellipse_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, INT a, INT b);
211 VOID _gx_dave2d_ellipse_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, INT a, INT b);
212 VOID _gx_dave2d_ellipse_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, INT a, INT b);
213 #endif
214 VOID _gx_synergy_jpeg_draw (GX_DRAW_CONTEXT *p_context, INT x, INT y, GX_PIXELMAP *p_pixelmap);
215 
216 #endif
217 
218 /* Declare event process functions, draw functions, and callback functions     */
219 
220 UINT main_event_handler(GX_WINDOW *widget, GX_EVENT *event_ptr);
221 
222 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
223 
224 
225 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
226 {
227     GX_CONST GX_CHAR *name;
228     GX_CONST GX_CHAR *canvas_name;
229     GX_CONST GX_THEME **theme_table;
230     GX_CONST GX_STRING **language_table;
231     USHORT   theme_table_size;
232     USHORT   language_table_size;
233     UINT     string_table_size;
234     UINT     x_resolution;
235     UINT     y_resolution;
236     GX_DISPLAY *display;
237     GX_CANVAS  *canvas;
238     GX_WINDOW_ROOT *root_window;
239     GX_COLOR   *canvas_memory;
240     ULONG      canvas_memory_size;
241     USHORT     rotation_angle;
242 } GX_STUDIO_DISPLAY_INFO;
243 
244 
245 /* Declare Studio-generated functions for creating top-level widgets           */
246 
247 UINT gx_studio_slider_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
248 UINT gx_studio_prompt_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
249 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
250 UINT gx_studio_text_input_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
251 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
252 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
253 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
254 
255 /* Determine if a C++ compiler is being used.  If so, complete the standard
256   C conditional started above.                                                 */
257 #ifdef __cplusplus
258 }
259 #endif
260 
261 #endif                                       /* sentry                         */
262