Release 961117

Sun Nov 17 15:01:45 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [graphics/bitblt.c] [graphics/x11drv/bitblt.c]
	Moved BitBlt operations to the new graphics driver
	interface. Implemented PatBlt32, BitBlt32 and StretchBlt32.

	* [memory/global.c]
	Unified MemManInfo() and GlobalMemoryStatus().

	* [objects/text.c]
	Fixed ExtTextOut() to always use physical coords for clip rect.

	* [windows/dialog.c]
	Implemented DlgDirSelectEx() and Win32 version of DlgDirSelect*.

	* [windows/event.c]
	Avoid busy-looping in EVENT_WaitXEvent when no timer is pending
	(thanks to Thomas Koenig).

	* [windows/painting.c]
	Moved update region clipping for CS_PARENTDC windows to BeginPaint().
	
	* [windows/scroll.c]
	Implemented Win32 version of ScrollWindow() and ScrollDC().

Tue Nov 12 09:52:17 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [files/*.c] [win32/file.c]
	Some win32 filetime conversion functions added.
	Fixed behaviour with DOS drives pointing to UNIX /
	SetCurrentDirectory() may also get X:\xxx paths.
	Fixed FILE_Open when called from CreateFile().
	Added GetFileSize(), MapViewOfFile(), SetFileTime(), GetFileTime().

	* [misc/crtdll.c] [if1632/crtdll.spec]
	Added some new functions.

	* [if1632/user32.spec]
	Some thunks into win16 code added.

	* [win32/init.c]
	Added GetSystemInfo(), removed GetModuleFileName() stub.

	* [win32/code_page.c] [if1632/thunk.c]
	Added EnumSystemCodePages* (untested).

	* [objects/font.c] [if1632/thunk.c]
	Added EnumFontFamilies32*.
	
Mon Nov 11 14:50:24 1996  Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>

	* [controls/menu.c] [windows/mdi.c]
	Don't delete the MDI `windows' menu if it's already been deleted.

	* [misc/exec.c]
	Notepad always calls WinHelp(.., HELP_QUIT, ...) at termination
 	and complains if it returns FALSE.

	* [windows/winpos.c]
	Get maximized MDI child's nonclient area redrawn after resize.

Thu Nov  7 13:32:34 1996  Lee Jaekil <juria@seodu.co.kr>

	* [memory/global.c]
	Use /proc filesystem for GlobalMemoryStatus() on Linux.

Mon Nov  4 18:30:00 1996  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [windows/event.c]
	Added OffiX-style file drop handling. File paths must be
	DOS-mappable by Wine (via wine.conf).

	* [controls/combo.c]
        Added WM_GETTEXT handler.

	* [objects/palette.c]
	Added ResizePalette() (untested).

	* [objects/cursoricon.c]
	Implemented icon to cursor conversion.

	* [objects/color.c]
	Fixed crash on startup when no colorcells are writeable.

Mon Nov  4 00:49:41 1996  Ulrich Schmid  <uschmid@mail.hh.provi.de>

	* [rc/winerc.c]
	Added support for win32 output.

	* [library/libres.c] [include/libres.h] [loader/resource.c]
	Renamed LIBRES_FindResource to LIBRES_FindResource16.
	Added LIBRES_FindResource32.

Sun Nov 3 21:21:45 1996  Robert Pouliot <krynos@clic.net>

	* [loader/builtin.c] [if1632/Makefile.in] [if1632/wing.spec]
	Added the spec file for WinG, it's only stub for now, but it
	should be easy to do by someone with Windows programming
	knowledge. See: ftp.microsoft.com/SoftLib/MSLFILES/wing10.exe.

	* [if1632/crtdll.spec]
	Added some string and memory functions to make sfxed95.exe (of
 	Warcraft 2) almost work.
diff --git a/graphics/bitblt.c b/graphics/bitblt.c
new file mode 100644
index 0000000..2acda69
--- /dev/null
+++ b/graphics/bitblt.c
@@ -0,0 +1,149 @@
+/*
+ * GDI bit-blit operations
+ *
+ * Copyright 1993, 1994  Alexandre Julliard
+ */
+
+#include "gdi.h"
+#include "stddebug.h"
+#include "debug.h"
+
+
+/***********************************************************************
+ *           PatBlt16    (GDI.29)
+ */
+BOOL16 PatBlt16( HDC16 hdc, INT16 left, INT16 top,
+                 INT16 width, INT16 height, DWORD rop)
+{
+    DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
+    if (!dc || !dc->funcs->pPatBlt) return FALSE;
+
+    dprintf_bitblt( stddeb, "PatBlt16: %04x %d,%d %dx%d %06lx\n",
+                    hdc, left, top, width, height, rop );
+    return dc->funcs->pPatBlt( dc, left, top, width, height, rop );
+}
+
+
+/***********************************************************************
+ *           PatBlt32    (GDI32.260)
+ */
+BOOL32 PatBlt32( HDC32 hdc, INT32 left, INT32 top,
+                 INT32 width, INT32 height, DWORD rop)
+{
+    DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
+    if (!dc || !dc->funcs->pPatBlt) return FALSE;
+
+    dprintf_bitblt( stddeb, "PatBlt32: %04x %d,%d %dx%d %06lx\n",
+                    hdc, left, top, width, height, rop );
+    return dc->funcs->pPatBlt( dc, left, top, width, height, rop );
+}
+
+
+/***********************************************************************
+ *           BitBlt16    (GDI.34)
+ */
+BOOL16 BitBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst, INT16 width,
+                 INT16 height, HDC16 hdcSrc, INT16 xSrc, INT16 ySrc, DWORD rop)
+{
+    DC *dcDst, *dcSrc;
+
+    if (!(dcDst = (DC *)GDI_GetObjPtr( hdcDst, DC_MAGIC ))) return FALSE;
+    if (!dcDst->funcs->pBitBlt) return FALSE;
+    dcSrc = (DC *) GDI_GetObjPtr( hdcSrc, DC_MAGIC );
+
+    dprintf_bitblt(stddeb,
+                "BitBlt16: hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n",
+                hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
+                hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
+    return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height,
+                                  dcSrc, xSrc, ySrc, rop );
+}
+
+
+/***********************************************************************
+ *           BitBlt32    (GDI32.10)
+ */
+BOOL32 BitBlt32( HDC32 hdcDst, INT32 xDst, INT32 yDst, INT32 width,
+                 INT32 height, HDC32 hdcSrc, INT32 xSrc, INT32 ySrc, DWORD rop)
+{
+    DC *dcDst, *dcSrc;
+
+    if (!(dcDst = (DC *)GDI_GetObjPtr( hdcDst, DC_MAGIC ))) return FALSE;
+    if (!dcDst->funcs->pBitBlt) return FALSE;
+    dcSrc = (DC *) GDI_GetObjPtr( hdcSrc, DC_MAGIC );
+
+    dprintf_bitblt(stddeb,
+                "BitBlt32: hdcSrc=%04x %d,%d %d bpp -> hdcDest=%04x %d,%d %dx%dx%d rop=%06lx\n",
+                hdcSrc, xSrc, ySrc, dcSrc ? dcSrc->w.bitsPerPixel : 0,
+                hdcDst, xDst, yDst, width, height, dcDst->w.bitsPerPixel, rop);
+    return dcDst->funcs->pBitBlt( dcDst, xDst, yDst, width, height,
+                                  dcSrc, xSrc, ySrc, rop );
+}
+
+
+/***********************************************************************
+ *           StretchBlt16    (GDI.35)
+ */
+BOOL16 StretchBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst,
+                     INT16 widthDst, INT16 heightDst,
+                     HDC16 hdcSrc, INT16 xSrc, INT16 ySrc,
+                     INT16 widthSrc, INT16 heightSrc, DWORD rop )
+{
+    DC *dcDst, *dcSrc;
+
+    if (!(dcDst = (DC *) GDI_GetObjPtr( hdcDst, DC_MAGIC ))) return FALSE;
+    if (!dcDst->funcs->pStretchBlt) return FALSE;
+    dcSrc = (DC *) GDI_GetObjPtr( hdcSrc, DC_MAGIC );
+    dprintf_bitblt(stddeb,
+        "StretchBlt16: %04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n",
+                   hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
+                   dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst,
+                   widthDst, heightDst, dcDst->w.bitsPerPixel, rop );
+    return dcDst->funcs->pStretchBlt( dcDst, xDst, yDst, widthDst, heightDst,
+                                      dcSrc, xSrc, ySrc, widthSrc, heightSrc,
+                                      rop );
+}
+
+
+/***********************************************************************
+ *           StretchBlt32    (GDI32.350)
+ */
+BOOL32 StretchBlt32( HDC32 hdcDst, INT32 xDst, INT32 yDst,
+                     INT32 widthDst, INT32 heightDst,
+                     HDC32 hdcSrc, INT32 xSrc, INT32 ySrc,
+                     INT32 widthSrc, INT32 heightSrc, DWORD rop )
+{
+    DC *dcDst, *dcSrc;
+
+    if (!(dcDst = (DC *) GDI_GetObjPtr( hdcDst, DC_MAGIC ))) return FALSE;
+    if (!dcDst->funcs->pStretchBlt) return FALSE;
+    dcSrc = (DC *) GDI_GetObjPtr( hdcSrc, DC_MAGIC );
+    dprintf_bitblt(stddeb,
+        "StretchBlt32: %04x %d,%d %dx%dx%d -> %04x %d,%d %dx%dx%d rop=%06lx\n",
+                   hdcSrc, xSrc, ySrc, widthSrc, heightSrc,
+                   dcSrc ? dcSrc->w.bitsPerPixel : 0, hdcDst, xDst, yDst,
+                   widthDst, heightDst, dcDst->w.bitsPerPixel, rop );
+    return dcDst->funcs->pStretchBlt( dcDst, xDst, yDst, widthDst, heightDst,
+                                      dcSrc, xSrc, ySrc, widthSrc, heightSrc,
+                                      rop );
+}
+
+
+/***********************************************************************
+ *           FastWindowFrame    (GDI.400)
+ */
+BOOL16 FastWindowFrame( HDC16 hdc, const RECT16 *rect,
+                        INT16 width, INT16 height, DWORD rop )
+{
+    HBRUSH32 hbrush = SelectObject32( hdc, GetStockObject32( GRAY_BRUSH ) );
+    PatBlt32( hdc, rect->left, rect->top,
+              rect->right - rect->left - width, height, rop );
+    PatBlt32( hdc, rect->left, rect->top + height, width,
+              rect->bottom - rect->top - height, rop );
+    PatBlt32( hdc, rect->left + width, rect->bottom,
+              rect->right - rect->left - width, -height, rop );
+    PatBlt32( hdc, rect->right, rect->top, -width, 
+              rect->bottom - rect->top - height, rop );
+    SelectObject32( hdc, hbrush );
+    return TRUE;
+}