VirtualBox

source: vbox/trunk/include/VBox/VBoxVideoHost3D.h@ 51435

Last change on this file since 51435 was 51435, checked in by vboxsync, 11 years ago

VBoxVideoHost3D.h: structure alignment (fixes 32bit hosts).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
1/** @file
2 *
3 * VirtualBox 3D host inter-components interfaces
4 */
5
6/*
7 * Copyright (C) 2011-2012 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#ifndef ___VBox_VBoxVideoHost3D_h
27#define ___VBox_VBoxVideoHost3D_h
28#include <iprt/cdefs.h>
29#include <VBox/VBoxVideo.h>
30#include <VBox/hgcmsvc.h>
31#include <VBox/vmm/pdmifs.h>
32
33/* screen update instance */
34typedef struct PDMIDISPLAYCONNECTOR *HVBOXCRCMDCLTSCR;
35struct VBVACMDHDR;
36
37typedef struct VBOXCMDVBVA_HDR *PVBOXCMDVBVA_HDR;
38
39typedef DECLCALLBACKPTR(void, PFNVBOXCRCMD_CLTSCR_UPDATE_BEGIN)(HVBOXCRCMDCLTSCR hClt, unsigned u32Screen);
40typedef DECLCALLBACKPTR(void, PFNVBOXCRCMD_CLTSCR_UPDATE_END)(HVBOXCRCMDCLTSCR hClt, unsigned uScreenId, int32_t x, int32_t y, uint32_t cx, uint32_t cy);
41typedef DECLCALLBACKPTR(void, PFNVBOXCRCMD_CLTSCR_UPDATE_PROCESS)(HVBOXCRCMDCLTSCR hClt, unsigned u32Screen, struct VBVACMDHDR *pCmd, size_t cbCmd);
42
43/*client callbacks to be used by the server
44 * when working in the CrCmd mode */
45typedef struct VBOXCRCMD_SVRENABLE_INFO
46{
47 HVBOXCRCMDCLTSCR hCltScr;
48 PFNVBOXCRCMD_CLTSCR_UPDATE_BEGIN pfnCltScrUpdateBegin;
49 PFNVBOXCRCMD_CLTSCR_UPDATE_PROCESS pfnCltScrUpdateProcess;
50 PFNVBOXCRCMD_CLTSCR_UPDATE_END pfnCltScrUpdateEnd;
51} VBOXCRCMD_SVRENABLE_INFO;
52
53typedef void * HVBOXCRCMDSVR;
54
55/* enables the CrCmd interface, thus the hgcm interface gets disabled.
56 * all subsequent calls will be done in the thread Enable was done,
57 * until the Disable is called */
58typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_ENABLE)(HVBOXCRCMDSVR hSvr, VBOXCRCMD_SVRENABLE_INFO *pInfo);
59/* Opposite to Enable (see above) */
60typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_DISABLE)(HVBOXCRCMDSVR hSvr);
61/* process command */
62typedef DECLCALLBACKPTR(int8_t, PFNVBOXCRCMD_SVR_CMD)(HVBOXCRCMDSVR hSvr, const VBOXCMDVBVA_HDR *pCmd, uint32_t cbCmd);
63/* process host control */
64typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_HOSTCTL)(HVBOXCRCMDSVR hSvr, uint8_t* pCtl, uint32_t cbCmd);
65/* process guest control */
66typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_GUESTCTL)(HVBOXCRCMDSVR hSvr, uint8_t* pCtl, uint32_t cbCmd);
67/* screen resize */
68typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_RESIZE)(HVBOXCRCMDSVR hSvr, const struct VBVAINFOSCREEN *pScreen, const uint32_t *pTargetMap);
69/* process SaveState */
70typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_SAVESTATE)(HVBOXCRCMDSVR hSvr, PSSMHANDLE pSSM);
71/* process LoadState */
72typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_LOADSTATE)(HVBOXCRCMDSVR hSvr, PSSMHANDLE pSSM, uint32_t u32Version);
73
74
75typedef struct VBOXCRCMD_SVRINFO
76{
77 HVBOXCRCMDSVR hSvr;
78 PFNVBOXCRCMD_SVR_ENABLE pfnEnable;
79 PFNVBOXCRCMD_SVR_DISABLE pfnDisable;
80 PFNVBOXCRCMD_SVR_CMD pfnCmd;
81 PFNVBOXCRCMD_SVR_HOSTCTL pfnHostCtl;
82 PFNVBOXCRCMD_SVR_GUESTCTL pfnGuestCtl;
83 PFNVBOXCRCMD_SVR_RESIZE pfnResize;
84 PFNVBOXCRCMD_SVR_SAVESTATE pfnSaveState;
85 PFNVBOXCRCMD_SVR_LOADSTATE pfnLoadState;
86} VBOXCRCMD_SVRINFO;
87
88
89typedef struct VBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP
90{
91 VBOXVDMACMD_CHROMIUM_CTL Hdr;
92 union
93 {
94 void *pvVRamBase;
95 uint64_t uAlignment;
96 };
97 uint64_t cbVRam;
98 PPDMLED pLed;
99 /* out */
100 struct VBOXCRCMD_SVRINFO CrCmdServerInfo;
101} VBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP, *PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP;
102
103typedef enum
104{
105 VBOXCRCMDCTL_TYPE_HGCM = 1,
106 VBOXCRCMDCTL_TYPE_DISABLE,
107 VBOXCRCMDCTL_TYPE_ENABLE,
108 VBOXCRCMDCTL_TYPE_32bit = 0x7fffffff
109} VBOXCRCMDCTL_TYPE;
110
111#pragma pack(1)
112typedef struct VBOXCRCMDCTL
113{
114 VBOXCRCMDCTL_TYPE enmType;
115 uint32_t u32Function;
116 /* not to be used by clients */
117 union
118 {
119 void(*pfnInternal)();
120 void* pvInternal;
121 } u;
122} VBOXCRCMDCTL;
123
124typedef struct VBOXCRCMDCTL_HGCM
125{
126 VBOXCRCMDCTL Hdr;
127 VBOXHGCMSVCPARM aParms[1];
128} VBOXCRCMDCTL_HGCM;
129#pragma pack()
130
131typedef struct VBOXVDMAHOST * HVBOXCRCMDCTL_REMAINING_HOST_COMMAND;
132
133typedef DECLCALLBACKPTR(uint8_t*, PFNVBOXCRCMDCTL_REMAINING_HOST_COMMAND)(HVBOXCRCMDCTL_REMAINING_HOST_COMMAND hClient, uint32_t *pcbCtl, int prevCmdRc);
134
135typedef struct VBOXCRCMDCTL_HGCMENABLE_DATA
136{
137 HVBOXCRCMDCTL_REMAINING_HOST_COMMAND hRHCmd;
138 PFNVBOXCRCMDCTL_REMAINING_HOST_COMMAND pfnRHCmd;
139} VBOXCRCMDCTL_HGCMENABLE_DATA;
140
141typedef struct VBOXVDMAHOST * HVBOXCRCMDCTL_NOTIFY_TERMINATING;
142
143typedef DECLCALLBACKPTR(int, PFNVBOXCRCMDCTL_NOTIFY_TERMINATING)(HVBOXCRCMDCTL_NOTIFY_TERMINATING hClient, VBOXCRCMDCTL_HGCMENABLE_DATA *pHgcmEnableData);
144
145typedef DECLCALLBACKPTR(void, PFNVBOXCRCMDCTL_NOTIFY_TERMINATING_DONE)(HVBOXCRCMDCTL_NOTIFY_TERMINATING hClient);
146
147typedef struct VBOXCRCMDCTL_HGCMDISABLE_DATA
148{
149 HVBOXCRCMDCTL_NOTIFY_TERMINATING hNotifyTerm;
150 PFNVBOXCRCMDCTL_NOTIFY_TERMINATING pfnNotifyTerm;
151 PFNVBOXCRCMDCTL_NOTIFY_TERMINATING_DONE pfnNotifyTermDone;
152} VBOXCRCMDCTL_HGCMDISABLE_DATA;
153
154#pragma pack(1)
155typedef struct VBOXCRCMDCTL_ENABLE
156{
157 VBOXCRCMDCTL Hdr;
158 VBOXCRCMDCTL_HGCMENABLE_DATA Data;
159} VBOXCRCMDCTL_ENABLE;
160
161typedef struct VBOXCRCMDCTL_DISABLE
162{
163 VBOXCRCMDCTL Hdr;
164 VBOXCRCMDCTL_HGCMDISABLE_DATA Data;
165} VBOXCRCMDCTL_DISABLE;
166#pragma pack()
167
168#endif /*#ifndef ___VBox_VBoxVideoHost3D_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