[ros-diffs] [greatlrd] 23072: 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.
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Sun Jul 16 13:46:31 CEST 2006
Author: greatlrd
Date: Sun Jul 16 15:46:30 2006
New Revision: 23072
URL: http://svn.reactos.org/svn/reactos?rev=23072&view=rev
Log:
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.
Added:
trunk/reactos/drivers/video/displays/framebuf/dd.c (with props)
trunk/reactos/drivers/video/displays/framebuf/ddenable.c (with props)
Modified:
trunk/reactos/drivers/video/displays/framebuf/enable.c
trunk/reactos/drivers/video/displays/framebuf/framebuf.h
trunk/reactos/drivers/video/displays/framebuf/framebuf.rbuild
Added: trunk/reactos/drivers/video/displays/framebuf/dd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/framebuf/dd.c?rev=23072&view=auto
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/dd.c (added)
+++ trunk/reactos/drivers/video/displays/framebuf/dd.c Sun Jul 16 15:46:30 2006
@@ -1,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"
+
Propchange: trunk/reactos/drivers/video/displays/framebuf/dd.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/drivers/video/displays/framebuf/ddenable.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/framebuf/ddenable.c?rev=23072&view=auto
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/ddenable.c (added)
+++ trunk/reactos/drivers/video/displays/framebuf/ddenable.c Sun Jul 16 15:46:30 2006
@@ -1,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;
+}
+
Propchange: trunk/reactos/drivers/video/displays/framebuf/ddenable.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/drivers/video/displays/framebuf/enable.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/framebuf/enable.c?rev=23072&r1=23071&r2=23072&view=diff
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/enable.c (original)
+++ trunk/reactos/drivers/video/displays/framebuf/enable.c Sun Jul 16 15:46:30 2006
@@ -31,7 +31,12 @@
{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 }
+
+
};
/*
Modified: trunk/reactos/drivers/video/displays/framebuf/framebuf.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/framebuf/framebuf.h?rev=23072&r1=23071&r2=23072&view=diff
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/framebuf.h (original)
+++ trunk/reactos/drivers/video/displays/framebuf/framebuf.h Sun Jul 16 15:46:30 2006
@@ -52,7 +52,7 @@
PVOID ScreenPtr;
HPALETTE DefaultPalette;
PALETTEENTRY *PaletteEntries;
-
+
#ifdef EXPERIMENTAL_MOUSE_CURSOR_SUPPORT
VIDEO_POINTER_ATTRIBUTES PointerAttributes;
XLATEOBJ *PointerXlateObject;
@@ -61,12 +61,38 @@
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))
#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(
@@ -157,4 +183,7 @@
IN ULONG iStart,
IN ULONG cColors);
+
+
#endif /* FRAMEBUF_H */
+
Modified: trunk/reactos/drivers/video/displays/framebuf/framebuf.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/framebuf/framebuf.rbuild?rev=23072&r1=23071&r2=23072&view=diff
==============================================================================
--- trunk/reactos/drivers/video/displays/framebuf/framebuf.rbuild (original)
+++ trunk/reactos/drivers/video/displays/framebuf/framebuf.rbuild Sun Jul 16 15:46:30 2006
@@ -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>
More information about the Ros-diffs
mailing list