⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pxa255video.h

📁 老外的一个开源项目
💻 H
字号:
// Copyright (c) David Vescovi.  All rights reserved.
// Part of Project DrumStix
// Windows Embedded Developers Interest Group (WE-DIG) community project.
// http://www.we-dig.org
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
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: pxa255video.h

Date Created: 9/22/2003 

Abstract: 

Functions: 

Notes: 

--*/
#ifndef _PXA255VIDEO_H_
#define _PXA255VIDEO_H_

#include <dispdrvr.h>

// OEM escape code base
#define ESCAPECODEBASE			100000
#define DISPLAYPAGE				(ESCAPECODEBASE + 1)
#define GETPALETTERAMPHYSICAL	(ESCAPECODEBASE + 2)
#define VERTICALBLANKINTERRUPT	(ESCAPECODEBASE + 3)
#define OS_SCREENACCESS			(ESCAPECODEBASE + 4)
#define SCROLL					(ESCAPECODEBASE + 5)
#define GETVFRAMEPHYSICAL       (ESCAPECODEBASE + 6)
#define GETVFRAMELEN            (ESCAPECODEBASE + 7)

// GAPI support
#define kidVersion100	100
#define kfLandscape		0x8		// Screen is rotated 270 degrees
#define kfPalette		0x10
#define kfDirect		0x20
#define kfDirect555		0x40
#define kfDirect565		0x80
#define kfDirect888		0x100
#define GETGXINFO		0x00020000

struct GXDeviceInfo
{
    long idVersion;
    void * pvFrameBuffer;
    unsigned long cbStride;
    unsigned long cxWidth;
    unsigned long cyHeight;
    unsigned long cBPP;
    unsigned long ffFormat;
    short vkButtonUpPortrait;
    short vkButtonUpLandscape;
    POINT ptButtonUp;
    short vkButtonDownPortrait;
    short vkButtonDownLandscape;
    POINT ptButtonDown;
    short vkButtonLeftPortrait;
    short vkButtonLeftLandscape;
    POINT ptButtonLeft;
    short vkButtonRightPortrait;
    short vkButtonRightLandscape;
    POINT ptButtonRight;
    short vkButtonAPortrait;
    short vkButtonALandscape;
    POINT ptButtonA;
    short vkButtonBPortrait;
    short vkButtonBLandscape;
    POINT ptButtonB;
    short vkButtonCPortrait;
    short vkButtonCLandscape;
    POINT ptButtonC;
    short vkButtonStartPortrait;
    short vkButtonStartLandscape;
    POINT ptButtonStart;
    void * pvReserved1;
    void * pvReserved2;
};


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

#ifdef DD_ENABLE
    GPEModeEx       m_pModeEx;
#endif
    HANDLE          m_hevInterrupt;
    void            *m_pVirtualFrameBuffer;

    SCODE           WrappedEmulatedLine(GPELineParms *pParms);
    SCODE           WrappedEmulatedBlt(GPEBltParms *pParms);
    Node2D          *m_p2DVideoMemory;
    DWORD           m_cbScanLineLength;
    DWORD           m_RedMaskSize;
    DWORD           m_RedMaskPosition;
    DWORD           m_GreenMaskSize;
    DWORD           m_GreenMaskPosition;
    DWORD           m_BlueMaskSize;
    DWORD           m_BlueMaskPosition;

public:
    SA2Video();
    virtual int     NumModes();
    virtual SCODE   SetMode(int modeId, HPALETTE *pPalette);
    virtual int     InVBlank();
    virtual SCODE   SetPalette(const PALETTEENTRY *src,
                               unsigned short firstEntry,unsigned short numEntries);
    virtual SCODE   GetModeInfo(GPEMode *pMode,int modeNo );
    virtual VOID    PowerHandler(BOOL bOff);
    virtual SCODE   SetPointerShape(GPESurf *pMask,GPESurf *pColorSurf,
                                    int xHot,int yHot,int cx,int cy);
    virtual SCODE   MovePointer(int x,int y);
    virtual void    WaitForNotBusy();
    virtual int     IsBusy();
    virtual SCODE   AllocSurface(GPESurf **ppSurf,int width,int height,
                                 EGPEFormat format,int surfaceFlags);
    virtual SCODE   Line(GPELineParms *pLineParms,EGPEPhase phase);
    virtual SCODE   BltPrepare(GPEBltParms *pBltParms);
    virtual SCODE   BltComplete(GPEBltParms *pBltParms);
    virtual ULONG   DrvEscape(SURFOBJ *pso, ULONG iEsc, ULONG cjIn, PVOID pvIn, ULONG cjOut, PVOID pvOut);
    virtual void    ContrastCmd(ULONG cjIn, PVOID pvIn, ULONG cjOut, PVOID pvOut);


#ifdef	DD_ENABLE
    void            GetVirtualVideoMemory(unsigned long * virtualMemoryBase, unsigned long *videoMemorySize);
    virtual SCODE   AllocSurface(DDGPESurf **ppSurf, int width, int height, EGPEFormat format, EDDGPEPixelFormat pixelFormat, int surfaceFlags);
    //virtual void	SetVisibleSurface( GPESurf *pSurf, BOOL bWaitForVBlank = FALSE);
    friend void buildDDHALInfo( LPDDHALINFO lpddhi, DWORD modeidx );
#endif	// DD_ENABLE

    BOOL IsrThreadStart(void);
    BOOL IsrThreadProc(void);

};

#endif 

⌨️ 快捷键说明

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