* Copyright David W. Metcalfe, 1994
*/
-#ifndef METAFILE_H
-#define METAFILE_H
+#ifndef __WINE_METAFILE_H
+#define __WINE_METAFILE_H
-#include "windows.h"
+#include "gdi.h"
+#include "windef.h"
+#include "wingdi.h"
+
+ /* GDI32 metafile object */
+typedef struct
+{
+ GDIOBJHDR header;
+ METAHEADER *mh;
+} METAFILEOBJ;
-#define MFHEADERSIZE (sizeof(METAHEADER))
-#define MFVERSION 0x300
#define META_EOF 0x0000
-HMETAFILE MF_WriteRecord(HMETAFILE hmf, METARECORD *mr, WORD rlen);
-int MF_AddHandle(HANDLETABLE *ht, WORD htlen, HANDLE hobj);
-int MF_AddHandleInternal(HANDLE hobj);
-BOOL MF_MetaParam0(DC *dc, short func);
-BOOL MF_MetaParam1(DC *dc, short func, short param1);
-BOOL MF_MetaParam2(DC *dc, short func, short param1, short param2);
-BOOL MF_MetaParam4(DC *dc, short func, short param1, short param2,
- short param3, short param4);
-BOOL MF_MetaParam6(DC *dc, short func, short param1, short param2,
- short param3, short param4, short param5, short param6);
-BOOL MF_MetaParam8(DC *dc, short func, short param1, short param2,
- short param3, short param4, short param5,
- short param6, short param7, short param8);
-BOOL MF_CreateBrushIndirect(DC *dc, HBRUSH hBrush, LOGBRUSH16 *logbrush);
-BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH16 *logbrush);
-BOOL MF_CreatePenIndirect(DC *dc, HPEN16 hPen, LOGPEN16 *logpen);
-BOOL MF_CreateFontIndirect(DC *dc, HFONT hFont, LOGFONT16 *logfont);
-BOOL MF_TextOut(DC *dc, short x, short y, LPCSTR str, short count);
-BOOL MF_MetaPoly(DC *dc, short func, LPPOINT16 pt, short count);
-BOOL MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
- short height, HDC hdcSrc, short xSrc, short ySrc, DWORD rop);
-BOOL MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
- short heightDest, HDC hdcSrc, short xSrc, short ySrc,
- short widthSrc, short heightSrc, DWORD rop);
-
-#endif /* METAFILE_H */
+/* values of mtType in METAHEADER. Note however that the disk image of a disk
+ based metafile has mtType == 1 */
+#define METAFILE_MEMORY 1
+#define METAFILE_DISK 2
+
+extern HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh);
+extern HMETAFILE16 MF_Create_HMETAFILE16(METAHEADER *mh);
+extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCSTR filename);
+
+#endif /* __WINE_METAFILE_H */