Implement Get & Set batch limit.
authorJames Tabor <james.tabor@reactos.org>
Tue, 17 Oct 2006 05:30:54 +0000 (05:30 +0000)
committerJames Tabor <james.tabor@reactos.org>
Tue, 17 Oct 2006 05:30:54 +0000 (05:30 +0000)
svn path=/trunk/; revision=24553

reactos/dll/win32/gdi32/include/gdi32p.h
reactos/dll/win32/gdi32/misc/misc.c
reactos/dll/win32/gdi32/misc/stubs.c

index a7ea6bd..ca815aa 100644 (file)
@@ -6,11 +6,14 @@
  * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)\r
  */\r
 \r
+#define GDI_BATCH_LIMIT 20\r
+\r
 /* DATA **********************************************************************/\r
 \r
 extern PGDI_TABLE_ENTRY GdiHandleTable;\r
 extern HANDLE hProcessHeap;\r
 extern HANDLE CurrentProcessId;\r
+extern DWORD GDI_BatchLimit;\r
 \r
 typedef INT\r
 (CALLBACK* EMFPLAYPROC)(\r
index 3fd24cf..9ca6185 100644 (file)
@@ -30,6 +30,7 @@
 
 PGDI_TABLE_ENTRY GdiHandleTable = NULL;
 HANDLE CurrentProcessId = NULL;
+DWORD GDI_BatchLimit = 1;
 
 /*
  * @implemented
@@ -69,3 +70,29 @@ BOOL GdiGetHandleUserData(HGDIOBJ hGdiObj, PVOID *UserData)
   }
   return FALSE;
 }
+
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GdiSetBatchLimit(DWORD Limit)
+{
+  DWORD OldLimit = GDI_BatchLimit;
+    if ((!Limit) || (Limit > GDI_BATCH_LIMIT)) return Limit;
+    GdiFlush();
+    GDI_BatchLimit = Limit;
+    return OldLimit;
+}
+
+
+/*
+ * @implemented
+ */
+DWORD
+STDCALL
+GdiGetBatchLimit()
+{
+    return GDI_BatchLimit;
+}
index 7a7a5ef..ee219ea 100644 (file)
@@ -871,34 +871,6 @@ GdiFlush()
 }
 
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GdiSetBatchLimit(
-       DWORD   a0
-       )
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GdiGetBatchLimit()
-{
-       UNIMPLEMENTED;
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-
 /*
  * @unimplemented
  */