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 | #include <windows.h>
|
---|
16 | #include <d3dkmthk.h>
|
---|
17 |
|
---|
18 | #include <iprt/cdefs.h>
|
---|
19 | #include <iprt/ctype.h>
|
---|
20 |
|
---|
21 | #include <VBox/VBoxVideo.h>
|
---|
22 |
|
---|
23 | #include "../../Miniport/wddm/VBoxVideoIf.h"
|
---|
24 |
|
---|
25 | typedef struct VBOXDISPIFESCAPE_SCREENLAYOUT_DATA
|
---|
26 | {
|
---|
27 | VBOXDISPIFESCAPE_SCREENLAYOUT ScreenLayout;
|
---|
28 | POINT buffer[VBOX_VIDEO_MAX_SCREENS];
|
---|
29 | } VBOXDISPIFESCAPE_SCREENLAYOUT_DATA, *PVBOXDISPIFESCAPE_SCREENLAYOUT_DATA;
|
---|
30 |
|
---|
31 | typedef struct VBOXSCREENMON
|
---|
32 | {
|
---|
33 | BOOL bInited;
|
---|
34 |
|
---|
35 | HMODULE hGdi32;
|
---|
36 |
|
---|
37 | HWND hWnd;
|
---|
38 |
|
---|
39 | /* open adapter */
|
---|
40 | PFND3DKMT_OPENADAPTERFROMHDC pfnD3DKMTOpenAdapterFromHdc;
|
---|
41 | PFND3DKMT_OPENADAPTERFROMGDIDISPLAYNAME pfnD3DKMTOpenAdapterFromGdiDisplayName;
|
---|
42 | /* close adapter */
|
---|
43 | PFND3DKMT_CLOSEADAPTER pfnD3DKMTCloseAdapter;
|
---|
44 | /* escape */
|
---|
45 | PFND3DKMT_ESCAPE pfnD3DKMTEscape;
|
---|
46 |
|
---|
47 | VBOXDISPIFESCAPE_SCREENLAYOUT_DATA LoData;
|
---|
48 | } VBOXSCREENMON, *PVBOXSCREENMON;
|
---|
49 |
|
---|
50 | typedef DECLCALLBACK(HRESULT) FNVBOXDISPESCAPECB(void * pvBuffer, uint32_t cbBuffer, void *pvContext);
|
---|
51 | typedef FNVBOXDISPESCAPECB *PFNVBOXDISPESCAPECB;
|
---|
52 |
|
---|
53 | typedef struct VBOXSCREENMONRUNNER
|
---|
54 | {
|
---|
55 | // VBOXSCREENMON Screen;
|
---|
56 | HANDLE hThread;
|
---|
57 | DWORD idThread;
|
---|
58 | } VBOXSCREENMONRUNNER, *PVBOXSCREENMONRUNNER;
|
---|
59 |
|
---|
60 | HRESULT VBoxScreenMRunnerStart(PVBOXSCREENMONRUNNER pMon);
|
---|
61 | HRESULT VBoxScreenMRunnerStop(PVBOXSCREENMONRUNNER pMon);
|
---|