ReactOS  0.4.14-dev-317-g96040ec
orders.h
Go to the documentation of this file.
1 /*
2  rdesktop: A Remote Desktop Protocol client.
3  RDP order processing
4  Copyright (C) Matthew Chapman 1999-2005
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc.,
18  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20 
21 #ifndef RDESKTOP_ORDERS_H
22 #define RDESKTOP_ORDERS_H
23 
24 #define RDP_ORDER_STANDARD 0x01
25 #define RDP_ORDER_SECONDARY 0x02
26 #define RDP_ORDER_BOUNDS 0x04
27 #define RDP_ORDER_CHANGE 0x08
28 #define RDP_ORDER_DELTA 0x10
29 #define RDP_ORDER_LASTBOUNDS 0x20
30 #define RDP_ORDER_SMALL 0x40
31 #define RDP_ORDER_TINY 0x80
32 
34 {
49 };
50 
52 {
60 };
61 
62 typedef struct _DESTBLT_ORDER
63 {
64  sint16 x;
65  sint16 y;
66  sint16 cx;
67  sint16 cy;
68  uint8 opcode;
69 
70 }
72 
73 typedef struct _PATBLT_ORDER
74 {
75  sint16 x;
76  sint16 y;
77  sint16 cx;
78  sint16 cy;
79  uint8 opcode;
82  BRUSH brush;
83 
84 }
86 
87 typedef struct _SCREENBLT_ORDER
88 {
89  sint16 x;
90  sint16 y;
91  sint16 cx;
92  sint16 cy;
93  uint8 opcode;
94  sint16 srcx;
95  sint16 srcy;
96 
97 }
99 
100 typedef struct _LINE_ORDER
101 {
102  uint16 mixmode;
103  sint16 startx;
104  sint16 starty;
105  sint16 endx;
106  sint16 endy;
108  uint8 opcode;
109  PEN pen;
110 
111 }
112 LINE_ORDER;
113 
114 typedef struct _RECT_ORDER
115 {
116  sint16 x;
117  sint16 y;
118  sint16 cx;
119  sint16 cy;
120  uint32 colour;
121 
122 }
123 RECT_ORDER;
124 
125 typedef struct _DESKSAVE_ORDER
126 {
127  uint32 offset;
128  sint16 left;
129  sint16 top;
130  sint16 right;
131  sint16 bottom;
132  uint8 action;
133 
134 }
136 
137 typedef struct _TRIBLT_ORDER
138 {
140  uint8 cache_id;
141  sint16 x;
142  sint16 y;
143  sint16 cx;
144  sint16 cy;
145  uint8 opcode;
146  sint16 srcx;
147  sint16 srcy;
150  BRUSH brush;
152  uint16 unknown;
153 
154 }
156 
157 typedef struct _MEMBLT_ORDER
158 {
160  uint8 cache_id;
161  sint16 x;
162  sint16 y;
163  sint16 cx;
164  sint16 cy;
165  uint8 opcode;
166  sint16 srcx;
167  sint16 srcy;
169 
170 }
172 
173 #define MAX_DATA 256
174 
175 typedef struct _POLYGON_ORDER
176 {
177  sint16 x;
178  sint16 y;
179  uint8 opcode;
180  uint8 fillmode;
182  uint8 npoints;
183  uint8 datasize;
185 
186 }
188 
189 typedef struct _POLYGON2_ORDER
190 {
191  sint16 x;
192  sint16 y;
193  uint8 opcode;
194  uint8 fillmode;
197  BRUSH brush;
198  uint8 npoints;
199  uint8 datasize;
201 
202 }
204 
205 typedef struct _POLYLINE_ORDER
206 {
207  sint16 x;
208  sint16 y;
209  uint8 opcode;
211  uint8 lines;
212  uint8 datasize;
214 
215 }
217 
218 typedef struct _ELLIPSE_ORDER
219 {
220  sint16 left;
221  sint16 top;
222  sint16 right;
223  sint16 bottom;
224  uint8 opcode;
225  uint8 fillmode;
227 
228 }
230 
231 typedef struct _ELLIPSE2_ORDER
232 {
233  sint16 left;
234  sint16 top;
235  sint16 right;
236  sint16 bottom;
237  uint8 opcode;
238  uint8 fillmode;
239  BRUSH brush;
242 
243 }
245 
246 #define MAX_TEXT 256
247 
248 typedef struct _TEXT2_ORDER
249 {
250  uint8 font;
251  uint8 flags;
252  uint8 opcode;
253  uint8 mixmode;
257  sint16 cliptop;
260  sint16 boxleft;
261  sint16 boxtop;
264  BRUSH brush;
265  sint16 x;
266  sint16 y;
267  uint8 length;
269 
270 }
272 
273 typedef struct _RDP_ORDER_STATE
274 {
276  BOUNDS bounds;
277 
292 
293 }
295 
296 typedef struct _RDP_RAW_BMPCACHE_ORDER
297 {
298  uint8 cache_id;
299  uint8 pad1;
300  uint8 width;
301  uint8 height;
302  uint8 bpp;
303  uint16 bufsize;
305  uint8 *data;
306 
307 }
309 
310 typedef struct _RDP_BMPCACHE_ORDER
311 {
312  uint8 cache_id;
313  uint8 pad1;
314  uint8 width;
315  uint8 height;
316  uint8 bpp;
317  uint16 bufsize;
319  uint16 pad2;
320  uint16 size;
323  uint8 *data;
324 
325 }
327 
328 /* RDP_BMPCACHE2_ORDER */
329 #define ID_MASK 0x0007
330 #define MODE_MASK 0x0038
331 #define SQUARE 0x0080
332 #define PERSIST 0x0100
333 #define FLAG_51_UNKNOWN 0x0800
334 
335 #define MODE_SHIFT 3
336 
337 #define LONG_FORMAT 0x80
338 #define BUFSIZE_MASK 0x3FFF /* or 0x1FFF? */
339 
340 #define MAX_GLYPH 32
341 
342 typedef struct _RDP_FONT_GLYPH
343 {
345  uint16 unknown;
347  uint16 width;
348  uint16 height;
350 
351 }
353 
354 #define MAX_GLYPHS 256
355 
356 typedef struct _RDP_FONTCACHE_ORDER
357 {
358  uint8 font;
359  uint8 nglyphs;
361 
362 }
364 
365 typedef struct _RDP_COLCACHE_ORDER
366 {
367  uint8 cache_id;
368  COLOURMAP map;
369 
370 }
372 
373 #endif
sint16 x
Definition: orders.h:203
Definition: types.h:72
uint32 fgcolour
Definition: orders.h:177
#define MAX_GLYPHS
Definition: orders.h:354
struct _RDP_COLCACHE_ORDER RDP_COLCACHE_ORDER
sint16 srcx
Definition: orders.h:162
uint8 datasize
Definition: orders.h:179
struct _DESTBLT_ORDER DESTBLT_ORDER
sint16 bottom
Definition: orders.h:127
uint32 bgcolour
Definition: orders.h:250
struct _ELLIPSE2_ORDER ELLIPSE2_ORDER
sint16 x
Definition: orders.h:60
#define MAX_GLYPH
Definition: orders.h:340
sint16 y
Definition: orders.h:113
uint8 opcode
Definition: orders.h:233
sint16 top
Definition: orders.h:230
sint16 cy
Definition: orders.h:63
sint16 x
Definition: orders.h:157
sint16 y
Definition: orders.h:174
sint16 clipleft
Definition: orders.h:252
sint16 top
Definition: orders.h:125
sint16 x
Definition: orders.h:137
struct _TRIBLT_ORDER TRIBLT_ORDER
uint32 colour
Definition: orders.h:116
uint8 opcode
Definition: orders.h:104
unsigned int uint32
Definition: types.h:32
Definition: types.h:82
uint32 offset
Definition: orders.h:123
struct _MEMBLT_ORDER MEMBLT_ORDER
sint16 cx
Definition: orders.h:87
uint16 cache_idx
Definition: orders.h:164
#define MAX_DATA
Definition: orders.h:173
struct _LINE_ORDER LINE_ORDER
uint32 bgcolour
Definition: orders.h:191
COLOURMAP map
Definition: orders.h:364
struct _RDP_ORDER_STATE RDP_ORDER_STATE
LINE_ORDER line
Definition: orders.h:277
struct _RDP_BMPCACHE_ORDER RDP_BMPCACHE_ORDER
sint16 y
Definition: orders.h:158
uint32 fgcolour
Definition: orders.h:222
struct _PATBLT_ORDER PATBLT_ORDER
uint8 opcode
Definition: orders.h:189
sint16 cx
Definition: orders.h:114
PATBLT_ORDER patblt
Definition: orders.h:275
uint8 fillmode
Definition: orders.h:234
BRUSH brush
Definition: orders.h:260
uint8 opcode
Definition: orders.h:161
sint16 left
Definition: orders.h:229
uint32 fgcolour
Definition: orders.h:251
sint16 x
Definition: orders.h:112
sint16 srcx
Definition: orders.h:90
struct _TEXT2_ORDER TEXT2_ORDER
uint8 flags
Definition: orders.h:247
SCREENBLT_ORDER screenblt
Definition: orders.h:276
sint16 boxleft
Definition: orders.h:256
ELLIPSE_ORDER ellipse
Definition: orders.h:285
sint16 cx
Definition: orders.h:139
TRIBLT_ORDER triblt
Definition: orders.h:281
uint32 fgcolour
Definition: orders.h:237
DESKSAVE_ORDER desksave
Definition: orders.h:279
BRUSH brush
Definition: orders.h:78
sint16 endy
Definition: orders.h:102
sint16 right
Definition: orders.h:126
uint32 fgcolour
Definition: orders.h:145
sint16 x
Definition: orders.h:71
uint8 colour_table
Definition: orders.h:135
sint16 y
Definition: orders.h:262
sint16 cy
Definition: orders.h:74
sint16 clipright
Definition: orders.h:254
sint16 left
Definition: orders.h:216
DESTBLT_ORDER destblt
Definition: orders.h:274
POLYLINE_ORDER polyline
Definition: orders.h:284
sint16 x
Definition: orders.h:85
uint32 bgcolour
Definition: orders.h:103
uint16 character
Definition: orders.h:340
struct _POLYGON2_ORDER POLYGON2_ORDER
RDP_SECONDARY_ORDER_TYPE
Definition: orders.h:47
sint16 endx
Definition: orders.h:101
sint16 y
Definition: orders.h:204
struct _SCREENBLT_ORDER SCREENBLT_ORDER
sint16 cx
Definition: orders.h:73
MEMBLT_ORDER memblt
Definition: orders.h:280
sint16 boxbottom
Definition: orders.h:259
uint16 final_size
Definition: orders.h:318
BRUSH brush
Definition: orders.h:193
sint16 startx
Definition: orders.h:99
RECT_ORDER rect
Definition: orders.h:278
POLYGON_ORDER polygon
Definition: orders.h:282
RDP_ORDER_TYPE
Definition: orders.h:29
Definition: brush.hpp:15
sint16 cx
Definition: orders.h:62
BOUNDS bounds
Definition: orders.h:272
sint16 y
Definition: orders.h:86
uint8 order_type
Definition: orders.h:271
unsigned char uint8
Definition: types.h:28
sint16 cy
Definition: orders.h:88
uint8 cache_id
Definition: orders.h:136
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
sint16 top
Definition: orders.h:217
uint32 bgcolour
Definition: orders.h:236
uint8 cache_id
Definition: orders.h:156
sint16 x
Definition: orders.h:187
struct _DESKSAVE_ORDER DESKSAVE_ORDER
uint32 fgcolour
Definition: orders.h:192
uint8 datasize
Definition: orders.h:208
uint16 width
Definition: orders.h:343
signed short sint16
Definition: types.h:31
sint16 left
Definition: orders.h:124
sint16 srcy
Definition: orders.h:91
sint16 srcy
Definition: orders.h:143
uint8 mixmode
Definition: orders.h:249
uint8 fillmode
Definition: orders.h:176
uint16 cache_idx
Definition: orders.h:314
struct _RDP_FONTCACHE_ORDER RDP_FONTCACHE_ORDER
uint16 unknown
Definition: orders.h:148
struct _RECT_ORDER RECT_ORDER
sint16 starty
Definition: orders.h:100
sint16 clipbottom
Definition: orders.h:255
sint16 y
Definition: orders.h:188
uint8 opcode
Definition: orders.h:64
struct _RDP_RAW_BMPCACHE_ORDER RDP_RAW_BMPCACHE_ORDER
uint8 opcode
Definition: orders.h:89
sint16 cy
Definition: orders.h:140
uint32 fgcolour
Definition: orders.h:206
sint16 x
Definition: orders.h:173
BRUSH brush
Definition: orders.h:146
unsigned short uint16
Definition: types.h:30
uint16 cache_idx
Definition: orders.h:147
uint8 lines
Definition: orders.h:207
BRUSH brush
Definition: orders.h:235
struct _RDP_FONT_GLYPH RDP_FONT_GLYPH
uint32 bgcolour
Definition: orders.h:76
uint16 baseline
Definition: orders.h:342
uint8 opcode
Definition: orders.h:141
ELLIPSE2_ORDER ellipse2
Definition: orders.h:286
#define MAX_TEXT
Definition: orders.h:246
RDP_FONT_GLYPH glyphs[MAX_GLYPHS]
Definition: orders.h:356
sint16 boxright
Definition: orders.h:258
uint16 unknown
Definition: orders.h:341
uint8 text[MAX_TEXT]
Definition: orders.h:264
uint16 mixmode
Definition: orders.h:98
sint16 right
Definition: orders.h:218
struct _POLYLINE_ORDER POLYLINE_ORDER
sint16 srcx
Definition: orders.h:142
struct _POLYGON_ORDER POLYGON_ORDER
POLYGON2_ORDER polygon2
Definition: orders.h:283
uint16 height
Definition: orders.h:344
uint8 opcode
Definition: orders.h:175
uint8 opcode
Definition: orders.h:205
sint16 y
Definition: orders.h:61
sint16 cx
Definition: orders.h:159
sint16 x
Definition: orders.h:261
uint8 opcode
Definition: orders.h:248
uint8 opcode
Definition: orders.h:220
sint16 y
Definition: orders.h:138
sint16 bottom
Definition: orders.h:232
sint16 right
Definition: orders.h:231
uint8 npoints
Definition: orders.h:194
sint16 srcy
Definition: orders.h:163
sint16 boxtop
Definition: orders.h:257
sint16 cy
Definition: orders.h:115
uint8 fillmode
Definition: orders.h:190
struct _ELLIPSE_ORDER ELLIPSE_ORDER
sint16 cliptop
Definition: orders.h:253
uint8 action
Definition: orders.h:128
uint8 font
Definition: orders.h:246
TEXT2_ORDER text2
Definition: orders.h:287
uint32 bgcolour
Definition: orders.h:144
uint8 length
Definition: orders.h:263
uint8 colour_table
Definition: orders.h:155
uint8 fillmode
Definition: orders.h:221
uint32 fgcolour
Definition: orders.h:77
uint8 npoints
Definition: orders.h:178
sint16 bottom
Definition: orders.h:219
PEN pen
Definition: orders.h:105
sint16 y
Definition: orders.h:72
uint8 datasize
Definition: orders.h:195
uint8 opcode
Definition: orders.h:75
sint16 cy
Definition: orders.h:160