1 | /* $Id: VBoxScreen.h 36867 2011-04-28 07:27:03Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | * VBoxVideo Display D3D User mode dll
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2011 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #include <windows.h>
|
---|
20 | #include <d3dkmthk.h>
|
---|
21 |
|
---|
22 | #include <iprt/cdefs.h>
|
---|
23 | #include <iprt/ctype.h>
|
---|
24 |
|
---|
25 | #include <VBox/VBoxVideo.h>
|
---|
26 |
|
---|
27 | #include "common/wddm/VBoxMPIf.h"
|
---|
28 |
|
---|
29 | typedef struct VBOXDISPIFESCAPE_SCREENLAYOUT_DATA
|
---|
30 | {
|
---|
31 | VBOXDISPIFESCAPE_SCREENLAYOUT ScreenLayout;
|
---|
32 | POINT buffer[VBOX_VIDEO_MAX_SCREENS];
|
---|
33 | } VBOXDISPIFESCAPE_SCREENLAYOUT_DATA, *PVBOXDISPIFESCAPE_SCREENLAYOUT_DATA;
|
---|
34 |
|
---|
35 | typedef struct VBOXSCREENMON
|
---|
36 | {
|
---|
37 | BOOL bInited;
|
---|
38 |
|
---|
39 | HMODULE hGdi32;
|
---|
40 |
|
---|
41 | HWND hWnd;
|
---|
42 |
|
---|
43 | /* open adapter */
|
---|
44 | PFND3DKMT_OPENADAPTERFROMHDC pfnD3DKMTOpenAdapterFromHdc;
|
---|
45 | PFND3DKMT_OPENADAPTERFROMGDIDISPLAYNAME pfnD3DKMTOpenAdapterFromGdiDisplayName;
|
---|
46 | /* close adapter */
|
---|
47 | PFND3DKMT_CLOSEADAPTER pfnD3DKMTCloseAdapter;
|
---|
48 | /* escape */
|
---|
49 | PFND3DKMT_ESCAPE pfnD3DKMTEscape;
|
---|
50 |
|
---|
51 | VBOXDISPIFESCAPE_SCREENLAYOUT_DATA LoData;
|
---|
52 | } VBOXSCREENMON, *PVBOXSCREENMON;
|
---|
53 |
|
---|
54 | typedef DECLCALLBACK(HRESULT) FNVBOXDISPESCAPECB(void * pvBuffer, uint32_t cbBuffer, void *pvContext);
|
---|
55 | typedef FNVBOXDISPESCAPECB *PFNVBOXDISPESCAPECB;
|
---|
56 |
|
---|
57 | typedef struct VBOXSCREENMONRUNNER
|
---|
58 | {
|
---|
59 | // VBOXSCREENMON Screen;
|
---|
60 | HANDLE hThread;
|
---|
61 | DWORD idThread;
|
---|
62 | HANDLE hEvent;
|
---|
63 | } VBOXSCREENMONRUNNER, *PVBOXSCREENMONRUNNER;
|
---|
64 |
|
---|
65 | HRESULT VBoxScreenMRunnerStart(PVBOXSCREENMONRUNNER pMon);
|
---|
66 | HRESULT VBoxScreenMRunnerStop(PVBOXSCREENMONRUNNER pMon);
|
---|