gpecer.h

来自「老外的一个开源项目」· C头文件 代码 · 共 111 行

H
111
字号
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

Module Name:

Abstract:

Functions:

Notes:

--*/

#ifndef __GPECER_H__
#define __GPECER_H__

#ifdef	DD_ENABLE
class GPECERem : public DDGPE
#else	// DD_ENABLE
class GPECERem : public GPE
#endif	// DD_ENABLE
{
private:

	GPEMode			m_ModeInfo;
	DWORD			m_pvFlatFrameBuffer;
	DWORD			m_cbScanLineLength;
	DWORD			m_cxPhysicalScreen;
	DWORD			m_cyPhysicalScreen;
	DWORD			m_colorDepth;
	DWORD			m_noServer;
	DWORD			m_VirtualFrameBuffer;
	DWORD			m_RedMaskSize;
	DWORD			m_RedMaskPosition;
	DWORD			m_GreenMaskSize;
	DWORD			m_GreenMaskPosition;
	DWORD			m_BlueMaskSize;
	DWORD			m_BlueMaskPosition;
	DWORD			m_VesaMode;

	BOOL			m_CursorDisabled;
	BOOL			m_CursorVisible;
	BOOL			m_CursorForcedOff;
	RECTL			m_CursorRect;
	POINTL			m_CursorSize;
	POINTL			m_CursorHotspot;
	UCHAR			*m_CursorBackingStore;
	UCHAR			*m_CursorXorShape;
	UCHAR			*m_CursorAndShape;

	DWORD			m_Sock;
	CERCONFIG		m_Config;
	
	void InitCerDispInfo(PCERDISPINFO pInfo);

public:
	GPECERem(void);
	static DWORD WINAPI	Refresh(LPVOID lParam);
	static DWORD WINAPI	DoInput(LPVOID lParam);
	static DWORD WINAPI	DoBroadcast(LPVOID lParam);
	virtual INT		NumModes(void);
	virtual SCODE	SetMode(INT modeId,	HPALETTE *palette);
	virtual INT		InVBlank(void);
	virtual SCODE	SetPalette(const PALETTEENTRY *source, USHORT firstEntry,
								USHORT numEntries);
	virtual SCODE	GetModeInfo(GPEMode *pMode,	INT modeNumber);
	virtual SCODE	SetPointerShape(GPESurf *mask, GPESurf *colorSurface,
									INT xHot, INT yHot, INT cX, INT cY);
	virtual SCODE	MovePointer(INT xPosition, INT yPosition);
	virtual void	WaitForNotBusy(void);
	virtual INT		IsBusy(void);
	virtual void	GetPhysicalVideoMemory(unsigned long *physicalMemoryBase, unsigned long *videoMemorySize);
#ifdef	DD_ENABLE
    void            GetVirtualVideoMemory(unsigned long * virtualMemoryBase, unsigned long *videoMemorySize);
#endif	// DD_ENABLE
	virtual SCODE	AllocSurface(GPESurf **surface, INT width, INT height,
									EGPEFormat format, INT surfaceFlags);
	virtual SCODE	Line(GPELineParms *lineParameters, EGPEPhase phase);
	virtual SCODE	BltPrepare(GPEBltParms *blitParameters);
	virtual SCODE	BltComplete(GPEBltParms *blitParameters);
	virtual ULONG	GetGraphicsCaps();

	SCODE			WrappedEmulatedLine (GPELineParms *lineParameters);
	void			CursorOn (void);
	void			CursorOff (void);

#ifdef	DD_ENABLE
    friend void buildDDHALInfo( LPDDHALINFO lpddhi, DWORD modeidx );
#endif	// DD_ENABLE
};


#endif __GPECER_H_


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?