Annotation of mstools/h/wingdi.h, revision 1.1.1.1

1.1       root        1: /*++ BUILD Version: 0004    // Increment this if a change has global effects
                      2: 
                      3: Copyright (c) 1985-91, Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     wingdi.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     Procedure declarations, constant definitions and macros for the GDI
                     12:     component.
                     13: 
                     14: --*/
                     15: 
                     16: #ifndef _WINGDI_
                     17: #define _WINGDI_
                     18: 
                     19: #ifndef NOGDI
                     20: 
                     21: #ifndef NORASTEROPS
                     22: 
                     23: /* Binary raster ops */
                     24: #define R2_BLACK            1   /*  0       */
                     25: #define R2_NOTMERGEPEN      2   /* DPon     */
                     26: #define R2_MASKNOTPEN       3   /* DPna     */
                     27: #define R2_NOTCOPYPEN       4   /* PN       */
                     28: #define R2_MASKPENNOT       5   /* PDna     */
                     29: #define R2_NOT              6   /* Dn       */
                     30: #define R2_XORPEN           7   /* DPx      */
                     31: #define R2_NOTMASKPEN       8   /* DPan     */
                     32: #define R2_MASKPEN          9   /* DPa      */
                     33: #define R2_NOTXORPEN        10  /* DPxn     */
                     34: #define R2_NOP              11  /* D        */
                     35: #define R2_MERGENOTPEN      12  /* DPno     */
                     36: #define R2_COPYPEN          13  /* P        */
                     37: #define R2_MERGEPENNOT      14  /* PDno     */
                     38: #define R2_MERGEPEN         15  /* DPo      */
                     39: #define R2_WHITE            16  /*  1       */
                     40: #define R2_LAST             16
                     41: 
                     42: /*  Ternary raster operations */
                     43: #define SRCCOPY             (DWORD)0x00CC0020 /* dest = source                   */
                     44: #define SRCPAINT            (DWORD)0x00EE0086 /* dest = source OR dest           */
                     45: #define SRCAND              (DWORD)0x008800C6 /* dest = source AND dest          */
                     46: #define SRCINVERT           (DWORD)0x00660046 /* dest = source XOR dest          */
                     47: #define SRCERASE            (DWORD)0x00440328 /* dest = source AND (NOT dest )   */
                     48: #define NOTSRCCOPY          (DWORD)0x00330008 /* dest = (NOT source)             */
                     49: #define NOTSRCERASE         (DWORD)0x001100A6 /* dest = (NOT src) AND (NOT dest) */
                     50: #define MERGECOPY           (DWORD)0x00C000CA /* dest = (source AND pattern)     */
                     51: #define MERGEPAINT          (DWORD)0x00BB0226 /* dest = (NOT source) OR dest     */
                     52: #define PATCOPY             (DWORD)0x00F00021 /* dest = pattern                  */
                     53: #define PATPAINT            (DWORD)0x00FB0A09 /* dest = DPSnoo                   */
                     54: #define PATINVERT           (DWORD)0x005A0049 /* dest = pattern XOR dest         */
                     55: #define DSTINVERT           (DWORD)0x00550009 /* dest = (NOT dest)               */
                     56: #define BLACKNESS           (DWORD)0x00000042 /* dest = BLACK                    */
                     57: #define WHITENESS           (DWORD)0x00FF0062 /* dest = WHITE                    */
                     58: #endif /* NORASTEROPS */
                     59: 
                     60: #define GDI_ERROR (0xFFFFFFFFL)
                     61: 
                     62: /* Region Flags */
                     63: #define ERROR               0
                     64: #define NULLREGION          1
                     65: #define SIMPLEREGION        2
                     66: #define COMPLEXREGION       3
                     67: #define RGN_ERROR ERROR
                     68: 
                     69: /* CombineRgn() Styles */
                     70: #define RGN_AND             1
                     71: #define RGN_OR              2
                     72: #define RGN_XOR             3
                     73: #define RGN_DIFF            4
                     74: #define RGN_COPY            5
                     75: #define RGN_MIN             RGN_AND
                     76: #define RGN_MAX             RGN_COPY
                     77: 
                     78: /* StretchBlt() Modes */
                     79: #define BLACKONWHITE                 1
                     80: #define WHITEONBLACK                 2
                     81: #define COLORONCOLOR                 3
                     82: #define BLEND                        4
                     83: #define HALFTONE                     5
                     84: #define MAXSTRETCHBLTMODE            5
                     85: 
                     86: /* PolyFill() Modes */
                     87: #define ALTERNATE                    1
                     88: #define WINDING                      2
                     89: #define POLYFILL_LAST                2
                     90: 
                     91: /* Text Alignment Options */
                     92: #define TA_NOUPDATECP                0
                     93: #define TA_UPDATECP                  1
                     94: 
                     95: #define TA_LEFT                      0
                     96: #define TA_RIGHT                     2
                     97: #define TA_CENTER                    6
                     98: 
                     99: #define TA_TOP                       0
                    100: #define TA_BOTTOM                    8
                    101: #define TA_BASELINE                  24
                    102: #define TA_MASK       (TA_BASELINE+TA_CENTER+TA_UPDATECP)
                    103: 
                    104: #define ETO_GRAYED                   1
                    105: #define ETO_OPAQUE                   2
                    106: #define ETO_CLIPPED                  4
                    107: 
                    108: #define ASPECT_FILTERING             0x0001
                    109: 
                    110: #ifndef NOMETAFILE
                    111: 
                    112: /* Metafile Functions */
                    113: #define META_SETBKCOLOR              0x0201
                    114: #define META_SETBKMODE               0x0102
                    115: #define META_SETMAPMODE              0x0103
                    116: #define META_SETROP2                 0x0104
                    117: #define META_SETRELABS               0x0105
                    118: #define META_SETPOLYFILLMODE         0x0106
                    119: #define META_SETSTRETCHBLTMODE       0x0107
                    120: #define META_SETTEXTCHAREXTRA        0x0108
                    121: #define META_SETTEXTCOLOR            0x0209
                    122: #define META_SETTEXTJUSTIFICATION    0x020A
                    123: #define META_SETWINDOWORG            0x020B
                    124: #define META_SETWINDOWEXT            0x020C
                    125: #define META_SETVIEWPORTORG          0x020D
                    126: #define META_SETVIEWPORTEXT          0x020E
                    127: #define META_OFFSETWINDOWORG         0x020F
                    128: #define META_SCALEWINDOWEXT          0x0400
                    129: #define META_OFFSETVIEWPORTORG       0x0211
                    130: #define META_SCALEVIEWPORTEXT        0x0412
                    131: #define META_LINETO                  0x0213
                    132: #define META_MOVETO                  0x0214
                    133: #define META_EXCLUDECLIPRECT         0x0415
                    134: #define META_INTERSECTCLIPRECT       0x0416
                    135: #define META_ARC                     0x0817
                    136: #define META_ELLIPSE                 0x0418
                    137: #define META_FLOODFILL               0x0419
                    138: #define META_PIE                     0x081A
                    139: #define META_RECTANGLE               0x041B
                    140: #define META_ROUNDRECT               0x061C
                    141: #define META_PATBLT                  0x061D
                    142: #define META_SAVEDC                  0x001E
                    143: #define META_SETPIXEL                0x041F
                    144: #define META_OFFSETCLIPRGN           0x0220
                    145: #define META_TEXTOUT                 0x0521
                    146: #define META_BITBLT                  0x0922
                    147: #define META_STRETCHBLT              0x0B23
                    148: #define META_POLYGON                 0x0324
                    149: #define META_POLYLINE                0x0325
                    150: #define META_ESCAPE                  0x0626
                    151: #define META_RESTOREDC               0x0127
                    152: #define META_FILLREGION              0x0228
                    153: #define META_FRAMEREGION             0x0429
                    154: #define META_INVERTREGION            0x012A
                    155: #define META_PAINTREGION             0x012B
                    156: #define META_SELECTCLIPREGION        0x012C
                    157: #define META_SELECTOBJECT            0x012D
                    158: #define META_SETTEXTALIGN            0x012E
                    159: #define META_DRAWTEXT                0x062F
                    160: 
                    161: #define META_CHORD                   0x0830
                    162: #define META_SETMAPPERFLAGS          0x0231
                    163: #define META_EXTTEXTOUT              0x0a32
                    164: #define META_SETDIBTODEV             0x0d33
                    165: #define META_SELECTPALETTE           0x0234
                    166: #define META_REALIZEPALETTE          0x0035
                    167: #define META_ANIMATEPALETTE          0x0436
                    168: #define META_SETPALENTRIES           0x0037
                    169: #define META_POLYPOLYGON             0x0538
                    170: #define META_RESIZEPALETTE           0x0139
                    171: 
                    172: #define META_DIBBITBLT               0x0940
                    173: #define META_DIBSTRETCHBLT           0x0b41
                    174: #define META_DIBCREATEPATTERNBRUSH   0x0142
                    175: #define META_STRETCHDIB              0x0f43
                    176: 
                    177: #define META_DELETEOBJECT            0x01f0
                    178: 
                    179: #define META_CREATEPALETTE           0x00f7
                    180: #define META_CREATEBRUSH             0x00F8
                    181: #define META_CREATEPATTERNBRUSH      0x01F9
                    182: #define META_CREATEPENINDIRECT       0x02FA
                    183: #define META_CREATEFONTINDIRECT      0x02FB
                    184: #define META_CREATEBRUSHINDIRECT     0x02FC
                    185: #define META_CREATEBITMAPINDIRECT    0x02FD
                    186: #define META_CREATEBITMAP            0x06FE
                    187: #define META_CREATEREGION            0x06FF
                    188: 
                    189: #endif /* NOMETAFILE */
                    190: 
                    191: /* GDI Escapes */
                    192: #define NEWFRAME                     1
                    193: #define ABORTDOC                     2
                    194: #define NEXTBAND                     3
                    195: #define SETCOLORTABLE                4
                    196: #define GETCOLORTABLE                5
                    197: #define FLUSHOUTPUT                  6
                    198: #define DRAFTMODE                    7
                    199: #define QUERYESCSUPPORT              8
                    200: #define SETABORTPROC                 9
                    201: #define STARTDOC                     10
                    202: #define ENDDOC                       11
                    203: #define GETPHYSPAGESIZE              12
                    204: #define GETPRINTINGOFFSET            13
                    205: #define GETSCALINGFACTOR             14
                    206: #define MFCOMMENT                    15
                    207: #define GETPENWIDTH                  16
                    208: #define SETCOPYCOUNT                 17
                    209: #define SELECTPAPERSOURCE            18
                    210: #define DEVICEDATA                   19
                    211: #define PASSTHROUGH                  19
                    212: #define GETTECHNOLGY                 20
                    213: #define GETTECHNOLOGY                20
                    214: #define SETENDCAP                    21
                    215: #define SETLINEJOIN                  22
                    216: #define SETMITERLIMIT                23
                    217: #define BANDINFO                     24
                    218: #define DRAWPATTERNRECT              25
                    219: #define GETVECTORPENSIZE             26
                    220: #define GETVECTORBRUSHSIZE           27
                    221: #define ENABLEDUPLEX                 28
                    222: #define GETSETPAPERBINS              29
                    223: #define GETSETPRINTORIENT            30
                    224: #define ENUMPAPERBINS                31
                    225: #define SETDIBSCALING                32
                    226: #define EPSPRINTING                  33
                    227: #define ENUMPAPERMETRICS             34
                    228: #define GETSETPAPERMETRICS           35
                    229: #define POSTSCRIPT_DATA              37
                    230: #define POSTSCRIPT_IGNORE            38
                    231: #define GETEXTENDEDTEXTMETRICS       256
                    232: #define GETEXTENTTABLE               257
                    233: #define GETPAIRKERNTABLE             258
                    234: #define GETTRACKKERNTABLE            259
                    235: #define EXTTEXTOUT                   512
                    236: #define ENABLERELATIVEWIDTHS         768
                    237: #define ENABLEPAIRKERNING            769
                    238: #define SETKERNTRACK                 770
                    239: #define SETALLJUSTVALUES             771
                    240: #define SETCHARSET                   772
                    241: 
                    242: #define STRETCHBLT                   2048
                    243: #define BEGIN_PATH                   4096
                    244: #define CLIP_TO_PATH                 4097
                    245: #define END_PATH                     4098
                    246: #define EXT_DEVICE_CAPS              4099
                    247: #define RESTORE_CTM                  4100
                    248: #define SAVE_CTM                     4101
                    249: #define SET_ARC_DIRECTION            4102
                    250: #define SET_BACKGROUND_COLOR         4103
                    251: #define SET_POLY_MODE                4104
                    252: #define SET_SCREEN_ANGLE             4105
                    253: #define SET_SPREAD                   4106
                    254: #define TRANSFORM_CTM                4107
                    255: #define SET_CLIP_BOX                 4108
                    256: #define SET_BOUNDS                   4109
                    257: #define SET_MIRROR_MODE              4110
                    258: 
                    259: /* Spooler Error Codes */
                    260: #define SP_NOTREPORTED               0x4000
                    261: #define SP_ERROR                     (-1)
                    262: #define SP_APPABORT                  (-2)
                    263: #define SP_USERABORT                 (-3)
                    264: #define SP_OUTOFDISK                 (-4)
                    265: #define SP_OUTOFMEMORY               (-5)
                    266: 
                    267: #define PR_JOBSTATUS                 0x0000
                    268: 
                    269: /* Object Definitions for EnumObjects(), GetObjectType() */
                    270: #define OBJ_PEN             1
                    271: #define OBJ_BRUSH           2
                    272: #define OBJ_DC              3
                    273: #define OBJ_METADC          4
                    274: #define OBJ_PAL             5
                    275: #define OBJ_FONT            6
                    276: #define OBJ_BITMAP          7
                    277: #define OBJ_REGION          8
                    278: #define OBJ_METAFILE        9
                    279: #define OBJ_MEMDC           10
                    280: 
                    281: /* xform stuff */
                    282: #define MWT_IDENTITY        1
                    283: #define MWT_LEFTMULTIPLY    2
                    284: #define MWT_RIGHTMULTIPLY   3
                    285: 
                    286: #define MWT_MIN             MWT_IDENTITY
                    287: #define MWT_MAX             MWT_RIGHTMULTIPLY
                    288: 
                    289: #define _XFORM_
                    290: typedef struct  tagXFORM
                    291:   {
                    292:     FLOAT   eM11;
                    293:     FLOAT   eM12;
                    294:     FLOAT   eM21;
                    295:     FLOAT   eM22;
                    296:     FLOAT   eDx;
                    297:     FLOAT   eDy;
                    298:   } XFORM, *PXFORM, FAR *LPXFORM;
                    299: 
                    300: /* Bitmap Header Definition */
                    301: typedef struct tagBITMAP
                    302:   {
                    303:     LONG        bmType;
                    304:     LONG        bmWidth;
                    305:     LONG        bmHeight;
                    306:     LONG        bmWidthBytes;
                    307:     WORD        bmPlanes;
                    308:     WORD        bmBitsPixel;
                    309:     LPSTR       bmBits;
                    310:   } BITMAP, *PBITMAP, NEAR *NPBITMAP, FAR *LPBITMAP;
                    311: 
                    312: typedef struct tagRGBTRIPLE {
                    313:         BYTE    rgbtBlue;
                    314:         BYTE    rgbtGreen;
                    315:         BYTE    rgbtRed;
                    316: } RGBTRIPLE;
                    317: 
                    318: typedef struct tagRGBQUAD {
                    319:         BYTE    rgbBlue;
                    320:         BYTE    rgbGreen;
                    321:         BYTE    rgbRed;
                    322:         BYTE    rgbReserved;
                    323: } RGBQUAD;
                    324: 
                    325: /* structures for defining DIBs */
                    326: typedef struct tagBITMAPCOREHEADER {
                    327:         DWORD   bcSize;                 /* used to get to color table */
                    328:         WORD    bcWidth;
                    329:         WORD    bcHeight;
                    330:         WORD    bcPlanes;
                    331:         WORD    bcBitCount;
                    332: } BITMAPCOREHEADER, FAR *LPBITMAPCOREHEADER, *PBITMAPCOREHEADER;
                    333: 
                    334: 
                    335: typedef struct tagBITMAPINFOHEADER{
                    336:         DWORD      biSize;
                    337:         DWORD      biWidth;
                    338:         DWORD      biHeight;
                    339:         WORD       biPlanes;
                    340:         WORD       biBitCount;
                    341: 
                    342:         DWORD      biCompression;
                    343:         DWORD      biSizeImage;
                    344:         DWORD      biXPelsPerMeter;
                    345:         DWORD      biYPelsPerMeter;
                    346:         DWORD      biClrUsed;
                    347:         DWORD      biClrImportant;
                    348: } BITMAPINFOHEADER, FAR *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;
                    349: 
                    350: /* constants for the biCompression field */
                    351: #define BI_RGB      0L
                    352: #define BI_RLE8     1L
                    353: #define BI_RLE4     2L
                    354: 
                    355: typedef struct tagBITMAPINFO {
                    356:     BITMAPINFOHEADER    bmiHeader;
                    357:     RGBQUAD             bmiColors[1];
                    358: } BITMAPINFO, FAR *LPBITMAPINFO, *PBITMAPINFO;
                    359: 
                    360: typedef struct tagBITMAPCOREINFO {
                    361:     BITMAPCOREHEADER    bmciHeader;
                    362:     RGBTRIPLE           bmciColors[1];
                    363: } BITMAPCOREINFO, FAR *LPBITMAPCOREINFO, *PBITMAPCOREINFO;
                    364: 
                    365: #pragma pack(2)
                    366: typedef struct tagBITMAPFILEHEADER {
                    367:         WORD    bfType;
                    368:         DWORD   bfSize;
                    369:         WORD    bfReserved1;
                    370:         WORD    bfReserved2;
                    371:         DWORD   bfOffBits;
                    372: } BITMAPFILEHEADER, FAR *LPBITMAPFILEHEADER, *PBITMAPFILEHEADER;
                    373: #pragma pack()
                    374: 
                    375: #define MAKEPOINTS(l)       (*((POINTS FAR *)&(l)))
                    376: 
                    377: #ifndef NOMETAFILE
                    378: 
                    379: /* Clipboard Metafile Picture Structure */
                    380: typedef struct tagHANDLETABLE
                    381:   {
                    382:     HANDLE      objectHandle[1];
                    383:   } HANDLETABLE, *PHANDLETABLE, FAR *LPHANDLETABLE;
                    384: 
                    385: typedef struct tagMETARECORD
                    386:   {
                    387:     DWORD       rdSize;
                    388:     WORD        rdFunction;
                    389:     WORD        rdParm[1];
                    390:   } METARECORD, *PMETARECORD, FAR *LPMETARECORD;
                    391: 
                    392: typedef struct tagMETAFILEPICT
                    393:   {
                    394:     DWORD       mm;
                    395:     DWORD       xExt;
                    396:     DWORD       yExt;
                    397:     HANDLE      hMF;
                    398:   } METAFILEPICT, FAR *LPMETAFILEPICT;
                    399: 
                    400: typedef struct tagMETAHEADER
                    401: {
                    402:     WORD        mtType;
                    403:     WORD        mtHeaderSize;
                    404:     WORD        mtVersion;
                    405:     DWORD       mtSize;
                    406:     WORD        mtNoObjects;
                    407:     DWORD       mtMaxRecord;
                    408:     WORD        mtNoParameters;
                    409: } METAHEADER;
                    410: 
                    411: #endif /* NOMETAFILE */
                    412: 
                    413: #ifndef NOTEXTMETRIC
                    414: 
                    415: typedef struct tagTEXTMETRICA
                    416: {
                    417:     LONG        tmHeight;
                    418:     LONG        tmAscent;
                    419:     LONG        tmDescent;
                    420:     LONG        tmInternalLeading;
                    421:     LONG        tmExternalLeading;
                    422:     LONG        tmAveCharWidth;
                    423:     LONG        tmMaxCharWidth;
                    424:     LONG        tmWeight;
                    425:     LONG        tmOverhang;
                    426:     LONG        tmDigitizedAspectX;
                    427:     LONG        tmDigitizedAspectY;
                    428:     BYTE        tmFirstChar;
                    429:     BYTE        tmLastChar;
                    430:     BYTE        tmDefaultChar;
                    431:     BYTE        tmBreakChar;
                    432:     BYTE        tmItalic;
                    433:     BYTE        tmUnderlined;
                    434:     BYTE        tmStruckOut;
                    435:     BYTE        tmPitchAndFamily;
                    436:     BYTE        tmCharSet;
                    437: } TEXTMETRICA, *PTEXTMETRICA, NEAR *NPTEXTMETRICA, FAR *LPTEXTMETRICA;
                    438: typedef struct tagTEXTMETRICW
                    439: {
                    440:     LONG        tmHeight;
                    441:     LONG        tmAscent;
                    442:     LONG        tmDescent;
                    443:     LONG        tmInternalLeading;
                    444:     LONG        tmExternalLeading;
                    445:     LONG        tmAveCharWidth;
                    446:     LONG        tmMaxCharWidth;
                    447:     LONG        tmWeight;
                    448:     LONG        tmOverhang;
                    449:     LONG        tmDigitizedAspectX;
                    450:     LONG        tmDigitizedAspectY;
                    451:     WCHAR       tmFirstChar;
                    452:     WCHAR       tmLastChar;
                    453:     WCHAR       tmDefaultChar;
                    454:     WCHAR       tmBreakChar;
                    455:     BYTE        tmItalic;
                    456:     BYTE        tmUnderlined;
                    457:     BYTE        tmStruckOut;
                    458:     BYTE        tmPitchAndFamily;
                    459:     BYTE        tmCharSet;
                    460: } TEXTMETRICW, *PTEXTMETRICW, NEAR *NPTEXTMETRICW, FAR *LPTEXTMETRICW;
                    461: #ifdef UNICODE
                    462: #define TEXTMETRIC TEXTMETRICW
                    463: #define PTEXTMETRIC PTEXTMETRICW
                    464: #define NPTEXTMETRIC NPTEXTMETRICW
                    465: #define LPTEXTMETRIC LPTEXTMETRICW
                    466: #else
                    467: #define TEXTMETRIC TEXTMETRICA
                    468: #define PTEXTMETRIC PTEXTMETRICA
                    469: #define NPTEXTMETRIC NPTEXTMETRICA
                    470: #define LPTEXTMETRIC LPTEXTMETRICA
                    471: #endif // UNICODE
                    472: 
                    473: #endif /* NOTEXTMETRIC */
                    474: 
                    475: /* GDI Logical Objects: */
                    476: 
                    477: /* Pel Array */
                    478: typedef struct tagPELARRAY
                    479:   {
                    480:     LONG        paXCount;
                    481:     LONG        paYCount;
                    482:     LONG        paXExt;
                    483:     LONG        paYExt;
                    484:     BYTE        paRGBs;
                    485:   } PELARRAY, *PPELARRAY, NEAR *NPPELARRAY, FAR *LPPELARRAY;
                    486: 
                    487: /* Logical Brush (or Pattern) */
                    488: typedef struct tagLOGBRUSH
                    489:   {
                    490:     DWORD       lbStyle;
                    491:     DWORD       lbColor;
                    492:     LONG        lbHatch;
                    493:   } LOGBRUSH, *PLOGBRUSH, NEAR *NPLOGBRUSH, FAR *LPLOGBRUSH;
                    494: 
                    495: typedef LOGBRUSH            PATTERN;
                    496: typedef PATTERN             *PPATTERN;
                    497: typedef PATTERN NEAR        *NPPATTERN;
                    498: typedef PATTERN FAR         *LPPATTERN;
                    499: 
                    500: /* Logical Pen */
                    501: typedef struct tagLOGPEN
                    502:   {
                    503:     DWORD       lopnStyle;
                    504:     POINT       lopnWidth;
                    505:     DWORD       lopnColor;
                    506:   } LOGPEN, *PLOGPEN, NEAR *NPLOGPEN, FAR *LPLOGPEN;
                    507: 
                    508: typedef struct tagPALETTEENTRY {
                    509:     BYTE        peRed;
                    510:     BYTE        peGreen;
                    511:     BYTE        peBlue;
                    512:     BYTE        peFlags;
                    513: } PALETTEENTRY, *PPALETTEENTRY, FAR *LPPALETTEENTRY;
                    514: 
                    515: /* Logical Palette */
                    516: typedef struct tagLOGPALETTE {
                    517:     WORD        palVersion;
                    518:     WORD        palNumEntries;
                    519:     PALETTEENTRY        palPalEntry[1];
                    520: } LOGPALETTE, *PLOGPALETTE, NEAR *NPLOGPALETTE, FAR *LPLOGPALETTE;
                    521: 
                    522: 
                    523: /* Logical Font */
                    524: #define LF_FACESIZE         32
                    525: 
                    526: 
                    527: typedef struct tagLOGFONTA
                    528: {
                    529:     LONG      lfHeight;
                    530:     LONG      lfWidth;
                    531:     LONG      lfEscapement;
                    532:     LONG      lfOrientation;
                    533:     LONG      lfWeight;
                    534:     BYTE      lfItalic;
                    535:     BYTE      lfUnderline;
                    536:     BYTE      lfStrikeOut;
                    537:     BYTE      lfCharSet;
                    538:     BYTE      lfOutPrecision;
                    539:     BYTE      lfClipPrecision;
                    540:     BYTE      lfQuality;
                    541:     BYTE      lfPitchAndFamily;
                    542:     BYTE      lfFaceName[LF_FACESIZE];
                    543: } LOGFONTA, *PLOGFONTA, NEAR *NPLOGFONTA, FAR *LPLOGFONTA;
                    544: typedef struct tagLOGFONTW
                    545: {
                    546:     LONG      lfHeight;
                    547:     LONG      lfWidth;
                    548:     LONG      lfEscapement;
                    549:     LONG      lfOrientation;
                    550:     LONG      lfWeight;
                    551:     BYTE      lfItalic;
                    552:     BYTE      lfUnderline;
                    553:     BYTE      lfStrikeOut;
                    554:     BYTE      lfCharSet;
                    555:     BYTE      lfOutPrecision;
                    556:     BYTE      lfClipPrecision;
                    557:     BYTE      lfQuality;
                    558:     BYTE      lfPitchAndFamily;
                    559:     WCHAR     lfFaceName[LF_FACESIZE];
                    560: } LOGFONTW, *PLOGFONTW, NEAR *NPLOGFONTW, FAR *LPLOGFONTW;
                    561: #ifdef UNICODE
                    562: #define LOGFONT LOGFONTW
                    563: #define PLOGFONT PLOGFONTW
                    564: #define NPLOGFONT NPLOGFONTW
                    565: #define LPLOGFONT LPLOGFONTW
                    566: #else
                    567: #define LOGFONT LOGFONTA
                    568: #define PLOGFONT PLOGFONTA
                    569: #define NPLOGFONT NPLOGFONTA
                    570: #define LPLOGFONT LPLOGFONTA
                    571: #endif // UNICODE
                    572: 
                    573: 
                    574: #define OUT_DEFAULT_PRECIS      0
                    575: #define OUT_STRING_PRECIS       1
                    576: #define OUT_CHARACTER_PRECIS    2
                    577: #define OUT_STROKE_PRECIS       3
                    578: 
                    579: #define CLIP_DEFAULT_PRECIS     0
                    580: #define CLIP_CHARACTER_PRECIS   1
                    581: #define CLIP_STROKE_PRECIS      2
                    582: 
                    583: #define DEFAULT_QUALITY         0
                    584: #define DRAFT_QUALITY           1
                    585: #define PROOF_QUALITY           2
                    586: 
                    587: #define DEFAULT_PITCH           0
                    588: #define FIXED_PITCH             1
                    589: #define VARIABLE_PITCH          2
                    590: 
                    591: #define ANSI_CHARSET            0
                    592: #define SYMBOL_CHARSET          2
                    593: #define SHIFTJIS_CHARSET        128
                    594: #define OEM_CHARSET             255
                    595: 
                    596: /* Font Families */
                    597: #define FF_DONTCARE         (0<<4)  /* Don't care or don't know. */
                    598: #define FF_ROMAN            (1<<4)  /* Variable stroke width, serifed. */
                    599:                                     /* Times Roman, Century Schoolbook, etc. */
                    600: #define FF_SWISS            (2<<4)  /* Variable stroke width, sans-serifed. */
                    601:                                     /* Helvetica, Swiss, etc. */
                    602: #define FF_MODERN           (3<<4)  /* Constant stroke width, serifed or sans-serifed. */
                    603:                                     /* Pica, Elite, Courier, etc. */
                    604: #define FF_SCRIPT           (4<<4)  /* Cursive, etc. */
                    605: #define FF_DECORATIVE       (5<<4)  /* Old English, etc. */
                    606: 
                    607: /* Font Weights */
                    608: #define FW_DONTCARE         0
                    609: #define FW_THIN             100
                    610: #define FW_EXTRALIGHT       200
                    611: #define FW_LIGHT            300
                    612: #define FW_NORMAL           400
                    613: #define FW_MEDIUM           500
                    614: #define FW_SEMIBOLD         600
                    615: #define FW_BOLD             700
                    616: #define FW_EXTRABOLD        800
                    617: #define FW_HEAVY            900
                    618: 
                    619: #define FW_ULTRALIGHT       FW_EXTRALIGHT
                    620: #define FW_REGULAR          FW_NORMAL
                    621: #define FW_DEMIBOLD         FW_SEMIBOLD
                    622: #define FW_ULTRABOLD        FW_EXTRABOLD
                    623: #define FW_BLACK            FW_HEAVY
                    624: 
                    625: 
                    626: typedef struct tagCHARSET {
                    627:     DWORD   aflBlock[3];
                    628:     DWORD   flLang;
                    629: } CHARSET, *LPCHARSET;
                    630: 
                    631: typedef struct tagPANOSE {
                    632:     ULONG ulCulture;
                    633:     BYTE  bFamilyType;
                    634:     BYTE  bSerifStyle;
                    635:     BYTE  bWeight;
                    636:     BYTE  bProportion;
                    637:     BYTE  bContrast;
                    638:     BYTE  bStrokeVariation;
                    639:     BYTE  bArmStyle;
                    640:     BYTE  bLetterform;
                    641:     BYTE  bMidline;
                    642:     BYTE  bXHeight;
                    643: } PANOSE, *LPPANOSE;
                    644: 
                    645: #define PAN_ANY                         0   /* Any */
                    646: #define PAN_NO_FIT                      1   /* No Fit */
                    647: 
                    648: #define PAN_FAMILY_TEXT_DISPLAY         2   /* Text and Display */
                    649: #define PAN_FAMILY_SCRIPT               3   /* Script */
                    650: #define PAN_FAMILY_DECORATIVE           4   /* Decorative */
                    651: #define PAN_FAMILY_PICTORIAL            5   /* Pictorial */
                    652: 
                    653: #define PAN_SERIF_COVE                  2   /* Cove */
                    654: #define PAN_SERIF_OBTUSE_COVE           3   /* Obtuse Cove */
                    655: #define PAN_SERIF_SQUARE_COVE           4   /* Square Cove */
                    656: #define PAN_SERIF_OBTUSE_SQUARE_COVE    5   /* Obtuse Square Cove */
                    657: #define PAN_SERIF_SQUARE                6   /* Square */
                    658: #define PAN_SERIF_THIN                  7   /* Thin */
                    659: #define PAN_SERIF_BONE                  8   /* Bone */
                    660: #define PAN_SERIF_EXAGGERATED           9   /* Exaggerated */
                    661: #define PAN_SERIF_TRIANGLE             10   /* Triangle */
                    662: #define PAN_SERIF_NORMAL_SANS          11   /* Normal Sans */
                    663: #define PAN_SERIF_OBTUSE_SANS          12   /* Obtuse Sans */
                    664: #define PAN_SERIF_PERP_SANS            13   /* Prep Sans */
                    665: #define PAN_SERIF_FLARED               14   /* Flared */
                    666: #define PAN_SERIF_ROUNDED              15   /* Rounded */
                    667: 
                    668: #define PAN_WEIGHT_VERY_LIGHT           2   /* Very Light */
                    669: #define PAN_WEIGHT_LIGHT                3   /* Light */
                    670: #define PAN_WEIGHT_THIN                 4   /* Thin */
                    671: #define PAN_WEIGHT_BOOK                 5   /* Book */
                    672: #define PAN_WEIGHT_MEDIUM               6   /* Medium */
                    673: #define PAN_WEIGHT_DEMI                 7   /* Demi */
                    674: #define PAN_WEIGHT_BOLD                 8   /* Bold */
                    675: #define PAN_WEIGHT_HEAVY                9   /* Heavy */
                    676: #define PAN_WEIGHT_BLACK               10   /* Black */
                    677: #define PAN_WEIGHT_NORD                11   /* Nord */
                    678: 
                    679: #define PAN_PROP_OLD_STYLE              2   /* Old Style */
                    680: #define PAN_PROP_MODERN                 3   /* Modern */
                    681: #define PAN_PROP_EVEN_WIDTH             4   /* Even Width */
                    682: #define PAN_PROP_EXPANDED               5   /* Expanded */
                    683: #define PAN_PROP_CONDENSED              6   /* Condensed */
                    684: #define PAN_PROP_VERY_EXPANDED          7   /* Very Expanded */
                    685: #define PAN_PROP_VERY_CONDENSED         8   /* Very Condensed */
                    686: #define PAN_PROP_MONOSPACED             9   /* Monospaced */
                    687: 
                    688: #define PAN_CONTRAST_NONE               2   /* None */
                    689: #define PAN_CONTRAST_VERY_LOW           3   /* Very Low */
                    690: #define PAN_CONTRAST_LOW                4   /* Low */
                    691: #define PAN_CONTRAST_MEDIUM_LOW         5   /* Medium Low */
                    692: #define PAN_CONTRAST_MEDIUM             6   /* Medium */
                    693: #define PAN_CONTRAST_MEDIUM_HIGH        7   /* Mediim High */
                    694: #define PAN_CONTRAST_HIGH               8   /* High */
                    695: #define PAN_CONTRAST_VERY_HIGH          9   /* Very High */
                    696: 
                    697: #define PAN_STROKE_GRADUAL_DIAG         2   /* Gradual/Diagonal */
                    698: #define PAN_STROKE_GRADUAL_TRAN         3   /* Gradual/Transitional */
                    699: #define PAN_STROKE_GRADUAL_VERT         4   /* Gradual/Vertical */
                    700: #define PAN_STROKE_GRADUAL_HORZ         5   /* Gradual/Horizontal */
                    701: #define PAN_STROKE_RAPID_VERT           6   /* Rapid/Vertical */
                    702: #define PAN_STROKE_RAPID_HORZ           7   /* Rapid/Horizontal */
                    703: #define PAN_STROKE_INSTANT_VERT         8   /* Instant/Vertical */
                    704: 
                    705: #define PAN_STRAIGHT_ARMS_HORZ          2   /* Straight Arms/Horizontal */
                    706: #define PAN_STRAIGHT_ARMS_WEDGE         3   /* Straight Arms/Wedge */
                    707: #define PAN_STRAIGHT_ARMS_VERT          4   /* Straight Arms/Vertical */
                    708: #define PAN_STRAIGHT_ARMS_SINGLE_SERIF  5   /* Straight Arms/Single-Serif */
                    709: #define PAN_STRAIGHT_ARMS_DOUBLE_SERIF  6   /* Straight Arms/Double-Serif */
                    710: #define PAN_BENT_ARMS_HORZ              7   /* Non-Straight Arms/Horizontal */
                    711: #define PAN_BENT_ARMS_WEDGE             8   /* Non-Straight Arms/Wedge */
                    712: #define PAN_BENT_ARMS_VERT              9   /* Non-Straight Arms/Vertical */
                    713: #define PAN_BENT_ARMS_SINGLE_SERIF     10   /* Non-Straight Arms/Single-Serif */
                    714: #define PAN_BENT_ARMS_DOUBLE_SERIF     11   /* Non-Straight Arms/Double-Serif */
                    715: 
                    716: #define PAN_LETT_NORMAL_CONTACT         2   /* Normal/Contact */
                    717: #define PAN_LETT_NORMAL_WEIGHTED        3   /* Normal/Weighted */
                    718: #define PAN_LETT_NORMAL_BOXED           4   /* Normal/Boxed */
                    719: #define PAN_LETT_NORMAL_FLATTENED       5   /* Normal/Flattened */
                    720: #define PAN_LETT_NORMAL_ROUNDED         6   /* Normal/Rounded */
                    721: #define PAN_LETT_NORMAL_OFF_CENTER      7   /* Normal/Off Center */
                    722: #define PAN_LETT_NORMAL_SQUARE          8   /* Normal/Square */
                    723: #define PAN_LETT_OBLIQUE_CONTACT        9   /* Oblique/Contact */
                    724: #define PAN_LETT_OBLIQUE_WEIGHTED      10   /* Oblique/Weighted */
                    725: #define PAN_LETT_OBLIQUE_BOXED         11   /* Oblique/Boxed */
                    726: #define PAN_LETT_OBLIQUE_FLATTENED     12   /* Oblique/Flattened */
                    727: #define PAN_LETT_OBLIQUE_ROUNDED       13   /* Oblique/Rounded */
                    728: #define PAN_LETT_OBLIQUE_OFF_CENTER    14   /* Oblique/Off Center */
                    729: #define PAN_LETT_OBLIQUE_SQUARE        15   /* Oblique/Square */
                    730: 
                    731: #define PAN_MIDLINE_STANDARD_TRIMMED    2   /* Standard/Trimmed */
                    732: #define PAN_MIDLINE_STANDARD_POINTED    3   /* Standard/Pointed */
                    733: #define PAN_MIDLINE_STANDARD_SERIFED    4   /* Standard/Serifed */
                    734: #define PAN_MIDLINE_HIGH_TRIMMED        5   /* High/Trimmed */
                    735: #define PAN_MIDLINE_HIGH_POINTED        6   /* High/Pointed */
                    736: #define PAN_MIDLINE_HIGH_SERIFED        7   /* High/Serifed */
                    737: #define PAN_MIDLINE_CONSTANT_TRIMMED    8   /* Constant/Trimmed */
                    738: #define PAN_MIDLINE_CONSTANT_POINTED    9   /* Constant/Pointed */
                    739: #define PAN_MIDLINE_CONSTANT_SERIFED   10   /* Constant/Serifed */
                    740: #define PAN_MIDLINE_LOW_TRIMMED        11   /* Low/Trimmed */
                    741: #define PAN_MIDLINE_LOW_POINTED        12   /* Low/Pointed */
                    742: #define PAN_MIDLINE_LOW_SERIFED        13   /* Low/Serifed */
                    743: 
                    744: #define PAN_XHEIGHT_CONSTANT_SMALL      2   /* Constant/Small */
                    745: #define PAN_XHEIGHT_CONSTANT_STD        3   /* Constant/Standard */
                    746: #define PAN_XHEIGHT_CONSTANT_LARGE      4   /* Constant/Large */
                    747: #define PAN_XHEIGHT_DUCKING_SMALL       5   /* Ducking/Small */
                    748: #define PAN_XHEIGHT_DUCKING_STD         6   /* Ducking/Standard */
                    749: #define PAN_XHEIGHT_DUCKING_LARGE       7   /* Ducking/Large */
                    750: 
                    751: 
                    752: #define ELF_FAMILY_SIZE 32
                    753: 
                    754: /* The extended logical font */
                    755: 
                    756: typedef struct tagEXTLOGFONTA {
                    757:     LOGFONTA    elfLogFont;
                    758:     DWORD       elfSize;
                    759:     DWORD       elfTech;
                    760:     DWORD       elfXHeight;
                    761:     PANOSE      elfPanose;
                    762:     CHARSET     elfCharset;
                    763:     BYTE        elfFamily[ELF_FAMILY_SIZE];
                    764: } EXTLOGFONTA, *LPEXTLOGFONTA;
                    765: typedef struct tagEXTLOGFONTW {
                    766:     LOGFONTW    elfLogFont;
                    767:     DWORD       elfSize;
                    768:     DWORD       elfTech;
                    769:     DWORD       elfXHeight;
                    770:     PANOSE      elfPanose;
                    771:     CHARSET     elfCharset;
                    772:     WCHAR       elfFamily[ELF_FAMILY_SIZE];
                    773: } EXTLOGFONTW, *LPEXTLOGFONTW;
                    774: #ifdef UNICODE
                    775: #define EXTLOGFONT EXTLOGFONTW
                    776: #define LPEXTLOGFONT LPEXTLOGFONTW
                    777: #else
                    778: #define EXTLOGFONT EXTLOGFONTA
                    779: #define LPEXTLOGFONT LPEXTLOGFONTA
                    780: #endif // UNICODE
                    781: 
                    782: /* Allowed values for EXTLOGFONT::elfTech */
                    783: #define ELF_ANY             0
                    784: #define ELF_OUTLINE         1
                    785: #define ELF_BITMAP          2
                    786: #define ELF_STICK           3
                    787: 
                    788: /* complete set font attribute weights */
                    789: typedef struct tagFMWEIGHTSET {
                    790:     WORD wtFaceName;
                    791:     WORD wtFamilyName;
                    792:     WORD wtAvgWidth;
                    793:     WORD wtXHeight;
                    794:     WORD wtSize;
                    795:     WORD wtTech;
                    796:     WORD wtPanose;
                    797:     WORD wtPanFamily;
                    798:     WORD wtPanSerif;
                    799:     WORD wtPanWeight;
                    800:     WORD wtPanProp;
                    801:     WORD wtPanContrast;
                    802:     WORD wtPanStrokeVar;
                    803:     WORD wtPanArmStyle;
                    804:     WORD wtPanLetter;
                    805:     WORD wtPanMidline;
                    806:     WORD wtPanXHeight;
                    807:     WORD wtCharSet;
                    808: } FMWEIGHTSET, *LPFMWEIGHTSET;
                    809: 
                    810: /* the complete set of font attribute distances */
                    811: typedef struct tagFMDISTANCESET {
                    812:     WORD dFaceName;
                    813:     WORD dFamilyName;
                    814:     WORD dAvgWidth;
                    815:     WORD dXHeight;
                    816:     WORD dSize;
                    817:     WORD dTech;
                    818:     WORD dPanose;
                    819:     WORD dPanFamily;
                    820:     WORD dPanSerif;
                    821:     WORD dPanWeight;
                    822:     WORD dPanProp;
                    823:     WORD dPanContrast;
                    824:     WORD dPanStrokeVar;
                    825:     WORD dPanArmStyle;
                    826:     WORD dPanLetter;
                    827:     WORD dPanMidline;
                    828:     WORD dPanXHeight;
                    829:     WORD dCharSet;
                    830: } FMDISTANCESET, *LPFMDISTANCESET;
                    831: 
                    832: typedef struct tagFMCONTROLS {
                    833:     DWORD           size;
                    834:     DWORD           distsetSumMax;
                    835:     FMDISTANCESET   distsetMax;
                    836:     FMWEIGHTSET     wtsetNear;
                    837:     FMWEIGHTSET     wtsetFar;
                    838: } FMCONTROLS, *LPFMCONTROLS;
                    839: 
                    840: #define SIZEOFFMCONTROLS sizeof(FMCONTROLS)
                    841: 
                    842: typedef struct tagFMATCHA {
                    843:     DWORD           size;
                    844:     DWORD           type;
                    845:     DWORD           distsetSum;
                    846:     FMDISTANCESET   distset;
                    847:     EXTLOGFONTA     ExtLogFont;
                    848: } FMATCHA,*LPFMATCHA;
                    849: typedef struct tagFMATCHW {
                    850:     DWORD           size;
                    851:     DWORD           type;
                    852:     DWORD           distsetSum;
                    853:     FMDISTANCESET   distset;
                    854:     EXTLOGFONTW     ExtLogFont;
                    855: } FMATCHW,*LPFMATCHW;
                    856: #ifdef UNICODE
                    857: #define FMATCH FMATCHW
                    858: #define LPFMATCH LPFMATCHW
                    859: #else
                    860: #define FMATCH FMATCHA
                    861: #define LPFMATCH LPFMATCHA
                    862: #endif // UNICODE
                    863: 
                    864: /* Allowed values for FMATCH::wType */
                    865: #define FMATCH_EXACT    0
                    866: #define FMATCH_NEAR     1
                    867: #define FMATCH_FAR      2
                    868: 
                    869: 
                    870: 
                    871: /* EnumFonts Masks */
                    872: #define RASTER_FONTTYPE     0x0001
                    873: #define DEVICE_FONTTYPE     0X0002
                    874: 
                    875: #define RGB(r,g,b)          ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
                    876: #define PALETTERGB(r,g,b)   (0x02000000 | RGB(r,g,b))
                    877: #define PALETTEINDEX(i)     ((DWORD)(0x01000000 | (WORD)(i)))
                    878: 
                    879: /* palette entry flags */
                    880: 
                    881: #define PC_RESERVED     0x01    /* palette index used for animation */
                    882: #define PC_EXPLICIT     0x02    /* palette index is explicit to device */
                    883: #define PC_NOCOLLAPSE   0x04    /* do not match color to system palette */
                    884: 
                    885: #define GetRValue(rgb)      ((BYTE)(rgb))
                    886: #define GetGValue(rgb)      ((BYTE)(((WORD)(rgb)) >> 8))
                    887: #define GetBValue(rgb)      ((BYTE)((rgb)>>16))
                    888: 
                    889: /* Background Modes */
                    890: #define TRANSPARENT         1
                    891: #define OPAQUE              2
                    892: #define BKMODE_LAST         2
                    893: 
                    894: /* PolyDraw and GetPath point types */
                    895: #define PT_CLOSEFIGURE      0x01
                    896: #define PT_LINETO           0x02
                    897: #define PT_BEZIERTO         0x04
                    898: #define PT_MOVETO           0x06
                    899: 
                    900: /* Mapping Modes */
                    901: #define MM_TEXT             1
                    902: #define MM_LOMETRIC         2
                    903: #define MM_HIMETRIC         3
                    904: #define MM_LOENGLISH        4
                    905: #define MM_HIENGLISH        5
                    906: #define MM_TWIPS            6
                    907: 
                    908: #define MM_ISOTROPIC        7
                    909: #define MM_ANISOTROPIC     8
                    910: 
                    911: /*
                    912:    Current mapping occurs in 'logical' scale.  To
                    913:    use 'actual' scale, OR this to modes 2-6 above.
                    914: */
                    915: #define MM_REAL_UNITS      16
                    916: 
                    917: /* Min and Max Mapping Mode values */
                    918: #define MM_MIN              MM_TEXT
                    919: #define MM_MAX              MM_ANISOTROPIC
                    920: #define MM_MAX_FIXEDSCALE   MM_TWIPS
                    921: #define MM_REAL_MIN        (MM_REAL_UNITS | MM_LOMETRIC)
                    922: #define MM_REAL_MAX        (MM_REAL_UNITS | MM_TWIPS)
                    923: 
                    924: /* Coordinate Modes */
                    925: #define ABSOLUTE            1
                    926: #define RELATIVE            2
                    927: 
                    928: /* Stock Logical Objects */
                    929: #define WHITE_BRUSH         0
                    930: #define LTGRAY_BRUSH        1
                    931: #define GRAY_BRUSH          2
                    932: #define DKGRAY_BRUSH        3
                    933: #define BLACK_BRUSH         4
                    934: #define NULL_BRUSH          5
                    935: #define HOLLOW_BRUSH        NULL_BRUSH
                    936: #define WHITE_PEN           6
                    937: #define BLACK_PEN           7
                    938: #define NULL_PEN            8
                    939: #define OEM_FIXED_FONT      10
                    940: #define ANSI_FIXED_FONT     11
                    941: #define ANSI_VAR_FONT       12
                    942: #define SYSTEM_FONT         13
                    943: #define DEVICE_DEFAULT_FONT 14
                    944: #define DEFAULT_PALETTE     15
                    945: #define SYSTEM_FIXED_FONT   16
                    946: #define STOCK_LAST          16
                    947: 
                    948: #define CLR_INVALID     0x80000000
                    949: 
                    950: /* Brush Styles */
                    951: #define BS_SOLID            0
                    952: #define BS_NULL             1
                    953: #define BS_HOLLOW           BS_NULL
                    954: #define BS_HATCHED          2
                    955: #define BS_PATTERN          3
                    956: #define BS_INDEXED          4
                    957: #define BS_DIBPATTERN       5
                    958: 
                    959: /* Hatch Styles */
                    960: #define HS_HORIZONTAL       0       /* ----- */
                    961: #define HS_VERTICAL         1       /* ||||| */
                    962: #define HS_FDIAGONAL        2       /* \\\\\ */
                    963: #define HS_BDIAGONAL        3       /* ///// */
                    964: #define HS_CROSS            4       /* +++++ */
                    965: #define HS_DIAGCROSS        5       /* xxxxx */
                    966: #define HS_FDIAGONAL1       6
                    967: #define HS_BDIAGONAL1       7
                    968: #define HS_SOLID            8
                    969: #define HS_DENSE1           9
                    970: #define HS_DENSE2           10
                    971: #define HS_DENSE3           11
                    972: #define HS_DENSE4           12
                    973: #define HS_DENSE5           13
                    974: #define HS_DENSE6           14
                    975: #define HS_DENSE7           15
                    976: #define HS_DENSE8           16
                    977: #define HS_NOSHADE          17
                    978: #define HS_HALFTONE         18
                    979: #define HS_API_MAX          19
                    980: 
                    981: /* Pen Styles */
                    982: #define PS_SOLID            0
                    983: #define PS_DASH             1       /* -------  */
                    984: #define PS_DOT              2       /* .......  */
                    985: #define PS_DASHDOT          3       /* _._._._  */
                    986: #define PS_DASHDOTDOT       4       /* _.._.._  */
                    987: #define PS_NULL             5
                    988: #define PS_INSIDEFRAME      6
                    989: 
                    990: /* Device Parameters for GetDeviceCaps() */
                    991: #define DRIVERVERSION 0     /* Device driver version                    */
                    992: #define TECHNOLOGY    2     /* Device classification                    */
                    993: #define HORZSIZE      4     /* Horizontal size in millimeters           */
                    994: #define VERTSIZE      6     /* Vertical size in millimeters             */
                    995: #define HORZRES       8     /* Horizontal width in pixels               */
                    996: #define VERTRES       10    /* Vertical width in pixels                 */
                    997: #define BITSPIXEL     12    /* Number of bits per pixel                 */
                    998: #define PLANES        14    /* Number of planes                         */
                    999: #define NUMBRUSHES    16    /* Number of brushes the device has         */
                   1000: #define NUMPENS       18    /* Number of pens the device has            */
                   1001: #define NUMMARKERS    20    /* Number of markers the device has         */
                   1002: #define NUMFONTS      22    /* Number of fonts the device has           */
                   1003: #define NUMCOLORS     24    /* Number of colors the device supports     */
                   1004: #define PDEVICESIZE   26    /* Size required for device descriptor      */
                   1005: #define CURVECAPS     28    /* Curve capabilities                       */
                   1006: #define LINECAPS      30    /* Line capabilities                        */
                   1007: #define POLYGONALCAPS 32    /* Polygonal capabilities                   */
                   1008: #define TEXTCAPS      34    /* Text capabilities                        */
                   1009: #define CLIPCAPS      36    /* Clipping capabilities                    */
                   1010: #define RASTERCAPS    38    /* Bitblt capabilities                      */
                   1011: #define ASPECTX       40    /* Length of the X leg                      */
                   1012: #define ASPECTY       42    /* Length of the Y leg                      */
                   1013: #define ASPECTXY      44    /* Length of the hypotenuse                 */
                   1014: 
                   1015: #define LOGPIXELSX    88    /* Logical pixels/inch in X                 */
                   1016: #define LOGPIXELSY    90    /* Logical pixels/inch in Y                 */
                   1017: 
                   1018: #define SIZEPALETTE  104    /* Number of entries in physical palette   */
                   1019: #define NUMRESERVED  106    /* Number of reserved entries in palette    */
                   1020: #define COLORRES     108    /* Actual color resolution                  */
                   1021: 
                   1022: 
                   1023: // Printing related DeviceCaps. These replace the appropriate Escapes
                   1024: 
                   1025: #define PHYSICALWIDTH   110 // Physical Width in device units
                   1026: #define PHYSICALHEIGHT  111 // Physical Height in device units
                   1027: #define PHYSICALOFFSETX 112 // Physical Printable Area x margin
                   1028: #define PHYSICALOFFSETY 113 // Physical Printable Area y margin
                   1029: #define SCALINGFACTORX  114 // Scaling factor x
                   1030: #define SCALINGFACTORY  115 // Scaling factor y
                   1031: 
                   1032: #ifndef NOGDICAPMASKS
                   1033: 
                   1034: /* Device Capability Masks: */
                   1035: 
                   1036: /* Device Technologies */
                   1037: #define DT_PLOTTER          0   /* Vector plotter                   */
                   1038: #define DT_RASDISPLAY       1   /* Raster display                   */
                   1039: #define DT_RASPRINTER       2   /* Raster printer                   */
                   1040: #define DT_RASCAMERA        3   /* Raster camera                    */
                   1041: #define DT_CHARSTREAM       4   /* Character-stream, PLP            */
                   1042: #define DT_METAFILE         5   /* Metafile, VDM                    */
                   1043: #define DT_DISPFILE         6   /* Display-file                     */
                   1044: 
                   1045: /* Curve Capabilities */
                   1046: #define CC_NONE             0   /* Curves not supported             */
                   1047: #define CC_CIRCLES          1   /* Can do circles                   */
                   1048: #define CC_PIE              2   /* Can do pie wedges                */
                   1049: #define CC_CHORD            4   /* Can do chord arcs                */
                   1050: #define CC_ELLIPSES         8   /* Can do ellipese                  */
                   1051: #define CC_WIDE             16  /* Can do wide lines                */
                   1052: #define CC_STYLED           32  /* Can do styled lines              */
                   1053: #define CC_WIDESTYLED       64  /* Can do wide styled lines         */
                   1054: #define CC_INTERIORS        128 /* Can do interiors                 */
                   1055: 
                   1056: /* Line Capabilities */
                   1057: #define LC_NONE             0   /* Lines not supported              */
                   1058: #define LC_POLYLINE         2   /* Can do polylines                 */
                   1059: #define LC_MARKER           4   /* Can do markers                   */
                   1060: #define LC_POLYMARKER       8   /* Can do polymarkers               */
                   1061: #define LC_WIDE             16  /* Can do wide lines                */
                   1062: #define LC_STYLED           32  /* Can do styled lines              */
                   1063: #define LC_WIDESTYLED       64  /* Can do wide styled lines         */
                   1064: #define LC_INTERIORS        128 /* Can do interiors                 */
                   1065: 
                   1066: /* Polygonal Capabilities */
                   1067: #define PC_NONE             0   /* Polygonals not supported         */
                   1068: #define PC_POLYGON          1   /* Can do polygons                  */
                   1069: #define PC_RECTANGLE        2   /* Can do rectangles                */
                   1070: #define PC_WINDPOLYGON      4   /* Can do winding polygons          */
                   1071: #define PC_TRAPEZOID        4   /* Can do trapezoids                */
                   1072: #define PC_SCANLINE         8   /* Can do scanlines                 */
                   1073: #define PC_WIDE             16  /* Can do wide borders              */
                   1074: #define PC_STYLED           32  /* Can do styled borders            */
                   1075: #define PC_WIDESTYLED       64  /* Can do wide styled borders       */
                   1076: #define PC_INTERIORS        128 /* Can do interiors                 */
                   1077: 
                   1078: /* Polygonal Capabilities */
                   1079: #define CP_NONE             0   /* No clipping of output            */
                   1080: #define CP_RECTANGLE        1   /* Output clipped to rects          */
                   1081: 
                   1082: /* Text Capabilities */
                   1083: #define TC_OP_CHARACTER     0x0001  /* Can do OutputPrecision   CHARACTER      */
                   1084: #define TC_OP_STROKE        0x0002  /* Can do OutputPrecision   STROKE         */
                   1085: #define TC_CP_STROKE        0x0004  /* Can do ClipPrecision     STROKE         */
                   1086: #define TC_CR_90            0x0008  /* Can do CharRotAbility    90             */
                   1087: #define TC_CR_ANY           0x0010  /* Can do CharRotAbility    ANY            */
                   1088: #define TC_SF_X_YINDEP      0x0020  /* Can do ScaleFreedom      X_YINDEPENDENT */
                   1089: #define TC_SA_DOUBLE        0x0040  /* Can do ScaleAbility      DOUBLE         */
                   1090: #define TC_SA_INTEGER       0x0080  /* Can do ScaleAbility      INTEGER        */
                   1091: #define TC_SA_CONTIN        0x0100  /* Can do ScaleAbility      CONTINUOUS     */
                   1092: #define TC_EA_DOUBLE        0x0200  /* Can do EmboldenAbility   DOUBLE         */
                   1093: #define TC_IA_ABLE          0x0400  /* Can do ItalisizeAbility  ABLE           */
                   1094: #define TC_UA_ABLE          0x0800  /* Can do UnderlineAbility  ABLE           */
                   1095: #define TC_SO_ABLE          0x1000  /* Can do StrikeOutAbility  ABLE           */
                   1096: #define TC_RA_ABLE          0x2000  /* Can do RasterFontAble    ABLE           */
                   1097: #define TC_VA_ABLE          0x4000  /* Can do VectorFontAble    ABLE           */
                   1098: #define TC_RESERVED         0x8000
                   1099: 
                   1100: #endif /* NOGDICAPMASKS */
                   1101: 
                   1102: /* Raster Capabilities */
                   1103: #define RC_BITBLT           1       /* Can do standard BLT.             */
                   1104: #define RC_BANDING          2       /* Device requires banding support  */
                   1105: #define RC_SCALING          4       /* Device requires scaling support  */
                   1106: #define RC_BITMAP64         8       /* Device can support >64K bitmap   */
                   1107: #define RC_GDI20_OUTPUT     0x0010      /* has 2.0 output calls         */
                   1108: #define RC_DI_BITMAP        0x0080      /* supports DIB to memory       */
                   1109: #define RC_PALETTE          0x0100      /* supports a palette           */
                   1110: #define RC_DIBTODEV         0x0200      /* supports DIBitsToDevice      */
                   1111: #define RC_BIGFONT          0x0400      /* supports >64K fonts          */
                   1112: #define RC_STRETCHBLT       0x0800      /* supports StretchBlt          */
                   1113: #define RC_FLOODFILL        0x1000      /* supports FloodFill           */
                   1114: #define RC_STRETCHDIB       0x2000      /* supports StretchDIBits       */
                   1115: 
                   1116: /* DIB color table identifiers */
                   1117: 
                   1118: #define DIB_RGB_COLORS  0       /* color table in RGBTriples */
                   1119: #define DIB_PAL_COLORS  1       /* color table in palette indices */
                   1120: #define DIB_PAL_INDICES 2       /* no color table, the indices are in      */
                   1121:                                 /* the DC the bitmap will be selected into */
                   1122: 
                   1123: 
                   1124: /* constants for Get/SetSystemPaletteUse() */
                   1125: 
                   1126: #define SYSPAL_ERROR    0
                   1127: #define SYSPAL_STATIC   1
                   1128: #define SYSPAL_NOSTATIC 2
                   1129: 
                   1130: /* constants for CreateDIBitmap */
                   1131: #define CBM_INIT        0x04L   /* initialize bitmap */
                   1132: 
                   1133: #ifndef NODRAWTEXT
                   1134: 
                   1135: /* DrawText() Format Flags */
                   1136: #define DT_TOP              0x0000
                   1137: #define DT_LEFT             0x0000
                   1138: #define DT_CENTER           0x0001
                   1139: #define DT_RIGHT            0x0002
                   1140: #define DT_VCENTER          0x0004
                   1141: #define DT_BOTTOM           0x0008
                   1142: #define DT_WORDBREAK        0x0010
                   1143: #define DT_SINGLELINE       0x0020
                   1144: #define DT_EXPANDTABS       0x0040
                   1145: #define DT_TABSTOP          0x0080
                   1146: #define DT_NOCLIP           0x0100
                   1147: #define DT_EXTERNALLEADING  0x0200
                   1148: #define DT_CALCRECT         0x0400
                   1149: #define DT_NOPREFIX         0x0800
                   1150: #define DT_INTERNAL         0x1000
                   1151: 
                   1152: #endif /* NODRAWTEXT */
                   1153: 
                   1154: /* ExtFloodFill style flags */
                   1155: #define  FLOODFILLBORDER   0
                   1156: #define  FLOODFILLSURFACE  1
                   1157: 
                   1158: typedef struct _devicemode {
                   1159:     char dmDeviceName[32];
                   1160:     WORD dmSpecVersion;
                   1161:     WORD dmDriverVersion;
                   1162:     WORD dmSize;
                   1163:     WORD dmDriverExtra;
                   1164:     DWORD dmFields;
                   1165:     short dmOrientation;
                   1166:     short dmPaperSize;
                   1167:     short dmPaperLength;
                   1168:     short dmPaperWidth;
                   1169:     short dmScale;
                   1170:     short dmCopies;
                   1171:     short dmDefaultSource;
                   1172:     short dmPrintQuality;
                   1173:     short dmColor;
                   1174:     short dmDuplex;
                   1175: } DEVMODE, *PDEVMODE, *NPDEVMODE, *LPDEVMODE;
                   1176: 
                   1177: /* GetRegionData/ExtCreateRegion */
                   1178: 
                   1179: #define RDH_RECTANGLES 1
                   1180: 
                   1181: typedef struct _RGNDATAHEADER {
                   1182:     DWORD   dwSize;
                   1183:     DWORD   iType;
                   1184:     DWORD   nCount;
                   1185: } RGNDATAHEADER, *PRGNDATAHEADER;
                   1186: 
                   1187: typedef struct _RGNDATA {
                   1188:     RGNDATAHEADER   rdh;
                   1189:     char           Buffer[1];
                   1190: } RGNDATA, *PRGNDATA, NEAR *NPRGNDATA, FAR *LPRGNDATA;
                   1191: 
                   1192: int APIENTRY AddFontResourceA(IN LPSTR);
                   1193: int APIENTRY AddFontResourceW(IN LPWSTR);
                   1194: #ifdef UNICODE
                   1195: #define AddFontResource AddFontResourceW
                   1196: #else
                   1197: #define AddFontResource AddFontResourceA
                   1198: #endif // !UNICODE
                   1199: 
                   1200: int     APIENTRY AddFontModule(IN HMODULE);
                   1201: BOOL    APIENTRY AnimatePalette(IN HPALETTE, IN UINT, IN UINT, IN LPPALETTEENTRY);
                   1202: BOOL BATCH APIENTRY Arc(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
                   1203: BOOL BATCH APIENTRY BitBlt(IN HDC, IN int, IN int, IN int, IN int, IN HDC, IN int, IN int, IN DWORD);
                   1204: BOOL BATCH APIENTRY Chord(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
                   1205: HMF     APIENTRY CloseMetaFile(IN HDC);
                   1206: int     APIENTRY CombineRgn(IN HRGN, IN HRGN, IN HRGN, IN int);
                   1207: HMF     APIENTRY CopyMetaFile(IN HMF, IN LPSTR);
                   1208: HBITMAP APIENTRY CreateBitmap(IN int, IN int, IN UINT, IN UINT, IN LPBYTE);
                   1209: HBITMAP APIENTRY CreateBitmapIndirect(IN LPBITMAP);
                   1210: HBRUSH  APIENTRY CreateBrushIndirect(IN LPLOGBRUSH);
                   1211: HBITMAP APIENTRY CreateCompatibleBitmap(IN HDC, IN int, IN int);
                   1212: HBITMAP APIENTRY CreateDiscardableBitmap(IN HDC, IN int, IN int);
                   1213: HDC     APIENTRY CreateCompatibleDC(IN HDC);
                   1214: HDC     APIENTRY CreateDC(IN LPSTR, IN LPSTR OPTIONAL, IN LPSTR OPTIONAL, IN LPDEVMODE OPTIONAL);
                   1215: HBITMAP APIENTRY CreateDIBitmap(IN HDC, IN LPBITMAPINFOHEADER, IN DWORD, IN LPBYTE, IN LPBITMAPINFO, IN DWORD);
                   1216: HBITMAP APIENTRY CreateDIBSection(IN HDC, IN LPBITMAPINFO, IN DWORD, IN DWORD, OUT LPBYTE *);
                   1217: HBRUSH  APIENTRY CreateDIBPatternBrush(IN GLOBALHANDLE, IN DWORD);
                   1218: HBRUSH  APIENTRY CreateDIBPatternBrushPt(IN LPVOID, IN DWORD);
                   1219: HRGN    APIENTRY CreateEllipticRgn(IN int, IN int, IN int, IN int);
                   1220: HRGN    APIENTRY CreateEllipticRgnIndirect(IN LPRECT);
                   1221: 
                   1222: HFONT   APIENTRY CreateFontIndirectA(IN LPLOGFONTA);
                   1223: HFONT   APIENTRY CreateFontIndirectW(IN LPLOGFONTW);
                   1224: #ifdef UNICODE
                   1225: #define CreateFontIndirect CreateFontIndirectW
                   1226: #else
                   1227: #define CreateFontIndirect CreateFontIndirectA
                   1228: #endif // !UNICODE
                   1229: HFONT   APIENTRY CreateFontA(IN int, IN int, IN int, IN int, IN int, IN DWORD,
                   1230:                              IN DWORD, IN DWORD, IN DWORD, IN DWORD, IN DWORD,
                   1231:                              IN DWORD, IN DWORD, IN LPSTR);
                   1232: HFONT   APIENTRY CreateFontW(IN int, IN int, IN int, IN int, IN int, IN DWORD,
                   1233:                              IN DWORD, IN DWORD, IN DWORD, IN DWORD, IN DWORD,
                   1234:                              IN DWORD, IN DWORD, IN LPWSTR);
                   1235: #ifdef UNICODE
                   1236: #define CreateFont CreateFontW
                   1237: #else
                   1238: #define CreateFont CreateFontA
                   1239: #endif // !UNICODE
                   1240: 
                   1241: HBRUSH  APIENTRY CreateHatchBrush(IN int, IN COLORREF);
                   1242: HDC     APIENTRY CreateIC(IN LPSTR, IN LPSTR OPTIONAL, IN LPSTR OPTIONAL, IN LPDEVMODE OPTIONAL);
                   1243: HMF     APIENTRY CreateMetaFile(IN LPSTR);
                   1244: HPALETTE APIENTRY CreatePalette(IN LPLOGPALETTE);
                   1245: HPEN    APIENTRY CreatePen(IN int, IN int, IN COLORREF);
                   1246: HPEN    APIENTRY CreatePenIndirect(IN LPLOGPEN);
                   1247: HRGN    APIENTRY CreatePolyPolygonRgn(IN LPPOINT, IN LPINT, IN int, IN int);
                   1248: HBRUSH  APIENTRY CreatePatternBrush(IN HBITMAP);
                   1249: HRGN    APIENTRY CreateRectRgn(IN int, IN int, IN int, IN int);
                   1250: HRGN    APIENTRY CreateRectRgnIndirect(IN LPRECT);
                   1251: HRGN    APIENTRY CreateRoundRectRgn(IN int, IN int, IN int, IN int, IN int, IN int);
                   1252: HBRUSH  APIENTRY CreateSolidBrush(IN COLORREF);
                   1253: 
                   1254: BOOL APIENTRY DeleteDC(IN HDC);
                   1255: BOOL APIENTRY DeleteMetaFile(IN HMF);
                   1256: BOOL APIENTRY DeleteObject(IN HANDLE);
                   1257: int  APIENTRY DeviceCapabilitiesEx(IN LPSTR, IN LPSTR, IN LPSTR, IN int, OUT LPSTR, IN LPDEVMODE OPTIONAL);
                   1258: BOOL APIENTRY DeviceModeEx(IN HWND, IN LPSTR, IN LPSTR, IN LPSTR);
                   1259: 
                   1260: BOOL BATCH APIENTRY Ellipse(IN HDC, IN int, IN int, IN int, IN int);
                   1261: 
                   1262: int  APIENTRY EnumFontsA(IN HDC, IN LPSTR,  IN PROC, IN LPVOID);
                   1263: int  APIENTRY EnumFontsW(IN HDC, IN LPWSTR,  IN PROC, IN LPVOID);
                   1264: #ifdef UNICODE
                   1265: #define EnumFonts EnumFontsW
                   1266: #else
                   1267: #define EnumFonts EnumFontsA
                   1268: #endif // !UNICODE
                   1269: 
                   1270: int  APIENTRY EnumObjects(IN HDC, IN int, IN PROC, IN LPVOID);
                   1271: BOOL APIENTRY EqualRgn(IN HRGN, IN HRGN);
                   1272: int  APIENTRY Escape(IN HDC,IN int,IN int,IN LPSTR,OUT LPSTR);
                   1273: int  APIENTRY ExcludeClipRect(IN HDC, IN int, IN int, IN int, IN int);
                   1274: HRGN APIENTRY ExtCreateRegion(IN LPXFORM, IN DWORD, IN LPRGNDATA);
                   1275: LONG APIENTRY ExtDeviceModeEx(IN HWND, IN LPSTR, OUT LPDEVMODE, IN LPSTR, IN LPSTR, IN LPDEVMODE, IN LPSTR, IN DWORD);
                   1276: BOOL BATCH APIENTRY ExtFloodFill(IN HDC, IN int, IN int, IN COLORREF, IN UINT);
                   1277: BOOL BATCH  APIENTRY FillRgn(IN HDC, IN HRGN, IN HBRUSH);
                   1278: BOOL BATCH  APIENTRY FloodFill(IN HDC, IN int, IN int, IN COLORREF);
                   1279: BOOL BATCH  APIENTRY FrameRgn(IN HDC, IN HRGN, IN HBRUSH, IN int, IN int);
                   1280: int   APIENTRY GetROP2(IN HDC);
                   1281: BOOL  APIENTRY GetAspectRatioFilterEx(IN HDC, OUT LPSIZE);
                   1282: COLORREF APIENTRY GetBkColor(IN HDC);
                   1283: int   APIENTRY GetBkMode(IN HDC);
                   1284: DWORD APIENTRY GetBitmapBits(IN HBITMAP, IN DWORD, OUT LPBYTE);
                   1285: BOOL  APIENTRY GetBitmapDimensionEx(IN HBITMAP, OUT LPSIZE);
                   1286: BOOL  APIENTRY GetBrushOrgEx(IN HDC, OUT LPPOINT);
                   1287: 
                   1288: BOOL  APIENTRY GetCharWidthA(IN HDC, IN UINT, IN UINT, OUT LPINT);
                   1289: BOOL  APIENTRY GetCharWidthW(IN HDC, IN UINT, IN UINT, OUT LPINT);
                   1290: #ifdef UNICODE
                   1291: #define GetCharWidth GetCharWidthW
                   1292: #else
                   1293: #define GetCharWidth GetCharWidthA
                   1294: #endif // !UNICODE
                   1295: BOOL  APIENTRY GetCharWidthW(IN HDC, IN UINT, IN UINT, OUT LPINT);
                   1296: 
                   1297: int   APIENTRY GetClipBox(IN HDC, OUT LPRECT);
                   1298: int   APIENTRY GetClipRgn(IN HDC, IN HRGN);
                   1299: HANDLE APIENTRY GetCurrentObject(IN HDC, IN UINT);
                   1300: BOOL  APIENTRY GetCurrentPositionEx(IN HDC, OUT LPPOINT);
                   1301: int   APIENTRY GetDeviceCaps(IN HDC, IN int);
                   1302: BOOL  APIENTRY GetDIBits(IN HDC, IN HBITMAP, IN UINT, IN UINT, OUT LPBYTE, IN LPBITMAPINFO, IN UINT);
                   1303: int   APIENTRY GetMapMode(IN HDC);
                   1304: DWORD APIENTRY GetMetaFileBits(IN HMF, IN DWORD, OUT LPBYTE);
                   1305: HMF   APIENTRY GetMetaFile(IN LPSTR);
                   1306: COLORREF APIENTRY GetNearestColor(IN HDC, IN COLORREF);
                   1307: UINT  APIENTRY GetNearestPaletteIndex(IN HPALETTE, IN COLORREF);
                   1308: DWORD APIENTRY GetObjectType(HANDLE h);
                   1309: UINT  APIENTRY GetPaletteEntries(IN HPALETTE, IN UINT, IN UINT, OUT LPPALETTEENTRY);
                   1310: DWORD APIENTRY GetPixel(IN HDC, IN int, IN int);
                   1311: int   APIENTRY GetPolyFillMode(IN HDC);
                   1312: DWORD APIENTRY GetRegionData(IN HRGN, IN DWORD, OUT LPRGNDATA);
                   1313: int   APIENTRY GetRgnBox(IN HRGN, OUT LPRECT);
                   1314: HANDLE APIENTRY GetStockObject(IN int);
                   1315: int   APIENTRY GetStretchBltMode(IN HDC);
                   1316: UINT  APIENTRY GetSystemPaletteEntries(IN HDC, IN UINT, IN UINT, OUT LPPALETTEENTRY);
                   1317: UINT  APIENTRY GetSystemPaletteUse(IN HDC);
                   1318: int   APIENTRY GetTextCharacterExtra(IN HDC);
                   1319: UINT  APIENTRY GetTextAlign(IN HDC);
                   1320: COLORREF APIENTRY GetTextColor(IN HDC);
                   1321: 
                   1322: BOOL  APIENTRY GetTextExtentPointA(
                   1323:                     IN HDC,
                   1324:                     IN LPSTR,
                   1325:                     IN int,
                   1326:                     OUT LPSIZE
                   1327:                     );
                   1328: BOOL  APIENTRY GetTextExtentPointW(
                   1329:                     IN HDC,
                   1330:                     IN LPWSTR,
                   1331:                     IN int,
                   1332:                     OUT LPSIZE
                   1333:                     );
                   1334: #ifdef UNICODE
                   1335: #define GetTextExtentPoint GetTextExtentPointW
                   1336: #else
                   1337: #define GetTextExtentPoint GetTextExtentPointA
                   1338: #endif // !UNICODE
                   1339: 
                   1340: BOOL  APIENTRY GetViewportExtEx(IN HDC, OUT LPSIZE);
                   1341: BOOL  APIENTRY GetViewportOrgEx(IN HDC, OUT LPPOINT);
                   1342: BOOL  APIENTRY GetWindowExtEx(IN HDC, OUT LPSIZE);
                   1343: BOOL  APIENTRY GetWindowOrgEx(IN HDC, OUT LPPOINT);
                   1344: 
                   1345: int  APIENTRY IntersectClipRect(IN HDC, IN int, IN int, IN int, IN int);
                   1346: BOOL BATCH APIENTRY InvertRgn(IN HDC, IN HRGN);
                   1347: BOOL APIENTRY LineDDA(IN int, IN int, IN int, IN int, IN PROC, IN LPVOID);
                   1348: BOOL BATCH APIENTRY LineTo(IN HDC, IN int, IN int);
                   1349: BOOL APIENTRY MaskBlt(IN HDC, IN int, IN int, IN int, IN int,
                   1350:               IN HDC, IN int, IN int, IN HBITMAP, IN int, IN int, IN DWORD);
                   1351: BOOL APIENTRY PlgBlt(IN HDC, IN LPPOINT, IN HDC, IN int, IN int, IN int,
                   1352:                      IN int, IN HBITMAP, IN int, IN int);
                   1353: 
                   1354: int  APIENTRY OffsetClipRgn(IN HDC, IN int, IN int);
                   1355: int  APIENTRY OffsetRgn(IN HRGN, IN int, IN int);
                   1356: BOOL BATCH APIENTRY PatBlt(IN HDC, IN int, IN int, IN int, IN int, IN DWORD);
                   1357: BOOL BATCH APIENTRY Pie(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
                   1358: BOOL APIENTRY PlayMetaFile(IN HDC, IN HMF);
                   1359: BOOL BATCH APIENTRY PaintRgn(IN HDC, IN HRGN);
                   1360: BOOL BATCH APIENTRY PolyPolygon(IN HDC, IN LPPOINT, IN LPINT, IN int);
                   1361: BOOL APIENTRY PtInRegion(IN HRGN, IN int, IN int);
                   1362: BOOL APIENTRY PtVisible(IN HDC, IN int, IN int);
                   1363: 
                   1364: BOOL APIENTRY RectInRegion(IN HRGN, IN LPRECT);
                   1365: BOOL APIENTRY RectVisible(IN HDC, IN LPRECT);
                   1366: BOOL BATCH APIENTRY Rectangle(IN HDC, IN int, IN int, IN int, IN int);
                   1367: BOOL APIENTRY RestoreDC(IN HDC, IN int);
                   1368: int  APIENTRY RealizePalette(IN HDC);
                   1369: BOOL APIENTRY RemoveFontModule(IN HMODULE);
                   1370: BOOL APIENTRY RemoveFontResourceA(IN LPSTR);
                   1371: BOOL APIENTRY RemoveFontResourceW(IN LPWSTR);
                   1372: #ifdef UNICODE
                   1373: #define RemoveFontResource RemoveFontResourceW
                   1374: #else
                   1375: #define RemoveFontResource RemoveFontResourceA
                   1376: #endif // !UNICODE
                   1377: BOOL BATCH APIENTRY RoundRect(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int);
                   1378: BOOL APIENTRY ResizePalette(IN HPALETTE, IN UINT);
                   1379: 
                   1380: int  APIENTRY SaveDC(IN HDC);
                   1381: int  APIENTRY SelectClipRgn(IN HDC, IN HRGN);
                   1382: int  APIENTRY ExtSelectClipRgn(IN HDC, IN HRGN, IN int);
                   1383: HANDLE APIENTRY SelectObject(IN HDC, IN HANDLE);
                   1384: HPALETTE APIENTRY SelectPalette(IN HDC, IN HPALETTE, IN BOOL);
                   1385: COLORREF APIENTRY SetBkColor(IN HDC, IN COLORREF);
                   1386: int   APIENTRY SetBkMode(IN HDC, IN int);
                   1387: int   APIENTRY SetBitmapBits(IN HBITMAP, IN DWORD, IN LPBYTE);
                   1388: 
                   1389: int   APIENTRY SetDIBits(IN HDC, IN HBITMAP, IN UINT, IN UINT, IN LPBYTE, IN LPBITMAPINFO, IN UINT);
                   1390: int   APIENTRY SetDIBitsToDevice(IN HDC, IN int, IN int, IN DWORD, IN DWORD, IN int, IN int, IN DWORD, IN DWORD, IN LPBYTE, IN LPBITMAPINFO, IN DWORD);
                   1391: DWORD APIENTRY SetMapperFlags(IN HDC, IN DWORD);
                   1392: int   APIENTRY SetMapMode(IN HDC, IN int);
                   1393: HMF   APIENTRY SetMetaFileBits(IN DWORD, IN LPBYTE);
                   1394: UINT  APIENTRY SetPaletteEntries(IN HPALETTE, IN UINT, IN UINT, IN LPPALETTEENTRY);
                   1395: COLORREF APIENTRY SetPixel(IN HDC, IN int, IN int, IN COLORREF);
                   1396: BOOL BATCH  APIENTRY SetPixelV(IN HDC, IN int, IN int, IN COLORREF);
                   1397: int   APIENTRY SetPolyFillMode(IN HDC, IN int);
                   1398: BOOL BATCH  APIENTRY StretchBlt(IN HDC, IN int, IN int, IN int, IN int, IN HDC, IN int, IN int, IN int, IN int, IN DWORD);
                   1399: BOOL BATCH  APIENTRY SetRectRgn(IN HRGN, IN int, IN int, IN int, IN int);
                   1400: int   APIENTRY StretchDIBits(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN LPBYTE, IN LPBITMAPINFO, IN DWORD, IN DWORD);
                   1401: int   APIENTRY SetROP2(IN HDC, IN int);
                   1402: int   APIENTRY SetStretchBltMode(IN HDC, IN int);
                   1403: UINT  APIENTRY SetSystemPaletteUse(IN HDC, IN UINT);
                   1404: int   APIENTRY SetTextCharacterExtra(IN HDC, IN int);
                   1405: COLORREF APIENTRY SetTextColor(IN HDC, IN COLORREF);
                   1406: UINT  APIENTRY SetTextAlign(IN HDC, IN UINT);
                   1407: BOOL  APIENTRY SetTextJustification(IN HDC, IN int, IN int);
                   1408: BOOL  APIENTRY UpdateColors(IN HDC);
                   1409: 
                   1410: #ifndef NOMETAFILE
                   1411: 
                   1412: // TEMPORARY include file containing the new Metafile definitions.
                   1413: // Eventually it will be folded into wingdi.h and the old metafile
                   1414: // definitions will be removed when the metafile stuff settles down.
                   1415: #include <winmeta.h>
                   1416: 
                   1417: BOOL APIENTRY PlayMetaFileRecord(IN HDC, IN LPHANDLETABLE, IN LPMETARECORD, IN UINT);
                   1418: BOOL APIENTRY EnumMetaFile(IN HDC, IN HMF, IN PROC, IN LPVOID);
                   1419: #endif
                   1420: 
                   1421: #ifndef NOTEXTMETRIC
                   1422: 
                   1423: BOOL APIENTRY GetTextMetricsA(IN HDC, OUT LPTEXTMETRICA);
                   1424: BOOL APIENTRY GetTextMetricsW(IN HDC, OUT LPTEXTMETRICW);
                   1425: #ifdef UNICODE
                   1426: #define GetTextMetrics GetTextMetricsW
                   1427: #else
                   1428: #define GetTextMetrics GetTextMetricsA
                   1429: #endif // !UNICODE
                   1430: 
                   1431: #endif
                   1432: 
                   1433: /* new GDI */
                   1434: BOOL BATCH APIENTRY AngleArc(IN HDC, IN int, IN int, IN DWORD, IN FLOAT, IN FLOAT);
                   1435: BOOL APIENTRY GetWorldTransform(IN HDC, OUT LPXFORM);
                   1436: BOOL BATCH APIENTRY PolyPolyline(IN HDC, IN LPPOINT, IN LPDWORD, IN DWORD);
                   1437: BOOL APIENTRY SetWorldTransform(IN HDC, IN LPXFORM);
                   1438: BOOL APIENTRY ModifyWorldTransform(IN HDC,IN LPXFORM OPTIONAL, IN DWORD);
                   1439: BOOL APIENTRY StartDoc(IN HDC, IN LPSTR);
                   1440: BOOL APIENTRY EndDoc(IN HDC);
                   1441: BOOL APIENTRY StartPage(IN HDC);
                   1442: BOOL APIENTRY EndPage(IN HDC);
                   1443: BOOL APIENTRY GdiFlush(VOID);
                   1444: BOOL APIENTRY GdiSetBatchLimit(IN DWORD);
                   1445: BOOL APIENTRY ArcTo(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int,IN int, IN int);
                   1446: BOOL APIENTRY BeginPath(IN HDC);
                   1447: BOOL APIENTRY CloseFigure(IN HDC);
                   1448: BOOL APIENTRY EndPath(IN HDC);
                   1449: BOOL APIENTRY FillPath(IN HDC);
                   1450: BOOL APIENTRY FlattenPath(IN HDC);
                   1451: int  APIENTRY GetPath(IN HDC, OUT LPPOINT, OUT LPBYTE, IN int);
                   1452: HRGN APIENTRY PathToRegion(IN HDC);
                   1453: BOOL APIENTRY PolyDraw(IN HDC, IN LPPOINT, IN LPBYTE, IN int);
                   1454: BOOL APIENTRY SelectClipPath(IN HDC, IN int);
                   1455: BOOL APIENTRY SetFlatness(IN HDC, IN FLOAT, OUT PFLOAT);
                   1456: BOOL APIENTRY SetMiterLimit(IN HDC, IN FLOAT, OUT PFLOAT);
                   1457: BOOL APIENTRY StrokeAndFillPath(IN HDC);
                   1458: BOOL APIENTRY StrokePath(IN HDC);
                   1459: BOOL APIENTRY WidenPath(IN HDC);
                   1460: 
                   1461: /* if the thank compiler is reading this file, don't define these */
                   1462: #ifndef THANKS
                   1463: 
                   1464: int     APIENTRY GetObjectA(IN HANDLE, IN int, OUT LPVOID);
                   1465: int     APIENTRY GetObjectW(IN HANDLE, IN int, OUT LPVOID);
                   1466: #ifdef UNICODE
                   1467: #define GetObject GetObjectW
                   1468: #else
                   1469: #define GetObject GetObjectA
                   1470: #endif // !UNICODE
                   1471: 
                   1472: BOOL    APIENTRY MoveToEx(IN HDC, IN int, IN int, OUT LPPOINT);
                   1473: 
                   1474: BOOL    BATCH APIENTRY TextOutA(
                   1475:                         IN HDC,
                   1476:                         IN int,
                   1477:                         IN int,
                   1478:                         IN LPSTR,
                   1479:                         IN int
                   1480:                         );
                   1481: BOOL    BATCH APIENTRY TextOutW(
                   1482:                         IN HDC,
                   1483:                         IN int,
                   1484:                         IN int,
                   1485:                         IN LPWSTR,
                   1486:                         IN int
                   1487:                         );
                   1488: #ifdef UNICODE
                   1489: #define TextOut TextOutW
                   1490: #else
                   1491: #define TextOut TextOutA
                   1492: #endif // !UNICODE
                   1493: 
                   1494: BOOL    BATCH APIENTRY ExtTextOutA(
                   1495:                             IN HDC,
                   1496:                             IN int,
                   1497:                             IN int,
                   1498:                             IN UINT,
                   1499:                             IN LPRECT,
                   1500:                             IN LPSTR,
                   1501:                             IN int,
                   1502:                             IN LPINT
                   1503:                             );
                   1504: BOOL    BATCH APIENTRY ExtTextOutW(
                   1505:                             IN HDC,
                   1506:                             IN int,
                   1507:                             IN int,
                   1508:                             IN UINT,
                   1509:                             IN LPRECT,
                   1510:                             IN LPWSTR,
                   1511:                             IN int,
                   1512:                             IN LPINT
                   1513:                             );
                   1514: #ifdef UNICODE
                   1515: #define ExtTextOut ExtTextOutW
                   1516: #else
                   1517: #define ExtTextOut ExtTextOutA
                   1518: #endif // !UNICODE
                   1519: 
                   1520: HRGN  APIENTRY CreatePolygonRgn(IN LPPOINT, IN int, IN int);
                   1521: BOOL  APIENTRY DPtoLP(IN HDC, IN OUT LPPOINT, IN int);
                   1522: BOOL  APIENTRY LPtoDP(IN HDC, IN OUT LPPOINT, IN int);
                   1523: BOOL  APIENTRY Polygon(IN HDC, IN LPPOINT, IN int);
                   1524: BOOL  APIENTRY Polyline(IN HDC, IN LPPOINT, IN int);
                   1525: 
                   1526: BOOL  APIENTRY PolyBezier(IN HDC, IN LPPOINT, IN DWORD);
                   1527: BOOL  APIENTRY PolyBezierTo(IN HDC, IN LPPOINT, IN DWORD);
                   1528: BOOL  APIENTRY PolylineTo(IN HDC, IN LPPOINT, IN DWORD);
                   1529: 
                   1530: BOOL  APIENTRY SetViewportExtEx(IN HDC, IN int, IN int, OUT LPSIZE);
                   1531: BOOL  APIENTRY SetViewportOrgEx(IN HDC, IN int, IN int, OUT LPPOINT);
                   1532: BOOL  APIENTRY SetWindowExtEx(IN HDC, IN int, IN int, OUT LPSIZE);
                   1533: BOOL  APIENTRY SetWindowOrgEx(IN HDC, IN int, IN int, OUT LPPOINT);
                   1534: 
                   1535: BOOL  APIENTRY OffsetViewportOrgEx(IN HDC, IN int, IN int, OUT LPPOINT);
                   1536: BOOL  APIENTRY OffsetWindowOrgEx(IN HDC, IN int, IN int, OUT LPPOINT);
                   1537: BOOL  APIENTRY ScaleViewportExtEx(IN HDC, IN int, IN int, IN int, IN int, OUT LPSIZE);
                   1538: BOOL  APIENTRY ScaleWindowExtEx(IN HDC, IN int, IN int, IN int, IN int, OUT LPSIZE);
                   1539: BOOL  APIENTRY SetBitmapDimensionEx(IN HBITMAP, IN int, IN int, OUT LPSIZE);
                   1540: BOOL  APIENTRY SetBrushOrg(IN HDC, IN int, IN int, OUT LPPOINT);
                   1541: 
                   1542: int   APIENTRY GetTextFaceA(IN HDC, IN int, OUT LPSTR);
                   1543: int   APIENTRY GetTextFaceW(IN HDC, IN int, OUT LPWSTR);
                   1544: #ifdef UNICODE
                   1545: #define GetTextFace GetTextFaceW
                   1546: #else
                   1547: #define GetTextFace GetTextFaceA
                   1548: #endif // !UNICODE
                   1549: 
                   1550: DWORD  APIENTRY EnumNearestFontsA(IN HDC,IN LPEXTLOGFONTA,IN DWORD,OUT LPFMATCHA);
                   1551: DWORD  APIENTRY EnumNearestFontsW(IN HDC,IN LPEXTLOGFONTW,IN DWORD,OUT LPFMATCHW);
                   1552: #ifdef UNICODE
                   1553: #define EnumNearestFonts EnumNearestFontsW
                   1554: #else
                   1555: #define EnumNearestFonts EnumNearestFontsA
                   1556: #endif // !UNICODE
                   1557: 
                   1558: HFONT  APIENTRY ExtCreateFontIndirectA(IN LPEXTLOGFONTA);
                   1559: HFONT  APIENTRY ExtCreateFontIndirectW(IN LPEXTLOGFONTW);
                   1560: #ifdef UNICODE
                   1561: #define ExtCreateFontIndirect ExtCreateFontIndirectW
                   1562: #else
                   1563: #define ExtCreateFontIndirect ExtCreateFontIndirectA
                   1564: #endif // !UNICODE
                   1565: 
                   1566: BOOL   APIENTRY SetFontMapperControls(IN LPFMCONTROLS);
                   1567: BOOL   APIENTRY GetFontMapperControls(OUT LPFMCONTROLS,IN DWORD);
                   1568: 
                   1569: #endif /* THANKS */
                   1570: #endif /* NOGDI */
                   1571: 
                   1572: #ifdef LATER
                   1573: /*
                   1574:  * JimA - 11/30/90
                   1575:  *   gdidelta.doc lists these as obsolete
                   1576:  */
                   1577: DWORD   APIENTRY GetDCOrg(HDC);
                   1578: #endif  /* LATER */
                   1579: 
                   1580: 
                   1581: #endif /* _WINGDI_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.