Release 960824
Sat Aug 24 13:57:01 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/scroll.c]
Renamed SCROLLINFO to SCROLLBAR_INFO to avoid conflict with Win32.
* [graphics/driver.c] [include/x11drv.h]
New files for graphics driver handling.
* [if1632/relay.c] [include/registers.h] [tools/build.c]
Implemented Win32 register functions. Not really tested yet.
* [include/gdi.h]
Added a lot of functions to the DC func table.
* [loader/pe_image.c]
Initialise %fs before calling out to 32-bit code.
* [windows/hook.c]
Fixed bug in HOOK_GetHook().
* [windows/win.c]
Fixed FindWindow to return an error if the class name doesn't exist.
Wed Aug 21 15:15:53 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [if1632/Makefile.in] [misc/mpr.c] [if1632/mpr.spec]
mpr.dll specs added.
* [if1632/kernel32.spec] [win32/newfns.c] [memory/global.c]
QueryPerformanceCounter(), GlobalMemoryStatus() added.
* [if1632/user32.spec] [win32/error.c]
SetLastErrorEx() added.
* [misc/commdlg.c]
lpstrFilter might be NULL in FILE_WMInitDialog (NS 3.0 setup).
* [misc/registry.c]
Some missing NULL ptr checks added, misc clean up.
Tue Aug 20 21:00:00 1996 Alex Korobka <alex@pharm.sunysb.edu>
* [controls/menu.c]
Adjust popup menu coordinates so that it always stays within
the desktop.
* [misc/main.c]
Fixed GetEnvironment() return value for lpEnv == NULL case.
Mon Aug 19 22:48:36 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
* [misc/crtdll.c] [if1632/crtdll.spec]
Added some is* functions, strlen and tolower.
Mon Aug 19 13:33:13 1996 Stephen Simmons <ssimmons@vitsemi.com>
* [tools/wineconf]
New perl script to generate the wine.conf file.
Fri Aug 16 15:31:44 1996 John Harvey <john@division.co.uk>
* [if1632/gdi.spec]
Lots of printer functions.
* [include/callback.h]
New functions for printer driver support.
* [include/gdi.h]
New/changed structures to support printer driver.
* [misc/escape.c]
New version that uses function table in DC structure.
* [objects/dc.c]
CreateDC copes with things other than Display.
X code for CreateDC moved to graphics/x11drv directory.
CreateCompatibleDC copies func table from original DC.
* [objects/font.c]
GetTextExtentPoint32A,GetTextMetrics16 use function table in
DC and code moved to drivers directory.
* [misc/printdrv.c] [graphics/*/*] [include/win16drv.h]
New files for printer support.
Fri Aug 16 12:33:00 1996 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [controls/scroll.c]
Added SetScrollInfo32 and GetScrollInfo32. These just call existing
code. There are a few options in which I'm probably the wrong person
for the job (page size and disable bar). There are comments in the
code as to what they should do.
* [objects/gdiobj.c] [objects/font.c] [include/font.h]
Added 32 bit version of FONT_GetObject.
diff --git a/objects/font.c b/objects/font.c
index 5cdfd38..615569f 100644
--- a/objects/font.c
+++ b/objects/font.c
@@ -64,7 +64,7 @@
/***********************************************************************
* FONT_Init
*/
-BOOL FONT_Init( void )
+BOOL32 FONT_Init( void )
{
char temp[1024];
LPSTR ptr;
@@ -480,9 +480,9 @@
/***********************************************************************
- * FONT_GetObject
+ * FONT_GetObject16
*/
-int FONT_GetObject( FONTOBJ * font, int count, LPSTR buffer )
+INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer )
{
if (count > sizeof(LOGFONT16)) count = sizeof(LOGFONT16);
memcpy( buffer, &font->logfont, count );
@@ -491,9 +491,39 @@
/***********************************************************************
+ * FONT_GetObject32A
+ */
+INT32 FONT_GetObject32A( FONTOBJ *font, INT32 count, LPSTR buffer )
+{
+ LOGFONT32A fnt32;
+
+ memset(&fnt32, 0, sizeof(fnt32));
+ fnt32.lfHeight = font->logfont.lfHeight;
+ fnt32.lfWidth = font->logfont.lfWidth;
+ fnt32.lfEscapement = font->logfont.lfEscapement;
+ fnt32.lfOrientation = font->logfont.lfOrientation;
+ fnt32.lfWeight = font->logfont.lfWeight;
+ fnt32.lfItalic = font->logfont.lfItalic;
+ fnt32.lfUnderline = font->logfont.lfUnderline;
+ fnt32.lfStrikeOut = font->logfont.lfStrikeOut;
+ fnt32.lfCharSet = font->logfont.lfCharSet;
+ fnt32.lfOutPrecision = font->logfont.lfOutPrecision;
+ fnt32.lfClipPrecision = font->logfont.lfClipPrecision;
+ fnt32.lfQuality = font->logfont.lfQuality;
+ fnt32.lfPitchAndFamily = font->logfont.lfPitchAndFamily;
+ strncpy( fnt32.lfFaceName, font->logfont.lfFaceName,
+ sizeof(fnt32.lfFaceName) );
+
+ if (count > sizeof(fnt32)) count = sizeof(fnt32);
+ memcpy( buffer, &fnt32, count );
+ return count;
+}
+
+
+/***********************************************************************
* FONT_SelectObject
*/
-HFONT FONT_SelectObject( DC * dc, HFONT hfont, FONTOBJ * font )
+HFONT16 FONT_SelectObject( DC * dc, HFONT16 hfont, FONTOBJ * font )
{
static X_PHYSFONT stockFonts[LAST_STOCK_FONT-FIRST_STOCK_FONT+1];
@@ -749,20 +779,19 @@
BOOL32 GetTextExtentPoint32A( HDC32 hdc, LPCSTR str, INT32 count,
LPSIZE32 size )
{
- int dir, ascent, descent;
- XCharStruct info;
-
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
- if (!dc) return FALSE;
- XTextExtents( dc->u.x.font.fstruct, str, count, &dir,
- &ascent, &descent, &info );
- size->cx = abs((info.width + dc->w.breakRem + count * dc->w.charExtra)
- * dc->w.WndExtX / dc->w.VportExtX);
- size->cy = abs((dc->u.x.font.fstruct->ascent+dc->u.x.font.fstruct->descent)
- * dc->w.WndExtY / dc->w.VportExtY);
+ if (!dc)
+ {
+ if (!(dc = (DC *)GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC )))
+ return FALSE;
+ }
- dprintf_font(stddeb,"GetTextExtentPoint(%08x '%*.*s' %d %p): returning %d,%d\n",
- hdc, count, count, str, count, size, size->cx, size->cy );
+ if (!dc->funcs->pGetTextExtentPoint ||
+ !dc->funcs->pGetTextExtentPoint( dc, str, count, size ))
+ return FALSE;
+
+ dprintf_font(stddeb,"GetTextExtentPoint(%08x '%.*s' %d %p): returning %d,%d\n",
+ hdc, count, str, count, size, size->cx, size->cy );
return TRUE;
}