Author: jimtabor
Date: Sat Apr 19 14:00:34 2008
New Revision: 33035
URL:
http://svn.reactos.org/svn/reactos?rev=33035&view=rev
Log:
Plugged in the old NtGdiSetDIBits for now. Need to investigate the problems with SaveDC
and CreateCompatibleDC.
Modified:
trunk/reactos/dll/win32/gdi32/objects/bitmap.c
trunk/reactos/include/reactos/win32k/ntgdibad.h
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
trunk/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Sat Apr 19 14:00:34 2008
@@ -295,7 +295,7 @@
0);
}
-
+#if 0
/*
* @implemented
*/
@@ -386,6 +386,20 @@
RestoreDC(SavehDC, -1);
return LinesCopied;
+}
+#endif
+
+INT
+STDCALL
+SetDIBits(HDC hdc,
+ HBITMAP hbmp,
+ UINT uStartScan,
+ UINT cScanLines,
+ CONST VOID *lpvBits,
+ CONST BITMAPINFO *lpbmi,
+ UINT fuColorUse)
+{
+ return NtGdiSetDIBits(hdc, hbmp, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse);
}
/*
Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdibad.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntgdibad.h [iso-8859-1] Sat Apr 19 14:00:34 2008
@@ -131,6 +131,18 @@
LPPOINT Point
);
+/* Use SetDIBitsToDevice in gdi32. */
+INT
+STDCALL
+NtGdiSetDIBits (
+ HDC hDC,
+ HBITMAP hBitmap,
+ UINT StartScan,
+ UINT ScanLines,
+ CONST VOID * Bits,
+ CONST BITMAPINFO * bmi,
+ UINT ColorUse
+ );
#endif /* WIN32K_NTGDI_BAD_INCLUDED */
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Sat Apr 19
14:00:34 2008
@@ -275,6 +275,41 @@
return result;
}
+
+// Converts a DIB to a device-dependent bitmap
+INT STDCALL
+NtGdiSetDIBits(
+ HDC hDC,
+ HBITMAP hBitmap,
+ UINT StartScan,
+ UINT ScanLines,
+ CONST VOID *Bits,
+ CONST BITMAPINFO *bmi,
+ UINT ColorUse)
+{
+ PDC Dc;
+ INT Ret;
+
+ Dc = DC_LockDc(hDC);
+ if (NULL == Dc)
+ {
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ return 0;
+ }
+ if (Dc->DC_Type == DC_TYPE_INFO)
+ {
+ DC_UnlockDc(Dc);
+ return 0;
+ }
+
+ Ret = IntSetDIBits(Dc, hBitmap, StartScan, ScanLines, Bits, bmi, ColorUse);
+
+ DC_UnlockDc(Dc);
+
+ return Ret;
+}
+
+
W32KAPI
INT
Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Apr 19 14:00:34
2008
@@ -674,6 +674,7 @@
#
#
#ReactOS specific syscalls
+NtGdiSetDIBits 7
NtGdiSetViewportExtEx 4
NtGdiSetViewportOrgEx 4
NtGdiSetWindowExtEx 4