| 1 | /*
 | 
|---|
| 2 |  * GDI32: public dc data definitions
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  *
 | 
|---|
| 5 |  * Copyright 1999      Daniela Engert (dani@ngrt.de)
 | 
|---|
| 6 |  *
 | 
|---|
| 7 |  *
 | 
|---|
| 8 |  * Project Odin Software License can be found in LICENSE.TXT
 | 
|---|
| 9 |  *
 | 
|---|
| 10 |  */
 | 
|---|
| 11 | #ifndef __DCDATA_H__
 | 
|---|
| 12 | #define __DCDATA_H__
 | 
|---|
| 13 | 
 | 
|---|
| 14 | //Flags for Reserved DWORD in DCData structure
 | 
|---|
| 15 | #define DC_FLAG_SEND_POSTSCRIPT_SETUP_STRING    1
 | 
|---|
| 16 | #define DC_FLAG_POLYGON_PRINTER_HACK            2
 | 
|---|
| 17 | 
 | 
|---|
| 18 | enum PS_Type { MICRO_CACHED, MICRO, NORMAL };
 | 
|---|
| 19 | enum HDC_Type{ TYPE_0, TYPE_1, TYPE_2, TYPE_3, TYPE_4 };
 | 
|---|
| 20 | 
 | 
|---|
| 21 | typedef struct _tagXFORM
 | 
|---|
| 22 | {
 | 
|---|
| 23 |     FLOAT eM11;
 | 
|---|
| 24 |     FLOAT eM12;
 | 
|---|
| 25 |     FLOAT eM21;
 | 
|---|
| 26 |     FLOAT eM22;
 | 
|---|
| 27 |     FLOAT eDx;
 | 
|---|
| 28 |     FLOAT eDy;
 | 
|---|
| 29 | } XFORM_W, *PXFORM_W, *LPXFORM_W;
 | 
|---|
| 30 | 
 | 
|---|
| 31 | #ifndef INCL_GPI
 | 
|---|
| 32 |    typedef struct _SIZEF
 | 
|---|
| 33 |    {
 | 
|---|
| 34 |       FIXED cx;
 | 
|---|
| 35 |       FIXED cy;
 | 
|---|
| 36 |    } SIZEF;
 | 
|---|
| 37 |    typedef SIZEF *PSIZEF;
 | 
|---|
| 38 | 
 | 
|---|
| 39 | #ifndef OS2DEF_INCLUDED
 | 
|---|
| 40 |    typedef struct _MATRIXLF
 | 
|---|
| 41 |    {
 | 
|---|
| 42 |       FIXED fxM11;
 | 
|---|
| 43 |       FIXED fxM12;
 | 
|---|
| 44 |       LONG  lM13;
 | 
|---|
| 45 |       FIXED fxM21;
 | 
|---|
| 46 |       FIXED fxM22;
 | 
|---|
| 47 |       LONG  lM23;
 | 
|---|
| 48 |       LONG  lM31;
 | 
|---|
| 49 |       LONG  lM32;
 | 
|---|
| 50 |       LONG  lM33;
 | 
|---|
| 51 |    } MATRIXLF;
 | 
|---|
| 52 |    typedef MATRIXLF *PMATRIXLF;
 | 
|---|
| 53 | 
 | 
|---|
| 54 |    typedef ULONG   HPS;
 | 
|---|
| 55 | #endif
 | 
|---|
| 56 | 
 | 
|---|
| 57 |    typedef struct _CHARBUNDLE
 | 
|---|
| 58 |    {
 | 
|---|
| 59 |       LONG      lColor;
 | 
|---|
| 60 |       LONG      lBackColor;
 | 
|---|
| 61 |       USHORT    usMixMode;
 | 
|---|
| 62 |       USHORT    usBackMixMode;
 | 
|---|
| 63 |       USHORT    usSet;
 | 
|---|
| 64 |       USHORT    usPrecision;
 | 
|---|
| 65 |       SIZEF     sizfxCell;
 | 
|---|
| 66 |       POINTL    ptlAngle;
 | 
|---|
| 67 |       POINTL    ptlShear;
 | 
|---|
| 68 |       USHORT    usDirection;
 | 
|---|
| 69 |       USHORT    usTextAlign;
 | 
|---|
| 70 |       FIXED     fxExtra;
 | 
|---|
| 71 |       FIXED     fxBreakExtra;
 | 
|---|
| 72 |    } CHARBUNDLE;
 | 
