[ros-diffs] [greatlrd] 37584: Implement GetDCRegionData

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Nov 23 12:34:58 CET 2008


Author: greatlrd
Date: Sun Nov 23 05:34:58 2008
New Revision: 37584

URL: http://svn.reactos.org/svn/reactos?rev=37584&view=rev
Log:
Implement GetDCRegionData

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=37584&r1=37583&r2=37584&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 05:34:58 2008
@@ -13,7 +13,7 @@
   DCISetClipList at 8
   DCISetDestination at 12
   DCISetSrcDestClip at 16
-;  GetDCRegionData
+  GetDCRegionData at 12
 ;  GetWindowRegionData
 ;  WinWatchClose
 ;  WinWatchDidStatusChange

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=37584&r1=37583&r2=37584&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 05:34:58 2008
@@ -105,6 +105,19 @@
     DeleteDC(hDC);
 }
 
+/*++
+* @name int WINAPI DCICreatePrimary(HDC hDC, LPDCISURFACEINFO *pDciSurfaceInfo)
+* @implemented
+*
+* Create a primary directdraw surface.
+*
+* @return
+* if it fail it return DCI_FAIL_* error codes, if it sussess it return DCI_OK.
+*
+* @remarks.
+* none
+*
+*--*/
 int WINAPI 
 DCICreatePrimary(HDC hDC, LPDCISURFACEINFO *pDciSurfaceInfo)
 {
@@ -267,7 +280,21 @@
     return retvalue;
 }
 
-void WINAPI DCIDestroy(LPDCISURFACEINFO pDciSurfaceInfo)
+/*++
+* @name void WINAPI DCIDestroy(LPDCISURFACEINFO pDciSurfaceInfo)
+* @implemented
+*
+* It destory the primary surface and all data that have been alloc from DCICreatePrimary
+
+* @return
+* None
+*
+* @remarks.
+* None
+*
+*--*/
+void WINAPI
+DCIDestroy(LPDCISURFACEINFO pDciSurfaceInfo)
 {
     DDHAL_DESTROYSURFACEDATA lpcsd;
     LPDCISURFACE_INT pDciSurface_int = NULL;
@@ -310,6 +337,36 @@
     }
 }
 
+/*++
+* @name DWORD WINAPI GetDCRegionData(HDC hdc, DWORD size, LPRGNDATA prd)
+* @implemented
+*
+* it give the region data, simple it fill in the prd
+
+* @return
+* return value 0 meain it fails,
+* if the sussess the size value and return value are same, 
+* if the prd is null the return value contains the number of bytes needed for the region data. 
+*
+* @remarks.
+* None
+*/
+DWORD WINAPI
+GetDCRegionData(HDC hdc, DWORD size, LPRGNDATA prd)
+{
+    DWORD retvalue = 0;
+    HRGN hRgn = CreateRectRgn(0,0,0,0);
+
+    if (hRgn != NULL)
+    {
+        GetRandomRgn(hdc,hRgn,SYSRGN);
+        retvalue = GetRegionData(hRgn,size,prd);
+        DeleteObject(hRgn);
+    }
+
+    return retvalue;
+}
+
 
 /***********************************************************************************************************/
 /***********************************************************************************************************/



More information about the Ros-diffs mailing list