60#include "wine/winternl.h"
88 for (
i = 0;
i < htlen;
i++)
90 if (*(
ht->objectHandle +
i) == 0)
92 *(
ht->objectHandle +
i) = hobj;
142 if (!mh)
return FALSE;
183 WARN(
"Disk metafile had mtType = %04x\n", mh->
mtType);
199 TRACE(
"%s\n", lpFilename);
250 ERR(
"Not a disk based metafile\n");
257 WARN(
"Can't open file of disk based metafile\n");
293 if (!mh)
return NULL;
392 if (!mh)
return FALSE;
417 while (offset < mh->mtSize * 2)
420 TRACE(
"offset=%04x,size=%08x\n",
423 TRACE(
"Entry got size %d at offset %d, total mf length is %d\n",
430 TRACE(
"Got META_EOF so stopping\n");
445 if(*(
ht->objectHandle +
i) != 0)
476 TRACE(
"(%p,%p,%p,%lx)\n",
hdc, hmf, lpEnumFunc, lpData);
478 if (!mh)
return FALSE;
495 TRACE(
"Got META_EOF so stopping\n");
498 TRACE(
"Calling EnumFunc with record type %x\n",
516 if(*(
ht->objectHandle +
i) != 0)
555 *(
ht->objectHandle + mr->
rdParm[0]) = 0;
723 for (
i = 0;
i < mr->
rdParm[0];
i++) cnt32[
i] = counts[
i];
775 ERR(
"META_CREATEPATTERNBRUSH: Unknown pattern type %d\n",
850 FIXME(
"Filtering Escape(SETABORTPROC), possible virus?\n");
928 *(
ht->objectHandle + mr->
rdParm[0]));
933 *(
ht->objectHandle + mr->
rdParm[2]),
1010#define META_UNIMP(x) case x: \
1011FIXME("PlayMetaFileRecord:record type "#x" not implemented.\n"); \
1029 WARN(
"PlayMetaFileRecord: Unknown record type %x\n", mr->
rdFunction);
1054 if (
size & 1)
return 0;
1117 TRACE(
"returning size %d\n", mfSize);
1135 static const DWORD max_chunk_size = 0x2000;
1146 chunk->comment_type = 0x1;
1147 chunk->version = 0x00010000;
1148 chunk->checksum = 0;
1150 chunk->num_chunks = (
size + max_chunk_size - 1) / max_chunk_size;
1151 chunk->chunk_size = max_chunk_size;
1155 for(
i = 0;
i <
chunk->num_chunks;
i++)
1157 if(
i ==
chunk->num_chunks - 1)
1162 chunk_data +=
chunk->chunk_size;
1204 INT horz_res, vert_res, horz_size, vert_size;
1243 WARN(
"Unknown map mode %d\n", map_mode);
1259 INT map_mode,
HDC hdcRef)
1268 TRACE(
"(%p,%d,%p,%d,%p) rc=%s\n", hemf, cbBuffer, lpbBuffer,
1275 if(!
set_window(hdcmf, hemf, hdcRef, map_mode))
1284 if(
ret &&
ret == full_size && lpbBuffer)
1290 for(
i = 0;
i < full_size / 2;
i++)
1292 comment_rec->
rdParm[8] = ~checksum + 1;
1338 for(band = 0,
start = &(mr->
rdParm[11]); band < mr->rdParm[5];
1341 WARN(
"Delimiter not even.\n");
1348 WARN(
"End points outside record.\n");
1354 WARN(
"Mismatched delimiters.\n");
1391 +
sizeof(
UINT16) + (isrect ? 4 *
sizeof(
SHORT) : 0);
1401 sot += 4 *
sizeof(
SHORT);
1409 dxx = (
SHORT *)(sot+(((
s1+1)>>1)*2));
1415 WARN(
"Please report: ExtTextOut len=%d slen=%d rdSize=%d opt=%04x\n",
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static int bitmap_info_size(const BITMAPINFO *info, WORD coloruse)
#define ERROR_NOT_ENOUGH_MEMORY
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
STRING Escape(const STRING &str)
#define GDIRealizePalette
void * free_gdi_handle(HGDIOBJ handle) DECLSPEC_HIDDEN
void GDI_ReleaseObj(HGDIOBJ) DECLSPEC_HIDDEN
HGDIOBJ alloc_gdi_handle(void *obj, WORD type, const struct gdi_obj_funcs *funcs) DECLSPEC_HIDDEN
void * GDI_GetObjPtr(HGDIOBJ, WORD) DECLSPEC_HIDDEN
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLubyte GLubyte GLubyte GLubyte w
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const struct newhuff ht[]
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const unsigned char metafile[]
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
#define FIELD_OFFSET(t, f)
static EFI_HANDLE * handles
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
*nSize LPSTR _Inout_ LPDWORD nSize
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
#define ERROR_INVALID_DATA
int(CALLBACK * MFENUMPROC)(_In_ HDC hdc, _In_reads_(nObj) HANDLETABLE FAR *lpht, _In_ METARECORD FAR *lpMR, _In_ int nObj, _In_opt_ LPARAM param)
#define META_CREATEBRUSHINDIRECT
BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE)
#define META_DIBSTRETCHBLT
int WINAPI SetMapMode(_In_ HDC, _In_ int)
HBRUSH WINAPI CreateBrushIndirect(_In_ const LOGBRUSH *plb)
INT WINAPI SetRelAbs(HDC, INT)
#define META_SETTEXTCOLOR
UINT WINAPI GetEnhMetaFileBits(_In_ HENHMETAFILE hEMF, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPBYTE lpData)
BOOL WINAPI Chord(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom, _In_ INT xRadial1, _In_ INT yRadial1, _In_ INT xRadial2, _In_ INT yRadial2)
int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID *, _In_ CONST BITMAPINFO *, _In_ UINT)
#define META_SCALEVIEWPORTEXT
#define META_REALIZEPALETTE
BOOL WINAPI FloodFill(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF)
BOOL WINAPI Polyline(_In_ HDC hdc, _In_reads_(cpt) const POINT *apt, _In_ int cpt)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
BOOL WINAPI Ellipse(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
#define META_SETTEXTCHAREXTRA
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
struct tagMETAHEADER METAHEADER
#define META_CREATEFONTINDIRECT
BOOL WINAPI OffsetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA *)
#define META_ANIMATEPALETTE
#define META_SELECTPALETTE
HPEN WINAPI CreatePenIndirect(_In_ const LOGPEN *)
#define META_SETSTRETCHBLTMODE
#define META_EXCLUDECLIPRECT
#define META_SETPOLYFILLMODE
HMETAFILE WINAPI GetMetaFileW(_In_ LPCWSTR)
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define META_SELECTCLIPREGION
BOOL WINAPI FrameRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH, _In_ int, _In_ int)
BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
#define META_CREATEPENINDIRECT
#define META_SETPALENTRIES
UINT WINAPI SetTextAlign(_In_ HDC, _In_ UINT)
BOOL WINAPI TextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCSTR lpString, _In_ int c)
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI ExcludeClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
BOOL WINAPI InvertRgn(_In_ HDC, _In_ HRGN)
BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
UINT WINAPI GetWinMetaFileBits(_In_ HENHMETAFILE hemf, _In_ UINT cbData16, _Out_writes_bytes_opt_(cbData16) LPBYTE pData16, _In_ INT iMapMode, _In_ HDC hdcRef)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define GETPRINTINGOFFSET
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
int WINAPI SetTextCharacterExtra(_In_ HDC, _In_ int)
struct tagBITMAPINFO * LPBITMAPINFO
HMETAFILE WINAPI CloseMetaFile(_In_ HDC hdc)
#define META_SETTEXTALIGN
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
UINT WINAPI GetMetaFileBitsEx(_In_ HMETAFILE hMF, _In_ UINT cbBuffer, _Out_writes_bytes_opt_(cbBuffer) LPVOID lpData)
BOOL WINAPI EnumMetaFile(_In_ HDC, _In_ HMETAFILE, _In_ MFENUMPROC, _In_opt_ LPARAM)
#define META_EXTFLOODFILL
HDC WINAPI CreateMetaFileW(_In_opt_ LPCWSTR)
BOOL WINAPI SetTextJustification(_In_ HDC, _In_ int, _In_ int)
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
#define META_SCALEWINDOWEXT
BOOL WINAPI ExtTextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define META_SETWINDOWORG
#define META_DELETEOBJECT
BOOL WINAPI ScaleWindowExtEx(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _Out_opt_ LPSIZE)
#define META_CREATEPALETTE
#define META_SETWINDOWEXT
#define META_SELECTOBJECT
#define META_SETVIEWPORTEXT
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
BOOL WINAPI ScaleViewportExtEx(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _Out_opt_ LPSIZE)
BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
#define META_SETVIEWPORTORG
#define META_OFFSETCLIPRGN
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
#define META_SETTEXTJUSTIFICATION
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HMETAFILE WINAPI CopyMetaFileA(_In_ HMETAFILE hmfSrc, _In_opt_ LPCSTR pszFile)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
int WINAPI OffsetClipRgn(_In_ HDC, _In_ int, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
int WINAPI SetROP2(_In_ HDC, _In_ int)
UINT WINAPI GetEnhMetaFileHeader(_In_ HENHMETAFILE hemf, _In_ UINT nSize, _Out_writes_bytes_opt_(nSize) LPENHMETAHEADER lpEnhMetaHeader)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
BOOL WINAPI RoundRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI PaintRgn(_In_ HDC, _In_ HRGN)
#define META_OFFSETWINDOWORG
#define META_CREATEBITMAP
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)
#define META_CREATEREGION
BOOL WINAPI PolyPolygon(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const INT *asz, _In_ int csz)
#define META_SETMAPPERFLAGS
BOOL WINAPI SetRectRgn(_In_ HRGN, _In_ int, _In_ int, _In_ int, _In_ int)
#define META_OFFSETVIEWPORTORG
struct tagMETARECORD METARECORD
#define META_DIBCREATEPATTERNBRUSH
BOOL WINAPI ExtFloodFill(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF, _In_ UINT)
BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int)
int WINAPI SetStretchBltMode(_In_ HDC, _In_ int)
#define META_CREATEPATTERNBRUSH
#define META_INVERTREGION
int WINAPI SaveDC(_In_ HDC)
int WINAPI ExtSelectClipRgn(_In_ HDC, _In_opt_ HRGN, _In_ int)
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)
#define META_CREATEBITMAPINDIRECT
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
DWORD WINAPI SetMapperFlags(_In_ HDC, _In_ DWORD)
#define META_INTERSECTCLIPRECT
#define META_RESIZEPALETTE
BOOL WINAPI Pie(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)