typedef struct tagWINEDC
{
HDC hdc;
+ struct gdi_physdev NullPhysDev;
PHYSDEV physDev; /* current top of the physdev stack */
LONG refcount; /* thread refcount */
INT saveLevel;
- struct gdi_physdev NullPhysDev;
HFONT hFont;
HBRUSH hBrush;
HPEN hPen;
HPALETTE hPalette;
} WINEDC, DC;
+WINEDC* get_physdev_dc( PHYSDEV dev );
+
/* brush.c */
extern BOOL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void **bits, UINT *usage ) DECLSPEC_HIDDEN;
extern HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh) DECLSPEC_HIDDEN;
extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCVOID filename, BOOL unicode ) DECLSPEC_HIDDEN;
+/* Format of comment record added by GetWinMetaFileBits */
+#include <pshpack2.h>
+typedef struct
+{
+ DWORD magic; /* WMFC */
+ WORD unk04; /* 1 */
+ WORD unk06; /* 0 */
+ WORD unk08; /* 0 */
+ WORD unk0a; /* 1 */
+ WORD checksum;
+ DWORD unk0e; /* 0 */
+ DWORD num_chunks;
+ DWORD chunk_size;
+ DWORD remaining_size;
+ DWORD emf_size;
+ BYTE emf_data[1];
+} emf_in_wmf_comment;
+#include <poppack.h>
+
+#define WMFC_MAGIC 0x43464d57
/* palette.c */
extern HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg) DECLSPEC_HIDDEN;
extern UINT WINAPI GDIRealizePalette( HDC hdc ) DECLSPEC_HIDDEN;
#define EMR_SETLINKEDUFI 119
+#define GET_DC_PHYSDEV(dc,func) \
+ get_physdev_entry_point( (dc)->physDev, FIELD_OFFSET(struct gdi_dc_funcs,func))
+
+static inline PHYSDEV pop_dc_driver( DC *dc, const struct gdi_dc_funcs *funcs )
+{
+ PHYSDEV dev, *pdev = &dc->physDev;
+ while (*pdev && (*pdev)->funcs != funcs) pdev = &(*pdev)->next;
+ if (!*pdev) return NULL;
+ dev = *pdev;
+ *pdev = dev->next;
+ return dev;
+}
+
+static inline PHYSDEV find_dc_driver( DC *dc, const struct gdi_dc_funcs *funcs )
+{
+ PHYSDEV dev;
+
+ for (dev = dc->physDev; dev; dev = dev->next) if (dev->funcs == funcs) return dev;
+ return NULL;
+}
+
/* Undocumented value for DIB's iUsage: Indicates a mono DIB w/o pal entries */
#define DIB_PAL_MONO 2
return FIELD_OFFSET( BITMAPINFO, bmiColors[info->bmiHeader.biClrUsed] );
}
+#define GdiWorldSpaceToDeviceSpace 0x204
+BOOL APIENTRY NtGdiGetTransform( _In_ HDC hdc, _In_ DWORD iXform, _Out_ LPXFORM pxf);
+
/* Special sauce for reactos */
#define GDIRealizePalette RealizePalette
#define GDISelectPalette SelectPalette
BOOL WINAPI SetWorldTransformForMetafile(HDC hdc, const XFORM *pxform);
#define SetWorldTransform SetWorldTransformForMetafile
+#ifdef _M_ARM
+#define DbgRaiseAssertionFailure() __emit(0xdefc)
+#else
+#define DbgRaiseAssertionFailure() __int2c()
+#endif // _M_ARM
+
#undef ASSERT
-#define ASSERT(x) if (!(x)) __int2c()
+#define ASSERT(x) if (!(x)) DbgRaiseAssertionFailure()
#endif /* __WINE_GDI_PRIVATE_H */