#ifndef __DEVCTXT_H_INCLUDED #define __DEVCTXT_H_INCLUDED #include "wintype.h" #include "gfxtype.h" #include "gfxobj.h" #define DCTXT_SIG_WORD 0x78744344 /* "DCtx */ /* Raster operation codes */ #define R2_BLACK 1 #define R2_NOTMERGEPEN 2 #define R2_MASKNOTPEN 3 #define R2_NOTCOPYPEN 4 #define R2_MASKPENNOT 5 #define R2_NOT 6 #define R2_XORPEN 7 #define R2_NOTMASKPEN 8 #define R2_MASKPEN 9 #define R2_NOTXORPEN 10 #define R2_NOP 11 #define R2_MERGENOTPEN 12 #define R2_COPYPEN 13 #define R2_MERGEPENNOT 14 #define R2_MERGEPEN 15 #define R2_WHITE 16 typedef COLORREF (*DCtx_SetPixel)(PVOID privdata, INT32 x, INT32 y, COLORREF color, INT32 op); typedef struct tagDCFUNTABLE { DCtx_SetPixel set_pixel; /* sets a single pixel on the display */ } DCFUNTABLE; typedef const DCFUNTABLE *PDCFUNTABLE; typedef struct tagDCTXT { GFXOBJECT hdr; /* the header of all objects */ PDCFUNTABLE funcs; /* device context functions */ PVOID privdata; /* private data for the type of DC */ RECT cliprect; /* clipping rectangle */ POINT pos; /* current position */ UINT32 rop2; /* current raster operation */ COLORREF color; /* current drawing color (XXX replace with pens later) */ } DCTXT, *PDCTXT; extern COLORREF DC_SetPixel(PDCTXT pdctxt, INT32 x, INT32 y, COLORREF color); #endif /* __DEVCTXT_H_INCLUDED */