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_4444ARGB_16BPP_SPECIFICATIONS_H_
14 #define _SYNERGY_4444ARGB_16BPP_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_PIC_WINDOW 1
26 #define ID_COMPRESSED 2
27 #define ID_4444ARGB 3
28 #define ID_4444BGRA 4
29 
30 
31 /* Define animation ids                                                        */
32 
33 #define GX_NEXT_ANIMATION_ID 1
34 
35 
36 /* Define user event ids                                                       */
37 
38 #define GX_NEXT_USER_EVENT_ID GX_FIRST_USER_EVENT
39 
40 
41 /* Declare properties structures for each utilized widget type                 */
42 
43 typedef struct GX_STUDIO_WIDGET_STRUCT
44 {
45    GX_CHAR *widget_name;
46    USHORT  widget_type;
47    USHORT  widget_id;
48    #if defined(GX_WIDGET_USER_DATA)
49    INT   user_data;
50    #endif
51    ULONG style;
52    ULONG status;
53    ULONG control_block_size;
54    GX_RESOURCE_ID normal_fill_color_id;
55    GX_RESOURCE_ID selected_fill_color_id;
56    GX_RESOURCE_ID disabled_fill_color_id;
57    UINT (*create_function) (GX_CONST struct GX_STUDIO_WIDGET_STRUCT *, GX_WIDGET *, GX_WIDGET *);
58    void (*draw_function) (GX_WIDGET *);
59    UINT (*event_function) (GX_WIDGET *, GX_EVENT *);
60    GX_RECTANGLE size;
61    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *next_widget;
62    GX_CONST struct GX_STUDIO_WIDGET_STRUCT *child_widget;
63    ULONG control_block_offset;
64    GX_CONST void *properties;
65 } GX_STUDIO_WIDGET;
66 
67 typedef struct
68 {
69     GX_CONST GX_STUDIO_WIDGET *widget_information;
70     GX_WIDGET        *widget;
71 } GX_STUDIO_WIDGET_ENTRY;
72 
73 typedef struct
74 {
75     GX_RESOURCE_ID string_id;
76     GX_RESOURCE_ID font_id;
77     GX_RESOURCE_ID normal_text_color_id;
78     GX_RESOURCE_ID selected_text_color_id;
79     GX_RESOURCE_ID disabled_text_color_id;
80     GX_RESOURCE_ID unchecked_pixelmap_id;
81     GX_RESOURCE_ID checked_pixelmap_id;
82     GX_RESOURCE_ID unchecked_disabled_pixelmap_id;
83     GX_RESOURCE_ID checked_disabled_pixelmap_id;
84 } GX_CHECKBOX_PROPERTIES;
85 
86 typedef struct
87 {
88     GX_RESOURCE_ID string_id;
89     GX_RESOURCE_ID font_id;
90     GX_RESOURCE_ID normal_text_color_id;
91     GX_RESOURCE_ID selected_text_color_id;
92     GX_RESOURCE_ID disabled_text_color_id;
93     GX_RESOURCE_ID off_pixelmap_id;
94     GX_RESOURCE_ID on_pixelmap_id;
95     GX_RESOURCE_ID off_disabled_pixelmap_id;
96     GX_RESOURCE_ID on_disabled_pixelmap_id;
97 } GX_RADIO_BUTTON_PROPERTIES;
98 
99 typedef struct
100 {
101     GX_RESOURCE_ID wallpaper_id;
102 } GX_WINDOW_PROPERTIES;
103 
104 
105 /* Declare top-level control blocks                                            */
106 
107 typedef struct MAIN_WINDOW_CONTROL_BLOCK_STRUCT
108 {
109     GX_WINDOW_MEMBERS_DECLARE
110     GX_WINDOW main_window_pic_window;
111     GX_CHECKBOX main_window_compressed_box;
112     GX_RADIO_BUTTON main_window_4444argb_button;
113     GX_RADIO_BUTTON main_window_4444bgra_button;
114 } MAIN_WINDOW_CONTROL_BLOCK;
115 
116 
117 /* extern statically defined control blocks                                    */
118 
119 #ifndef GUIX_STUDIO_GENERATED_FILE
120 extern MAIN_WINDOW_CONTROL_BLOCK main_window;
121 #endif
122 
123 /* Prototype Dave2D display driver specific functions                          */
124 
125 UINT _gx_synergy_display_driver_setup(GX_DISPLAY *display);
126 #if defined(GX_TARGET_WIN32) || defined(GX_TARGET_LINUX)
127 UINT win32_dave2d_graphics_driver_setup_565rgb(GX_DISPLAY *display);
128 #else
129 VOID _gx_display_driver_565rgb_setup(GX_DISPLAY *display, VOID *aux_data,
130                            VOID (*toggle_function)(struct GX_CANVAS_STRUCT *canvas,
131                            GX_RECTANGLE *dirty_area));
132 VOID _gx_dave2d_horizontal_pattern_line_draw_565(GX_DRAW_CONTEXT *context, INT xstart, INT xend, INT ypos);
133 VOID _gx_dave2d_vertical_pattern_line_draw_565(GX_DRAW_CONTEXT *context, INT ystart, INT yend, INT xpos);
134 VOID _gx_dave2d_pixel_write_565(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR color);
135 VOID _gx_dave2d_pixel_blend_565(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR fcolor, GX_UBYTE alpha);
136 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);
137 VOID _gx_dave2d_drawing_initiate(GX_DISPLAY *display, GX_CANVAS *canvas);
138 VOID _gx_dave2d_drawing_complete(GX_DISPLAY *display, GX_CANVAS *canvas);
139 VOID _gx_dave2d_horizontal_line(GX_DRAW_CONTEXT *context,
140                              INT xstart, INT xend, INT ypos, INT width, GX_COLOR color);
141 VOID _gx_dave2d_vertical_line(GX_DRAW_CONTEXT *context,
142                              INT ystart, INT yend, INT xpos, INT width, GX_COLOR color);
143 VOID _gx_dave2d_canvas_copy(GX_CANVAS *canvas, GX_CANVAS *composite);
144 VOID _gx_dave2d_canvas_blend(GX_CANVAS *canvas, GX_CANVAS *composite);
145 VOID _gx_dave2d_simple_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT ystart, INT xend, INT yend);
146 VOID _gx_dave2d_simple_wide_line(GX_DRAW_CONTEXT *context, INT xstart, INT ystart,
147                                 INT xend, INT yend);
148 VOID _gx_dave2d_aliased_line(GX_DRAW_CONTEXT *context, INT xstart, INT ystart, INT xend, INT yend);
149 VOID _gx_dave2d_aliased_wide_line(GX_DRAW_CONTEXT *context, INT xstart,
150                                         INT ystart, INT xend, INT yend);
151 VOID _gx_dave2d_pixelmap_draw(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap);
152 VOID _gx_dave2d_horizontal_pixelmap_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT xend, INT y, GX_FILL_PIXELMAP_INFO *info);
153 VOID _gx_dave2d_pixelmap_blend(GX_DRAW_CONTEXT *context, INT xpos, INT ypos,
154                                       GX_PIXELMAP *pixelmap, GX_UBYTE alpha);
155 VOID _gx_dave2d_polygon_draw(GX_DRAW_CONTEXT *context, GX_POINT *vertex, INT num);
156 VOID _gx_dave2d_polygon_fill(GX_DRAW_CONTEXT *context, GX_POINT *vertex, INT num);
157 VOID _gx_dave2d_block_move(GX_DRAW_CONTEXT *context,
158                           GX_RECTANGLE *block, INT xshift, INT yshift);
159 VOID _gx_dave2d_alphamap_draw(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap);
160 VOID _gx_dave2d_compressed_glyph_8bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
161 VOID _gx_dave2d_raw_glyph_8bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
162 VOID _gx_dave2d_compressed_glyph_4bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
163 VOID _gx_dave2d_raw_glyph_4bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
164 VOID _gx_dave2d_compressed_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
165 VOID _gx_dave2d_raw_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, const GX_GLYPH *glyph);
166 VOID _gx_dave2d_buffer_toggle(GX_CANVAS *canvas, GX_RECTANGLE *dirty);
167 #if defined(GX_ARC_DRAWING_SUPPORT)
168 VOID _gx_dave2d_aliased_circle_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r);
169 VOID _gx_dave2d_circle_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r);
170 VOID _gx_dave2d_circle_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r);
171 VOID _gx_dave2d_pie_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
172 VOID _gx_dave2d_aliased_arc_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
173 VOID _gx_dave2d_arc_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
174 VOID _gx_dave2d_arc_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, UINT r, INT start_angle, INT end_angle);
175 VOID _gx_dave2d_aliased_ellipse_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, INT a, INT b);
176 VOID _gx_dave2d_ellipse_draw(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, INT a, INT b);
177 VOID _gx_dave2d_ellipse_fill(GX_DRAW_CONTEXT *context, INT xcenter, INT ycenter, INT a, INT b);
178 #endif
179 VOID _gx_synergy_jpeg_draw (GX_DRAW_CONTEXT *p_context, INT x, INT y, GX_PIXELMAP *p_pixelmap);
180 
181 #endif
182 
183 /* Declare event process functions, draw functions, and callback functions     */
184 
185 UINT main_event_handler(GX_WINDOW *widget, GX_EVENT *event_ptr);
186 VOID pic_win_draw(GX_WINDOW *widget);
187 
188 /* Declare the GX_STUDIO_DISPLAY_INFO structure                                */
189 
190 
191 typedef struct GX_STUDIO_DISPLAY_INFO_STRUCT
192 {
193     GX_CONST GX_CHAR *name;
194     GX_CONST GX_CHAR *canvas_name;
195     GX_CONST GX_THEME **theme_table;
196     GX_CONST GX_STRING **language_table;
197     USHORT   theme_table_size;
198     USHORT   language_table_size;
199     UINT     string_table_size;
200     UINT     x_resolution;
201     UINT     y_resolution;
202     GX_DISPLAY *display;
203     GX_CANVAS  *canvas;
204     GX_WINDOW_ROOT *root_window;
205     GX_COLOR   *canvas_memory;
206     ULONG      canvas_memory_size;
207     USHORT     rotation_angle;
208 } GX_STUDIO_DISPLAY_INFO;
209 
210 
211 /* Declare Studio-generated functions for creating top-level widgets           */
212 
213 UINT gx_studio_checkbox_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
214 UINT gx_studio_radio_button_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
215 UINT gx_studio_window_create(GX_CONST GX_STUDIO_WIDGET *info, GX_WIDGET *control_block, GX_WIDGET *parent);
216 GX_WIDGET *gx_studio_widget_create(GX_BYTE *storage, GX_CONST GX_STUDIO_WIDGET *definition, GX_WIDGET *parent);
217 UINT gx_studio_named_widget_create(char *name, GX_WIDGET *parent, GX_WIDGET **new_widget);
218 UINT gx_studio_display_configure(USHORT display, UINT (*driver)(GX_DISPLAY *), GX_UBYTE language, USHORT theme, GX_WINDOW_ROOT **return_root);
219 
220 /* Determine if a C++ compiler is being used.  If so, complete the standard
221   C conditional started above.                                                 */
222 #ifdef __cplusplus
223 }
224 #endif
225 
226 #endif                                       /* sentry                         */
227