VirtualBox

source: vbox/trunk/include/VBox/HostServices/VBoxCrOpenGLSvc.h@ 35351

Last change on this file since 35351 was 34571, checked in by vboxsync, 14 years ago

crOpenGL: fix compiz for high resolution guests

  • Property svn:eol-style set to native
File size: 6.8 KB
Line 
1/** @file
2 * OpenGL:
3 * Common header for host service and guest clients.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
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_HostService_VBoxCrOpenGLSvc_h
28#define ___VBox_HostService_VBoxCrOpenGLSvc_h
29
30#include <VBox/types.h>
31#include <VBox/VMMDev.h>
32#include <VBox/VBoxGuest2.h>
33#include <VBox/hgcmsvc.h>
34
35/* crOpenGL host functions */
36#define SHCRGL_HOST_FN_SET_CONSOLE (1)
37#define SHCRGL_HOST_FN_SET_VISIBLE_REGION (5)
38#define SHCRGL_HOST_FN_SET_VM (7)
39#define SHCRGL_HOST_FN_SCREEN_CHANGED (8)
40#ifdef VBOX_WITH_CRHGSMI
41#define SHCRGL_HOST_FN_CRHGSMI_CMD (10)
42#define SHCRGL_HOST_FN_CRHGSMI_CTL (11)
43#endif
44/* crOpenGL guest functions */
45#define SHCRGL_GUEST_FN_WRITE (2)
46#define SHCRGL_GUEST_FN_READ (3)
47#define SHCRGL_GUEST_FN_WRITE_READ (4)
48#define SHCRGL_GUEST_FN_SET_VERSION (6)
49#define SHCRGL_GUEST_FN_INJECT (9)
50#define SHCRGL_GUEST_FN_SET_PID (12)
51#define SHCRGL_GUEST_FN_WRITE_BUFFER (13)
52#define SHCRGL_GUEST_FN_WRITE_READ_BUFFERED (14)
53
54/* Parameters count */
55#define SHCRGL_CPARMS_SET_CONSOLE (1)
56#define SHCRGL_CPARMS_SET_VM (1)
57#define SHCRGL_CPARMS_SET_VISIBLE_REGION (2)
58#define SHCRGL_CPARMS_WRITE (1)
59#define SHCRGL_CPARMS_READ (2)
60#define SHCRGL_CPARMS_WRITE_READ (3)
61#define SHCRGL_CPARMS_SET_VERSION (2)
62#define SHCRGL_CPARMS_SCREEN_CHANGED (1)
63#define SHCRGL_CPARMS_INJECT (2)
64#define SHCRGL_CPARMS_SET_PID (1)
65#define SHCRGL_CPARMS_WRITE_BUFFER (4)
66#define SHCRGL_CPARMS_WRITE_READ_BUFFERED (3)
67
68
69#ifdef VBOX_WITH_CRHGSMI
70#pragma pack(1)
71typedef struct
72{
73 int32_t result; /**< OUT Host HGSMI return code.*/
74 uint32_t u32ClientID; /**< IN The id of the caller. */
75 uint32_t u32Function; /**< IN Function number. */
76 uint32_t u32Reserved;
77} CRVBOXHGSMIHDR;
78AssertCompileSize(CRVBOXHGSMIHDR, 16);
79
80/** GUEST_FN_WRITE Parameters structure. */
81typedef struct
82{
83 CRVBOXHGSMIHDR hdr;
84 /** buffer index, in
85 * Data buffer
86 */
87 uint32_t iBuffer;
88} CRVBOXHGSMIWRITE;
89
90/** GUEST_FN_READ Parameters structure. */
91typedef struct
92{
93 CRVBOXHGSMIHDR hdr;
94
95 /** buffer index, in/out
96 * Data buffer
97 */
98 uint32_t iBuffer;
99 uint32_t cbBuffer;
100} CRVBOXHGSMIREAD;
101
102/** GUEST_FN_WRITE_READ Parameters structure. */
103typedef struct
104{
105 CRVBOXHGSMIHDR hdr;
106
107 /** buffer index, in
108 * Data buffer
109 */
110 uint32_t iBuffer;
111
112 /** buffer index, out
113 * Writeback buffer
114 */
115 uint32_t iWriteback;
116 uint32_t cbWriteback;
117} CRVBOXHGSMIWRITEREAD;
118
119/** GUEST_FN_SET_VERSION Parameters structure. */
120typedef struct
121{
122 CRVBOXHGSMIHDR hdr;
123
124 /** 32bit, in
125 * Major version
126 */
127 uint32_t vMajor;
128
129 /** 32bit, in
130 * Minor version
131 */
132 uint32_t vMinor;
133} CRVBOXHGSMISETVERSION;
134
135/** GUEST_FN_INJECT Parameters structure. */
136typedef struct
137{
138 CRVBOXHGSMIHDR hdr;
139
140 /** 32bit, in
141 * ClientID to inject commands buffer for
142 */
143 uint32_t u32ClientID;
144 /** buffer index, in
145 * Data buffer
146 */
147 uint32_t iBuffer;
148} CRVBOXHGSMIINJECT;
149
150/** GUEST_FN_SET_PID Parameters structure. */
151typedef struct
152{
153 CRVBOXHGSMIHDR hdr;
154
155 /** 64bit, in
156 * PID
157 */
158 uint64_t u64PID;
159} CRVBOXHGSMISETPID;
160
161#pragma pack()
162#endif
163/**
164 * SHCRGL_GUEST_FN_WRITE
165 */
166
167/** GUEST_FN_WRITE Parameters structure. */
168typedef struct
169{
170 VBoxGuestHGCMCallInfo hdr;
171
172 /** pointer, in
173 * Data buffer
174 */
175 HGCMFunctionParameter pBuffer;
176} CRVBOXHGCMWRITE;
177
178/** GUEST_FN_READ Parameters structure. */
179typedef struct
180{
181 VBoxGuestHGCMCallInfo hdr;
182
183 /** pointer, in/out
184 * Data buffer
185 */
186 HGCMFunctionParameter pBuffer;
187
188 /** 32bit, out
189 * Count of bytes written to buffer
190 */
191 HGCMFunctionParameter cbBuffer;
192
193} CRVBOXHGCMREAD;
194
195/** GUEST_FN_WRITE_READ Parameters structure. */
196typedef struct
197{
198 VBoxGuestHGCMCallInfo hdr;
199
200 /** pointer, in
201 * Data buffer
202 */
203 HGCMFunctionParameter pBuffer;
204
205 /** pointer, out
206 * Writeback buffer
207 */
208 HGCMFunctionParameter pWriteback;
209
210 /** 32bit, out
211 * Count of bytes written to writeback buffer
212 */
213 HGCMFunctionParameter cbWriteback;
214
215} CRVBOXHGCMWRITEREAD;
216
217/** GUEST_FN_SET_VERSION Parameters structure. */
218typedef struct
219{
220 VBoxGuestHGCMCallInfo hdr;
221
222 /** 32bit, in
223 * Major version
224 */
225 HGCMFunctionParameter vMajor;
226
227 /** 32bit, in
228 * Minor version
229 */
230 HGCMFunctionParameter vMinor;
231
232} CRVBOXHGCMSETVERSION;
233
234/** GUEST_FN_INJECT Parameters structure. */
235typedef struct
236{
237 VBoxGuestHGCMCallInfo hdr;
238
239 /** 32bit, in
240 * ClientID to inject commands buffer for
241 */
242 HGCMFunctionParameter u32ClientID;
243 /** pointer, in
244 * Data buffer
245 */
246 HGCMFunctionParameter pBuffer;
247} CRVBOXHGCMINJECT;
248
249/** GUEST_FN_SET_PID Parameters structure. */
250typedef struct
251{
252 VBoxGuestHGCMCallInfo hdr;
253
254 /** 64bit, in
255 * PID
256 */
257 HGCMFunctionParameter u64PID;
258} CRVBOXHGCMSETPID;
259
260/** GUEST_FN_WRITE_BUFFER Parameters structure. */
261typedef struct
262{
263 VBoxGuestHGCMCallInfo hdr;
264
265 /** 32bit, in/out
266 * Buffer id, 0 means host have to allocate one
267 */
268 HGCMFunctionParameter iBufferID;
269
270 /** 32bit, in
271 * Buffer size
272 */
273 HGCMFunctionParameter cbBufferSize;
274
275 /** 32bit, in
276 * Write offset in buffer
277 */
278 HGCMFunctionParameter ui32Offset;
279
280 /** pointer, in
281 * Data buffer
282 */
283 HGCMFunctionParameter pBuffer;
284
285} CRVBOXHGCMWRITEBUFFER;
286
287/** GUEST_FN_WRITE_READ_BUFFERED Parameters structure. */
288typedef struct
289{
290 VBoxGuestHGCMCallInfo hdr;
291
292 /** 32bit, in
293 * Buffer id.
294 */
295 HGCMFunctionParameter iBufferID;
296
297 /** pointer, out
298 * Writeback buffer
299 */
300 HGCMFunctionParameter pWriteback;
301
302 /** 32bit, out
303 * Count of bytes written to writeback buffer
304 */
305 HGCMFunctionParameter cbWriteback;
306
307} CRVBOXHGCMWRITEREADBUFFERED;
308
309#endif
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