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