1 |
/* |
/* |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
RDP order processing |
RDP order processing |
4 |
Copyright (C) Matthew Chapman 1999-2000 |
Copyright (C) Matthew Chapman 1999-2002 |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or modify |
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 |
it under the terms of the GNU General Public License as published by |
33 |
RDP_ORDER_PATBLT = 1, |
RDP_ORDER_PATBLT = 1, |
34 |
RDP_ORDER_SCREENBLT = 2, |
RDP_ORDER_SCREENBLT = 2, |
35 |
RDP_ORDER_LINE = 9, |
RDP_ORDER_LINE = 9, |
36 |
RDP_ORDER_RECT = 10, |
RDP_ORDER_RECT = 10, |
37 |
RDP_ORDER_DESKSAVE = 11, |
RDP_ORDER_DESKSAVE = 11, |
38 |
RDP_ORDER_MEMBLT = 13, |
RDP_ORDER_MEMBLT = 13, |
39 |
RDP_ORDER_TRIBLT = 14, |
RDP_ORDER_TRIBLT = 14, |
40 |
|
RDP_ORDER_POLYLINE = 22, |
41 |
RDP_ORDER_TEXT2 = 27 |
RDP_ORDER_TEXT2 = 27 |
42 |
}; |
}; |
43 |
|
|
57 |
uint16 cy; |
uint16 cy; |
58 |
uint8 opcode; |
uint8 opcode; |
59 |
|
|
60 |
} DESTBLT_ORDER; |
} |
61 |
|
DESTBLT_ORDER; |
62 |
|
|
63 |
typedef struct _PATBLT_ORDER |
typedef struct _PATBLT_ORDER |
64 |
{ |
{ |
71 |
uint8 fgcolour; |
uint8 fgcolour; |
72 |
BRUSH brush; |
BRUSH brush; |
73 |
|
|
74 |
} PATBLT_ORDER; |
} |
75 |
|
PATBLT_ORDER; |
76 |
|
|
77 |
typedef struct _SCREENBLT_ORDER |
typedef struct _SCREENBLT_ORDER |
78 |
{ |
{ |
84 |
uint16 srcx; |
uint16 srcx; |
85 |
uint16 srcy; |
uint16 srcy; |
86 |
|
|
87 |
} SCREENBLT_ORDER; |
} |
88 |
|
SCREENBLT_ORDER; |
89 |
|
|
90 |
typedef struct _LINE_ORDER |
typedef struct _LINE_ORDER |
91 |
{ |
{ |
98 |
uint8 opcode; |
uint8 opcode; |
99 |
PEN pen; |
PEN pen; |
100 |
|
|
101 |
} LINE_ORDER; |
} |
102 |
|
LINE_ORDER; |
103 |
|
|
104 |
typedef struct _RECT_ORDER |
typedef struct _RECT_ORDER |
105 |
{ |
{ |
109 |
uint16 cy; |
uint16 cy; |
110 |
uint8 colour; |
uint8 colour; |
111 |
|
|
112 |
} RECT_ORDER; |
} |
113 |
|
RECT_ORDER; |
114 |
|
|
115 |
typedef struct _DESKSAVE_ORDER |
typedef struct _DESKSAVE_ORDER |
116 |
{ |
{ |
121 |
uint16 bottom; |
uint16 bottom; |
122 |
uint8 action; |
uint8 action; |
123 |
|
|
124 |
} DESKSAVE_ORDER; |
} |
125 |
|
DESKSAVE_ORDER; |
126 |
|
|
127 |
typedef struct _TRIBLT_ORDER |
typedef struct _TRIBLT_ORDER |
128 |
{ |
{ |
141 |
uint16 cache_idx; |
uint16 cache_idx; |
142 |
uint16 unknown; |
uint16 unknown; |
143 |
|
|
144 |
} TRIBLT_ORDER; |
} |
145 |
|
TRIBLT_ORDER; |
146 |
|
|
147 |
typedef struct _MEMBLT_ORDER |
typedef struct _MEMBLT_ORDER |
148 |
{ |
{ |
157 |
uint16 srcy; |
uint16 srcy; |
158 |
uint16 cache_idx; |
uint16 cache_idx; |
159 |
|
|
160 |
} MEMBLT_ORDER; |
} |
161 |
|
MEMBLT_ORDER; |
162 |
|
|
163 |
|
#define MAX_DATA 256 |
164 |
|
|
165 |
|
typedef struct _POLYLINE_ORDER |
166 |
|
{ |
167 |
|
uint16 x; |
168 |
|
uint16 y; |
169 |
|
uint8 opcode; |
170 |
|
uint8 fgcolour; |
171 |
|
uint8 lines; |
172 |
|
uint8 datasize; |
173 |
|
uint8 data[MAX_DATA]; |
174 |
|
|
175 |
|
} |
176 |
|
POLYLINE_ORDER; |
177 |
|
|
178 |
#define MAX_TEXT 256 |
#define MAX_TEXT 256 |
179 |
|
|
198 |
uint8 length; |
uint8 length; |
199 |
uint8 text[MAX_TEXT]; |
uint8 text[MAX_TEXT]; |
200 |
|
|
201 |
} TEXT2_ORDER; |
} |
202 |
|
TEXT2_ORDER; |
203 |
|
|
204 |
typedef struct _RDP_ORDER_STATE |
typedef struct _RDP_ORDER_STATE |
205 |
{ |
{ |
214 |
DESKSAVE_ORDER desksave; |
DESKSAVE_ORDER desksave; |
215 |
MEMBLT_ORDER memblt; |
MEMBLT_ORDER memblt; |
216 |
TRIBLT_ORDER triblt; |
TRIBLT_ORDER triblt; |
217 |
|
POLYLINE_ORDER polyline; |
218 |
TEXT2_ORDER text2; |
TEXT2_ORDER text2; |
219 |
|
|
220 |
} RDP_ORDER_STATE; |
} |
221 |
|
RDP_ORDER_STATE; |
222 |
|
|
223 |
typedef struct _RDP_RAW_BMPCACHE_ORDER |
typedef struct _RDP_RAW_BMPCACHE_ORDER |
224 |
{ |
{ |
231 |
uint16 cache_idx; |
uint16 cache_idx; |
232 |
uint8 *data; |
uint8 *data; |
233 |
|
|
234 |
} RDP_RAW_BMPCACHE_ORDER; |
} |
235 |
|
RDP_RAW_BMPCACHE_ORDER; |
236 |
|
|
237 |
typedef struct _RDP_BMPCACHE_ORDER |
typedef struct _RDP_BMPCACHE_ORDER |
238 |
{ |
{ |
249 |
uint16 final_size; |
uint16 final_size; |
250 |
uint8 *data; |
uint8 *data; |
251 |
|
|
252 |
} RDP_BMPCACHE_ORDER; |
} |
253 |
|
RDP_BMPCACHE_ORDER; |
254 |
|
|
255 |
#define MAX_GLYPH 32 |
#define MAX_GLYPH 32 |
256 |
|
|
263 |
uint16 height; |
uint16 height; |
264 |
uint8 data[MAX_GLYPH]; |
uint8 data[MAX_GLYPH]; |
265 |
|
|
266 |
} RDP_FONT_GLYPH; |
} |
267 |
|
RDP_FONT_GLYPH; |
268 |
|
|
269 |
#define MAX_GLYPHS 256 |
#define MAX_GLYPHS 256 |
270 |
|
|
274 |
uint8 nglyphs; |
uint8 nglyphs; |
275 |
RDP_FONT_GLYPH glyphs[MAX_GLYPHS]; |
RDP_FONT_GLYPH glyphs[MAX_GLYPHS]; |
276 |
|
|
277 |
} RDP_FONTCACHE_ORDER; |
} |
278 |
|
RDP_FONTCACHE_ORDER; |
279 |
|
|
280 |
typedef struct _RDP_COLCACHE_ORDER |
typedef struct _RDP_COLCACHE_ORDER |
281 |
{ |
{ |
282 |
uint8 cache_id; |
uint8 cache_id; |
283 |
COLOURMAP map; |
COLOURMAP map; |
284 |
|
|
285 |
} RDP_COLCACHE_ORDER; |
} |
286 |
|
RDP_COLCACHE_ORDER; |