[ros-diffs] [greatlrd] 37577: Impement part of DCIDestroy Implement DCISetClipList Implement DCISetSrcDestClip Implement WinWatchNotify. BugFix : DciCreatePrimary. forget check see if hal support create surface or not.
greatlrd at svn.reactos.org
greatlrd at svn.reactos.org
Sun Nov 23 10:54:49 CET 2008
Author: greatlrd
Date: Sun Nov 23 03:54:48 2008
New Revision: 37577
URL: http://svn.reactos.org/svn/reactos?rev=37577&view=rev
Log:
Impement part of DCIDestroy
Implement DCISetClipList
Implement DCISetSrcDestClip
Implement WinWatchNotify.
BugFix : DciCreatePrimary. forget check see if hal support create surface or not.
Modified:
branches/reactx/reactos/dll/win32/dciman32/dciman32.def
branches/reactx/reactos/dll/win32/dciman32/dciman_main.c
Modified: branches/reactx/reactos/dll/win32/dciman32/dciman32.def
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/win32/dciman32/dciman32.def?rev=37577&r1=37576&r2=37577&view=diff
==============================================================================
--- branches/reactx/reactos/dll/win32/dciman32/dciman32.def [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/win32/dciman32/dciman32.def [iso-8859-1] Sun Nov 23 03:54:48 2008
@@ -5,18 +5,18 @@
DCICreateOffscreen at 40
DCICreateOverlay at 12
DCICreatePrimary at 8
-; DCIDestroy
+ DCIDestroy at 4
DCIDraw at 4
; DCIEndAccess
DCIEnum at 20
DCIOpenProvider at 0
-; DCISetClipList
+ DCISetClipList at 8
DCISetDestination at 12
-; DCISetSrcDestClip
+ DCISetSrcDestClip at 16
; GetDCRegionData
; GetWindowRegionData
; WinWatchClose
; WinWatchDidStatusChange
; WinWatchGetClipList
-; WinWatchNotify
+ WinWatchNotify at 12
; WinWatchOpen
Modified: branches/reactx/reactos/dll/win32/dciman32/dciman_main.c
URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/win32/dciman32/dciman_main.c?rev=37577&r1=37576&r2=37577&view=diff
==============================================================================
--- branches/reactx/reactos/dll/win32/dciman32/dciman_main.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/win32/dciman32/dciman_main.c [iso-8859-1] Sun Nov 23 03:54:48 2008
@@ -20,6 +20,7 @@
DDRAWI_DDRAWSURFACE_LCL SurfaceLocal;
DDHAL_DDCALLBACKS DDCallbacks;
DDHAL_DDSURFACECALLBACKS DDSurfaceCallbacks;
+
} DCISURFACE_LCL, *LPDCISURFACE_LCL;
typedef struct _DCISURFACE_INT
@@ -181,10 +182,15 @@
lpcsd.lplpSList = SurfaceLocal_List;
lpcsd.dwSCnt = 1;
lpcsd.ddRVal = DDERR_GENERIC;
- lpcsd.CreateSurface = pDciSurface_int->DciSurface_lcl.DDCallbacks.CreateSurface;
+
+ /* Check see if dx hal support CreateSurface */
+ if ( (pDciSurface_int->DciSurface_lcl.DDCallbacks.dwFlags & DDHAL_CB32_CREATESURFACE) == DDHAL_CB32_CREATESURFACE)
+ {
+ lpcsd.CreateSurface = pDciSurface_int->DciSurface_lcl.DDCallbacks.CreateSurface;
+ }
/* Now try create our surface */
- if (lpcsd.CreateSurface != NULL)
+ if (lpcsd.CreateSurface != NULL )
{
retvalue = lpcsd.CreateSurface(&lpcsd);
}
@@ -261,6 +267,44 @@
return retvalue;
}
+void WINAPI DCIDestroy(LPDCISURFACEINFO pDciSurfaceInfo)
+{
+ LPDCISURFACE_INT pDciSurface_int = NULL;
+ if (pDciSurfaceInfo != NULL)
+ {
+ /* Get the internal data for our pdci struct */
+ pDciSurface_int = (LPDCISURFACE_INT) (((DWORD) pDciSurfaceInfo) - sizeof(DCISURFACE_LCL)) ;
+
+ /* If we lost the primary surface we do not destory it, */
+ if (pDciSurface_int->DciSurface_lcl.LostSurface == FALSE)
+ {
+ /* Fixme destore the primary surface */
+
+ /* Check see if dx hal support DestroySurface */
+ if ( (pDciSurface_int->DciSurface_lcl.DDSurfaceCallbacks.dwFlags & DDHAL_SURFCB32_DESTROYSURFACE) == DDHAL_SURFCB32_DESTROYSURFACE)
+ {
+ // lpcsd.DestroySurface = pDciSurface_int->DciSurface_lcl.DDSurfaceCallbacks.DestroySurface;
+ }
+
+
+ /* Destroy the Ddraw object */
+ if (pDciSurface_int->DciSurface_lcl.DirectDrawGlobal.hDD != 0)
+ {
+ DdDeleteDirectDrawObject(&pDciSurface_int->DciSurface_lcl.DirectDrawGlobal);
+ }
+
+ /* Free the alloc memmory for the internal and for pDciSurfaceInfo */
+ HeapFree(GetProcessHeap(), 0, pDciSurface_int);
+ }
+ }
+}
+
+
+/***********************************************************************************************************/
+/***********************************************************************************************************/
+/***********************************************************************************************************/
+/* All function under here are not supported in windows nt / ReactOS, they only return error code or false */
+/***********************************************************************************************************/
/*++
* @name int WINAPI DCICreateOffscreen(HDC hdc)
@@ -371,6 +415,70 @@
{
return DCI_FAIL_UNSUPPORTED;
}
-
-
-
+/*++
+* @name DCIRVAL WINAPI DCISetClipList(LPDCIOFFSCREEN pdci, LPRGNDATA prd)
+* @implemented
+*
+* Not supported in windows, it only return DCI_FAIL_UNSUPPORTED.
+
+* @return
+* DCI_FAIL_UNSUPPORTED
+*
+* @remarks.
+* None
+*
+*--*/
+DCIRVAL WINAPI
+DCISetClipList(LPDCIOFFSCREEN pdci,
+ LPRGNDATA prd)
+{
+ return DCI_FAIL_UNSUPPORTED;
+}
+
+/*++
+* @name DCIRVAL WINAPI DCISetSrcDestClip(LPDCIOFFSCREEN pdci, LPRECT srcrc, LPRECT destrc, LPRGNDATA prd)
+* @implemented
+*
+* Not supported in windows, it only return DCI_FAIL_UNSUPPORTED.
+
+* @return
+* DCI_FAIL_UNSUPPORTED
+*
+* @remarks.
+* None
+*
+*--*/
+DCIRVAL WINAPI
+DCISetSrcDestClip(LPDCIOFFSCREEN pdci,
+ LPRECT srcrc,
+ LPRECT destrc,
+ LPRGNDATA prd)
+{
+ return DCI_FAIL_UNSUPPORTED;
+}
+
+/*++
+* @name BOOL WINAPI WinWatchNotify(HWINWATCH hWW, WINWATCHNOTIFYPROC NotifyCallback, LPARAM NotifyParam );
+* @implemented
+*
+* Not supported in windows, it only return FALSE.
+
+* @return
+* FALSE
+*
+* @remarks.
+* None
+*
+*--*/
+BOOL WINAPI
+WinWatchNotify(HWINWATCH hWW,
+ WINWATCHNOTIFYPROC NotifyCallback,
+ LPARAM NotifyParam )
+{
+ return FALSE;
+}
+
+
+
+
+
More information about the Ros-diffs
mailing list