VirtualBox

source: vbox/trunk/src/VBox/RDP/client/orders.h@ 33656

最後變更 在這個檔案從33656是 33656,由 vboxsync 提交於 14 年 前

*: rebrand Sun (L)GPL disclaimers

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.1 KB
 
1/*
2 rdesktop: A Remote Desktop Protocol client.
3 RDP order processing
4 Copyright (C) Matthew Chapman 1999-2007
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
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21/*
22 * Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
24 * the General Public License version 2 (GPLv2) at this time for any software where
25 * a choice of GPL license versions is made available with the language indicating
26 * that GPLv2 or any later version may be used, or where a choice of which version
27 * of the GPL is applied is otherwise unspecified.
28 */
29
30#define RDP_ORDER_STANDARD 0x01
31#define RDP_ORDER_SECONDARY 0x02
32#define RDP_ORDER_BOUNDS 0x04
33#define RDP_ORDER_CHANGE 0x08
34#define RDP_ORDER_DELTA 0x10
35#define RDP_ORDER_LASTBOUNDS 0x20
36#define RDP_ORDER_SMALL 0x40
37#define RDP_ORDER_TINY 0x80
38
39enum RDP_ORDER_TYPE
40{
41 RDP_ORDER_DESTBLT = 0,
42 RDP_ORDER_PATBLT = 1,
43 RDP_ORDER_SCREENBLT = 2,
44 RDP_ORDER_LINE = 9,
45 RDP_ORDER_RECT = 10,
46 RDP_ORDER_DESKSAVE = 11,
47 RDP_ORDER_MEMBLT = 13,
48 RDP_ORDER_TRIBLT = 14,
49 RDP_ORDER_POLYGON = 20,
50 RDP_ORDER_POLYGON2 = 21,
51 RDP_ORDER_POLYLINE = 22,
52 RDP_ORDER_ELLIPSE = 25,
53 RDP_ORDER_ELLIPSE2 = 26,
54 RDP_ORDER_TEXT2 = 27
55};
56
57enum RDP_SECONDARY_ORDER_TYPE
58{
59 RDP_ORDER_RAW_BMPCACHE = 0,
60 RDP_ORDER_COLCACHE = 1,
61 RDP_ORDER_BMPCACHE = 2,
62 RDP_ORDER_FONTCACHE = 3,
63 RDP_ORDER_RAW_BMPCACHE2 = 4,
64 RDP_ORDER_BMPCACHE2 = 5,
65 RDP_ORDER_BRUSHCACHE = 7
66};
67
68typedef struct _DESTBLT_ORDER
69{
70 sint16 x;
71 sint16 y;
72 sint16 cx;
73 sint16 cy;
74 uint8 opcode;
75
76}
77DESTBLT_ORDER;
78
79typedef struct _PATBLT_ORDER
80{
81 sint16 x;
82 sint16 y;
83 sint16 cx;
84 sint16 cy;
85 uint8 opcode;
86 uint32 bgcolour;
87 uint32 fgcolour;
88 BRUSH brush;
89
90}
91PATBLT_ORDER;
92
93typedef struct _SCREENBLT_ORDER
94{
95 sint16 x;
96 sint16 y;
97 sint16 cx;
98 sint16 cy;
99 uint8 opcode;
100 sint16 srcx;
101 sint16 srcy;
102
103}
104SCREENBLT_ORDER;
105
106typedef struct _LINE_ORDER
107{
108 uint16 mixmode;
109 sint16 startx;
110 sint16 starty;
111 sint16 endx;
112 sint16 endy;
113 uint32 bgcolour;
114 uint8 opcode;
115 PEN pen;
116
117}
118LINE_ORDER;
119
120typedef struct _RECT_ORDER
121{
122 sint16 x;
123 sint16 y;
124 sint16 cx;
125 sint16 cy;
126 uint32 colour;
127
128}
129RECT_ORDER;
130
131typedef struct _DESKSAVE_ORDER
132{
133 uint32 offset;
134 sint16 left;
135 sint16 top;
136 sint16 right;
137 sint16 bottom;
138 uint8 action;
139
140}
141DESKSAVE_ORDER;
142
143typedef struct _TRIBLT_ORDER
144{
145 uint8 colour_table;
146 uint8 cache_id;
147 sint16 x;
148 sint16 y;
149 sint16 cx;
150 sint16 cy;
151 uint8 opcode;
152 sint16 srcx;
153 sint16 srcy;
154 uint32 bgcolour;
155 uint32 fgcolour;
156 BRUSH brush;
157 uint16 cache_idx;
158 uint16 unknown;
159
160}
161TRIBLT_ORDER;
162
163typedef struct _MEMBLT_ORDER
164{
165 uint8 colour_table;
166 uint8 cache_id;
167 sint16 x;
168 sint16 y;
169 sint16 cx;
170 sint16 cy;
171 uint8 opcode;
172 sint16 srcx;
173 sint16 srcy;
174 uint16 cache_idx;
175
176}
177MEMBLT_ORDER;
178
179#define MAX_DATA 256
180
181typedef struct _POLYGON_ORDER
182{
183 sint16 x;
184 sint16 y;
185 uint8 opcode;
186 uint8 fillmode;
187 uint32 fgcolour;
188 uint8 npoints;
189 uint8 datasize;
190 uint8 data[MAX_DATA];
191
192}
193POLYGON_ORDER;
194
195typedef struct _POLYGON2_ORDER
196{
197 sint16 x;
198 sint16 y;
199 uint8 opcode;
200 uint8 fillmode;
201 uint32 bgcolour;
202 uint32 fgcolour;
203 BRUSH brush;
204 uint8 npoints;
205 uint8 datasize;
206 uint8 data[MAX_DATA];
207
208}
209POLYGON2_ORDER;
210
211typedef struct _POLYLINE_ORDER
212{
213 sint16 x;
214 sint16 y;
215 uint8 opcode;
216 uint32 fgcolour;
217 uint8 lines;
218 uint8 datasize;
219 uint8 data[MAX_DATA];
220
221}
222POLYLINE_ORDER;
223
224typedef struct _ELLIPSE_ORDER
225{
226 sint16 left;
227 sint16 top;
228 sint16 right;
229 sint16 bottom;
230 uint8 opcode;
231 uint8 fillmode;
232 uint32 fgcolour;
233
234}
235ELLIPSE_ORDER;
236
237typedef struct _ELLIPSE2_ORDER
238{
239 sint16 left;
240 sint16 top;
241 sint16 right;
242 sint16 bottom;
243 uint8 opcode;
244 uint8 fillmode;
245 BRUSH brush;
246 uint32 bgcolour;
247 uint32 fgcolour;
248
249}
250ELLIPSE2_ORDER;
251
252#define MAX_TEXT 256
253
254typedef struct _TEXT2_ORDER
255{
256 uint8 font;
257 uint8 flags;
258 uint8 opcode;
259 uint8 mixmode;
260 uint32 bgcolour;
261 uint32 fgcolour;
262 sint16 clipleft;
263 sint16 cliptop;
264 sint16 clipright;
265 sint16 clipbottom;
266 sint16 boxleft;
267 sint16 boxtop;
268 sint16 boxright;
269 sint16 boxbottom;
270 BRUSH brush;
271 sint16 x;
272 sint16 y;
273 uint8 length;
274 uint8 text[MAX_TEXT];
275
276}
277TEXT2_ORDER;
278
279typedef struct _RDP_ORDER_STATE
280{
281 uint8 order_type;
282 BOUNDS bounds;
283
284 DESTBLT_ORDER destblt;
285 PATBLT_ORDER patblt;
286 SCREENBLT_ORDER screenblt;
287 LINE_ORDER line;
288 RECT_ORDER rect;
289 DESKSAVE_ORDER desksave;
290 MEMBLT_ORDER memblt;
291 TRIBLT_ORDER triblt;
292 POLYGON_ORDER polygon;
293 POLYGON2_ORDER polygon2;
294 POLYLINE_ORDER polyline;
295 ELLIPSE_ORDER ellipse;
296 ELLIPSE2_ORDER ellipse2;
297 TEXT2_ORDER text2;
298
299}
300RDP_ORDER_STATE;
301
302typedef struct _RDP_RAW_BMPCACHE_ORDER
303{
304 uint8 cache_id;
305 uint8 pad1;
306 uint8 width;
307 uint8 height;
308 uint8 bpp;
309 uint16 bufsize;
310 uint16 cache_idx;
311 uint8 *data;
312
313}
314RDP_RAW_BMPCACHE_ORDER;
315
316typedef struct _RDP_BMPCACHE_ORDER
317{
318 uint8 cache_id;
319 uint8 pad1;
320 uint8 width;
321 uint8 height;
322 uint8 bpp;
323 uint16 bufsize;
324 uint16 cache_idx;
325 uint16 pad2;
326 uint16 size;
327 uint16 row_size;
328 uint16 final_size;
329 uint8 *data;
330
331}
332RDP_BMPCACHE_ORDER;
333
334/* RDP_BMPCACHE2_ORDER */
335#define ID_MASK 0x0007
336#define MODE_MASK 0x0038
337#define SQUARE 0x0080
338#define PERSIST 0x0100
339#define FLAG_51_UNKNOWN 0x0800
340
341#define MODE_SHIFT 3
342
343#define LONG_FORMAT 0x80
344#define BUFSIZE_MASK 0x3FFF /* or 0x1FFF? */
345
346#define MAX_GLYPH 32
347
348typedef struct _RDP_FONT_GLYPH
349{
350 uint16 character;
351 uint16 unknown;
352 uint16 baseline;
353 uint16 width;
354 uint16 height;
355 uint8 data[MAX_GLYPH];
356
357}
358RDP_FONT_GLYPH;
359
360#define MAX_GLYPHS 256
361
362typedef struct _RDP_FONTCACHE_ORDER
363{
364 uint8 font;
365 uint8 nglyphs;
366 RDP_FONT_GLYPH glyphs[MAX_GLYPHS];
367
368}
369RDP_FONTCACHE_ORDER;
370
371typedef struct _RDP_COLCACHE_ORDER
372{
373 uint8 cache_id;
374 COLOURMAP map;
375
376}
377RDP_COLCACHE_ORDER;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette