11#define SYSTM_LOGFONT {16,7,0,0,700,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,VARIABLE_PITCH | FF_DONTCARE,L"System"}
12#define HELVE_LOGFONT {12,9,0,0,400,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_STROKE_PRECIS,PROOF_QUALITY,VARIABLE_PITCH | FF_DONTCARE,L"MS Sans Serif"}
13#define COURI_LOGFONT {12,9,0,0,400,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_STROKE_PRECIS,PROOF_QUALITY,FIXED_PITCH | FF_DONTCARE, L"Courier"}
128 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
142 0x00, 0x00, 0x00, 0x00,
143 0x2A, 0x00, 0x15, 0x00,
144 0x00, 0x2A, 0x15, 0x00,
145 0x2A, 0x2A, 0x15, 0x00,
146 0x00, 0x00, 0x2A, 0x00,
147 0x2A, 0x15, 0x2A, 0x00,
148 0x15, 0x2A, 0x2A, 0x00,
149 0x21, 0x22, 0x23, 0x00,
150 0x30, 0x31, 0x32, 0x00,
151 0x3F, 0x00, 0x00, 0x00,
152 0x00, 0x3F, 0x00, 0x00,
153 0x3F, 0x3F, 0x00, 0x00,
154 0x00, 0x00, 0x3F, 0x00,
155 0x3F, 0x00, 0x3F, 0x00,
156 0x00, 0x3F, 0x3F, 0x00,
157 0x3F, 0x3F, 0x3F, 0x00
170 DWORD returnedDataLength;
175 ULONG RemappingNeeded = 0;
181 if (EngDeviceIoControl(ppdev->
hDriver,
189 &returnedDataLength))
191 RIP(
"DISP bInitSURF failed IOCTL_SET_MODE\n");
200 if (bFirst || RemappingNeeded)
205 if (EngDeviceIoControl(ppdev->
hDriver,
209 &videoMemoryInformation,
211 &returnedDataLength))
213 RIP(
"DISP bInitSURF failed IOCTL_VIDEO_MAP\n");
222 RIP(
"VideoRamBase does not correspond to FrameBufferBase\n");
233 DISPDBG((1,
"Frame buffer memory is not accessible.\n"));
274 DISPDBG((0,
"bInitPointer EngAllocMem failed\n"));
299 DWORD returnedDataLength;
310 &returnedDataLength))
312 RIP(
"DISP vDisableSURF failed IOCTL_VIDEO_UNMAP\n");
356 pVideoModeSelected =
NULL;
357 pVideoTemp = pVideoBuffer;
364 DISPDBG((2,
"Default mode requested"));
365 bSelectDefault =
TRUE;
370 DISPDBG((2,
"Requested mode...\n"));
376 bSelectDefault =
FALSE;
381 if (pVideoTemp->
Length != 0)
383 if (bSelectDefault ||
390 pVideoModeSelected = pVideoTemp;
391 DISPDBG((3,
"Found a match\n")) ;
397 (((
PUCHAR)pVideoTemp) + cbModeSize);
404 if (pVideoModeSelected ==
NULL)
407 DISPDBG((0,
"DISP bInitPDEV failed - no valid modes\n"));
491 if (EngDeviceIoControl(ppdev->
hDriver,
500 DISPDBG((2,
"getcolorCapabilities failed \n"));
664 if (EngDeviceIoControl(
hDriver,
672 DISPDBG((0,
"getAvailableModes failed VIDEO_QUERY_NUM_AVAIL_MODES\n"));
686 if (*modeInformation ==
NULL)
688 DISPDBG((0,
"getAvailableModes failed EngAllocMem\n"));
697 if (EngDeviceIoControl(
hDriver,
706 DISPDBG((0,
"getAvailableModes failed VIDEO_QUERY_AVAIL_MODES\n"));
709 *modeInformation =
NULL;
721 pVideoTemp = *modeInformation;
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
#define VIDEO_MODE_GRAPHICS
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
struct _VIDEO_MODE_INFORMATION * PVIDEO_MODE_INFORMATION
#define IOCTL_VIDEO_SET_CURRENT_MODE
struct _VIDEO_POINTER_ATTRIBUTES VIDEO_POINTER_ATTRIBUTES
#define VIDEO_DEVICE_COLOR
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
struct _VIDEO_POINTER_ATTRIBUTES * PVIDEO_POINTER_ATTRIBUTES
#define VIDEO_MODE_COLOR_POINTER
void * EngAllocMem(int zero, unsigned long size, int tag=0)
LDECI4 YellowInMagentaDye
LDECI4 MagentaInYellowDye
VIDEO_POINTER_CAPABILITIES PointerCapabilities
DWORD cjPointerAttributes
PVIDEO_POINTER_ATTRIBUTES pPointerAttributes
PVOID RequestedVirtualAddress
ULONG ModeInformationLength
DWORD getAvailableModes(IN HANDLE Driver, OUT PVIDEO_MODE_INFORMATION *modeInformation, OUT DWORD *ModeSize)
static WORD PaletteBuffer[]
static BYTE ColorBuffer[]
const DEVINFO gDevInfoFrameBuffer
BOOL bInitSURF(PPDEV ppdev, BOOL bFirst)
BOOL bInitPDEV(PPDEV ppdev, DEVMODEW *pDevMode, GDIINFO *pGdiInfo, DEVINFO *pDevInfo)
VOID vDisableSURF(PPDEV ppdev)
#define HT_FLAG_ADDITIVE_PRIMS
#define GDI_DRIVER_VERSION
#define PRIMARY_ORDER_CBA
#define HT_FORMAT_4BPP_IRGB
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver