1 | /** @file
|
---|
2 | * OpenGL:
|
---|
3 | * Common header for host service and guest clients.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
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 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
27 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
28 | * additional information or have any questions.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #ifndef ___VBox_HostService_VBoxCrOpenGLSvc_h
|
---|
32 | #define ___VBox_HostService_VBoxCrOpenGLSvc_h
|
---|
33 |
|
---|
34 | #include <VBox/types.h>
|
---|
35 | #include <VBox/VMMDev.h>
|
---|
36 | #include <VBox/VBoxGuest2.h>
|
---|
37 | #include <VBox/hgcmsvc.h>
|
---|
38 |
|
---|
39 | /* crOpenGL host functions */
|
---|
40 | #define SHCRGL_HOST_FN_SET_FRAMEBUFFER (1)
|
---|
41 | #define SHCRGL_HOST_FN_SET_VISIBLE_REGION (5)
|
---|
42 | #define SHCRGL_HOST_FN_SET_VM (7)
|
---|
43 | /* crOpenGL guest functions */
|
---|
44 | #define SHCRGL_GUEST_FN_WRITE (2)
|
---|
45 | #define SHCRGL_GUEST_FN_READ (3)
|
---|
46 | #define SHCRGL_GUEST_FN_WRITE_READ (4)
|
---|
47 | #define SHCRGL_GUEST_FN_SET_VERSION (6)
|
---|
48 |
|
---|
49 | /* Parameters count */
|
---|
50 | #define SHCRGL_CPARMS_SET_FRAMEBUFFER (1)
|
---|
51 | #define SHCRGL_CPARMS_SET_VM (1)
|
---|
52 | #define SHCRGL_CPARMS_SET_VISIBLE_REGION (2)
|
---|
53 | #define SHCRGL_CPARMS_WRITE (1)
|
---|
54 | #define SHCRGL_CPARMS_READ (2)
|
---|
55 | #define SHCRGL_CPARMS_WRITE_READ (3)
|
---|
56 | #define SHCRGL_CPARMS_SET_VERSION (2)
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * SHCRGL_GUEST_FN_WRITE
|
---|
60 | */
|
---|
61 |
|
---|
62 | /** GUEST_FN_WRITE Parameters structure. */
|
---|
63 | typedef struct
|
---|
64 | {
|
---|
65 | VBoxGuestHGCMCallInfo hdr;
|
---|
66 |
|
---|
67 | /** pointer, in
|
---|
68 | * Data buffer
|
---|
69 | */
|
---|
70 | HGCMFunctionParameter pBuffer;
|
---|
71 | } CRVBOXHGCMWRITE;
|
---|
72 |
|
---|
73 | /** GUEST_FN_READ Parameters structure. */
|
---|
74 | typedef struct
|
---|
75 | {
|
---|
76 | VBoxGuestHGCMCallInfo hdr;
|
---|
77 |
|
---|
78 | /** pointer, in/out
|
---|
79 | * Data buffer
|
---|
80 | */
|
---|
81 | HGCMFunctionParameter pBuffer;
|
---|
82 |
|
---|
83 | /** 32bit, out
|
---|
84 | * Count of bytes written to buffer
|
---|
85 | */
|
---|
86 | HGCMFunctionParameter cbBuffer;
|
---|
87 |
|
---|
88 | } CRVBOXHGCMREAD;
|
---|
89 |
|
---|
90 | /** GUEST_FN_WRITE_READ Parameters structure. */
|
---|
91 | typedef struct
|
---|
92 | {
|
---|
93 | VBoxGuestHGCMCallInfo hdr;
|
---|
94 |
|
---|
95 | /** pointer, in
|
---|
96 | * Data buffer
|
---|
97 | */
|
---|
98 | HGCMFunctionParameter pBuffer;
|
---|
99 |
|
---|
100 | /** pointer, out
|
---|
101 | * Writeback buffer
|
---|
102 | */
|
---|
103 | HGCMFunctionParameter pWriteback;
|
---|
104 |
|
---|
105 | /** 32bit, out
|
---|
106 | * Count of bytes written to writeback buffer
|
---|
107 | */
|
---|
108 | HGCMFunctionParameter cbWriteback;
|
---|
109 |
|
---|
110 | } CRVBOXHGCMWRITEREAD;
|
---|
111 |
|
---|
112 | /** GUEST_FN_SET_VERSION Parameters structure. */
|
---|
113 | typedef struct
|
---|
114 | {
|
---|
115 | VBoxGuestHGCMCallInfo hdr;
|
---|
116 |
|
---|
117 | /** 32bit, in
|
---|
118 | * Major version
|
---|
119 | */
|
---|
120 | HGCMFunctionParameter vMajor;
|
---|
121 |
|
---|
122 | /** 32bit, in
|
---|
123 | * Minor version
|
---|
124 | */
|
---|
125 | HGCMFunctionParameter vMinor;
|
---|
126 |
|
---|
127 | } CRVBOXHGCMSETVERSION;
|
---|
128 |
|
---|
129 | #endif
|
---|