1 | /** @file
|
---|
2 | *
|
---|
3 | * VBoxVideo Display D3D User mode dll
|
---|
4 | *
|
---|
5 | * Copyright (C) 2010 Oracle Corporation
|
---|
6 | *
|
---|
7 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
8 | * available from http://www.virtualbox.org. This file is free software;
|
---|
9 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
10 | * General Public License (GPL) as published by the Free Software
|
---|
11 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
12 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
13 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
14 | */
|
---|
15 | #ifndef ___VBoxDispMp_h___
|
---|
16 | #define ___VBoxDispMp_h___
|
---|
17 |
|
---|
18 | #include <windows.h>
|
---|
19 | #include <d3d9types.h>
|
---|
20 | #include <D3dumddi.h>
|
---|
21 | #include <d3dhal.h>
|
---|
22 | #include "../../Miniport/wddm/VBoxVideoIf.h"
|
---|
23 |
|
---|
24 | typedef struct VBOXDISPMP_REGIONS
|
---|
25 | {
|
---|
26 | HWND hWnd;
|
---|
27 | PVBOXVIDEOCM_CMD_RECTS pRegions;
|
---|
28 | } VBOXDISPMP_REGIONS, *PVBOXDISPMP_REGIONS;
|
---|
29 |
|
---|
30 | typedef DECLCALLBACK(HRESULT) FNVBOXDISPMP_ENABLEEVENTS();
|
---|
31 | typedef FNVBOXDISPMP_ENABLEEVENTS *PFNVBOXDISPMP_ENABLEEVENTS;
|
---|
32 |
|
---|
33 | typedef DECLCALLBACK(HRESULT) FNVBOXDISPMP_DISABLEEVENTS();
|
---|
34 | typedef FNVBOXDISPMP_DISABLEEVENTS *PFNVBOXDISPMP_DISABLEEVENTS;
|
---|
35 |
|
---|
36 | typedef DECLCALLBACK(HRESULT) FNVBOXDISPMP_DISABLEEVENTS();
|
---|
37 | typedef FNVBOXDISPMP_DISABLEEVENTS *PFNVBOXDISPMP_DISABLEEVENTS;
|
---|
38 |
|
---|
39 | typedef DECLCALLBACK(HRESULT) FNVBOXDISPMP_GETREGIONS(PVBOXDISPMP_REGIONS pRegions, DWORD dwMilliseconds);
|
---|
40 | typedef FNVBOXDISPMP_GETREGIONS *PFNVBOXDISPMP_GETREGIONS;
|
---|
41 |
|
---|
42 | typedef struct VBOXDISPMP_CALLBACKS
|
---|
43 | {
|
---|
44 | PFNVBOXDISPMP_ENABLEEVENTS pfnEnableEvents;
|
---|
45 | PFNVBOXDISPMP_DISABLEEVENTS pfnDisableEvents;
|
---|
46 | /**
|
---|
47 | * if events are enabled - blocks until dirty region is available or timeout occurs
|
---|
48 | * in the former case S_OK is returned on event, in the latter case WAIT_TIMEOUT is returned
|
---|
49 | * if events are disabled - returns S_FALSE
|
---|
50 | */
|
---|
51 | PFNVBOXDISPMP_GETREGIONS pfnGetRegions;
|
---|
52 | } VBOXDISPMP_CALLBACKS, *PVBOXDISPMP_CALLBACKS;
|
---|
53 |
|
---|
54 | /** @def VBOXNETCFGWIN_DECL
|
---|
55 | * The usual declaration wrapper.
|
---|
56 | */
|
---|
57 |
|
---|
58 | /* enable this in case we include this in a dll*/
|
---|
59 | # ifdef VBOXWDDMDISP
|
---|
60 | # define VBOXDISPMP_DECL(_type) DECLEXPORT(_type)
|
---|
61 | # else
|
---|
62 | # define VBOXDISPMP_DECL(_type) DECLIMPORT(_type)
|
---|
63 | # endif
|
---|
64 |
|
---|
65 | #define VBOXDISPMP_IFVERSION 1
|
---|
66 | #define VBOXDISPMP_VERSION (VBOXVIDEOIF_VERSION | (VBOXDISPMP_IFVERSION < 16))
|
---|
67 | /**
|
---|
68 | * VBoxDispMpGetCallbacks export
|
---|
69 | *
|
---|
70 | * @param u32Version - must be set to VBOXDISPMP_VERSION
|
---|
71 | * @param pCallbacks - callbacks structure
|
---|
72 | */
|
---|
73 | typedef VBOXDISPMP_DECL(HRESULT) FNVBOXDISPMP_GETCALLBACKS(uint32_t u32Version, PVBOXDISPMP_CALLBACKS pCallbacks);
|
---|
74 | typedef FNVBOXDISPMP_GETCALLBACKS *PFNVBOXDISPMP_GETCALLBACKS;
|
---|
75 |
|
---|
76 | #endif /* #ifndef ___VBoxDispMp_h___ */
|
---|