Fix build
[reactos.git] / reactos / drivers / video / miniport / xboxvmp / xboxvmp.h
1 /*
2 * ReactOS Xbox miniport video driver
3 * Copyright (C) 2004 Gé van Geldorp
4 *
5 * Based on VBE miniport video driver
6 * Copyright (C) 2004 Filip Navara
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22
23 #ifndef XBOXVMP_H
24 #define XBOXVMP_H
25
26 /* INCLUDES *******************************************************************/
27
28 #ifdef _MSC_VER
29 #include "dderror.h"
30 #include "devioctl.h"
31 #define PAGE_SIZE 4096
32 #else
33 #include <ntddk.h>
34 #endif
35
36 #include "miniport.h"
37 #include "ntddvdeo.h"
38 #include "video.h"
39
40 /* FIXME: NDK not compatible with miniport drivers */
41 #define SystemBasicInformation 0
42 typedef struct _SYSTEM_BASIC_INFORMATION
43 {
44 ULONG Reserved;
45 ULONG TimerResolution;
46 ULONG PageSize;
47 ULONG NumberOfPhysicalPages;
48 ULONG LowestPhysicalPageNumber;
49 ULONG HighestPhysicalPageNumber;
50 ULONG AllocationGranularity;
51 ULONG MinimumUserModeAddress;
52 ULONG MaximumUserModeAddress;
53 KAFFINITY ActiveProcessorsAffinityMask;
54 CCHAR NumberOfProcessors;
55 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
56
57 LONG
58 __stdcall
59 ZwQuerySystemInformation(
60 IN ULONG SystemInformationClass,
61 OUT PVOID SystemInformation,
62 IN ULONG Length,
63 OUT PULONG ResultLength
64 );
65
66 typedef struct
67 {
68 PHYSICAL_ADDRESS PhysControlStart;
69 ULONG ControlLength;
70 PVOID VirtControlStart;
71 PHYSICAL_ADDRESS PhysFrameBufferStart;
72 } XBOXVMP_DEVICE_EXTENSION, *PXBOXVMP_DEVICE_EXTENSION;
73
74 VP_STATUS STDCALL
75 XboxVmpFindAdapter(
76 IN PVOID HwDeviceExtension,
77 IN PVOID HwContext,
78 IN PWSTR ArgumentString,
79 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
80 OUT PUCHAR Again);
81
82 BOOLEAN STDCALL
83 XboxVmpInitialize(PVOID HwDeviceExtension);
84
85 BOOLEAN STDCALL
86 XboxVmpStartIO(
87 PVOID HwDeviceExtension,
88 PVIDEO_REQUEST_PACKET RequestPacket);
89
90 BOOLEAN STDCALL
91 XboxVmpResetHw(
92 PVOID DeviceExtension,
93 ULONG Columns,
94 ULONG Rows);
95
96 VP_STATUS STDCALL
97 XboxVmpGetPowerState(
98 PVOID HwDeviceExtension,
99 ULONG HwId,
100 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
101
102 VP_STATUS STDCALL
103 XboxVmpSetPowerState(
104 PVOID HwDeviceExtension,
105 ULONG HwId,
106 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
107
108 BOOLEAN FASTCALL
109 XboxVmpSetCurrentMode(
110 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
111 PVIDEO_MODE RequestedMode,
112 PSTATUS_BLOCK StatusBlock);
113
114 BOOLEAN FASTCALL
115 XboxVmpResetDevice(
116 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
117 PSTATUS_BLOCK StatusBlock);
118
119 BOOLEAN FASTCALL
120 XboxVmpMapVideoMemory(
121 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
122 PVIDEO_MEMORY RequestedAddress,
123 PVIDEO_MEMORY_INFORMATION MapInformation,
124 PSTATUS_BLOCK StatusBlock);
125
126 BOOLEAN FASTCALL
127 XboxVmpUnmapVideoMemory(
128 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
129 PVIDEO_MEMORY VideoMemory,
130 PSTATUS_BLOCK StatusBlock);
131
132 BOOLEAN FASTCALL
133 XboxVmpQueryNumAvailModes(
134 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
135 PVIDEO_NUM_MODES Modes,
136 PSTATUS_BLOCK StatusBlock);
137
138 BOOLEAN FASTCALL
139 XboxVmpQueryAvailModes(
140 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
141 PVIDEO_MODE_INFORMATION ReturnedModes,
142 PSTATUS_BLOCK StatusBlock);
143
144 BOOLEAN FASTCALL
145 XboxVmpQueryCurrentMode(
146 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
147 PVIDEO_MODE_INFORMATION VideoModeInfo,
148 PSTATUS_BLOCK StatusBlock);
149
150 BOOLEAN FASTCALL
151 XboxVmpSetColorRegisters(
152 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
153 PVIDEO_CLUT ColorLookUpTable,
154 PSTATUS_BLOCK StatusBlock);
155
156 #endif /* XBOXVMP_H */
157
158 /* EOF */