#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "gdi_private.h"
#include "mfdrv/metafiledrv.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (metafile) |
|
static BOOL | MFDRV_CreateCompatibleDC (PHYSDEV orig, PHYSDEV *pdev) |
|
static BOOL | MFDRV_DeleteDC (PHYSDEV dev) |
|
static INT | MFDRV_ExtEscape (PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data, INT cbOutput, LPVOID out_data) |
|
static UINT | MFDRV_GetBoundsRect (PHYSDEV dev, RECT *rect, UINT flags) |
|
static UINT | MFDRV_SetBoundsRect (PHYSDEV dev, RECT *rect, UINT flags) |
|
static INT | MFDRV_GetDeviceCaps (PHYSDEV dev, INT cap) |
|
static DC * | MFDRV_AllocMetaFile (void) |
|
HDC WINAPI | CreateMetaFileW (LPCWSTR filename) |
|
HDC WINAPI | CreateMetaFileA (LPCSTR filename) |
|
static DC * | MFDRV_CloseMetaFile (HDC hdc) |
|
HMETAFILE WINAPI | CloseMetaFile (HDC hdc) |
|
BOOL | MFDRV_WriteRecord (PHYSDEV dev, METARECORD *mr, DWORD rlen) |
|
BOOL | MFDRV_MetaParam0 (PHYSDEV dev, short func) |
|
BOOL | MFDRV_MetaParam1 (PHYSDEV dev, short func, short param1) |
|
BOOL | MFDRV_MetaParam2 (PHYSDEV dev, short func, short param1, short param2) |
|
BOOL | MFDRV_MetaParam4 (PHYSDEV dev, short func, short param1, short param2, short param3, short param4) |
|
BOOL | MFDRV_MetaParam6 (PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6) |
|
BOOL | MFDRV_MetaParam8 (PHYSDEV dev, short func, short param1, short param2, short param3, short param4, short param5, short param6, short param7, short param8) |
|
◆ CloseMetaFile()
Definition at line 452 of file init.c.
453{
454 HMETAFILE hmf;
459
460
461
463
466 return hmf;
467}
HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh) DECLSPEC_HIDDEN
void free_dc_ptr(DC *dc) DECLSPEC_HIDDEN
static DC * MFDRV_CloseMetaFile(HDC hdc)
◆ CreateMetaFileA()
Definition at line 365 of file init.c.
366{
370
372
376
378
380
381 return hReturnDC;
382}
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static const WCHAR filenameW[]
HDC WINAPI CreateMetaFileW(LPCWSTR filename)
◆ CreateMetaFileW()
Definition at line 319 of file init.c.
320{
326
328
331
333 {
338 return 0;
339 }
341 &bytes_written,
NULL )) {
344 return 0;
345 }
347
348
350 }
351 else
353
354 TRACE(
"returning %p\n", physDev->
dev.hdc);
358}
#define INVALID_HANDLE_VALUE
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
METAHEADER * MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCVOID filename, BOOL unicode) DECLSPEC_HIDDEN
void release_dc_ptr(DC *dc) DECLSPEC_HIDDEN
static DC * MFDRV_AllocMetaFile(void)
Referenced by CreateMetaFileA().
◆ MFDRV_AllocMetaFile()
static DC * MFDRV_AllocMetaFile |
( |
void |
| ) |
|
|
static |
Definition at line 238 of file init.c.
239{
242
244
246 if (!physDev)
247 {
250 }
252 {
256 }
257
259
263
265
272
274
276}
BOOL WINAPI SetVirtualResolution(HDC hdc, DWORD horz_res, DWORD vert_res, DWORD horz_size, DWORD vert_size)
DC * alloc_dc_ptr(WORD magic) DECLSPEC_HIDDEN
static const struct gdi_dc_funcs MFDRV_Funcs
struct tagMETAHEADER METAHEADER
Referenced by CreateMetaFileW().
◆ MFDRV_CloseMetaFile()
static DC * MFDRV_CloseMetaFile |
( |
HDC |
hdc | ) |
|
|
static |
Definition at line 388 of file init.c.
389{
393
395
398 {
401 }
402 if (
dc->refcount != 1)
403 {
404 FIXME(
"not deleting busy DC %p refcount %u\n",
hdc,
dc->refcount );
407 }
409
410
411
412
413
415 {
417 return 0;
418 }
419
421 {
424 return 0;
425 }
426
429 &bytes_written,
NULL)) {
431 return 0;
432 }
435 }
436
438}
static POBJECT_TYPE GetObjectType(IN PCWSTR TypeName)
DC * get_dc_ptr(HDC hdc) DECLSPEC_HIDDEN
BOOL MFDRV_MetaParam0(PHYSDEV dev, short func)
Referenced by CloseMetaFile().
◆ MFDRV_CreateCompatibleDC()
◆ MFDRV_DeleteDC()
Definition at line 292 of file init.c.
293{
296
304}
void GDI_hdc_not_using_object(HGDIOBJ obj, HDC hdc) DECLSPEC_HIDDEN
◆ MFDRV_ExtEscape()
Definition at line 40 of file init.c.
42{
46
47 if (cbOutput) return 0;
48
49 len =
sizeof(*mr) +
sizeof(
WORD) + ((cbInput + 1) & ~1);
53 mr->rdParm[0] = nEscape;
54 mr->rdParm[1] = cbInput;
55 memcpy(&(mr->rdParm[2]), in_data, cbInput);
59}
#define memcpy(s1, s2, n)
BOOL MFDRV_WriteRecord(PHYSDEV dev, METARECORD *mr, DWORD rlen)
◆ MFDRV_GetBoundsRect()
◆ MFDRV_GetDeviceCaps()
Definition at line 85 of file init.c.
86{
88 {
92 return 0;
93 default:
94 TRACE(
" unsupported capability %d, will return 0\n",
cap );
95 }
96 return 0;
97}
◆ MFDRV_MetaParam0()
◆ MFDRV_MetaParam1()
Definition at line 532 of file init.c.
533{
537
542}
GLenum const GLfloat * params
Referenced by MFDRV_ExtSelectClipRgn(), MFDRV_InvertRgn(), MFDRV_PaintRgn(), MFDRV_RestoreDC(), MFDRV_SetBkMode(), MFDRV_SetMapMode(), MFDRV_SetPolyFillMode(), MFDRV_SetRelAbs(), MFDRV_SetROP2(), MFDRV_SetStretchBltMode(), and MFDRV_SetTextCharacterExtra().
◆ MFDRV_MetaParam2()
Definition at line 548 of file init.c.
Referenced by MFDRV_FillRgn(), MFDRV_LineTo(), MFDRV_MoveTo(), MFDRV_OffsetClipRgn(), MFDRV_OffsetViewportOrgEx(), MFDRV_OffsetWindowOrgEx(), MFDRV_SetBkColor(), MFDRV_SetMapperFlags(), MFDRV_SetTextAlign(), MFDRV_SetTextColor(), MFDRV_SetTextJustification(), MFDRV_SetViewportExtEx(), MFDRV_SetViewportOrgEx(), MFDRV_SetWindowExtEx(), and MFDRV_SetWindowOrgEx().
◆ MFDRV_MetaParam4()
◆ MFDRV_MetaParam6()
◆ MFDRV_MetaParam8()
◆ MFDRV_SetBoundsRect()
◆ MFDRV_WriteRecord()
Definition at line 475 of file init.c.
476{
480
482 {
485
488 {
489
492 if (!mh)
return FALSE;
494 TRACE(
"Reallocated metafile: new size is %d\n",
size);
495 }
497 break;
499 TRACE(
"Writing record to disk\n");
502 break;
503 default:
504 ERR(
"Unknown metafile type %d\n", physDev->
mh->
mtType );
506 }
507
511}
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
Referenced by MFDRV_CreateBrushIndirect(), MFDRV_CreateFontIndirect(), MFDRV_CreatePalette(), MFDRV_CreatePenIndirect(), MFDRV_CreateRegion(), MFDRV_DeleteObject(), MFDRV_ExtEscape(), MFDRV_MetaExtTextOut(), MFDRV_MetaParam0(), MFDRV_MetaParam1(), MFDRV_MetaParam2(), MFDRV_MetaParam4(), MFDRV_MetaParam6(), MFDRV_MetaParam8(), MFDRV_MetaPoly(), MFDRV_PolyPolygon(), MFDRV_RealizePalette(), MFDRV_SelectObject(), MFDRV_SetDIBitsToDevice(), MFDRV_StretchBlt(), and MFDRV_StretchDIBits().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
◆ MFDRV_Funcs