1 | /* $Id: VBoxMPCommon.h 99828 2023-05-17 13:48:57Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Miniport common functions used by XPDM/WDDM drivers
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_common_VBoxMPCommon_h
|
---|
29 | #define GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_common_VBoxMPCommon_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #include "VBoxMPDevExt.h"
|
---|
35 |
|
---|
36 | RT_C_DECLS_BEGIN
|
---|
37 |
|
---|
38 | int VBoxMPCmnMapAdapterMemory(PVBOXMP_COMMON pCommon, void **ppv, uint32_t ulOffset, uint32_t ulSize);
|
---|
39 | void VBoxMPCmnUnmapAdapterMemory(PVBOXMP_COMMON pCommon, void **ppv);
|
---|
40 |
|
---|
41 | typedef bool(*PFNVIDEOIRQSYNC)(void *);
|
---|
42 | bool VBoxMPCmnSyncToVideoIRQ(PVBOXMP_COMMON pCommon, PFNVIDEOIRQSYNC pfnSync, void *pvUser);
|
---|
43 |
|
---|
44 | /* Video modes related */
|
---|
45 | #ifdef VBOX_XPDM_MINIPORT
|
---|
46 | void VBoxMPCmnInitCustomVideoModes(PVBOXMP_DEVEXT pExt);
|
---|
47 | VIDEO_MODE_INFORMATION* VBoxMPCmnGetCustomVideoModeInfo(ULONG ulIndex);
|
---|
48 | VIDEO_MODE_INFORMATION* VBoxMPCmnGetVideoModeInfo(PVBOXMP_DEVEXT pExt, ULONG ulIndex);
|
---|
49 | VIDEO_MODE_INFORMATION* VBoxMPXpdmCurrentVideoMode(PVBOXMP_DEVEXT pExt);
|
---|
50 | ULONG VBoxMPXpdmGetVideoModesCount(PVBOXMP_DEVEXT pExt);
|
---|
51 | void VBoxMPXpdmBuildVideoModesTable(PVBOXMP_DEVEXT pExt);
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | /* Registry access */
|
---|
55 | #ifdef VBOX_XPDM_MINIPORT
|
---|
56 | typedef PVBOXMP_DEVEXT VBOXMPCMNREGISTRY;
|
---|
57 | #else
|
---|
58 | typedef HANDLE VBOXMPCMNREGISTRY;
|
---|
59 | #endif
|
---|
60 |
|
---|
61 | VP_STATUS VBoxMPCmnRegInit(IN PVBOXMP_DEVEXT pExt, OUT VBOXMPCMNREGISTRY *pReg);
|
---|
62 | VP_STATUS VBoxMPCmnRegFini(IN VBOXMPCMNREGISTRY Reg);
|
---|
63 | VP_STATUS VBoxMPCmnRegSetDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t Val);
|
---|
64 | VP_STATUS VBoxMPCmnRegQueryDword(IN VBOXMPCMNREGISTRY Reg, PCWSTR pName, uint32_t *pVal);
|
---|
65 |
|
---|
66 | /* Pointer related */
|
---|
67 | bool VBoxMPCmnUpdatePointerShape(PVBOXMP_COMMON pCommon, PVIDEO_POINTER_ATTRIBUTES pAttrs, uint32_t cbLength);
|
---|
68 |
|
---|
69 | RT_C_DECLS_END
|
---|
70 |
|
---|
71 | #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_common_VBoxMPCommon_h */
|
---|