Fix build.
[reactos.git] / rosky / include / structs.h
1 #ifndef __RSK_STRUCTS_H
2 #define __RSK_STRUCTS_H
3
4 typedef unsigned int COLOR;
5
6 typedef struct region
7 {
8 int x1;
9 int y1;
10 int x2;
11 int y2;
12 } s_region;
13
14 typedef struct s_gi_msg
15 {
16 HANDLE win;
17 unsigned int type;
18 unsigned int para1;
19 unsigned int para2;
20 s_region rect;
21 struct s_gi_msg *next;
22 struct s_gi_msg *prev;
23 unsigned long long timestamp;
24 } s_gi_msg;
25
26 typedef struct DDB
27 {
28 unsigned int color;
29 unsigned int width;
30 unsigned int height;
31 unsigned char *data;
32 unsigned int palette_size;
33 unsigned int transcolor;
34 unsigned char trans;
35 unsigned char *bAndMask;
36 unsigned char bUseAndMask;
37 unsigned int uiAndMaskWidth;
38 unsigned int uiAndMaskHeight;
39 COLOR *palette;
40 } DDB;
41
42 typedef struct DIB
43 {
44 unsigned int color;
45 unsigned int width;
46 unsigned int height;
47 unsigned char *data;
48
49 unsigned int palette_size;
50 unsigned int transcolor;
51 unsigned char trans;
52
53 unsigned char *bAndMask;
54 unsigned char bUseAndMask;
55 unsigned int uiAndMaskWidth;
56 unsigned int uiAndMaskHeight;
57 unsigned int uiFlags;
58 COLOR *palette;
59 } DIB;
60
61 typedef struct GC
62 {
63 unsigned int type;
64 HANDLE window;
65 DIB *hDIB;
66 unsigned int width;
67 unsigned int height;
68 s_region *clip;
69 COLOR fg_color;
70 COLOR bg_color;
71 COLOR trans_color;
72 unsigned int uiTransparentLevel;
73 unsigned int flags;
74 unsigned int fontIndex;
75 unsigned int fontSize;
76 unsigned int fontFlags;
77 } GC;
78
79 typedef struct sBlit
80 {
81 DIB *hDIB;
82 DDB *hDDB;
83 int iDestX;
84 int iDestY;
85 int iSrcX;
86 int iSrcY;
87 int iWidth;
88 int iHeight;
89 unsigned int uiFlags;
90 unsigned int uiReserved0;
91 unsigned int uiReserved1;
92 unsigned int uiReserved2;
93 unsigned int uiReserved3;
94 unsigned int uiReserved4;
95 unsigned int uiReserved5;
96 unsigned int uiReserved6;
97 unsigned int uiReserved7;
98 unsigned int uiReserved8;
99 unsigned int uiReserved9;
100 } sBlit;
101
102 typedef struct widget_dynbmp_item
103 {
104 DIB *hDib;
105 unsigned char *rawData;
106 struct widget_dynbmp_item *next;
107 } widget_dynbmp_item;
108
109 typedef struct widget_dynbmp
110 {
111 unsigned int state;
112 unsigned int trans;
113 unsigned int transcolor;
114 unsigned int thread_id;
115 unsigned int timer_id;
116 widget_dynbmp_item *first;
117 widget_dynbmp_item *selected;
118 } widget_dynbmp;
119
120 typedef struct widget_popup
121 {
122 unsigned int uiItemHeight;
123 unsigned int uiFlags;
124 HANDLE hFont;
125 unsigned int uiFontFlags;
126 unsigned int uiFontSize;
127
128 unsigned int uiColorSelectedBack;
129 unsigned int uiColorSelectedFore;
130 unsigned int uiColorBack;
131 unsigned int uiColorFore;
132 unsigned int uiWindowBackColor;
133
134 unsigned int uiSpacingX;
135 } widget_popup;
136
137 typedef struct widget_menu_item
138 {
139 unsigned char text[255];
140 unsigned int ID;
141 unsigned int flags;
142 struct widget_menu_item *next;
143 struct widget_menu *child;
144 unsigned int focus;
145 unsigned int enabled;
146 unsigned int x;
147 HANDLE icon;
148 DIB *hDIB;
149 unsigned int has_icon;
150
151 /* sub items */
152 unsigned int width;
153 unsigned int count;
154 } widget_menu_item;
155
156 typedef struct widget_menu
157 {
158 unsigned char focus;
159 unsigned int count;
160 unsigned int width;
161 unsigned int has_icons;
162 widget_menu_item *items;
163 widget_dynbmp *animation;
164 widget_popup *pPopUpData;
165 unsigned int uiLineColor;
166 unsigned int uiBackGroundColor;
167 } widget_menu;
168
169 typedef struct app_para
170 {
171 unsigned char cpName[255];
172 unsigned int ulX;
173 unsigned int ulY;
174 unsigned int ulWidth;
175 unsigned int ulHeight;
176
177 void *win_func;
178 unsigned int ulStyle;
179 unsigned int ulBackGround;
180
181 unsigned int ulAppIcon;
182 widget_menu *pMenu;
183 } app_para;
184
185 typedef struct s_window
186 {
187 unsigned char name[255];
188 unsigned int x;
189 unsigned int y;
190 unsigned int height;
191 unsigned int width;
192 unsigned int orgx;
193 unsigned int orgy;
194 unsigned long (__cdecl *win_func)(struct s_window *win, s_gi_msg *m);
195 HANDLE handle;
196
197 struct s_window *parent;
198 struct s_window *child;
199 struct s_window *next;
200
201 unsigned char focus;
202 struct s_window *focus_win;
203 void *windowData;
204 unsigned int windowDataSize;
205
206 unsigned int flags;
207 int origin_x;
208 int origin_y;
209 } s_window;
210
211 typedef struct sCreateApplication
212 {
213 unsigned char ucApplicationName[255];
214 unsigned int uiX;
215 unsigned int uiY;
216 unsigned int uiWidth;
217 unsigned int uiHeight;
218
219 void *fwndClient;
220 unsigned int uiStyleApplication;
221 unsigned int uiStyleFrame;
222 unsigned int uiStyleTitle;
223 unsigned int uiStyleMenu;
224 unsigned int uiStyleBar;
225 unsigned int uiStyleClient;
226 unsigned int uiBackGroundColor;
227 unsigned int uiApplicationIcon;
228 widget_menu *pFrameMenu;
229
230 unsigned int uiReserved[128];
231
232 void (__cdecl *PostCreateWindowBitmap)(HANDLE hWnd, void *pGCBuf);
233 } sCreateApplication;
234
235 typedef struct s_resolution
236 {
237 unsigned int width;
238 unsigned int height;
239 unsigned int bpp;
240 } s_resolution;
241
242 #endif /* __RSK_STRUCTS_H */