[GDI32]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 29 Dec 2014 13:11:27 +0000 (13:11 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 29 Dec 2014 13:11:27 +0000 (13:11 +0000)
Move PatBlt, GetROP2 and SetROP2 to appropriate source files

svn path=/trunk/; revision=65878

reactos/win32ss/gdi/gdi32/objects/brush.c
reactos/win32ss/gdi/gdi32/objects/dc.c
reactos/win32ss/gdi/gdi32/objects/painting.c

index 4931c48..c9450d0 100644 (file)
@@ -258,94 +258,6 @@ CreateBrushIndirect(
     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
  *
index 6c8a82d..ca4dab5 100644 (file)
@@ -1146,6 +1146,70 @@ SetBkMode(
     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
  *
index 24c7ecd..f2cb0c7 100644 (file)
@@ -735,6 +735,30 @@ BitBlt(
         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