VirtualBox

source: vbox/trunk/include/VBox/RemoteDesktop/VRDEOrders.h@ 78307

Last change on this file since 78307 was 76585, checked in by vboxsync, 6 years ago

*: scm --fix-header-guard-endif

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.5 KB
Line 
1/** @file
2 * VBox Remote Desktop Extension (VRDE) - Graphics Orders Structures.
3 */
4
5/*
6 * Copyright (C) 2006-2019 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef VBOX_INCLUDED_RemoteDesktop_VRDEOrders_h
27#define VBOX_INCLUDED_RemoteDesktop_VRDEOrders_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <iprt/types.h>
33
34/*
35 * VRDE gets an information about a graphical update as a pointer
36 * to a memory block and the size of the memory block.
37 * The memory block layout is:
38 * VRDEORDERHDR - Describes the affected rectangle.
39 * Then VRDE orders follow:
40 * VRDEORDERCODE;
41 * a VRDEORDER* structure.
42 *
43 * If size of the memory block is equal to the VRDEORDERHDR, then a bitmap
44 * update is assumed.
45 */
46
47/* VRDE order codes. Must be >= 0, because the VRDE internally
48 * uses negative values to mark some operations.
49 */
50#define VRDE_ORDER_DIRTY_RECT (0)
51#define VRDE_ORDER_SOLIDRECT (1)
52#define VRDE_ORDER_SOLIDBLT (2)
53#define VRDE_ORDER_DSTBLT (3)
54#define VRDE_ORDER_SCREENBLT (4)
55#define VRDE_ORDER_PATBLTBRUSH (5)
56#define VRDE_ORDER_MEMBLT (6)
57#define VRDE_ORDER_CACHED_BITMAP (7)
58#define VRDE_ORDER_DELETED_BITMAP (8)
59#define VRDE_ORDER_LINE (9)
60#define VRDE_ORDER_BOUNDS (10)
61#define VRDE_ORDER_REPEAT (11)
62#define VRDE_ORDER_POLYLINE (12)
63#define VRDE_ORDER_ELLIPSE (13)
64#define VRDE_ORDER_SAVESCREEN (14)
65#define VRDE_ORDER_TEXT (15)
66
67/* 128 bit bitmap hash. */
68typedef uint8_t VRDEBITMAPHASH[16];
69
70#pragma pack(1)
71typedef struct _VRDEORDERHDR
72{
73 /** Coordinates of the affected rectangle. */
74 int16_t x;
75 int16_t y;
76 uint16_t w;
77 uint16_t h;
78} VRDEORDERHDR;
79
80typedef struct _VRDEORDERCODE
81{
82 uint32_t u32Code;
83} VRDEORDERCODE;
84
85typedef struct _VRDEORDERPOINT
86{
87 int16_t x;
88 int16_t y;
89} VRDEORDERPOINT;
90
91typedef struct _VRDEORDERPOLYPOINTS
92{
93 uint8_t c;
94 VRDEORDERPOINT a[16];
95} VRDEORDERPOLYPOINTS;
96
97typedef struct _VRDEORDERAREA
98{
99 int16_t x;
100 int16_t y;
101 uint16_t w;
102 uint16_t h;
103} VRDEORDERAREA;
104
105typedef struct _VRDEORDERRECT
106{
107 int16_t left;
108 int16_t top;
109 int16_t right;
110 int16_t bottom;
111} VRDEORDERRECT;
112
113
114typedef struct _VRDEORDERBOUNDS
115{
116 VRDEORDERPOINT pt1;
117 VRDEORDERPOINT pt2;
118} VRDEORDERBOUNDS;
119
120typedef struct _VRDEORDERREPEAT
121{
122 VRDEORDERBOUNDS bounds;
123} VRDEORDERREPEAT;
124
125
126/* Header for bitmap bits. */
127typedef struct _VRDEDATABITS
128{
129 uint32_t cb; /* Size of bitmap data without the header. */
130 int16_t x;
131 int16_t y;
132 uint16_t cWidth;
133 uint16_t cHeight;
134 uint8_t cbPixel;
135 /* Bitmap data follow. */
136} VRDEDATABITS;
137
138typedef struct _VRDEORDERSOLIDRECT
139{
140 int16_t x;
141 int16_t y;
142 uint16_t w;
143 uint16_t h;
144 uint32_t rgb;
145} VRDEORDERSOLIDRECT;
146
147typedef struct _VRDEORDERSOLIDBLT
148{
149 int16_t x;
150 int16_t y;
151 uint16_t w;
152 uint16_t h;
153 uint32_t rgb;
154 uint8_t rop;
155} VRDEORDERSOLIDBLT;
156
157typedef struct _VRDEORDERDSTBLT
158{
159 int16_t x;
160 int16_t y;
161 uint16_t w;
162 uint16_t h;
163 uint8_t rop;
164} VRDEORDERDSTBLT;
165
166typedef struct _VRDEORDERSCREENBLT
167{
168 int16_t x;
169 int16_t y;
170 uint16_t w;
171 uint16_t h;
172 int16_t xSrc;
173 int16_t ySrc;
174 uint8_t rop;
175} VRDEORDERSCREENBLT;
176
177typedef struct _VRDEORDERPATBLTBRUSH
178{
179 int16_t x;
180 int16_t y;
181 uint16_t w;
182 uint16_t h;
183 int8_t xSrc;
184 int8_t ySrc;
185 uint32_t rgbFG;
186 uint32_t rgbBG;
187 uint8_t rop;
188 uint8_t pattern[8];
189} VRDEORDERPATBLTBRUSH;
190
191typedef struct _VRDEORDERMEMBLT
192{
193 int16_t x;
194 int16_t y;
195 uint16_t w;
196 uint16_t h;
197 int16_t xSrc;
198 int16_t ySrc;
199 uint8_t rop;
200 VRDEBITMAPHASH hash;
201} VRDEORDERMEMBLT;
202
203typedef struct _VRDEORDERCACHEDBITMAP
204{
205 VRDEBITMAPHASH hash;
206 /* VRDEDATABITS and the bitmap data follow. */
207} VRDEORDERCACHEDBITMAP;
208
209typedef struct _VRDEORDERDELETEDBITMAP
210{
211 VRDEBITMAPHASH hash;
212} VRDEORDERDELETEDBITMAP;
213
214typedef struct _VRDEORDERLINE
215{
216 int16_t x1;
217 int16_t y1;
218 int16_t x2;
219 int16_t y2;
220 int16_t xBounds1;
221 int16_t yBounds1;
222 int16_t xBounds2;
223 int16_t yBounds2;
224 uint8_t mix;
225 uint32_t rgb;
226} VRDEORDERLINE;
227
228typedef struct _VRDEORDERPOLYLINE
229{
230 VRDEORDERPOINT ptStart;
231 uint8_t mix;
232 uint32_t rgb;
233 VRDEORDERPOLYPOINTS points;
234} VRDEORDERPOLYLINE;
235
236typedef struct _VRDEORDERELLIPSE
237{
238 VRDEORDERPOINT pt1;
239 VRDEORDERPOINT pt2;
240 uint8_t mix;
241 uint8_t fillMode;
242 uint32_t rgb;
243} VRDEORDERELLIPSE;
244
245typedef struct _VRDEORDERSAVESCREEN
246{
247 VRDEORDERPOINT pt1;
248 VRDEORDERPOINT pt2;
249 uint8_t ident;
250 uint8_t restore;
251} VRDEORDERSAVESCREEN;
252
253typedef struct _VRDEORDERGLYPH
254{
255 uint32_t o32NextGlyph;
256 uint64_t u64Handle;
257
258 /* The glyph origin position on the screen. */
259 int16_t x;
260 int16_t y;
261
262 /* The glyph bitmap dimensions. Note w == h == 0 for the space character. */
263 uint16_t w;
264 uint16_t h;
265
266 /* The character origin in the bitmap. */
267 int16_t xOrigin;
268 int16_t yOrigin;
269
270 /* 1BPP bitmap. Rows are byte aligned. Size is (((w + 7)/8) * h + 3) & ~3. */
271 uint8_t au8Bitmap[1];
272} VRDEORDERGLYPH;
273
274typedef struct _VRDEORDERTEXT
275{
276 uint32_t cbOrder;
277
278 int16_t xBkGround;
279 int16_t yBkGround;
280 uint16_t wBkGround;
281 uint16_t hBkGround;
282
283 int16_t xOpaque;
284 int16_t yOpaque;
285 uint16_t wOpaque;
286 uint16_t hOpaque;
287
288 uint16_t u16MaxGlyph;
289
290 uint8_t u8Glyphs;
291 uint8_t u8Flags;
292 uint16_t u8CharInc;
293 uint32_t u32FgRGB;
294 uint32_t u32BgRGB;
295
296 /* u8Glyphs glyphs follow. Size of each glyph structure may vary. */
297} VRDEORDERTEXT;
298#pragma pack()
299
300#endif /* !VBOX_INCLUDED_RemoteDesktop_VRDEOrders_h */
Note: See TracBrowser for help on using the repository browser.

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