mirror of
https://github.com/reactos/reactos.git
synced 2024-11-07 15:10:53 +00:00
Start adding basic directdraw hal 2d interface, so we have a directdraw hal interface to test with, for vmware server does not come with directdraw interface for the the driver. for now everthing is stubed.
svn path=/trunk/; revision=23072
This commit is contained in:
parent
0a02efc6e2
commit
d16a694b91
5 changed files with 144 additions and 2 deletions
24
reactos/drivers/video/displays/framebuf/dd.c
Normal file
24
reactos/drivers/video/displays/framebuf/dd.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* ReactOS Generic Framebuffer display driver directdraw interface
|
||||
*
|
||||
* Copyright (C) 2006 Magnus Olsen
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* Here we put in all 2d api for directdraw and redirect some of them to GDI api */
|
||||
|
||||
#include "framebuf.h"
|
||||
|
82
reactos/drivers/video/displays/framebuf/ddenable.c
Normal file
82
reactos/drivers/video/displays/framebuf/ddenable.c
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* ReactOS Generic Framebuffer display driver directdraw interface
|
||||
*
|
||||
* Copyright (C) 2006 Magnus Olsen
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "framebuf.h"
|
||||
|
||||
VOID DDKAPI
|
||||
DrvDisableDirectDraw( IN DHPDEV dhpdev)
|
||||
{
|
||||
PPDEV ppdev = (PPDEV)dhpdev;
|
||||
ppdev->bDDInitialized = FALSE;
|
||||
/* Add Clean up code here if we need it
|
||||
when we shout down directx interface */
|
||||
}
|
||||
|
||||
BOOL DDKAPI
|
||||
DrvEnableDirectDraw(
|
||||
IN DHPDEV dhpdev,
|
||||
OUT DD_CALLBACKS *pCallBacks,
|
||||
OUT DD_SURFACECALLBACKS *pSurfaceCallBacks,
|
||||
OUT DD_PALETTECALLBACKS *pPaletteCallBacks)
|
||||
{
|
||||
PPDEV ppdev = (PPDEV)dhpdev;
|
||||
|
||||
if (ppdev->bDDInitialized == TRUE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (pCallBacks !=NULL)
|
||||
{
|
||||
memset(pCallBacks,0,sizeof(DD_CALLBACKS));
|
||||
|
||||
/* FILL pCallBacks with hal stuff */
|
||||
}
|
||||
|
||||
if (pSurfaceCallBacks !=NULL)
|
||||
{
|
||||
memset(pSurfaceCallBacks,0,sizeof(DD_SURFACECALLBACKS));
|
||||
|
||||
/* FILL pSurfaceCallBacks with hal stuff */
|
||||
}
|
||||
|
||||
if (pPaletteCallBacks !=NULL)
|
||||
{
|
||||
memset(pPaletteCallBacks,0,sizeof(DD_PALETTECALLBACKS));
|
||||
|
||||
/* FILL pPaletteCallBacks with hal stuff */
|
||||
}
|
||||
|
||||
ppdev->bDDInitialized = TRUE;
|
||||
return ppdev->bDDInitialized;
|
||||
}
|
||||
|
||||
BOOL DDKAPI
|
||||
DrvGetDirectDrawInfo(
|
||||
IN DHPDEV dhpdev,
|
||||
OUT DD_HALINFO *pHalInfo,
|
||||
OUT DWORD *pdwNumHeaps,
|
||||
OUT VIDEOMEMORY *pvmList,
|
||||
OUT DWORD *pdwNumFourCCCodes,
|
||||
OUT DWORD *pdwFourCC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -31,7 +31,12 @@ static DRVFN DrvFunctionTable[] =
|
|||
{INDEX_DrvGetModes, (PFN)DrvGetModes},
|
||||
{INDEX_DrvSetPalette, (PFN)DrvSetPalette},
|
||||
{INDEX_DrvSetPointerShape, (PFN)DrvSetPointerShape},
|
||||
{INDEX_DrvMovePointer, (PFN)DrvMovePointer}
|
||||
{INDEX_DrvMovePointer, (PFN)DrvMovePointer},
|
||||
{INDEX_DrvGetDirectDrawInfo, (PFN) DrvGetDirectDrawInfo },
|
||||
{INDEX_DrvEnableDirectDraw, (PFN) DrvEnableDirectDraw },
|
||||
{INDEX_DrvDisableDirectDraw, (PFN) DrvDisableDirectDraw }
|
||||
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct _PDEV
|
|||
PVOID ScreenPtr;
|
||||
HPALETTE DefaultPalette;
|
||||
PALETTEENTRY *PaletteEntries;
|
||||
|
||||
|
||||
#ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
|
||||
VIDEO_POINTER_ATTRIBUTES PointerAttributes;
|
||||
XLATEOBJ *PointerXlateObject;
|
||||
|
@ -61,6 +61,9 @@ typedef struct _PDEV
|
|||
HSURF PointerSaveSurface;
|
||||
POINTL PointerHotSpot;
|
||||
#endif
|
||||
|
||||
/* DirectX Support */
|
||||
BOOL bDDInitialized;
|
||||
} PDEV, *PPDEV;
|
||||
|
||||
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
|
||||
|
@ -68,6 +71,29 @@ typedef struct _PDEV
|
|||
#define DEVICE_NAME L"framebuf"
|
||||
#define ALLOC_TAG TAG('F','B','U','F')
|
||||
|
||||
VOID STDCALL
|
||||
DrvDisableDirectDraw(
|
||||
IN DHPDEV dhpdev);
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
DrvEnableDirectDraw(
|
||||
IN DHPDEV dhpdev,
|
||||
OUT DD_CALLBACKS *pCallBacks,
|
||||
OUT DD_SURFACECALLBACKS *pSurfaceCallBacks,
|
||||
OUT DD_PALETTECALLBACKS *pPaletteCallBacks);
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
DrvGetDirectDrawInfo(
|
||||
IN DHPDEV dhpdev,
|
||||
OUT DD_HALINFO *pHalInfo,
|
||||
OUT DWORD *pdwNumHeaps,
|
||||
OUT VIDEOMEMORY *pvmList,
|
||||
OUT DWORD *pdwNumFourCCCodes,
|
||||
OUT DWORD *pdwFourCC);
|
||||
|
||||
|
||||
DHPDEV STDCALL
|
||||
DrvEnablePDEV(
|
||||
IN DEVMODEW *pdm,
|
||||
|
@ -157,4 +183,7 @@ IntSetPalette(
|
|||
IN ULONG iStart,
|
||||
IN ULONG cColors);
|
||||
|
||||
|
||||
|
||||
#endif /* FRAMEBUF_H */
|
||||
|
||||
|
|
|
@ -9,5 +9,7 @@
|
|||
<file>pointer.c</file>
|
||||
<file>screen.c</file>
|
||||
<file>surface.c</file>
|
||||
<file>ddenable.c</file>
|
||||
<file>dd.c</file>
|
||||
<file>framebuf.rc</file>
|
||||
</module>
|
||||
|
|
Loading…
Reference in a new issue