Author: tkreuzer Date: Mon Dec 29 13:11:27 2014 New Revision: 65878
URL: http://svn.reactos.org/svn/reactos?rev=65878&view=rev Log: [GDI32] Move PatBlt, GetROP2 and SetROP2 to appropriate source files
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/brush.c trunk/reactos/win32ss/gdi/gdi32/objects/dc.c trunk/reactos/win32ss/gdi/gdi32/objects/painting.c
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/brush.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/b... ============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/objects/brush.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/objects/brush.c [iso-8859-1] Mon Dec 29 13:11:27 2014 @@ -258,94 +258,6 @@ return hBrush; }
-BOOL -WINAPI -PatBlt(HDC hdc, - int nXLeft, - int nYLeft, - int nWidth, - int nHeight, - DWORD dwRop) -{ - /* FIXME some part need be done in user mode */ - return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop); -} - -BOOL -WINAPI -PolyPatBlt(IN HDC hdc, - IN DWORD rop4, - IN PPOLYPATBLT pPoly, - IN DWORD Count, - IN DWORD Mode) -{ - /* FIXME some part need be done in user mode */ - return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode); -} - -/* - * @implemented - * - */ -int -WINAPI -GetROP2(HDC hdc) -{ - PDC_ATTR Dc_Attr; - if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return 0; - return Dc_Attr->jROP2; -} - -/* - * @implemented - */ -int -WINAPI -SetROP2(HDC hdc, - int fnDrawMode) -{ - PDC_ATTR Dc_Attr; - INT Old_ROP2; - -#if 0 -// Handle something other than a normal dc object. - if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC) - { - if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC) - return MFDRV_SetROP2( hdc, fnDrawMode); - else - { - PLDC pLDC = GdiGetLDC(hdc); - if ( !pLDC ) - { - SetLastError(ERROR_INVALID_HANDLE); - return FALSE; - } - if (pLDC->iType == LDC_EMFLDC) - { - return EMFDRV_SetROP2(( hdc, fnDrawMode); - } - return FALSE; - } - } -#endif - if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE; - - if (NtCurrentTeb()->GdiTebBatch.HDC == hdc) - { - if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY) - { - NtGdiFlush(); - Dc_Attr->ulDirty_ &= ~DC_MODE_DIRTY; - } - } - - Old_ROP2 = Dc_Attr->jROP2; - Dc_Attr->jROP2 = fnDrawMode; - - return Old_ROP2; -} - /* * @implemented *
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/dc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/d... ============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/objects/dc.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/objects/dc.c [iso-8859-1] Mon Dec 29 13:11:27 2014 @@ -1145,6 +1145,70 @@
return iOldMode; } + +/* + * @implemented + * + */ +int +WINAPI +GetROP2(HDC hdc) +{ + PDC_ATTR Dc_Attr; + if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return 0; + return Dc_Attr->jROP2; +} + +/* + * @implemented + */ +int +WINAPI +SetROP2(HDC hdc, + int fnDrawMode) +{ + PDC_ATTR Dc_Attr; + INT Old_ROP2; + +#if 0 +// Handle something other than a normal dc object. + if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC) + return MFDRV_SetROP2( hdc, fnDrawMode); + else + { + PLDC pLDC = GdiGetLDC(hdc); + if ( !pLDC ) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (pLDC->iType == LDC_EMFLDC) + { + return EMFDRV_SetROP2(( hdc, fnDrawMode); + } + return FALSE; + } + } +#endif + if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE; + + if (NtCurrentTeb()->GdiTebBatch.HDC == hdc) + { + if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY) + { + NtGdiFlush(); + Dc_Attr->ulDirty_ &= ~DC_MODE_DIRTY; + } + } + + Old_ROP2 = Dc_Attr->jROP2; + Dc_Attr->jROP2 = fnDrawMode; + + return Old_ROP2; +} +
/* * @implemented
Modified: trunk/reactos/win32ss/gdi/gdi32/objects/painting.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/gdi32/objects/p... ============================================================================== --- trunk/reactos/win32ss/gdi/gdi32/objects/painting.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/gdi32/objects/painting.c [iso-8859-1] Mon Dec 29 13:11:27 2014 @@ -735,6 +735,30 @@ nYSrc, dwRop, 0, 0); }
+BOOL +WINAPI +PatBlt(HDC hdc, + int nXLeft, + int nYLeft, + int nWidth, + int nHeight, + DWORD dwRop) +{ + /* FIXME some part need be done in user mode */ + return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop); +} + +BOOL +WINAPI +PolyPatBlt(IN HDC hdc, + IN DWORD rop4, + IN PPOLYPATBLT pPoly, + IN DWORD Count, + IN DWORD Mode) +{ + /* FIXME some part need be done in user mode */ + return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode); +}
/* * @implemented