1996-10-13 19:45:47 +02:00
|
|
|
/*
|
|
|
|
* Metafile driver initialisation functions
|
|
|
|
*
|
|
|
|
* Copyright 1996 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1996-10-13 19:45:47 +02:00
|
|
|
*/
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
1999-02-17 14:51:06 +01:00
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winbase.h"
|
2009-12-05 11:45:31 +01:00
|
|
|
#include "winnls.h"
|
2021-07-09 15:28:26 +02:00
|
|
|
#include "ntgdi_private.h"
|
2002-03-27 22:13:40 +01:00
|
|
|
#include "mfdrv/metafiledrv.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1996-10-13 19:45:47 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(metafile);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL MFDRV_CreateCompatibleDC( PHYSDEV orig, PHYSDEV *pdev );
|
|
|
|
static BOOL CDECL MFDRV_DeleteDC( PHYSDEV dev );
|
2011-03-16 21:45:39 +01:00
|
|
|
|
2011-05-25 11:09:07 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
2021-08-13 12:09:34 +02:00
|
|
|
* METADC_ExtEscape
|
2011-05-25 11:09:07 +02:00
|
|
|
*/
|
2021-08-13 12:09:34 +02:00
|
|
|
BOOL METADC_ExtEscape( HDC hdc, INT escape, INT input_size, const void *input,
|
|
|
|
INT output_size, void *output )
|
2011-05-25 11:09:07 +02:00
|
|
|
{
|
|
|
|
METARECORD *mr;
|
|
|
|
DWORD len;
|
2021-08-13 12:09:34 +02:00
|
|
|
BOOL ret;
|
2011-05-25 11:09:07 +02:00
|
|
|
|
2021-08-13 12:09:34 +02:00
|
|
|
if (output_size) return FALSE; /* escapes that require output cannot work in metafiles */
|
2011-05-25 11:09:07 +02:00
|
|
|
|
2021-08-13 12:09:34 +02:00
|
|
|
len = sizeof(*mr) + sizeof(WORD) + ((input_size + 1) & ~1);
|
2011-05-25 11:09:07 +02:00
|
|
|
mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
|
|
mr->rdSize = len / 2;
|
|
|
|
mr->rdFunction = META_ESCAPE;
|
2021-08-13 12:09:34 +02:00
|
|
|
mr->rdParm[0] = escape;
|
|
|
|
mr->rdParm[1] = input_size;
|
|
|
|
memcpy( &mr->rdParm[2], input, input_size );
|
|
|
|
ret = metadc_record( hdc, mr, len );
|
2011-05-25 11:09:07 +02:00
|
|
|
HeapFree(GetProcessHeap(), 0, mr);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-04-10 16:17:14 +02:00
|
|
|
/******************************************************************
|
|
|
|
* MFDRV_GetBoundsRect
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static UINT CDECL MFDRV_GetBoundsRect( PHYSDEV dev, RECT *rect, UINT flags )
|
2012-04-10 16:17:14 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-04-25 12:26:44 +02:00
|
|
|
/******************************************************************
|
|
|
|
* MFDRV_SetBoundsRect
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static UINT CDECL MFDRV_SetBoundsRect( PHYSDEV dev, RECT *rect, UINT flags )
|
2012-04-25 12:26:44 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-05-25 11:09:07 +02:00
|
|
|
/******************************************************************
|
2021-07-30 13:03:15 +02:00
|
|
|
* METADC_GetDeviceCaps
|
2011-05-25 11:09:07 +02:00
|
|
|
*
|
|
|
|
*A very simple implementation that returns DT_METAFILE
|
|
|
|
*/
|
2021-07-30 13:03:15 +02:00
|
|
|
INT METADC_GetDeviceCaps( HDC hdc, INT cap )
|
2011-05-25 11:09:07 +02:00
|
|
|
{
|
2021-07-30 13:03:15 +02:00
|
|
|
if (!get_metadc_ptr( hdc )) return 0;
|
|
|
|
|
2011-05-25 11:09:07 +02:00
|
|
|
switch(cap)
|
|
|
|
{
|
|
|
|
case TECHNOLOGY:
|
|
|
|
return DT_METAFILE;
|
|
|
|
case TEXTCAPS:
|
|
|
|
return 0;
|
|
|
|
default:
|
|
|
|
TRACE(" unsupported capability %d, will return 0\n", cap );
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-10-17 20:39:54 +02:00
|
|
|
static const struct gdi_dc_funcs MFDRV_Funcs =
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
1999-05-17 18:20:51 +02:00
|
|
|
NULL, /* pAbortDoc */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_AbortPath, /* pAbortPath */
|
2004-08-02 20:54:54 +02:00
|
|
|
NULL, /* pAlphaBlend */
|
1999-12-06 00:54:02 +01:00
|
|
|
NULL, /* pAngleArc */
|
2021-07-18 12:57:34 +02:00
|
|
|
NULL, /* pArc */
|
|
|
|
MFDRV_ArcTo, /* pArcTo */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_BeginPath, /* pBeginPath */
|
2011-09-14 11:57:45 +02:00
|
|
|
NULL, /* pBlendImage */
|
2021-07-17 17:01:18 +02:00
|
|
|
NULL, /* pChord */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_CloseFigure, /* pCloseFigure */
|
2011-09-07 16:31:19 +02:00
|
|
|
MFDRV_CreateCompatibleDC, /* pCreateCompatibleDC */
|
2002-03-28 23:22:05 +01:00
|
|
|
NULL, /* pCreateDC */
|
2011-03-16 21:45:39 +01:00
|
|
|
MFDRV_DeleteDC, /* pDeleteDC */
|
2021-08-09 11:30:16 +02:00
|
|
|
NULL, /* pDeleteObject */
|
1999-05-17 18:20:51 +02:00
|
|
|
NULL, /* pDeviceCapabilities */
|
2021-07-20 09:19:33 +02:00
|
|
|
NULL, /* pEllipse */
|
1999-05-17 18:20:51 +02:00
|
|
|
NULL, /* pEndDoc */
|
|
|
|
NULL, /* pEndPage */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_EndPath, /* pEndPath */
|
2011-10-19 15:37:10 +02:00
|
|
|
NULL, /* pEnumFonts */
|
2010-10-26 12:40:41 +02:00
|
|
|
NULL, /* pEnumICMProfiles */
|
1999-05-17 18:20:51 +02:00
|
|
|
NULL, /* pExtDeviceMode */
|
2021-08-13 12:09:34 +02:00
|
|
|
NULL, /* pExtEscape */
|
2021-07-25 10:57:58 +02:00
|
|
|
NULL, /* pExtFloodFill */
|
2021-07-23 10:49:42 +02:00
|
|
|
NULL, /* pExtTextOut */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_FillPath, /* pFillPath */
|
1999-04-25 11:24:23 +02:00
|
|
|
MFDRV_FillRgn, /* pFillRgn */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_FlattenPath, /* pFlattenPath */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pFontIsLinked */
|
2021-07-25 10:56:56 +02:00
|
|
|
NULL, /* pFrameRgn */
|
2003-05-21 20:28:49 +02:00
|
|
|
NULL, /* pGdiComment */
|
2012-04-10 16:17:14 +02:00
|
|
|
MFDRV_GetBoundsRect, /* pGetBoundsRect */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetCharABCWidths */
|
|
|
|
NULL, /* pGetCharABCWidthsI */
|
1997-03-29 18:20:20 +01:00
|
|
|
NULL, /* pGetCharWidth */
|
2019-04-09 11:32:59 +02:00
|
|
|
NULL, /* pGetCharWidthInfo */
|
2021-07-30 13:03:15 +02:00
|
|
|
NULL, /* pGetDeviceCaps */
|
2001-03-20 02:55:18 +01:00
|
|
|
NULL, /* pGetDeviceGammaRamp */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetFontData */
|
2015-08-29 18:54:17 +02:00
|
|
|
NULL, /* pGetFontRealizationInfo */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetFontUnicodeRanges */
|
|
|
|
NULL, /* pGetGlyphIndices */
|
|
|
|
NULL, /* pGetGlyphOutline */
|
2008-03-05 15:57:21 +01:00
|
|
|
NULL, /* pGetICMProfile */
|
2011-07-14 11:30:58 +02:00
|
|
|
NULL, /* pGetImage */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetKerningPairs */
|
2002-06-02 23:40:24 +02:00
|
|
|
NULL, /* pGetNearestColor */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetOutlineTextMetrics */
|
2002-03-28 23:22:05 +01:00
|
|
|
NULL, /* pGetPixel */
|
2002-06-02 23:40:24 +02:00
|
|
|
NULL, /* pGetSystemPaletteEntries */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetTextCharsetInfo */
|
2006-07-12 02:58:35 +02:00
|
|
|
NULL, /* pGetTextExtentExPoint */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetTextExtentExPointI */
|
|
|
|
NULL, /* pGetTextFace */
|
1996-10-13 19:45:47 +02:00
|
|
|
NULL, /* pGetTextMetrics */
|
2011-10-31 23:51:38 +01:00
|
|
|
NULL, /* pGradientFill */
|
2021-07-25 10:57:12 +02:00
|
|
|
NULL, /* pInvertRgn */
|
2021-07-17 17:00:55 +02:00
|
|
|
NULL, /* pLineTo */
|
2021-07-17 17:20:11 +02:00
|
|
|
NULL, /* pMoveTo */
|
2021-07-25 10:56:36 +02:00
|
|
|
NULL, /* pPaintRgn */
|
2021-08-03 12:56:49 +02:00
|
|
|
NULL, /* pPatBlt */
|
2021-07-17 17:01:18 +02:00
|
|
|
NULL, /* pPie */
|
1999-12-20 05:14:48 +01:00
|
|
|
MFDRV_PolyBezier, /* pPolyBezier */
|
|
|
|
MFDRV_PolyBezierTo, /* pPolyBezierTo */
|
1999-12-06 00:54:02 +01:00
|
|
|
NULL, /* pPolyDraw */
|
2021-07-22 11:25:17 +02:00
|
|
|
NULL, /* pPolyPolygon */
|
Release 980503
Thu Apr 30 16:28:12 1998 James Juran <jrj120@psu.edu>
* [scheduler/process.c]
Implemented GetExitCodeProcess. The code is a direct translation
of GetExitCodeThread.
Mon Apr 27 22:20:25 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [loader/pe_image.c]
Unload dummy module when PE_LoadLibraryEx32A fails with
PE_LoadImage (makes Encarta 98 installer proceed).
* [files/drive.c]
Make GetDriveType16 return DRIVE_REMOVABLE for TYPE_CDROM.
Make GetCurrentDirectory32 behave like the code does and not
like the help describes.
* [files/profile.c]
Revoke recent change in PROFILE_GetSection and try better
handling of special case.
* [include/windows.h]
Change definition of ACCEL32.
* [misc/commdlg.c]
Replace the GetXXXFilename32 macros by normal code.
Fix two reported bugs in my changes to commdlg.
* [windows/win.c]
Add a hook to catch bogus WM_SIZE messages by emitting a warning
in the appropriate case.
* [objects/bitmap.c]
Reject unreasonbable large size arguments in
CreateCompatibleBitmap32 and add an fixme for that situation.
Sun Apr 26 18:30:07 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [include/ldt.h] [debugger/*.c] [miscemu/instr.c]
Added IS_SELECTOR_SYSTEM and IS_SELECTOR_32BIT macros.
Make instruction emulation support system selectors.
* [loader/*.c]
Started moving NE specific functions to the new loader/ne
directory.
* [memory/environ.c]
Enforce the 127 chars limit only when creating the environment of
a Win16 process.
Sun Apr 26 12:22:23 1998 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed an incredible typo in CopyFile32A that made it unusable
since a rewrite in 970112 (!!).
* [files/directory.c]
Fixed GetTempPath32A/W to include trailing backslash.
* [misc/ver.c]
Make find_pe_resource "work" with corrupt files.
* [misc/wsprintf.c]
Altered WPRINTF_ParseFormatA/W to treat invalid format chars
as normal output, too.
* [msdos/dpmi.c]
Implemented "Allocate/Free real mode callback" (0x0303/0x0304).
Cross your fingers if you need to use it ;) (completely untested)
Implemented "Call real mode proc with far return" (0x0301, tested).
* [msdos/int21.c]
Fixed ioctlGenericBlkDevReq/0x60.
* [relay32/dplayx.spec] [relay32/builtin32.c] [relay32/Makefile.in]
Added built-in DPLAYX.DLL.
* [windows/win.c]
Fixed GetWindowWord()/GWW_HWNDPARENT to return the window's owner
if it has no parent (SDK).
Sat Apr 25 15:09:53 1998 M.T.Fortescue <mark@mtfhpc.demon.co.uk>
* [debugger/db_disasm.c]
Fixed disassemble bug for no-display option and 'lock',
'repne' and 'repe' prefixes.
* [debugger/registers.c]
Added textual flag description output on 'info regs'.
Sat Apr 25 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [*/*.c]
Added stubs and/or documentation for the following functions:
LookupPrivilegeValue, OpenService, ControlService, RegGetKeySecurity,
StartService, SetComputerName, DeleteService, CloseServiceHandle,
OpenProcessToken, OpenSCManager, DeregisterEventSource,
WaitForDebugEvent, WaitForInputIdle, RegisterEventSource,
SetDebugErrorLevel, SetConsoleCursorPosition, ChoosePixelFormat,
SetPixelFormat, GetPixelFormat, DescribePixelFormat, SwapBuffers,
PolyBezier, AbortPath, DestroyAcceleratorTable, HeapWalk,
DdeInitialize, DdeUninitialize, DdeConnectList, DdeDisconnectList,
DdeCreateStringHandle, DdePostAdvise, DdeGetData, DdeNameService,
DdeGetLastError, WNetGetDirectoryType, EnumPrinters, RegFlushKey,
RegGetKeySecurity, DllGetClassObject, DllCanUnloadNow, CreateBitmap,
CreateCompatibleBitmap, CreateBitmapIndirect, GetBitmapBits,
SetBitmapBits, LoadImage, CopyImage, LoadBitmap, DrawIcon,
CreateDiscardableBitmap, SetDIBits, GetCharABCWidths, LoadTypeLib,
SetConsoleCtrlHandler, CreateConsoleScreenBuffer, ReadConsoleInput,
GetConsoleCursorInfo, SetConsoleCursorInfo, SetConsoleWindowInfo,
SetConsoleTextAttribute, SetConsoleScreenBufferSize,
FillConsoleOutputCharacter, FillConsoleOutputAttribute,
CreateMailslot, GetMailslotInfo, GetCompressedFileSize,
GetProcessWindowStation, GetThreadDesktop, SetDebugErrorLevel,
WaitForDebugEvent, SetComputerName, CreateMDIWindow.
Thu Apr 23 23:54:04 1998 Douglas Ridgway <ridgway@winehq.com>
* [include/windows.h] [objects/enhmetafile.c] [relay32/gdi32.spec]
Implement CopyEnhMetaFile, Get/SetEnhMetaFileBits, other fixes.
* [include/windows.h] [objects/metafile.c] [relay32/gdi32.spec]
32-bit metafile fixes, implement EnumMetaFile32, GetMetaFileBitsEx.
* [objects/font.c] [graphics/x11drv/xfont.c] [graphics/x11drv/text.c]
Some rotated text support for X11R6 displays.
* [win32/newfns.c] [ole/ole2nls.c]
Moved GetNumberFormat32A.
Wed Apr 22 17:38:20 1998 David Lee Lambert <lamber45@egr.msu.edu>
* [ole/ole2nls.c] [misc/network.c]
Changed some function documentation to the new style.
* [misc/network.c] [include/windows.h] [if1632/user.spec]
[relay32/mpr.spec] [misc/mpr.c]
Added stubs for some Win32 network functions; renamed some
16-bit ones with 32-bit counterparts, as well as
WNetGetDirectoryType; moved the stubs in misc/mpr.c (three of
them!) to misc/network.c.
* [ole/compobj.c] [ole/storage.c] [ole/ole2disp.c]
[ole/ole2nls.c] [ole/folders.c] [ole/moniker.c] [ole/ole2.c]
[graphics/fontengine.c] [graphics/ddraw.c] [graphics/env.c]
[graphics/driver.c] [graphics/escape.c]
Changed fprintf's to proper debug-macros.
* [include/winnls.h]
Added some flags (for internal use).
* [ole/ole2nls.c]
Added the Unicode core function, and worked out a way to hide
the commonality of the core.
* [relay32/kernel32.spec]
Added support for GetDate/Time32A/W.
Wed Apr 22 09:16:03 1998 Gordon Chaffee <chaffee@cs.berkeley.edu>
* [win32/code_page.c]
Fixed problem with MultiByteToWideChar that was introduced in
last release. Made MultiByteToWideChar more compatible with Win32.
* [graphics/x11drv/graphics.c]
Fixed problem with drawing arcs.
Tue Apr 21 11:24:58 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [ole/ole2nls.c]
Move stuff from 0x409 case to Lang_En.
* [relay32/user32.spec] [windows/winpos.c]
Added stubs for GetWindowRgn32 and SetWindowRgn32. Makes Office
Paperclip happy.
Tue Apr 21 11:16:16 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [loader/pe_image.c]
If image is relocated, TLS addresses need to be adjusted.
* [debugger/*.c]
Generalized tests for 32-bit segments.
Tue Apr 21 02:04:59 1998 James Juran <jrj120@psu.edu>
* [misc/*.c] [miscemu/*.c] [msdos/*.c] [if1632/*.c]
[include/*.h] [loader/*.c] [memory/*.c] [multimedia/*.c]
[objects/*.c]
Almost all fprintf statements converted to appropriate
debug messages.
* [README]
Updated "GETTING MORE INFORMATION" section to include WineHQ.
* [documentation/debugger]
Fixed typo.
* [windows/defwnd.c]
Added function documentation.
Sun Apr 19 16:30:58 1998 Marcus Meissner <marcus@mud.de>
* [Make.rules.in]
Added lint target (using lclint).
* [relay32/oleaut32.spec][relay32/Makefile.in][ole/typelib.c]
[ole/ole2disp.c]
Added oleaut32 spec, added some SysString functions.
* [if1632/signal.c]
Added printing of faultaddress in Linux (using CR2 debug register).
* [configure.in]
Added <sys/types.h> for statfs checks.
* [loader/*.c][debugger/break.c][debugger/hash.c]
Started to split win32/win16 module handling, preparing support
for other binary formats (like ELF).
Sat Apr 18 10:07:41 1998 Rein Klazes <rklazes@casema.net>
* [misc/registry.c]
Fixed a bug that made RegQueryValuexxx returning
incorrect registry values.
Fri Apr 17 22:59:22 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage32*: remove linefeed when nolinefeed set;
check for target underflow.
Fri Apr 17 00:38:14 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/crtdll.c]
Implement xlat_file_ptr for CRT stdin/stdout/stderr address
translation.
Wed Apr 15 20:43:56 1998 Jim Peterson <jspeter@birch.ee.vt.edu>
* [controls/menu.c]
Added 'odaction' parameter to MENU_DrawMenuItem() and redirected
WM_DRAWITEM messages to GetWindow(hwnd,GW_OWNER).
Tue Apr 14 16:17:55 1998 Berend Reitsma <berend@united-info.com>
* [graphics/metafiledrv/init.c] [graphics/painting.c]
[graphics/win16drv/init.c] [graphics/x11drv/graphics.c]
[graphics/x11drv/init.c] [include/gdi.h] [include/x11drv.h]
[relay32/gdi32.spec]
Added PolyPolyline routine.
* [windows/winproc.c]
Changed WINPROC_GetProc() to return proc instead of &(jmp proc).
1998-05-03 21:01:20 +02:00
|
|
|
NULL, /* pPolyPolyline */
|
1999-12-06 00:54:02 +01:00
|
|
|
NULL, /* pPolylineTo */
|
2011-07-14 11:30:58 +02:00
|
|
|
NULL, /* pPutImage */
|
2002-06-02 23:40:24 +02:00
|
|
|
NULL, /* pRealizeDefaultPalette */
|
2021-08-09 11:31:13 +02:00
|
|
|
NULL, /* pRealizePalette */
|
2021-07-20 09:19:51 +02:00
|
|
|
NULL, /* pRectangle */
|
2002-04-06 02:00:56 +02:00
|
|
|
NULL, /* pResetDC */
|
2021-08-17 11:37:39 +02:00
|
|
|
NULL, /* pRestoreDC */
|
2021-07-20 09:19:41 +02:00
|
|
|
NULL, /* pRoundRect */
|
2021-08-09 11:30:32 +02:00
|
|
|
NULL, /* pSelectBitmap */
|
|
|
|
NULL, /* pSelectBrush */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_SelectClipPath, /* pSelectClipPath */
|
2021-08-09 11:30:32 +02:00
|
|
|
NULL, /* pSelectFont */
|
|
|
|
NULL, /* pSelectPen */
|
2021-08-16 10:28:29 +02:00
|
|
|
NULL, /* pSetBkColor */
|
2012-04-25 12:26:44 +02:00
|
|
|
MFDRV_SetBoundsRect, /* pSetBoundsRect */
|
2011-03-10 20:22:22 +01:00
|
|
|
MFDRV_SetDCBrushColor, /* pSetDCBrushColor*/
|
|
|
|
MFDRV_SetDCPenColor, /* pSetDCPenColor*/
|
2021-08-13 12:09:03 +02:00
|
|
|
NULL, /* pSetDIBitsToDevice */
|
1996-10-23 18:59:13 +02:00
|
|
|
NULL, /* pSetDeviceClipping */
|
2001-03-20 02:55:18 +01:00
|
|
|
NULL, /* pSetDeviceGammaRamp */
|
2021-07-23 10:51:16 +02:00
|
|
|
NULL, /* pSetPixel */
|
2021-08-16 10:28:42 +02:00
|
|
|
NULL, /* pSetTextColor */
|
1999-05-17 18:20:51 +02:00
|
|
|
NULL, /* pStartDoc */
|
|
|
|
NULL, /* pStartPage */
|
2021-08-12 12:00:13 +02:00
|
|
|
NULL, /* pStretchBlt */
|
2021-08-13 12:09:16 +02:00
|
|
|
NULL, /* pStretchDIBits */
|
1999-12-06 00:54:02 +01:00
|
|
|
MFDRV_StrokeAndFillPath, /* pStrokeAndFillPath */
|
|
|
|
MFDRV_StrokePath, /* pStrokePath */
|
2006-11-17 14:38:11 +01:00
|
|
|
NULL, /* pUnrealizePalette */
|
2012-05-08 12:16:05 +02:00
|
|
|
MFDRV_WidenPath, /* pWidenPath */
|
2019-10-22 10:38:56 +02:00
|
|
|
NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */
|
|
|
|
NULL, /* pD3DKMTSetVidPnSourceOwner */
|
2012-06-28 14:13:24 +02:00
|
|
|
NULL, /* wine_get_wgl_driver */
|
2018-02-26 19:42:15 +01:00
|
|
|
NULL, /* wine_get_vulkan_driver */
|
2012-05-08 12:16:05 +02:00
|
|
|
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
1996-10-13 19:45:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* MFDRV_AllocMetaFile
|
|
|
|
*/
|
|
|
|
static DC *MFDRV_AllocMetaFile(void)
|
|
|
|
{
|
|
|
|
DC *dc;
|
2021-08-17 11:37:53 +02:00
|
|
|
struct metadc *physDev;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2021-07-08 17:11:45 +02:00
|
|
|
if (!(dc = alloc_dc_ptr( NTGDI_OBJ_METADC ))) return NULL;
|
1996-10-13 19:45:47 +02:00
|
|
|
|
2005-03-24 22:01:35 +01:00
|
|
|
physDev = HeapAlloc(GetProcessHeap(),0,sizeof(*physDev));
|
1996-10-13 19:45:47 +02:00
|
|
|
if (!physDev)
|
|
|
|
{
|
2007-09-26 17:39:25 +02:00
|
|
|
free_dc_ptr( dc );
|
1996-10-13 19:45:47 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
2000-02-16 23:47:24 +01:00
|
|
|
if (!(physDev->mh = HeapAlloc( GetProcessHeap(), 0, sizeof(*physDev->mh) )))
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
2000-02-16 23:47:24 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, physDev );
|
2007-09-26 17:39:25 +02:00
|
|
|
free_dc_ptr( dc );
|
1996-10-13 19:45:47 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-09-07 14:39:46 +02:00
|
|
|
push_dc_driver( &dc->physDev, &physDev->dev, &MFDRV_Funcs );
|
2021-07-17 17:00:55 +02:00
|
|
|
set_gdi_client_ptr( dc->hSelf, physDev );
|
2011-03-16 21:45:39 +01:00
|
|
|
|
2003-11-26 04:38:11 +01:00
|
|
|
physDev->handles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, HANDLE_LIST_INC * sizeof(physDev->handles[0]));
|
|
|
|
physDev->handles_size = HANDLE_LIST_INC;
|
|
|
|
physDev->cur_handles = 0;
|
|
|
|
|
1999-04-15 18:46:51 +02:00
|
|
|
physDev->hFile = 0;
|
1996-10-13 19:45:47 +02:00
|
|
|
|
|
|
|
physDev->mh->mtHeaderSize = sizeof(METAHEADER) / sizeof(WORD);
|
|
|
|
physDev->mh->mtVersion = 0x0300;
|
|
|
|
physDev->mh->mtSize = physDev->mh->mtHeaderSize;
|
|
|
|
physDev->mh->mtNoObjects = 0;
|
|
|
|
physDev->mh->mtMaxRecord = 0;
|
|
|
|
physDev->mh->mtNoParameters = 0;
|
|
|
|
|
2021-08-04 11:23:26 +02:00
|
|
|
NtGdiSetVirtualResolution( physDev->dev.hdc, 0, 0, 0, 0);
|
2009-06-23 15:55:32 +02:00
|
|
|
|
1996-10-13 19:45:47 +02:00
|
|
|
return dc;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-09-07 16:31:19 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* MFDRV_CreateCompatibleDC
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL MFDRV_CreateCompatibleDC( PHYSDEV orig, PHYSDEV *pdev )
|
2011-09-07 16:31:19 +02:00
|
|
|
{
|
|
|
|
/* not supported on metafile DCs */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-10-13 19:45:47 +02:00
|
|
|
/**********************************************************************
|
1999-04-15 18:46:51 +02:00
|
|
|
* MFDRV_DeleteDC
|
1996-10-13 19:45:47 +02:00
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL MFDRV_DeleteDC( PHYSDEV dev )
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
2021-08-17 11:37:53 +02:00
|
|
|
struct metadc *physDev = (struct metadc *)dev;
|
2003-11-26 04:38:11 +01:00
|
|
|
DWORD index;
|
2002-03-28 23:22:05 +01:00
|
|
|
|
2004-12-23 18:06:43 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, physDev->mh );
|
2003-11-26 04:38:11 +01:00
|
|
|
for(index = 0; index < physDev->handles_size; index++)
|
|
|
|
if(physDev->handles[index])
|
2011-04-04 12:27:02 +02:00
|
|
|
GDI_hdc_not_using_object(physDev->handles[index], dev->hdc);
|
2003-11-26 04:38:11 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, physDev->handles );
|
2000-02-16 23:47:24 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, physDev );
|
1996-10-13 19:45:47 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2002-08-16 02:42:06 +02:00
|
|
|
|
1996-10-13 19:45:47 +02:00
|
|
|
/**********************************************************************
|
2004-03-29 22:27:18 +02:00
|
|
|
* CreateMetaFileW (GDI32.@)
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
*
|
|
|
|
* Create a new DC and associate it with a metafile. Pass a filename
|
|
|
|
* to create a disk-based metafile, NULL to create a memory metafile.
|
|
|
|
*
|
2005-04-11 14:50:01 +02:00
|
|
|
* PARAMS
|
|
|
|
* filename [I] Filename of disk metafile
|
|
|
|
*
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
* RETURNS
|
|
|
|
* A handle to the metafile DC if successful, NULL on failure.
|
1996-10-13 19:45:47 +02:00
|
|
|
*/
|
2005-04-11 14:50:01 +02:00
|
|
|
HDC WINAPI CreateMetaFileW( LPCWSTR filename )
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
2000-08-19 23:38:55 +02:00
|
|
|
HDC ret;
|
1996-10-13 19:45:47 +02:00
|
|
|
DC *dc;
|
2021-08-17 11:37:53 +02:00
|
|
|
struct metadc *physDev;
|
2002-07-31 19:20:00 +02:00
|
|
|
HANDLE hFile;
|
1996-10-13 19:45:47 +02:00
|
|
|
|
2007-01-18 11:40:15 +01:00
|
|
|
TRACE("%s\n", debugstr_w(filename) );
|
1996-10-13 19:45:47 +02:00
|
|
|
|
|
|
|
if (!(dc = MFDRV_AllocMetaFile())) return 0;
|
2021-08-17 11:37:53 +02:00
|
|
|
physDev = (struct metadc *)dc->physDev;
|
2021-06-29 13:41:58 +02:00
|
|
|
physDev->mh->mtType = METAFILE_MEMORY;
|
2021-08-09 11:30:32 +02:00
|
|
|
physDev->pen = GetStockObject( BLACK_PEN );
|
|
|
|
physDev->brush = GetStockObject( WHITE_BRUSH );
|
|
|
|
physDev->font = GetStockObject( DEVICE_DEFAULT_FONT );
|
2002-06-01 01:06:46 +02:00
|
|
|
|
1996-10-13 19:45:47 +02:00
|
|
|
if (filename) /* disk based metafile */
|
|
|
|
{
|
2004-03-29 22:27:18 +02:00
|
|
|
if ((hFile = CreateFileW(filename, GENERIC_WRITE, 0, NULL,
|
2001-01-06 02:29:18 +01:00
|
|
|
CREATE_ALWAYS, 0, 0)) == INVALID_HANDLE_VALUE) {
|
2011-03-16 21:45:39 +01:00
|
|
|
free_dc_ptr( dc );
|
1996-10-13 19:45:47 +02:00
|
|
|
return 0;
|
|
|
|
}
|
1999-04-15 18:46:51 +02:00
|
|
|
physDev->hFile = hFile;
|
1996-10-13 19:45:47 +02:00
|
|
|
}
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2011-04-04 12:27:02 +02:00
|
|
|
TRACE("returning %p\n", physDev->dev.hdc);
|
|
|
|
ret = physDev->dev.hdc;
|
2007-09-26 17:39:25 +02:00
|
|
|
release_dc_ptr( dc );
|
2000-08-19 23:38:55 +02:00
|
|
|
return ret;
|
1996-10-13 19:45:47 +02:00
|
|
|
}
|
|
|
|
|
1998-12-10 16:49:22 +01:00
|
|
|
/**********************************************************************
|
2004-03-29 22:27:18 +02:00
|
|
|
* CreateMetaFileA (GDI32.@)
|
2005-11-05 11:45:02 +01:00
|
|
|
*
|
|
|
|
* See CreateMetaFileW.
|
1998-12-10 16:49:22 +01:00
|
|
|
*/
|
2004-03-29 22:27:18 +02:00
|
|
|
HDC WINAPI CreateMetaFileA(LPCSTR filename)
|
1998-12-10 16:49:22 +01:00
|
|
|
{
|
2004-03-29 22:27:18 +02:00
|
|
|
LPWSTR filenameW;
|
2002-01-01 01:24:30 +01:00
|
|
|
DWORD len;
|
1999-02-26 12:11:13 +01:00
|
|
|
HDC hReturnDC;
|
1998-12-10 16:49:22 +01:00
|
|
|
|
2004-03-29 22:27:18 +02:00
|
|
|
if (!filename) return CreateMetaFileW(NULL);
|
2003-06-24 04:34:42 +02:00
|
|
|
|
2004-03-29 22:27:18 +02:00
|
|
|
len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
|
|
|
|
filenameW = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
|
|
|
MultiByteToWideChar( CP_ACP, 0, filename, -1, filenameW, len );
|
1998-12-10 16:49:22 +01:00
|
|
|
|
2004-03-29 22:27:18 +02:00
|
|
|
hReturnDC = CreateMetaFileW(filenameW);
|
1998-12-10 16:49:22 +01:00
|
|
|
|
2004-03-29 22:27:18 +02:00
|
|
|
HeapFree( GetProcessHeap(), 0, filenameW );
|
1998-12-10 16:49:22 +01:00
|
|
|
|
|
|
|
return hReturnDC;
|
|
|
|
}
|
|
|
|
|
1999-04-15 18:46:51 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* MFDRV_CloseMetaFile
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
static DC *MFDRV_CloseMetaFile( HDC hdc )
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
|
|
|
DC *dc;
|
2021-08-17 11:37:53 +02:00
|
|
|
struct metadc *physDev;
|
2014-07-12 10:35:15 +02:00
|
|
|
DWORD bytes_written;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-11-22 23:16:53 +01:00
|
|
|
TRACE("(%p)\n", hdc );
|
1996-10-13 19:45:47 +02:00
|
|
|
|
2007-09-26 17:39:25 +02:00
|
|
|
if (!(dc = get_dc_ptr( hdc ))) return NULL;
|
2012-10-17 12:25:28 +02:00
|
|
|
if (GetObjectType( hdc ) != OBJ_METADC)
|
2007-08-21 21:37:40 +02:00
|
|
|
{
|
2007-09-26 17:39:25 +02:00
|
|
|
release_dc_ptr( dc );
|
2007-08-21 21:37:40 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
2007-08-31 15:58:38 +02:00
|
|
|
if (dc->refcount != 1)
|
|
|
|
{
|
2011-04-04 12:27:02 +02:00
|
|
|
FIXME( "not deleting busy DC %p refcount %u\n", hdc, dc->refcount );
|
2007-09-26 17:39:25 +02:00
|
|
|
release_dc_ptr( dc );
|
2007-08-31 15:58:38 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
2021-08-17 11:37:53 +02:00
|
|
|
physDev = (struct metadc *)dc->physDev;
|
1996-10-13 19:45:47 +02:00
|
|
|
|
|
|
|
/* Construct the end of metafile record - this is documented
|
|
|
|
* in SDK Knowledgebase Q99334.
|
|
|
|
*/
|
|
|
|
|
2021-08-17 11:38:06 +02:00
|
|
|
if (!metadc_param0( hdc, META_EOF ))
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
2011-03-16 21:45:39 +01:00
|
|
|
free_dc_ptr( dc );
|
1996-10-13 19:45:47 +02:00
|
|
|
return 0;
|
2002-06-01 01:06:46 +02:00
|
|
|
}
|
1996-10-13 19:45:47 +02:00
|
|
|
|
2021-06-29 13:41:58 +02:00
|
|
|
if (physDev->hFile) /* disk based metafile */
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
2021-06-29 13:41:41 +02:00
|
|
|
if (!WriteFile(physDev->hFile, physDev->mh, physDev->mh->mtSize * 2,
|
2014-07-12 10:35:15 +02:00
|
|
|
&bytes_written, NULL)) {
|
2011-03-16 21:45:39 +01:00
|
|
|
free_dc_ptr( dc );
|
1996-10-13 19:45:47 +02:00
|
|
|
return 0;
|
|
|
|
}
|
1999-04-15 18:46:51 +02:00
|
|
|
CloseHandle(physDev->hFile);
|
1996-10-13 19:45:47 +02:00
|
|
|
}
|
|
|
|
|
1998-03-29 21:44:57 +02:00
|
|
|
return dc;
|
|
|
|
}
|
|
|
|
|
1996-10-13 19:45:47 +02:00
|
|
|
/******************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CloseMetaFile (GDI32.@)
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
*
|
1998-03-29 21:44:57 +02:00
|
|
|
* Stop recording graphics operations in metafile associated with
|
|
|
|
* hdc and retrieve metafile.
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
*
|
2005-04-11 14:50:01 +02:00
|
|
|
* PARAMS
|
|
|
|
* hdc [I] Metafile DC to close
|
|
|
|
*
|
1998-03-29 21:44:57 +02:00
|
|
|
* RETURNS
|
|
|
|
* Handle of newly created metafile on success, NULL on failure.
|
|
|
|
*/
|
2005-04-11 14:50:01 +02:00
|
|
|
HMETAFILE WINAPI CloseMetaFile(HDC hdc)
|
1998-03-29 21:44:57 +02:00
|
|
|
{
|
1999-04-15 18:46:51 +02:00
|
|
|
HMETAFILE hmf;
|
2021-08-17 11:37:53 +02:00
|
|
|
struct metadc *physDev;
|
1999-04-15 18:46:51 +02:00
|
|
|
DC *dc = MFDRV_CloseMetaFile(hdc);
|
|
|
|
if (!dc) return 0;
|
2021-08-17 11:37:53 +02:00
|
|
|
physDev = (struct metadc *)dc->physDev;
|
1999-04-15 18:46:51 +02:00
|
|
|
|
|
|
|
/* Now allocate a global handle for the metafile */
|
|
|
|
|
|
|
|
hmf = MF_Create_HMETAFILE( physDev->mh );
|
|
|
|
|
|
|
|
physDev->mh = NULL; /* So it won't be deleted */
|
2011-03-16 21:45:39 +01:00
|
|
|
free_dc_ptr( dc );
|
1999-04-15 18:46:51 +02:00
|
|
|
return hmf;
|
1998-03-29 21:44:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
struct metadc *get_metadc_ptr( HDC hdc )
|
|
|
|
{
|
|
|
|
struct metadc *metafile = get_gdi_client_ptr( hdc, NTGDI_OBJ_METADC );
|
|
|
|
if (!metafile) SetLastError( ERROR_INVALID_HANDLE );
|
|
|
|
return metafile;
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL metadc_write_record( struct metadc *metadc, METARECORD *mr, unsigned int rlen )
|
1996-10-13 19:45:47 +02:00
|
|
|
{
|
2003-09-03 02:18:33 +02:00
|
|
|
DWORD len, size;
|
1999-04-15 18:46:51 +02:00
|
|
|
METAHEADER *mh;
|
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
len = metadc->mh->mtSize * sizeof(WORD) + rlen;
|
|
|
|
size = HeapSize( GetProcessHeap(), 0, metadc->mh );
|
2021-06-29 13:41:41 +02:00
|
|
|
if (len > size)
|
1999-04-15 18:46:51 +02:00
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
size += size / sizeof(WORD) + rlen;
|
|
|
|
mh = HeapReAlloc( GetProcessHeap(), 0, metadc->mh, size );
|
2021-06-29 13:41:41 +02:00
|
|
|
if (!mh) return FALSE;
|
2021-08-17 11:38:50 +02:00
|
|
|
metadc->mh = mh;
|
1999-04-15 18:46:51 +02:00
|
|
|
}
|
2021-08-17 11:38:50 +02:00
|
|
|
memcpy( (WORD *)metadc->mh + metadc->mh->mtSize, mr, rlen );
|
1999-04-15 18:46:51 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
metadc->mh->mtSize += rlen / sizeof(WORD);
|
|
|
|
metadc->mh->mtMaxRecord = max( metadc->mh->mtMaxRecord, rlen / sizeof(WORD) );
|
1999-04-15 18:46:51 +02:00
|
|
|
return TRUE;
|
1996-10-13 19:45:47 +02:00
|
|
|
}
|
Release 980201
Sun Feb 1 13:24:54 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [files/drive.c]
Added Device= parameter to drive configuration.
* [if1632/relay.c]
Throw() and Catch() now use the correct CATCHBUF layout (untested).
* [tools/build.c] [include/stackframe.h] [loader/task.c]
Moved 16-bit stack pointer into thread database.
Save current %fs while running 16-bit code.
Fri Jan 30 09:25:49 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c]
Made DPtoLP32 and LPtoDP32 respect world transforms.
* [graphics/path.c] [graphics/painting.c] [if1632/gdi.spec]
[include/path.h]
More path support.
* [include/gdi.h] [include/windows.h] [objects/dc.c]
[relay/gdi32.spec]
Support for Get/SetArcDirection and Get/SetWorldTransform
* [windows/hook.c]
Fixed a bug in HOOK_Map16To32Common.
Thu Jan 29 23:43:18 1998 Douglas Ridgway <ridgway@taiga.gmcl.com>
* [graphics/metafiledrv/init.c] [objects/metafile.c]
Documentation for metafile related API calls. Fixed a bug to avoid
documenting it.
* [include/windows.h]
Declaration for LoadImage.
Thu Jan 29 21:44:45 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [graphics/win16drv/*]
Changes to printing code to enable use of printer fonts with the
win3.1 postscript driver. Remember to add printer=on to [wine]
section of wine.conf . You will also need to disable truetype
fonts from control panel. Winword 6.0 and Write seem to be happy
with this...
* [include/bitmap.h]
Fix Widthbytes for 15bpp displays.
Tue Jan 27 20:54:08 1998 Kristian Nielsen <kristian.nielsen@risoe.dk>
* [tsx11/*] [include/ts*] [tools/make_X11wrappers]
Implemented thread-safe X11 wrappers.
Tue Jan 27 13:54:09 1998 Constantine Sapuntzakis <csapuntz@tma-1.lcs.mit.edu>
* [windows/queue.c]
Forgot to convert thdb to thread_id.
* [misc/registry.c]
Sped up Windows 95 registry reading. Changed code to traverse
registry as a tree rather than read in all possible keys
(including dead ones).
Tue Jan 27 12:46:09 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][Makefile.in][scheduler/thread.c]
[libtest/hello5.c]
Don't exit() on failed to load referenced dlls.
Fixed static tls allocation for multiple threads.
WINELIB should now be able to load PE dlls. A sample
winelib program, that dynamically loads a internal dll
is included.
* [graphics/ddraw.c][include/ddraw.h][include/d3d.h]
Cleaned up and enhanced further. Added several DirectX5
interface definitions and DirectSurface3 implementation.
Stubs for D3D (NOT coming soon, just there so it fails safely).
* [multimedia/dsound.c][include/dsound.h]
Actually works now for a lot of cases. Some DirectX5 stuff
added. Still lacking several features.
* [windows/dinput.c][include/dinput.h]
Started implementing DirectInput. Doesn't work yet, don't
know why.
* [if1632/thunk.c][misc/callbacks.c]
[win32/kernel.c][include/callbacks.h]
Added WOWCallback16Ex, WOWHandle32.
* [misc/cpu.c]
Fixed GetSystemInfo, IsProcessorFeaturePresent.
* [multimedia/joystick.c][multimedia/time.c]
Several fixes. Small hack to get timerevents in timeGetTime() loops.
Tue Jan 20 11:26:27 1998 Slaven Rezic <eserte@cs.tu-berlin.de>
* [configure.in]
Fixed check for union semun on FreeBSD systems.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [misc/ole2nls.c] [programs/progman/Sw.rc] [programs/winhelp/Sw.rc]
[resources/sysres_Sw.rc]
Added/updated Swedish language support.
Sun Jan 18 18:49:01 1998 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c] [misc/winsock_dns.c] [windows/event.c]
[windows/win.c] [windows/dce.c] [windows/winpos.c]
Bug fixes.
Sun Jan 18 12:45:23 1997 Andreas Mohr <100.30936@germany.net>
* [msdos/int25.c] [msdos/int26.c]
Implemented "native" absolute disk read/write access.
* [msdos/int13.c] [msdos/ioports.c]
Enhanced GET DRIVE PARAMETERS (int13 AH=08).
* [graphics/win16drv/prtdrv.c] [if1632/gdi.spec]
Fixed typos, implemented dmEnumDFonts,
Started implementation of dmRealizeObject.
* [if1632/compobj.spec] [ole/compobj.c] [relay32/ole32.spec]
Stubs CoCreateInstance, CoFreeUnusedLibraries, implemented
CoFileTimeNow.
* [if1632/kernel.spec] [include/windows.h] [memory/global.c]
[memory/string.c] [misc/kernel.c] [misc/Makefile.in]
[misc/toolhelp.c] [msdos/int21.c]
Implemented GlobalHandleNoRIP, GetFreeMemInfo, DebugFillBuffer,
stubs GetSetKernelDOSProc, DiagQuery, DiagOutput, ToolHelpHook
(Undocumented Windows).
* [if1632/user.spec] [if1632/win32s16.spec] [misc/win32s16.c]
Misc stubs.
* [if1632/winaspi.spec] [misc/aspi.c]
Implemented GetASPIDLLVersion.
* [if1632/wprocs.spec] [msdos/int20.c] [msdos/Makefile.in]
Added handler for Int 0x20 (terminate program, _very_ old-fashioned).
* [misc/w32scomb.c]
Implemented Get16DLLAddress() partially
(big thanks to Marcus and Alexandre).
* [relay32/Makefile.in] [relay32/builtin32.c] [relay32/dplay.spec]
Added built-in DPLAY.DLL.
* [relay32/winmm.spec] [multimedia/joystick.c]
Added joySetThreshold.
* [misc/windebug.c]
Added WinNotify.
* [win32/console.c]
Stubs CreateConsoleScreenBuffer, SetConsoleActiveScreenBuffer,
WriteConsoleOutput32A.
* [windows/user.c]
Stub SetEventHook.
Sat Jan 17 19:30:35 1998 Matthew Toseland <Paul.Toseland@btinternet.com>
* [windows/painting.c]
Fixed broken restore-to-maximized.
Mon Jan 12 21:25:32 1998 Perceval - Marc Huguet Puig <mhp@tinet.fut.es>
* [documentation/wine.man] [include/options.h]
[misc/main.c] [ole/ole2nls.c] [resources/sysres.c]
[resources/sysres_Ca.rc] [resources/Makefile.in]
Added language catalan. (Afegit l'idioma catal).
1998-02-01 19:33:27 +01:00
|
|
|
|
2021-07-22 11:25:17 +02:00
|
|
|
BOOL metadc_record( HDC hdc, METARECORD *mr, DWORD rlen )
|
|
|
|
{
|
2021-08-17 11:38:06 +02:00
|
|
|
struct metadc *metadc;
|
2021-07-22 11:25:17 +02:00
|
|
|
|
2021-08-17 11:38:06 +02:00
|
|
|
if (!(metadc = get_metadc_ptr( hdc ))) return FALSE;
|
|
|
|
return metadc_write_record( metadc, mr, rlen );
|
2021-07-22 11:25:17 +02:00
|
|
|
}
|
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
BOOL metadc_param0( HDC hdc, short func )
|
2021-07-26 23:30:20 +02:00
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
METARECORD mr;
|
2021-07-26 23:30:20 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
mr.rdSize = FIELD_OFFSET(METARECORD, rdParm[0]) / sizeof(WORD);
|
|
|
|
mr.rdFunction = func;
|
|
|
|
return metadc_record( hdc, &mr, mr.rdSize * sizeof(WORD) );
|
2021-07-26 23:30:20 +02:00
|
|
|
}
|
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
BOOL metadc_param1( HDC hdc, short func, short param )
|
2021-07-30 13:01:56 +02:00
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
METARECORD mr;
|
2021-07-30 13:01:56 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
mr.rdSize = sizeof(mr) / sizeof(WORD);
|
|
|
|
mr.rdFunction = func;
|
|
|
|
mr.rdParm[0] = param;
|
|
|
|
return metadc_record( hdc, &mr, mr.rdSize * sizeof(WORD) );
|
2021-07-30 13:01:56 +02:00
|
|
|
}
|
|
|
|
|
2021-07-17 17:00:55 +02:00
|
|
|
BOOL metadc_param2( HDC hdc, short func, short param1, short param2 )
|
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
char buffer[FIELD_OFFSET(METARECORD, rdParm[2])];
|
|
|
|
METARECORD *mr = (METARECORD *)&buffer;
|
2021-07-17 17:00:55 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
mr->rdSize = sizeof(buffer) / sizeof(WORD);
|
|
|
|
mr->rdFunction = func;
|
|
|
|
mr->rdParm[0] = param2;
|
|
|
|
mr->rdParm[1] = param1;
|
|
|
|
return metadc_record( hdc, mr, sizeof(buffer) );
|
2021-07-17 17:00:55 +02:00
|
|
|
}
|
2021-07-17 17:01:18 +02:00
|
|
|
|
2021-07-20 09:19:33 +02:00
|
|
|
BOOL metadc_param4( HDC hdc, short func, short param1, short param2,
|
|
|
|
short param3, short param4 )
|
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
char buffer[FIELD_OFFSET(METARECORD, rdParm[4])];
|
|
|
|
METARECORD *mr = (METARECORD *)&buffer;
|
2021-07-20 09:19:33 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
mr->rdSize = sizeof(buffer) / sizeof(WORD);
|
|
|
|
mr->rdFunction = func;
|
|
|
|
mr->rdParm[0] = param4;
|
|
|
|
mr->rdParm[1] = param3;
|
|
|
|
mr->rdParm[2] = param2;
|
|
|
|
mr->rdParm[3] = param1;
|
|
|
|
return metadc_record( hdc, mr, sizeof(buffer) );
|
2021-07-20 09:19:33 +02:00
|
|
|
}
|
|
|
|
|
2021-07-25 12:58:12 +02:00
|
|
|
BOOL metadc_param5( HDC hdc, short func, short param1, short param2,
|
|
|
|
short param3, short param4, short param5 )
|
|
|
|
{
|
|
|
|
char buffer[FIELD_OFFSET(METARECORD, rdParm[5])];
|
|
|
|
METARECORD *mr = (METARECORD *)&buffer;
|
|
|
|
|
|
|
|
mr->rdSize = sizeof(buffer) / sizeof(WORD);
|
|
|
|
mr->rdFunction = func;
|
|
|
|
mr->rdParm[0] = param5;
|
|
|
|
mr->rdParm[1] = param4;
|
|
|
|
mr->rdParm[2] = param3;
|
|
|
|
mr->rdParm[3] = param2;
|
|
|
|
mr->rdParm[4] = param1;
|
|
|
|
return metadc_record( hdc, mr, sizeof(buffer) );
|
|
|
|
}
|
|
|
|
|
2021-07-20 09:19:41 +02:00
|
|
|
BOOL metadc_param6( HDC hdc, short func, short param1, short param2,
|
|
|
|
short param3, short param4, short param5,
|
|
|
|
short param6 )
|
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
char buffer[FIELD_OFFSET(METARECORD, rdParm[6])];
|
|
|
|
METARECORD *mr = (METARECORD *)&buffer;
|
2021-07-20 09:19:41 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
mr->rdSize = sizeof(buffer) / sizeof(WORD);
|
|
|
|
mr->rdFunction = func;
|
|
|
|
mr->rdParm[0] = param6;
|
|
|
|
mr->rdParm[1] = param5;
|
|
|
|
mr->rdParm[2] = param4;
|
|
|
|
mr->rdParm[3] = param3;
|
|
|
|
mr->rdParm[4] = param2;
|
|
|
|
mr->rdParm[5] = param1;
|
|
|
|
return metadc_record( hdc, mr, sizeof(buffer) );
|
2021-07-20 09:19:41 +02:00
|
|
|
}
|
|
|
|
|
2021-07-17 17:01:18 +02:00
|
|
|
BOOL metadc_param8( HDC hdc, short func, short param1, short param2,
|
|
|
|
short param3, short param4, short param5,
|
|
|
|
short param6, short param7, short param8)
|
|
|
|
{
|
2021-08-17 11:38:50 +02:00
|
|
|
char buffer[FIELD_OFFSET(METARECORD, rdParm[8])];
|
|
|
|
METARECORD *mr = (METARECORD *)&buffer;
|
2021-07-17 17:01:18 +02:00
|
|
|
|
2021-08-17 11:38:50 +02:00
|
|
|
mr->rdSize = sizeof(buffer) / sizeof(WORD);
|
|
|
|
mr->rdFunction = func;
|
|
|
|
mr->rdParm[0] = param8;
|
|
|
|
mr->rdParm[1] = param7;
|
|
|
|
mr->rdParm[2] = param6;
|
|
|
|
mr->rdParm[3] = param5;
|
|
|
|
mr->rdParm[4] = param4;
|
|
|
|
mr->rdParm[5] = param3;
|
|
|
|
mr->rdParm[6] = param2;
|
|
|
|
mr->rdParm[7] = param1;
|
|
|
|
return metadc_record( hdc, mr, sizeof(buffer) );
|
2021-07-17 17:01:18 +02:00
|
|
|
}
|