|---|
| 73 |    typedef CHARBUNDLE *PCHARBUNDLE;
 | 
|---|
| 74 | 
 | 
|---|
| 75 | #endif
 | 
|---|
| 76 | 
 | 
|---|
| 77 | #pragma pack(4)
 | 
|---|
| 78 | typedef struct _DCData
 | 
|---|
| 79 | {
 | 
|---|
| 80 |    HDC         hdc;
 | 
|---|
| 81 |    HWND        hwnd;
 | 
|---|
| 82 |    HPS         hps;
 | 
|---|
| 83 | 
 | 
|---|
| 84 |    UINT        lastBrushKey;
 | 
|---|
| 85 |    PVOID       lastBrushObject;
 | 
|---|
| 86 |    UINT        lastPenKey;
 | 
|---|
| 87 |    struct _penobject *lastPenObject;
 | 
|---|
| 88 |    UINT        lastFontKey;
 | 
|---|
| 89 |    PVOID       lastFontObject;
 | 
|---|
| 90 |    UINT        lastBitmapKey;
 | 
|---|
| 91 |    PVOID       lastBitmapObject;
 | 
|---|
| 92 |    UINT        lastPaletteKey;
 | 
|---|
| 93 |    PVOID       lastPaletteObject;
 | 
|---|
| 94 | 
 | 
|---|
| 95 |    UINT        nullBitmapHandle;
 | 
|---|
| 96 | 
 | 
|---|
| 97 |    COLORREF    BkColor;
 | 
|---|
| 98 |    COLORREF    TextColor;
 | 
|---|
| 99 |    ULONG       BkColor_PM;  
 | 
|---|
| 100 |    ULONG       TextColor_PM;
 | 
|---|
| 101 | 
 | 
|---|
| 102 |    int         BkMode;
 | 
|---|
| 103 |    ULONG       BkMode_PM;
 | 
|---|
| 104 | 
 | 
|---|
| 105 |    int         ROP2Mode;
 | 
|---|
| 106 |    int         ROP2Mode_PM;
 | 
|---|
| 107 | 
 | 
|---|
| 108 |    unsigned    isMemoryPS:1;
 | 
|---|
| 109 |    unsigned    isMetaPS:1;
 | 
|---|
| 110 |    unsigned    isPrinter:1;
 | 
|---|
| 111 |    unsigned    isFrameWindow:1;
 | 
|---|
| 112 |    unsigned    isOD_QUEUED:1;
 | 
|---|
| 113 |    unsigned    isOD_INFO:1;
 | 
|---|
| 114 |    unsigned    isClient:1;
 | 
|---|
| 115 |    unsigned    isClientArea:1;
 | 
|---|
| 116 |    unsigned    isLeftLeft:1;
 | 
|---|
| 117 |    unsigned    isTopTop:1;
 | 
|---|
| 118 |    unsigned    isWideLine:1;
 | 
|---|
| 119 |    unsigned    alignUpdateCP:1;
 | 
|---|
| 120 |    unsigned    isCacheable:1;
 | 
|---|
| 121 |    unsigned    penIsExtPen:1;
 | 
|---|
| 122 |    unsigned    isValid:1;
 | 
|---|
| 123 |    unsigned    inPath:1;
 | 
|---|
| 124 |    unsigned    isStartDoc:1;
 | 
|---|
| 125 |    unsigned    resetStockFonts:1;
 | 
|---|
| 126 | #ifdef CUSTOM_CURPOS
 | 
|---|
| 127 |    unsigned    curPosSet:1;
 | 
|---|
| 128 | #endif
 | 
|---|
| 129 |    unsigned    bAttrSet:1;
 | 
|---|
| 130 |    unsigned    bFirstSet:1;
 | 
|---|
| 131 |    unsigned    unused:11;
 | 
|---|
| 132 | 
 | 
|---|
| 133 |    ULONG       MapMode;
 | 
|---|
| 134 |    HBITMAP     bitmapHandle;
 | 
|---|
| 135 |    ULONG       bitmapHeight;
 | 
|---|
| 136 |    ULONG       bitmapWidth;
 | 
|---|
| 137 |    HMETAFILE   hMeta;
 | 
|---|
| 138 |    PVOID       pMetaFileObject;
 | 
|---|
| 139 |    int         polyFillMode;
 | 
|---|
| 140 |    int         arcDirection;
 | 
|---|
| 141 |    int         stretchBltMode;
 | 
|---|
| 142 |    int         graphicsMode;
 | 
|---|
| 143 |    HRGN        hrgnHDC;
 | 
|---|
| 144 | 
 | 
|---|
| 145 |    PS_Type     psType;
 | 
|---|
| 146 | 
 | 
|---|
| 147 |    HDC_Type    hdcType;
 | 
|---|
| 148 |    USHORT      usUnused;
 | 
|---|
| 149 |    POINTL      viewportOrg;
 | 
|---|
| 150 |    double      viewportXExt;
 | 
|---|
| 151 |    double      viewportYExt;
 | 
|---|
| 152 |    POINTL      windowOrg;
 | 
|---|
| 153 |    SIZEL       windowExt;
 | 
|---|
| 154 |    HRGN        hrgnWin32Clip;   //current Win32 clip region handle
 | 
|---|
| 155 | 
 | 
|---|
| 156 |    POINTL      ptlOrigin;
 | 
|---|
| 157 | 
 | 
|---|
| 158 |    ULONG       printPageHeight;
 | 
|---|
| 159 |    PVOID       printerObject;
 | 
|---|
| 160 | 
 | 
|---|
| 161 |    LONG        taMode;
 | 
|---|
| 162 |    XFORM_W     xform;
 | 
|---|
| 163 |    INT         worldYDeltaFor1Pixel;
 | 
|---|
| 164 |    INT         worldXDeltaFor1Pixel;
 | 
|---|
| 165 |    ULONG       colorMode;
 | 
|---|
| 166 |    PULONG      pLogColorTable;
 | 
|---|
| 167 | 
 | 
|---|
| 168 |    ULONG       lcidBitfield;
 | 
|---|
| 169 |    HWND        hwndRealize;
 | 
|---|
| 170 |    ULONG       cpeMap;
 | 
|---|
| 171 |    LONG        lTechnology;
 | 
|---|
| 172 |    LONG        lWndXExtSave, lWndYExtSave,
 | 
|---|
| 173 |                lVwpXExtSave, lVwpYExtSave;
 | 
|---|
| 174 |    int         height;
 | 
|---|
| 175 |    POINTL      brushOrgPoint;
 | 
|---|
| 176 |    PVOID       pEnhMetaPalette;
 | 
|---|
| 177 |    ABORTPROC   lpAbortProc;
 | 
|---|
| 178 |    ULONG       HPStoHDCInversionHeight;
 | 
|---|
| 179 |    int         saveLevel;
 | 
|---|
| 180 |    CHARBUNDLE  CBundle;
 | 
|---|
| 181 |    CHARBUNDLE  CSetBundle;
 | 
|---|
| 182 |    ULONG       ulCharMask;
 | 
|---|
| 183 |    ULONG       ulDefCharMask;
 | 
|---|
| 184 | #ifdef CUSTOM_CURPOS
 | 
|---|
| 185 |    POINTL      curPos;
 | 
|---|
| 186 | #endif
 | 
|---|
| 187 |    MATRIXLF    defView;
 | 
|---|
| 188 |    int         yInvert;
 | 
|---|
| 189 |    int         yInvert4Enable;
 | 
|---|
| 190 | 
 | 
|---|
| 191 |    ULONG       Reserved;
 | 
|---|
| 192 | 
 | 
|---|
| 193 |    HRGN        hrgnWinVis;      //current Win32 visible region handle
 | 
|---|
| 194 |    struct      _DCData *nextHPS_HDC;
 | 
|---|
| 195 | } tDCData, *pDCData;
 | 
|---|
| 196 | #pragma pack()
 | 
|---|
| 197 | 
 | 
|---|
| 198 | #endif //__DCDATA_H__
 | 
|---|