1 | /* $Id: VBoxMPCommon.h 69500 2017-10-28 15:14:05Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Miniport common functions used by XPDM/WDDM drivers
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2017 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 |
|
---|
18 | #ifndef VBOXMPCOMMON_H
|
---|
19 | #define VBOXMPCOMMON_H
|
---|
20 |
|
---|
21 | #include "VBoxMPDevExt.h"
|
---|
22 |
|
---|
23 | RT_C_DECLS_BEGIN
|
---|
24 |
|
---|
25 | int VBoxMPCmnMapAdapterMemory(PVBOXMP_COMMON pCommon, void **ppv, uint32_t ulOffset, uint32_t ulSize);
|
---|
26 | void VBoxMPCmnUnmapAdapterMemory(PVBOXMP_COMMON pCommon, void **ppv);
|
---|
27 |
|
---|
28 | typedef bool(*PFNVIDEOIRQSYNC)(void *);
|
---|
29 | bool VBoxMPCmnSyncToVideoIRQ(PVBOXMP_COMMON pCommon, PFNVIDEOIRQSYNC pfnSync, void *pvUser);
|
---|
30 |
|
---|
31 | /* Video modes related */
|
---|
32 | #ifdef VBOX_XPDM_MINIPORT
|
---|
33 | void VBoxMPCmnInitCustomVideoModes(PVBOXMP_DEVEXT pExt);
|
---|
34 | VIDEO_MODE_INFORMATION* VBoxMPCmnGetCustomVideoModeInfo(ULONG ulIndex);
|
---|
35 | VIDEO_MODE_INFORMATION* VBoxMPCmnGetVideoModeInfo(PVBOXMP_DEVEXT pExt, ULONG ulIndex);
|
---|
36 | VIDEO_MODE_INFORMATION* VBoxMPXpdmCurrentVideoMode(PVBOXMP_DEVEXT pExt);
|
---|
37 | ULONG VBoxMPXpdmGetVideoModesCount(PVBOXMP_DEVEXT pExt);
|
---|
38 | void VBoxMPXpdmBuildVideoModesTable(PVBOXMP_DEVEXT pExt);
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | /* Registry access */
|
---|
42 | #ifdef VBOX_XPDM_MINIPORT
|
---|
43 | typedef PVBOXMP_DEVEXT VBOXMPCMNREGISTRY;
|
---|
44 | #else
|
---|
45 | typedef HANDLE VBOXMPCMNREGISTRY;
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | VP_STATUS VBoxMPCmnRegInit(IN PVBOXMP_DEVEXT pExt, OUT VBOXMPCMNREGISTRY *pReg);
|
---|
49 | VP_STATUS VBoxMPCmnRegFini(IN VBOXMPCMNREGISTRY Reg);
|
---|
50 | VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t Val);
|
---|
51 | VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PWSTR pName, uint32_t *pVal);
|
---|
52 |
|
---|
53 | /* Pointer related */
|
---|
54 | bool VBoxMPCmnUpdatePointerShape(PVBOXMP_COMMON pCommon, PVIDEO_POINTER_ATTRIBUTES pAttrs, uint32_t cbLength);
|
---|
55 |
|
---|
56 | RT_C_DECLS_END
|
---|
57 |
|
---|
58 | #endif /*VBOXMPCOMMON_H*/
|
---|