1 | /** @file
|
---|
2 | * VBox Remote Desktop Protocol:
|
---|
3 | * VRDP orders structures.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2008 innotek GmbH
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifndef ___VBox_vrdporders_h
|
---|
28 | #define ___VBox_vrdporders_h
|
---|
29 |
|
---|
30 | /*
|
---|
31 | * The VRDP server gets an information about a graphical update as a pointer
|
---|
32 | * to a memory block and the size of the memory block.
|
---|
33 | * The memory block layout is:
|
---|
34 | * VRDPORDERHDR - Describes the affected rectangle.
|
---|
35 | * Then VRDP orders follow:
|
---|
36 | * VRDPORDERCODE
|
---|
37 | * A VRDPORDER* structure.
|
---|
38 | *
|
---|
39 | * If size of the memory block is equal to the VRDPORDERHDR, then a bitmap
|
---|
40 | * update is assumed.
|
---|
41 | */
|
---|
42 |
|
---|
43 | /* 128 bit bitmap hash. */
|
---|
44 | typedef uint8_t VRDPBITMAPHASH[16];
|
---|
45 |
|
---|
46 | #pragma pack(1)
|
---|
47 | typedef struct _VRDPORDERHDR
|
---|
48 | {
|
---|
49 | /** Coordinates of the affected rectangle. */
|
---|
50 | int16_t x;
|
---|
51 | int16_t y;
|
---|
52 | uint16_t w;
|
---|
53 | uint16_t h;
|
---|
54 | } VRDPORDERHDR;
|
---|
55 |
|
---|
56 | typedef struct _VRDPORDERCODE
|
---|
57 | {
|
---|
58 | uint32_t u32Code;
|
---|
59 | } VRDPORDERCODE;
|
---|
60 |
|
---|
61 | /* VRDP order codes. Must be >= 0, because the VRDP server internally
|
---|
62 | * uses negative values to mark some operations.
|
---|
63 | */
|
---|
64 | #define VRDP_ORDER_DIRTY_RECT (0)
|
---|
65 | #define VRDP_ORDER_SOLIDRECT (1)
|
---|
66 | #define VRDP_ORDER_SOLIDBLT (2)
|
---|
67 | #define VRDP_ORDER_DSTBLT (3)
|
---|
68 | #define VRDP_ORDER_SCREENBLT (4)
|
---|
69 | #define VRDP_ORDER_PATBLTBRUSH (5)
|
---|
70 | #define VRDP_ORDER_MEMBLT (6)
|
---|
71 | #define VRDP_ORDER_CACHED_BITMAP (7)
|
---|
72 | #define VRDP_ORDER_DELETED_BITMAP (8)
|
---|
73 | #define VRDP_ORDER_LINE (9)
|
---|
74 | #define VRDP_ORDER_BOUNDS (10)
|
---|
75 | #define VRDP_ORDER_REPEAT (11)
|
---|
76 | #define VRDP_ORDER_POLYLINE (12)
|
---|
77 | #define VRDP_ORDER_ELLIPSE (13)
|
---|
78 | #define VRDP_ORDER_SAVESCREEN (14)
|
---|
79 |
|
---|
80 | typedef struct _VRDPORDERPOINT
|
---|
81 | {
|
---|
82 | int16_t x;
|
---|
83 | int16_t y;
|
---|
84 | } VRDPORDERPOINT;
|
---|
85 |
|
---|
86 | typedef struct _VRDPORDERPOLYPOINTS
|
---|
87 | {
|
---|
88 | uint8_t c;
|
---|
89 | VRDPORDERPOINT a[16];
|
---|
90 | } VRDPORDERPOLYPOINTS;
|
---|
91 |
|
---|
92 | typedef struct _VRDPORDERAREA
|
---|
93 | {
|
---|
94 | int16_t x;
|
---|
95 | int16_t y;
|
---|
96 | uint16_t w;
|
---|
97 | uint16_t h;
|
---|
98 | } VRDPORDERAREA;
|
---|
99 |
|
---|
100 | typedef struct _VRDPORDERBOUNDS
|
---|
101 | {
|
---|
102 | VRDPORDERPOINT pt1;
|
---|
103 | VRDPORDERPOINT pt2;
|
---|
104 | } VRDPORDERBOUNDS;
|
---|
105 |
|
---|
106 | typedef struct _VRDPORDERREPEAT
|
---|
107 | {
|
---|
108 | VRDPORDERBOUNDS bounds;
|
---|
109 | } VRDPORDERREPEAT;
|
---|
110 |
|
---|
111 |
|
---|
112 | /* Header for bitmap bits in VBVA VRDP operations. */
|
---|
113 | typedef struct _VRDPDATABITS
|
---|
114 | {
|
---|
115 | /* Size of bitmap data without the header. */
|
---|
116 | uint32_t cb;
|
---|
117 | int16_t x;
|
---|
118 | int16_t y;
|
---|
119 | uint16_t cWidth;
|
---|
120 | uint16_t cHeight;
|
---|
121 | uint8_t cbPixel;
|
---|
122 | } VRDPDATABITS;
|
---|
123 |
|
---|
124 | typedef struct _VRDPORDERSOLIDRECT
|
---|
125 | {
|
---|
126 | int16_t x;
|
---|
127 | int16_t y;
|
---|
128 | uint16_t w;
|
---|
129 | uint16_t h;
|
---|
130 | uint32_t rgb;
|
---|
131 | } VRDPORDERSOLIDRECT;
|
---|
132 |
|
---|
133 | typedef struct _VRDPORDERSOLIDBLT
|
---|
134 | {
|
---|
135 | int16_t x;
|
---|
136 | int16_t y;
|
---|
137 | uint16_t w;
|
---|
138 | uint16_t h;
|
---|
139 | uint32_t rgb;
|
---|
140 | uint8_t rop;
|
---|
141 | } VRDPORDERSOLIDBLT;
|
---|
142 |
|
---|
143 | typedef struct _VRDPORDERDSTBLT
|
---|
144 | {
|
---|
145 | int16_t x;
|
---|
146 | int16_t y;
|
---|
147 | uint16_t w;
|
---|
148 | uint16_t h;
|
---|
149 | uint8_t rop;
|
---|
150 | } VRDPORDERDSTBLT;
|
---|
151 |
|
---|
152 | typedef struct _VRDPORDERSCREENBLT
|
---|
153 | {
|
---|
154 | int16_t x;
|
---|
155 | int16_t y;
|
---|
156 | uint16_t w;
|
---|
157 | uint16_t h;
|
---|
158 | int16_t xSrc;
|
---|
159 | int16_t ySrc;
|
---|
160 | uint8_t rop;
|
---|
161 | } VRDPORDERSCREENBLT;
|
---|
162 |
|
---|
163 | typedef struct _VRDPORDERPATBLTBRUSH
|
---|
164 | {
|
---|
165 | int16_t x;
|
---|
166 | int16_t y;
|
---|
167 | uint16_t w;
|
---|
168 | uint16_t h;
|
---|
169 | int8_t xSrc;
|
---|
170 | int8_t ySrc;
|
---|
171 | uint32_t rgbFG;
|
---|
172 | uint32_t rgbBG;
|
---|
173 | uint8_t rop;
|
---|
174 | uint8_t pattern[8];
|
---|
175 | } VRDPORDERPATBLTBRUSH;
|
---|
176 |
|
---|
177 | typedef struct _VRDPORDERMEMBLT
|
---|
178 | {
|
---|
179 | int16_t x;
|
---|
180 | int16_t y;
|
---|
181 | uint16_t w;
|
---|
182 | uint16_t h;
|
---|
183 | int16_t xSrc;
|
---|
184 | int16_t ySrc;
|
---|
185 | uint8_t rop;
|
---|
186 | VRDPBITMAPHASH hash;
|
---|
187 | } VRDPORDERMEMBLT;
|
---|
188 |
|
---|
189 | typedef struct _VRDPORDERCACHEDBITMAP
|
---|
190 | {
|
---|
191 | VRDPBITMAPHASH hash;
|
---|
192 | /* VRDPDATABITS and the bitmap data follows. */
|
---|
193 | } VRDPORDERCACHEDBITMAP;
|
---|
194 |
|
---|
195 | typedef struct _VRDPORDERDELETEDBITMAP
|
---|
196 | {
|
---|
197 | VRDPBITMAPHASH hash;
|
---|
198 | } VRDPORDERDELETEDBITMAP;
|
---|
199 |
|
---|
200 | typedef struct _VRDPORDERLINE
|
---|
201 | {
|
---|
202 | int16_t x1;
|
---|
203 | int16_t y1;
|
---|
204 | int16_t x2;
|
---|
205 | int16_t y2;
|
---|
206 | int16_t xBounds1;
|
---|
207 | int16_t yBounds1;
|
---|
208 | int16_t xBounds2;
|
---|
209 | int16_t yBounds2;
|
---|
210 | uint8_t mix;
|
---|
211 | uint32_t rgb;
|
---|
212 | } VRDPORDERLINE;
|
---|
213 |
|
---|
214 | typedef struct _VRDPORDERPOLYLINE
|
---|
215 | {
|
---|
216 | VRDPORDERPOINT ptStart;
|
---|
217 | uint8_t mix;
|
---|
218 | uint32_t rgb;
|
---|
219 | VRDPORDERPOLYPOINTS points;
|
---|
220 | } VRDPORDERPOLYLINE;
|
---|
221 |
|
---|
222 | typedef struct _VRDPORDERELLIPSE
|
---|
223 | {
|
---|
224 | VRDPORDERPOINT pt1;
|
---|
225 | VRDPORDERPOINT pt2;
|
---|
226 | uint8_t mix;
|
---|
227 | uint8_t fillMode;
|
---|
228 | uint32_t rgb;
|
---|
229 | } VRDPORDERELLIPSE;
|
---|
230 |
|
---|
231 | typedef struct _VRDPORDERSAVESCREEN
|
---|
232 | {
|
---|
233 | VRDPORDERPOINT pt1;
|
---|
234 | VRDPORDERPOINT pt2;
|
---|
235 | uint8_t ident;
|
---|
236 | uint8_t restore;
|
---|
237 | } VRDPORDERSAVESCREEN;
|
---|
238 | #pragma pack()
|
---|
239 |
|
---|
240 | #endif
|
---|