1 | /** @file
|
---|
2 | * VBoxDisplay - private windows additions display header
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox base platform packages, as
|
---|
9 | * available from https://www.virtualbox.org.
|
---|
10 | *
|
---|
11 | * This program is free software; you can redistribute it and/or
|
---|
12 | * modify it under the terms of the GNU General Public License
|
---|
13 | * as published by the Free Software Foundation, in version 3 of the
|
---|
14 | * License.
|
---|
15 | *
|
---|
16 | * This program is distributed in the hope that it will be useful, but
|
---|
17 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
19 | * General Public License for more details.
|
---|
20 | *
|
---|
21 | * You should have received a copy of the GNU General Public License
|
---|
22 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
23 | *
|
---|
24 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifndef GA_INCLUDED_WINNT_VBoxDisplay_h
|
---|
28 | #define GA_INCLUDED_WINNT_VBoxDisplay_h
|
---|
29 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
30 | # pragma once
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | #include <iprt/types.h>
|
---|
34 | #include <iprt/assert.h>
|
---|
35 |
|
---|
36 | #define VBOXESC_SETVISIBLEREGION 0xABCD9001
|
---|
37 | #define VBOXESC_ISVRDPACTIVE 0xABCD9002
|
---|
38 | #ifdef VBOX_WITH_WDDM
|
---|
39 | # define VBOXESC_REINITVIDEOMODES 0xABCD9003
|
---|
40 | # define VBOXESC_GETVBOXVIDEOCMCMD 0xABCD9004
|
---|
41 | # define VBOXESC_DBGPRINT 0xABCD9005
|
---|
42 | # define VBOXESC_SCREENLAYOUT 0xABCD9006
|
---|
43 | // obsolete 0xABCD9007
|
---|
44 | // obsolete 0xABCD9008
|
---|
45 | // obsolete 0xABCD9009
|
---|
46 | // obsolete 0xABCD900A
|
---|
47 | // obsolete 0xABCD900B
|
---|
48 | // obsolete 0xABCD900C
|
---|
49 | # define VBOXESC_DBGDUMPBUF 0xABCD900D
|
---|
50 | // obsolete 0xABCD900E
|
---|
51 | // obsolete 0xABCD900F
|
---|
52 | # define VBOXESC_REINITVIDEOMODESBYMASK 0xABCD9010
|
---|
53 | # define VBOXESC_ADJUSTVIDEOMODES 0xABCD9011
|
---|
54 | // obsolete 0xABCD9012
|
---|
55 | # define VBOXESC_CONFIGURETARGETS 0xABCD9013
|
---|
56 | # define VBOXESC_SETALLOCHOSTID 0xABCD9014
|
---|
57 | // obsolete 0xABCD9015
|
---|
58 | # define VBOXESC_UPDATEMODES 0xABCD9016
|
---|
59 | # define VBOXESC_GUEST_DISPLAYCHANGED 0xABCD9017
|
---|
60 | # define VBOXESC_TARGET_CONNECTIVITY 0xABCD9018
|
---|
61 |
|
---|
62 | # define VBOXESC_RECONNECT_TARGETS 0xABCD9019
|
---|
63 | #endif /* #ifdef VBOX_WITH_WDDM */
|
---|
64 |
|
---|
65 | # define VBOXESC_ISANYX 0xABCD9200
|
---|
66 |
|
---|
67 | typedef struct VBOXDISPIFESCAPE
|
---|
68 | {
|
---|
69 | int32_t escapeCode;
|
---|
70 | uint32_t u32CmdSpecific;
|
---|
71 | } VBOXDISPIFESCAPE, *PVBOXDISPIFESCAPE;
|
---|
72 |
|
---|
73 | /* ensure command body is always 8-byte-aligned*/
|
---|
74 | AssertCompile((sizeof (VBOXDISPIFESCAPE) & 7) == 0);
|
---|
75 |
|
---|
76 | #define VBOXDISPIFESCAPE_DATA_OFFSET() ((sizeof (VBOXDISPIFESCAPE) + 7) & ~7)
|
---|
77 | #define VBOXDISPIFESCAPE_DATA(_pHead, _t) ( (_t*)(((uint8_t*)(_pHead)) + VBOXDISPIFESCAPE_DATA_OFFSET()))
|
---|
78 | #define VBOXDISPIFESCAPE_DATA_SIZE(_s) ( (_s) < VBOXDISPIFESCAPE_DATA_OFFSET() ? 0 : (_s) - VBOXDISPIFESCAPE_DATA_OFFSET() )
|
---|
79 | #define VBOXDISPIFESCAPE_SIZE(_cbData) ((_cbData) ? VBOXDISPIFESCAPE_DATA_OFFSET() + (_cbData) : sizeof (VBOXDISPIFESCAPE))
|
---|
80 |
|
---|
81 | #define IOCTL_VIDEO_VBOX_SETVISIBLEREGION \
|
---|
82 | CTL_CODE(FILE_DEVICE_VIDEO, 0xA01, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
83 |
|
---|
84 | #define IOCTL_VIDEO_VBOX_ISANYX \
|
---|
85 | CTL_CODE(FILE_DEVICE_VIDEO, 0xA02, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
86 |
|
---|
87 | typedef struct VBOXDISPIFESCAPE_ISANYX
|
---|
88 | {
|
---|
89 | VBOXDISPIFESCAPE EscapeHdr;
|
---|
90 | uint32_t u32IsAnyX;
|
---|
91 | } VBOXDISPIFESCAPE_ISANYX, *PVBOXDISPIFESCAPE_ISANYX;
|
---|
92 |
|
---|
93 | #ifdef VBOX_WITH_WDDM
|
---|
94 |
|
---|
95 | /* Enables code which performs (un)plugging of virtual displays in VBOXESC_UPDATEMODES.
|
---|
96 | * The code has been disabled as part of #8244.
|
---|
97 | */
|
---|
98 | //#define VBOX_WDDM_REPLUG_ON_MODE_CHANGE
|
---|
99 |
|
---|
100 | /* for VBOX_VIDEO_MAX_SCREENS definition */
|
---|
101 | #include <VBoxVideo.h>
|
---|
102 |
|
---|
103 | typedef struct VBOXWDDM_RECOMMENDVIDPN_SOURCE
|
---|
104 | {
|
---|
105 | RTRECTSIZE Size;
|
---|
106 | } VBOXWDDM_RECOMMENDVIDPN_SOURCE;
|
---|
107 |
|
---|
108 | typedef struct VBOXWDDM_RECOMMENDVIDPN_TARGET
|
---|
109 | {
|
---|
110 | int32_t iSource;
|
---|
111 | } VBOXWDDM_RECOMMENDVIDPN_TARGET;
|
---|
112 |
|
---|
113 | typedef struct
|
---|
114 | {
|
---|
115 | VBOXWDDM_RECOMMENDVIDPN_SOURCE aSources[VBOX_VIDEO_MAX_SCREENS];
|
---|
116 | VBOXWDDM_RECOMMENDVIDPN_TARGET aTargets[VBOX_VIDEO_MAX_SCREENS];
|
---|
117 | } VBOXWDDM_RECOMMENDVIDPN, *PVBOXWDDM_RECOMMENDVIDPN;
|
---|
118 |
|
---|
119 | #define VBOXWDDM_SCREENMASK_SIZE ((VBOX_VIDEO_MAX_SCREENS + 7) >> 3)
|
---|
120 |
|
---|
121 | typedef struct VBOXDISPIFESCAPE_UPDATEMODES
|
---|
122 | {
|
---|
123 | VBOXDISPIFESCAPE EscapeHdr;
|
---|
124 | uint32_t u32TargetId;
|
---|
125 | RTRECTSIZE Size;
|
---|
126 | } VBOXDISPIFESCAPE_UPDATEMODES;
|
---|
127 |
|
---|
128 | typedef struct VBOXDISPIFESCAPE_TARGETCONNECTIVITY
|
---|
129 | {
|
---|
130 | VBOXDISPIFESCAPE EscapeHdr;
|
---|
131 | uint32_t u32TargetId;
|
---|
132 | uint32_t fu32Connect;
|
---|
133 | } VBOXDISPIFESCAPE_TARGETCONNECTIVITY;
|
---|
134 |
|
---|
135 | typedef struct VBOXDISPIFESCAPE_RECONNECT_TARGETS
|
---|
136 | {
|
---|
137 | VBOXDISPIFESCAPE EscapeHdr;
|
---|
138 | uint32_t u32ConnectMask;
|
---|
139 | uint32_t u32DisconnectMask;
|
---|
140 | } VBOXDISPIFESCAPE_RECONNECT_TARGETS;
|
---|
141 |
|
---|
142 | #endif /* VBOX_WITH_WDDM */
|
---|
143 |
|
---|
144 | #endif /* !GA_INCLUDED_WINNT_VBoxDisplay_h */
|
---|
145 |
|
---|