VirtualBox

source: vbox/trunk/include/VBox/Graphics/VBoxVideoHost3D.h@ 80472

Last change on this file since 80472 was 80472, checked in by vboxsync, 5 years ago

VBoxVideoHost3D.h: Doxygen fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 KB
Line 
1/* $Id: VBoxVideoHost3D.h 80472 2019-08-28 11:46:50Z vboxsync $ */
2/** @file
3 * VirtualBox 3D host inter-components interfaces
4 */
5
6/*
7 * Copyright (C) 2011-2019 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_INCLUDED_Graphics_VBoxVideoHost3D_h
28#define VBOX_INCLUDED_Graphics_VBoxVideoHost3D_h
29#ifndef RT_WITHOUT_PRAGMA_ONCE
30# pragma once
31#endif
32
33#include <iprt/cdefs.h>
34#include "VBoxVideo.h"
35#include <VBox/hgcmsvc.h>
36#include <VBox/vmm/pdmifs.h>
37#include <iprt/list.h>
38
39/* screen update instance */
40typedef struct PDMIDISPLAYCONNECTOR *HVBOXCRCMDCLTSCR;
41struct VBVACMDHDR;
42
43typedef struct VBOXCMDVBVA_HDR *PVBOXCMDVBVA_HDR;
44
45typedef DECLCALLBACKPTR(void, PFNVBOXCRCMD_CLTSCR_UPDATE_BEGIN)(HVBOXCRCMDCLTSCR hClt, unsigned u32Screen);
46typedef DECLCALLBACKPTR(void, PFNVBOXCRCMD_CLTSCR_UPDATE_END)(HVBOXCRCMDCLTSCR hClt, unsigned uScreenId, int32_t x, int32_t y, uint32_t cx, uint32_t cy);
47typedef DECLCALLBACKPTR(void, PFNVBOXCRCMD_CLTSCR_UPDATE_PROCESS)(HVBOXCRCMDCLTSCR hClt, unsigned u32Screen,
48 struct VBVACMDHDR const RT_UNTRUSTED_VOLATILE_GUEST *pCmd,
49 size_t cbCmd);
50
51/*client callbacks to be used by the server
52 * when working in the CrCmd mode */
53typedef struct VBOXCRCMD_SVRENABLE_INFO
54{
55 HVBOXCRCMDCLTSCR hCltScr;
56 PFNVBOXCRCMD_CLTSCR_UPDATE_BEGIN pfnCltScrUpdateBegin;
57 PFNVBOXCRCMD_CLTSCR_UPDATE_PROCESS pfnCltScrUpdateProcess;
58 PFNVBOXCRCMD_CLTSCR_UPDATE_END pfnCltScrUpdateEnd;
59} VBOXCRCMD_SVRENABLE_INFO;
60
61typedef struct VBOXVDMAHOST * HVBOXCRCLIENT;
62struct VBOXCRCMDCTL_CALLOUT_LISTENTRY;
63typedef DECLCALLBACKPTR(void, PFNVBOXCRCMDCTL_CALLOUT_CB)(struct VBOXCRCMDCTL_CALLOUT_LISTENTRY *pEntry);
64
65#pragma pack(1)
66typedef struct VBOXCRCMDCTL_CALLOUT_LISTENTRY
67{
68 RTLISTNODE Node;
69 PFNVBOXCRCMDCTL_CALLOUT_CB pfnCb;
70} VBOXCRCMDCTL_CALLOUT_LISTENTRY;
71
72typedef struct VBOXCRCMDCTL_CALLOUT_LIST
73{
74 RTLISTANCHOR List;
75} VBOXCRCMDCTL_CALLOUT_LIST;
76#pragma pack()
77
78struct VBOXCRCMDCTL;
79
80/**
81 * Probably not used anymore (just to keep doxygen happy for now).
82 */
83typedef DECLCALLBACKPTR(int, PFNVBOXCRCLIENT_CALLOUT)(HVBOXCRCLIENT hClient, struct VBOXCRCMDCTL* pCmd, VBOXCRCMDCTL_CALLOUT_LISTENTRY *pEntry, PFNVBOXCRCMDCTL_CALLOUT_CB pfnCb);
84
85typedef struct VBOXCRCLIENT_INFO
86{
87 HVBOXCRCLIENT hClient;
88 PFNVBOXCRCLIENT_CALLOUT pfnCallout;
89} VBOXCRCLIENT_INFO;
90
91typedef void * HVBOXCRCMDSVR;
92
93/** enables the CrCmd interface, thus the hgcm interface gets disabled.
94 * all subsequent calls will be done in the thread Enable was done,
95 * until the Disable is called */
96typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_ENABLE)(HVBOXCRCMDSVR hSvr, VBOXCRCMD_SVRENABLE_INFO *pInfo);
97/** Opposite to Enable (see above) */
98typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_DISABLE)(HVBOXCRCMDSVR hSvr);
99/** process command */
100typedef DECLCALLBACKPTR(int8_t, PFNVBOXCRCMD_SVR_CMD)(HVBOXCRCMDSVR hSvr,
101 const VBOXCMDVBVA_HDR RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd);
102/** process host control */
103typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_HOSTCTL)(HVBOXCRCMDSVR hSvr, uint8_t *pCtl, uint32_t cbCmd);
104/** process guest control */
105typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_GUESTCTL)(HVBOXCRCMDSVR hSvr, uint8_t RT_UNTRUSTED_VOLATILE_GUEST *pCtl,
106 uint32_t cbCmd);
107/** screen resize */
108typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_RESIZE)(HVBOXCRCMDSVR hSvr, const struct VBVAINFOSCREEN *pScreen,
109 const uint32_t *pTargetMap);
110/** process SaveState */
111typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_SAVESTATE)(HVBOXCRCMDSVR hSvr, PSSMHANDLE pSSM);
112/** process LoadState */
113typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_SVR_LOADSTATE)(HVBOXCRCMDSVR hSvr, PSSMHANDLE pSSM, uint32_t u32Version);
114
115
116typedef struct VBOXCRCMD_SVRINFO
117{
118 HVBOXCRCMDSVR hSvr;
119 PFNVBOXCRCMD_SVR_ENABLE pfnEnable;
120 PFNVBOXCRCMD_SVR_DISABLE pfnDisable;
121 PFNVBOXCRCMD_SVR_CMD pfnCmd;
122 PFNVBOXCRCMD_SVR_HOSTCTL pfnHostCtl;
123 PFNVBOXCRCMD_SVR_GUESTCTL pfnGuestCtl;
124 PFNVBOXCRCMD_SVR_RESIZE pfnResize;
125 PFNVBOXCRCMD_SVR_SAVESTATE pfnSaveState;
126 PFNVBOXCRCMD_SVR_LOADSTATE pfnLoadState;
127} VBOXCRCMD_SVRINFO;
128
129
130typedef struct VBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP
131{
132 VBOXVDMACMD_CHROMIUM_CTL Hdr;
133 union
134 {
135 void *pvVRamBase;
136 uint64_t uAlignment;
137 } RT_UNION_NM(u);
138 uint64_t cbVRam;
139 PPDMLED pLed;
140 VBOXCRCLIENT_INFO CrClientInfo;
141 /* out */
142 struct VBOXCRCMD_SVRINFO CrCmdServerInfo;
143} VBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP, *PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP;
144
145typedef enum
146{
147 VBOXCRCMDCTL_TYPE_HGCM = 1,
148 VBOXCRCMDCTL_TYPE_DISABLE,
149 VBOXCRCMDCTL_TYPE_ENABLE,
150 VBOXCRCMDCTL_TYPE_32bit = 0x7fffffff
151} VBOXCRCMDCTL_TYPE;
152
153#pragma pack(1)
154
155typedef struct VBOXCRCMDCTL
156{
157 VBOXCRCMDCTL_TYPE enmType;
158 uint32_t u32Function;
159 /* not to be used by clients */
160 VBOXCRCMDCTL_CALLOUT_LIST CalloutList;
161 union
162 {
163 PFNRT pfnInternal;
164 void *pvInternal;
165 } u;
166} VBOXCRCMDCTL;
167
168#define VBOXCRCMDCTL_IS_CALLOUT_AVAILABLE(_pCtl) (!!((_pCtl)->CalloutList.List.pNext))
169
170typedef struct VBOXCRCMDCTL_HGCM
171{
172 VBOXCRCMDCTL Hdr;
173 VBOXHGCMSVCPARM aParms[1];
174} VBOXCRCMDCTL_HGCM;
175#pragma pack()
176
177typedef struct VBOXVDMAHOST * HVBOXCRCMDCTL_REMAINING_HOST_COMMAND;
178
179typedef DECLCALLBACKPTR(uint8_t*, PFNVBOXCRCMDCTL_REMAINING_HOST_COMMAND)(HVBOXCRCMDCTL_REMAINING_HOST_COMMAND hClient, uint32_t *pcbCtl, int prevCmdRc);
180
181typedef struct VBOXCRCMDCTL_HGCMENABLE_DATA
182{
183 HVBOXCRCMDCTL_REMAINING_HOST_COMMAND hRHCmd;
184
185 /**
186 * Probably not used anymore (just to keep doxygen happy for now).
187 */
188 PFNVBOXCRCMDCTL_REMAINING_HOST_COMMAND pfnRHCmd;
189} VBOXCRCMDCTL_HGCMENABLE_DATA;
190
191typedef struct VBOXVDMAHOST * HVBOXCRCMDCTL_NOTIFY_TERMINATING;
192
193typedef DECLCALLBACKPTR(int, PFNVBOXCRCMDCTL_NOTIFY_TERMINATING)(HVBOXCRCMDCTL_NOTIFY_TERMINATING hClient, VBOXCRCMDCTL_HGCMENABLE_DATA *pHgcmEnableData);
194
195typedef DECLCALLBACKPTR(void, PFNVBOXCRCMDCTL_NOTIFY_TERMINATING_DONE)(HVBOXCRCMDCTL_NOTIFY_TERMINATING hClient);
196
197typedef struct VBOXCRCMDCTL_HGCMDISABLE_DATA
198{
199 HVBOXCRCMDCTL_NOTIFY_TERMINATING hNotifyTerm;
200
201 /**
202 * Probably not used anymore (just to keep doxygen happy for now).
203 */
204 PFNVBOXCRCMDCTL_NOTIFY_TERMINATING pfnNotifyTerm;
205
206 /**
207 * Probably not used anymore (just to keep doxygen happy for now).
208 */
209 PFNVBOXCRCMDCTL_NOTIFY_TERMINATING_DONE pfnNotifyTermDone;
210} VBOXCRCMDCTL_HGCMDISABLE_DATA;
211
212#pragma pack(1)
213typedef struct VBOXCRCMDCTL_ENABLE
214{
215 VBOXCRCMDCTL Hdr;
216 VBOXCRCMDCTL_HGCMENABLE_DATA Data;
217} VBOXCRCMDCTL_ENABLE;
218
219typedef struct VBOXCRCMDCTL_DISABLE
220{
221 VBOXCRCMDCTL Hdr;
222 VBOXCRCMDCTL_HGCMDISABLE_DATA Data;
223} VBOXCRCMDCTL_DISABLE;
224#pragma pack()
225
226#endif /* !VBOX_INCLUDED_Graphics_VBoxVideoHost3D_h */
227
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