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/dciman3... ============================================================================== --- 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@8 DCISetDestination@12 DCISetSrcDestClip@16 -; GetDCRegionData + GetDCRegionData@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/dciman3... ============================================================================== --- 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; +} +
/***********************************************************************************************************/ /***********************************************************************************************************/