home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / include / os2 / pmddi.h < prev    next >
C/C++ Source or Header  |  1997-04-02  |  43KB  |  1,302 lines

  1. /****************************** Module Header ******************************\
  2. *
  3. * Module Name: PMDDI.H
  4. *
  5. * OS/2 Presentation Manager entry points, macros, and types for the
  6. * Graphics Engine.
  7. *
  8. * Copyright (c) International Business Machines Corporation 1981, 1988-1992
  9. *
  10. * ===========================================================================
  11. *
  12. * The following symbols are used in this file for conditional sections.
  13. *
  14. *   #define:                To include:
  15. *
  16. *   INCL_DDIGRE             don't want OS2DEF, PMGPI, and PMDEV included
  17. *   INCL_DDIDEFS            don't want the above, but do want GRE structs
  18. *
  19. * It is expected that callers of the Engine will want to define INCL_DDIGRE
  20. * and possibly INCL_DDIDEFS.  The Engine itself and device drivers define
  21. * neither of these.
  22. *
  23. * Further defines must be made to specify which of the GRE function macros
  24. * should be defined.
  25. *
  26. *   #define:                To include:
  27. *
  28. *   INCL_GREALL           All of the following
  29. *   INCL_GRE_ARCS         Arcs functions
  30. *   INCL_GRE_BITMAPS      Bitmap functions
  31. *   INCL_GRE_CLIP            etc...
  32. *   INCL_GRE_COLORTABLE
  33. *   INCL_GRE_DCS
  34. *   INCL_GRE_PAX
  35. *   INCL_GRE_DEVICE
  36. *   INCL_GRE_DEVMISC
  37. *   INCL_GRE_DEVSUPPORT
  38. *   INCL_GRE_FONTS
  39. *   INCL_GRE_INKPATH
  40. *   INCL_GRE_JOURNALING
  41. *   INCL_GRE_LCID
  42. *   INCL_GRE_LINES
  43. *   INCL_GRE_MARKERS
  44. *   INCL_GRE_PALETTE
  45. *   INCL_GRE_PATHS
  46. *   INCL_GRE_PICK
  47. *   INCL_GRE_POLYGON
  48. *   INCL_GRE_REGIONS
  49. *   INCL_GRE_SCANS
  50. *   INCL_GRE_SETID
  51. *   INCL_GRE_STRINGS
  52. *   INCL_GRE_XFORMS
  53. *
  54. * ===========================================================================
  55. *
  56. * Comments at the end of each typedef line give the name tags used in
  57. * the assembler include version of this file.
  58. *
  59. * The assembler include version of this file excludes lines between NOINC
  60. * and INC comments.
  61. *
  62. \***************************************************************************/
  63. /* NOINC */
  64. #if __IBMC__ || __IBMCPP__
  65.    #pragma info( none )
  66.    #ifndef __CHKHDR__
  67.       #pragma info( none )
  68.    #endif
  69.    #pragma info( restore )
  70. #endif
  71. #ifdef __cplusplus
  72.       extern "C" {
  73. #endif
  74. /* INC */
  75.  
  76. #define DDI_INCLUDED
  77.  
  78.  
  79. #ifdef INCL_GREALL
  80.    #define INCL_GRE_ARCS
  81.    #define INCL_GRE_BITMAPS
  82.    #define INCL_GRE_CLIP
  83.    #define INCL_GRE_COLORTABLE
  84.    #define INCL_GRE_DCS
  85.    #define INCL_GRE_PAX
  86.    #define INCL_GRE_DEVICE
  87.    #define INCL_GRE_DEVMISC
  88.    #define INCL_GRE_DEVSUPPORT
  89.    #define INCL_GRE_FONTS
  90.    #define INCL_GRE_INKPATH
  91.    #define INCL_GRE_JOURNALING
  92.    #define INCL_GRE_LCID
  93.    #define INCL_GRE_LINES
  94.    #define INCL_GRE_MARKERS
  95.    #define INCL_GRE_PALETTE
  96.    #define INCL_GRE_PATHS
  97.    #define INCL_GRE_PICK
  98.    #define INCL_GRE_POLYGON
  99.    #define INCL_GRE_REGIONS
  100.    #define INCL_GRE_SCANS
  101.    #define INCL_GRE_SCREEN
  102.    #define INCL_GRE_SETID
  103.    #define INCL_GRE_STRINGS
  104.    #define INCL_GRE_XFORMS
  105. #endif /* INCL_GREALL */
  106.  
  107. #ifdef INCL_GRE_DEVMISC
  108.    #define INCL_GRE_DEVMISC1
  109.    #define INCL_GRE_DEVMISC2
  110.    #define INCL_GRE_DEVMISC3
  111. #endif  /* INCL_GRE_DEVMISC */
  112.  
  113.  
  114. /*** Engine dispatch tables ************************************************/
  115.  
  116. #define MAXTABLEENTRIES        223
  117. #define NUMBEROFMAJORFUN       MAXTABLEENTRIES
  118. #define NUMBEROFMINORFUN       86
  119.  
  120. typedef struct _DISPATCHER    /* dr */
  121. {
  122.    PFN    pfnTblEntry[MAXTABLEENTRIES];
  123. } DISPATCHER;
  124. typedef DISPATCHER *PDISPATCHER;
  125.  
  126. typedef struct _FUNINFOTABLE    /* fit */
  127. {
  128.    BYTE   FunInfo_00[NUMBEROFMAJORFUN];
  129.    BYTE   FunInfo_02[NUMBEROFMINORFUN];
  130. } FUNINFOTABLE;
  131. typedef FUNINFOTABLE *PFUNINFOTABLE;
  132.  
  133. /*** exported Engine DDI functions *****************************************/
  134.  
  135. LONG  APIENTRY SetDriverInfo(ULONG hDrv,
  136.                              LHANDLE hEng,
  137.                              ULONG ulIndex,
  138.                              HDC hdc);
  139.  
  140. LONG  APIENTRY GetDriverInfo(LHANDLE hEng,
  141.                              ULONG ulIndex,
  142.                              HDC hdc);
  143.  
  144. #ifdef __cplusplus
  145. LONG  APIENTRY PostDeviceModes(PDRIVDATA pDrvData,
  146.                                PCSZ  pszDrvName,
  147.                                PCSZ  pszDevName,
  148.                                PCSZ  pszPrtName,
  149.                                ULONG ulOptions);
  150. #else
  151. LONG  APIENTRY PostDeviceModes(PDRIVDATA pDrvData,
  152.                                PSZ pszDrvName,
  153.                                PSZ pszDevName,
  154.                                PSZ pszPrtName,
  155.                                ULONG ulOptions);
  156. #endif
  157.  
  158. #ifdef __cplusplus
  159. LONG  APIENTRY PostEscape(PCSZ  pszDrvName,
  160.                           PCSZ  pszDevName,
  161.                           PCSZ  pszQueueName,
  162.                           PCSZ  pszSplPrinterName,
  163.                           ULONG ulFuncNum,
  164.                           ULONG cbParm1,
  165.                           PBYTE pbParm1,
  166.                           ULONG cpParm2,
  167.                           PBYTE pbParm2);
  168. #else
  169. LONG  APIENTRY PostEscape(PSZ pszDrvName,
  170.                           PSZ pszDevName,
  171.                           PSZ pszQueueName,
  172.                           PSZ pszSplPrinterName,
  173.                           ULONG ulFuncNum,
  174.                           ULONG cbParm1,
  175.                           PBYTE pbParm1,
  176.                           ULONG cpParm2,
  177.                           PBYTE pbParm2);
  178. #endif
  179.  
  180. BOOL  APIENTRY GreInitialize(VOID);
  181.  
  182. ULONG APIENTRY SSAllocMem(PVOID ppAddr,
  183.                           ULONG ulSize,
  184.                           ULONG ulReserved);
  185.  
  186. ULONG APIENTRY SSFreeMem(PVOID pAddr);
  187.  
  188. /*** define common types in the Engine and DDI *****************************/
  189.  
  190. typedef struct _RECTS   /* rcs */
  191. {
  192.    POINTS pts1;
  193.    POINTS pts2;
  194. } RECTS;
  195. typedef RECTS *PRECTS;
  196.  
  197. /* NOINC */
  198. #ifndef POINTFX_DEFINED
  199.    #define POINTFX_DEFINED
  200.    /* INC */
  201.    typedef struct _POINTFX   /* ptfx */
  202.    {
  203.       FIXED x;
  204.       FIXED y;
  205.    } POINTFX;
  206.    typedef POINTFX *PPOINTFX;
  207.    /* NOINC */
  208. #endif
  209. /* INC */
  210.  
  211. typedef struct _RECTFX   /* rcfx */
  212. {
  213.    POINTFX ptfx1;
  214.    POINTFX ptfx2;
  215. } RECTFX;
  216. typedef RECTFX *PRECTFX;
  217.  
  218. typedef struct _XFORM   /* xform */
  219. {
  220.    FIXED fxM11;
  221.    FIXED fxM12;
  222.    FIXED fxM21;
  223.    FIXED fxM22;
  224.    LONG  lM41;
  225.    LONG  lM42;
  226. } XFORM;
  227. typedef XFORM *PXFORM;
  228.  
  229. typedef LONG LCID;      /* locally-coded id */
  230. typedef LCID *PLCID;
  231. typedef LONG PHID;      /* path id */
  232. typedef ULONG HDEVPAL;
  233.  
  234. #ifdef INCL_GRE_HFONT
  235.    typedef LHANDLE HFONT;       /* font handle */
  236. #endif /* INCL_GRE_HFONT */
  237.  
  238. #ifdef INCL_DDICOMFLAGS
  239.    #define COM_DRAW16                      0x00000001L
  240.    #define COM_BOUND16                     0x00000002L
  241.    #define COM_CORRELATE16                 0x00000004L
  242.    #define COM_ALT_BOUND16                 0x00000008L
  243.    #define COM_AREA16                      0x00000010L
  244.    #define COM_PATH16                      0x00000020L
  245.    #define COM_TRANSFORM16                 0x00000040L
  246.    #define COM_RECORDING16                 0x00000080L
  247.    #define COM_DEVICE16                    0x00000100L
  248.    #define COM_SCR_BOUND16                 0x00000200L
  249.    #define COM_PRECLIP16                   0x04000000L
  250.    
  251.    #define COM_DRAW                        0x00010000L
  252.    #define COM_BOUND                       0x00020000L
  253.    #define COM_CORRELATE                   0x00040000L
  254.    #define COM_ALT_BOUND                   0x00080000L
  255.    #define COM_AREA                        0x00100000L
  256.    #define COM_PATH                        0x00200000L
  257.    #define COM_TRANSFORM                   0x00400000L
  258.    #define COM_RECORDING                   0x00800000L
  259.    #define COM_DEVICE                      0x01000000L
  260.    #define COM_SCR_BOUND                   0x02000000L
  261.    #define COM_PRECLIP                     0x04000000L
  262. #endif /* INCL_DDICOMFLAGS */
  263.  
  264. #ifdef INCL_GRE_ARCS
  265.    
  266.    /* BoxBoundary */
  267.    /* BoxInterior */
  268.    /* BoxBoth */
  269.    
  270.    typedef struct _BOXPARAMS      /* boxp */
  271.    {
  272.       POINTL ptl;
  273.       SIZEL  sizl;
  274.    } BOXPARAMS;
  275.    typedef BOXPARAMS *PBOXPARAMS;
  276. #endif /* INCL_GRE_ARCS */
  277.  
  278. #ifdef INCL_GRE_CLIP
  279.    
  280.    /* CopyClipRegion */
  281.    
  282.    #define COPYCRGN_ALLINTERSECT        0L
  283.    #define COPYCRGN_VISRGN              1L
  284.    #define COPYCRGN_CLIPRGN             2L
  285.    
  286.    /* SetupDC */
  287.    
  288.    #define SETUPDC_VISRGN               0x00000001L
  289.    #define SETUPDC_ORIGIN               0x00000002L
  290.    #define SETUPDC_ACCUMBOUNDSON        0x00000004L
  291.    #define SETUPDC_ACCUMBOUNDSOFF       0x00000008L
  292.    #define SETUPDC_RECALCCLIP           0x00000010L
  293.    #define SETUPDC_SETOWNER             0x00000020L
  294.    #define SETUPDC_CLEANDC              0x00000040L
  295.    
  296. #endif /* INCL_GRE_CLIP */
  297.  
  298. #ifdef INCL_GRE_XFORMS
  299.    
  300.    /* QueryViewportSize */
  301.    typedef struct _VIEWPORTSIZE   /* vs */
  302.    {
  303.       ULONG cx;
  304.       ULONG cy;
  305.    } VIEWPORTSIZE;
  306.    typedef VIEWPORTSIZE *PVIEWPORTSIZE;
  307.    
  308. #endif /* INCL_GRE_XFORMS */
  309.  
  310. #ifdef INCL_GRE_DEVSUPPORT
  311.    
  312.    /* Constants for GreInitializeAttributes */
  313.    
  314.    #define INAT_DEFAULTATTRIBUTES       1L
  315.    #define INAT_CURRENTATTRIBUTES       2L
  316.    
  317.    /* InvalidateVisRegion */
  318.    
  319.    typedef struct _DC_BLOCK   /* ivr */
  320.    {
  321.       ULONG hdc;
  322.       ULONG hddc;
  323.    } DC_BLOCK;
  324.    typedef DC_BLOCK *PDC_BLOCK;
  325.    
  326. #endif /* INCL_GRE_DEVSUPPORT */
  327.  
  328. #ifdef INCL_GRE_FONTS
  329.    
  330.    /* QueryCodePageObject */
  331.    
  332.    typedef ULONG GLYPH;
  333.    typedef ULONG *PGLYPH;
  334.    
  335.    /* NOINC */
  336.    typedef  ULONG (* APIENTRY PXLATECHAR)(PVOID object,
  337.                    ULONG ulCod,
  338.                    PGLYPH pGly);
  339.    typedef  ULONG (* APIENTRY PXLATESTRING)(PVOID object,
  340.                    PUCHAR pchCod,
  341.                    ULONG  ulCodLen,
  342.                    PGLYPH pGly,
  343.                    PULONG pulGlyLen,
  344.                    ULONG flOptions);
  345.    typedef  ULONG (* APIENTRY PINVXLATECHAR)(PVOID object,
  346.                    GLYPH gGly,
  347.                    PULONG pulCod);
  348.    typedef  ULONG (* APIENTRY PINVXLATESTRING)(PVOID object,
  349.                    PGLYPH pGly,
  350.                    ULONG ulGlyLen,
  351.                    PUCHAR pchCod,
  352.                    PULONG pulCodLen,
  353.                    ULONG flOptions);
  354.    typedef struct _CPOBJMEMBERS    /* cpm */
  355.    {
  356.       PXLATECHAR  pfnXlateChar;
  357.       PXLATESTRING pfnXlateString;
  358.       PINVXLATECHAR pfnInvXlateChar;
  359.       PINVXLATESTRING pfnInvXlateString;
  360.    } CPOBJMEMBERS;
  361.    typedef CPOBJMEMBERS *PCPOBJMEMBERS;
  362.    
  363.    typedef struct _CODEPAGEOBJECT    /* cpo */
  364.    {
  365.       ULONG    Identity;
  366.       ULONG    ulCodePage;
  367.       UCHAR    szGlyphList[16];
  368.       ULONG    fl;
  369.       PUCHAR   pDbcsEnv;
  370.       ULONG    ulReserved;
  371.       CPOBJMEMBERS Member;
  372.    } CODEPAGEOBJECT;
  373.    typedef CODEPAGEOBJECT *PCODEPAGEOBJECT;
  374.    /* INC */
  375.    
  376.    #define  CPO_SBCS_CODEPAGE    0x00000001L
  377.    #define  CPO_MBCS_CODEPAGE    0x00000002L
  378.    #define  CPO_DBCS_CODEPAGE    0x00000004L
  379.    
  380. #endif /* INCL_GRE_FONTS */
  381.  
  382. #ifdef INCL_GRE_STRINGS
  383.    
  384.    /* QueryCharoutline */
  385.    
  386.    #define  QCO_FORMAT_GOCA      0x00000001L
  387.    #define  QCO_FORMAT_IFI       0x00000002L
  388.    #define  QCO_NO_TRANSFORM     0x00000004L
  389.    #define  QCO_UNICODE          0x00000008L
  390.    
  391.    /* QueryCharMetricsTable */
  392.    
  393.    typedef struct _CHARMETRICS    /* cm */
  394.    {
  395.       LONG     lA;
  396.       ULONG    ulB;
  397.       LONG     lC;
  398.       RECTL    rclBoundBox;
  399.    } CHARMETRICS;
  400.    typedef CHARMETRICS *PCHARMETRICS;
  401.    
  402.    #define QCMT_NO_TRANSFORM     0x00000001L
  403.    
  404.    /* RealizeString */
  405.    
  406.    #define RS_NO_TRANSLATION     0x00000001L
  407.    #define RS_UNICODE            0x00000002L
  408.    #define RS_FONT_CACHE         0x00000004L
  409.    #define RS_CREATE_FTA         0x00000008L
  410.    #define RS_DESTROY_FTA        0x00000010L
  411.    #define RS_DELETE_CHARS       0x00000020L
  412.    #define RS_COPY_CHARS         0x00000040L
  413.    
  414. #endif /* INCL_GRE_STRINGS */
  415.  
  416. #ifdef INCL_DDIMISC
  417.    
  418.    /* Display information resource structure (RT_DISPLAYINFO) */
  419.    typedef struct _DISPLAYINFO           /* dspinfo */
  420.    {
  421.       USHORT cb;
  422.       SHORT cxIcon;
  423.       SHORT cyIcon;
  424.       SHORT cxPointer;
  425.       SHORT cyPointer;
  426.       SHORT cxBorder;
  427.       SHORT cyBorder;
  428.       SHORT cxHSlider;
  429.       SHORT cyVSlider;
  430.       SHORT cxSizeBorder;
  431.       SHORT cySizeBorder;
  432.       SHORT cxDeviceAlign;
  433.       SHORT cyDeviceAlign;
  434.    } DISPLAYINFO;
  435.    typedef DISPLAYINFO *PDISPLAYINFO;
  436.    
  437.    /* Parameters for the DC Enable function */
  438.    
  439.    typedef struct _DENPARAMS   /* den */
  440.    {
  441.       ULONG ulStateInfo;
  442.       ULONG ulType;
  443.       ULONG ulHDC;
  444.    } DENPARAMS;
  445.    typedef DENPARAMS *PDENPARAMS;
  446.    
  447.    
  448.    typedef struct _STYLERATIO   /* sr */
  449.    {
  450.       BYTE dx;
  451.       BYTE dy;
  452.    } STYLERATIO;
  453.    typedef STYLERATIO *PSTYLERATIO;
  454.    
  455.    /* Options flags for SetGlobalAttribute */
  456.    
  457.    #define GATTR_DEFAULT                   1L
  458.    
  459.    /* Attribute Types for SetGlobalAttribute */
  460.    
  461.    #define ATYPE_COLOR                     1L
  462.    #define ATYPE_BACK_COLOR                2L
  463.    #define ATYPE_MIX_MODE                  3L
  464.    #define ATYPE_BACK_MIX_MODE             4L
  465.    
  466.    /* Options for CharStringPos */
  467.    
  468.    #define CHS_START_XY                    0x00000020L
  469.    #define CHS_ATTR_INFO                   0x00000040L
  470.    
  471.    typedef struct _CSP_INFO   /* csp */
  472.    {
  473.       LONG  cSize;
  474.       LONG  lColor;
  475.       LONG  lBackColor;
  476.    } CSP_INFO;
  477.    typedef CSP_INFO *PCSP_INFO;
  478.    
  479.    /* Set/GetProcessControl */
  480.    
  481.    #define PCTL_DRAW                       0x00000001L
  482.    #define PCTL_BOUND                      0x00000002L
  483.    #define PCTL_CORRELATE                  0x00000004L
  484.    #define PCTL_USERBOUNDS                 0x00000008L
  485.    #define PCTL_AREA                       0x00000010L
  486.    
  487.    /* ResetBounds */
  488.    
  489.    #define RB_GPI                          0x00000001L
  490.    #define RB_USER                         0x00000002L
  491.    
  492.    /* GetBoundsData */
  493.    
  494.    #define GBD_GPI                         0L
  495.    #define GBD_USER                        1L
  496.    
  497.    /* EndArea Cancel Option */
  498.    
  499.    #define EA_DRAW                         0x00000000L
  500.    #define EA_CANCEL                       0x00000001L
  501.    
  502.    /* Bitblt Style */
  503.    
  504.    #define BLTMODE_SRC_BITMAP              0x00010000L
  505.    #define BLTMODE_ATTRS_PRES              0x00020000L
  506.    #define BBO_TARGWORLD                   0x00000100L
  507.    
  508.    typedef struct _BITBLTPARAMETERS   /* bbp */
  509.    {
  510.       RECTL rclTarg;
  511.       RECTL rclSrc;
  512.    } BITBLTPARAMETERS;
  513.    typedef BITBLTPARAMETERS *PBITBLTPARAMETERS;
  514.    
  515.    typedef struct _BITBLTATTRS   /* bba */
  516.    {
  517.       LONG cSize;
  518.       LONG lColor;
  519.       LONG lBackColor;
  520.    } BITBLTATTRS;
  521.    typedef BITBLTATTRS *PBITBLTATTRS;
  522.    
  523.    /* LCIDs */
  524.    
  525.    #define LCID_AVIO_1                     (-2L)
  526.    #define LCID_AVIO_2                     (-3L)
  527.    #define LCID_AVIO_3                     (-4L)
  528.    #define LCID_BITMAP_ID_REQUEST          (-5L)
  529.    
  530.    #define LCID_RANGE_GPI                  1L
  531.    #define LCID_RANGE_AVIO                 2L
  532.    #define LCID_RANGE_BOTH                 3L
  533.    #define LCID_GRAPHICS_MIN               1
  534.    #define LCID_GRAPHICS_MAX               254
  535.    
  536.    #define LCIDT_NONE                      0L
  537.    
  538.    /* ResetDC */
  539.    
  540.    #define RDC_RGBMODE                     0x1L
  541.    #define RDC_SETOWNERTOSHELL             0x2L
  542.    
  543.    /* SetRandomXform */
  544.    
  545.    #define SX_UNITY                        0L
  546.    #define SX_CAT_AFTER                    1L
  547.    #define SX_CAT_BEFORE                   2L
  548.    #define SX_OVERWRITE                    3L
  549.    
  550.    /* transform accelerators                    */
  551.    /*  These bits are only valid if the MATRIX_SIMPLE bit is set.           */
  552.    /*  The X and Y negate flags are only meaningful if MATRIX_UNITS is set.*/
  553.    
  554.    #define MATRIX_SIMPLE            0x0001L  /* two entries are zero */
  555.    #define MATRIX_UNITS             0x0002L  /* all entries are +1 or -1 */
  556.    #define MATRIX_XY_EXCHANGE       0x0004L  /* zeros are on the diagonal*/
  557.    #define MATRIX_X_NEGATE          0x0008L  /* X is hit by negative */
  558.    #define MATRIX_Y_NEGATE          0x0010L  /* Y is hit by negative */
  559.    #define MATRIX_TRANSLATION       0x0020L  /* non-zero translation */
  560.    
  561.    /* NotifyClipChange */
  562.    
  563.    #define NCC_CLEANDC              0x0002L  /* clear DC dirty bit */
  564.    
  565.    /* NotifyTransformChange */
  566.    
  567.    typedef struct _NOTIFYTRANSFORMDATA   /* ntd */
  568.    {
  569.       ULONG  usType;
  570.       XFORM  xform;
  571.    } NOTIFYTRANSFORMDATA;
  572.    typedef NOTIFYTRANSFORMDATA *PNOTIFYTRANSFORMDATA;
  573.    
  574.    /* ColorTable */
  575.    
  576.    #define LCOL_SYSCOLORS           0x0010L
  577.    
  578.    
  579.    /* query device caps */
  580.    
  581.    typedef struct _QCDARRAY   /* qcd */
  582.    {
  583.       LONG    iFormat;
  584.       LONG    iSmallest;
  585.       LONG    iLargest;
  586.       LONG    cAvailable;
  587.       LONG    cSpecifiable;
  588.       LONG    iMax;
  589.    } QCDARRAY;
  590.    typedef QCDARRAY *PQCDARRAY;
  591.    
  592.    #define CAPS_MIX_OR                  0x00000001L
  593.    #define CAPS_MIX_COPY                0x00000002L
  594.    #define CAPS_MIX_UNDERPAINT          0x00000004L
  595.    #define CAPS_MIX_XOR                 0x00000008L
  596.    #define CAPS_MIX_INVISIBLE           0x00000010L
  597.    #define CAPS_MIX_AND                 0x00000020L
  598.    #define CAPS_MIX_OTHER               0x00000040L
  599.    
  600.    #define CAPS_DEV_FONT_SIM_BOLD       1L      /* for CAPS_DEVICE_FONT_SIM */
  601.    #define CAPS_DEV_FONT_SIM_ITALIC     2L
  602.    #define CAPS_DEV_FONT_SIM_UNDERSCORE 4L
  603.    #define CAPS_DEV_FONT_SIM_STRIKEOUT  8L
  604.    
  605.    #define CAPS_BACKMIX_OR              0x00000001L
  606.    #define CAPS_BACKMIX_COPY            0x00000002L
  607.    #define CAPS_BACKMIX_UNDERPAINT      0x00000004L
  608.    #define CAPS_BACKMIX_XOR             0x00000008L
  609.    #define CAPS_BACKMIX_INVISIBLE       0x00000010L
  610.    
  611.    
  612.    /*#define CAPS_RASTER_BITBLT         0x00000001L defined in pmdev.h */
  613.    /*#define CAPS_RASTER_BANDING        0x00000002L */
  614.    /*#define CAPS_RASTER_STRETCHBLT     0x00000004L */
  615.    /*#define CAPS_RASTER_SETPEL         0x00000010L */
  616.    #define CAPS_FONT_OUTLINE_MANAGE     16L
  617.    #define CAPS_FONT_IMAGE_MANAGE       32L
  618.    #define SFONT_RASTER                 100
  619.    #define SFONT_OUTLINE                101
  620.    #define FONT              1000       /* must not conflict with RT_XXX */
  621.    /* constants in BSEDOS.H */
  622.    
  623.    /* DCCaps */
  624.    
  625.    #define DCCAPS_LINE                  0x0100
  626.    #define DCCAPS_CURVE                 0x0200
  627.    #define DCCAPS_AREA                  0x0400
  628.    #define DCCAPS_MARKER                0x0800
  629.    #define DCCAPS_TEXT                  0x1000
  630.    
  631.    /* DeviceDeleteBitmap */
  632.    #define BITMAP_USAGE_TRANSLATE       0x0004
  633.    
  634.    /* DeleteBitmap return structure */
  635.    typedef struct _DELETERETURN   /* dr */
  636.    {
  637.       ULONG      pInfo;
  638.       ULONG      pBits;
  639.    } DELETERETURN;
  640.    typedef DELETERETURN *PDELETERETURN;
  641.    
  642.    /* Short Line Header */
  643.    
  644.    #define SLH_FORMAT_IS_16_DOT_16 1
  645.    #define PSL_YMAJOR 0x8000    /* bit mask for usStyle */
  646.    
  647.    typedef struct _SHORTLINEHEADER   /* slh */
  648.    {
  649.       ULONG  ulStyle;
  650.       ULONG  ulFormat;
  651.       POINTL ptlStart;
  652.       POINTL ptlStop;
  653.       LONG   lxLeft;
  654.       LONG   lxRight;
  655.       struct _SHORTLINEHEADER *pslhNext;
  656.       struct _SHORTLINEHEADER *pslhPrev;
  657.    } SHORTLINEHEADER;
  658.    typedef SHORTLINEHEADER *PSHORTLINEHEADER;
  659.    /* Short Line */
  660.    
  661.    typedef struct _SHORTLINE   /* sl */
  662.    {
  663.       SHORTLINEHEADER slh;
  664.       LONG      ax[1];
  665.    } SHORTLINE;
  666.    typedef SHORTLINE *PSHORTLINE;
  667.    
  668.    /* Bounding rectangle for subpaths. */
  669.    
  670.    typedef struct _BRECTL          /* brctl */
  671.    {
  672.       POINTL ptl1;
  673.       POINTL ptl2;
  674.    } BRECTL;
  675.    typedef BRECTL *PBRECTL;
  676.    
  677.    typedef struct _RLEHDR   /* rle */
  678.    {
  679.       LONG     lType;
  680.       BRECTL   brectlBounds;
  681.       PVOID    pRLE;
  682.    } RLEHDR;
  683.    typedef RLEHDR *PRLEHDR;
  684.    
  685.    
  686.    typedef struct _SCANDATA   /* sd */
  687.    {
  688.       PSHORTLINE pslFirstLeft;
  689.       PSHORTLINE pslLastLeft;
  690.       PSHORTLINE pslFirstRight;
  691.       PSHORTLINE pslLastRight;
  692.       ULONG      c;
  693.       RECTL      rclBound;
  694.    } SCANDATA;
  695.    typedef SCANDATA *PSCANDATA;
  696.    
  697.    /* Index for Set/GetDriverInfo */
  698.    
  699.    #define DI_HDC                      0x00000000L
  700.    #define DI_HBITMAP                  0x00000001L
  701.    
  702. #endif  /* INCL_DDIMISC */
  703.  
  704. #ifdef INCL_DDIMISC2
  705.    
  706.    /* RealizeFont */
  707.    
  708.    #define REALIZE_FONT                 1
  709.    #define REALIZE_ENGINE_FONT          2
  710.    #define DELETE_FONT                  3
  711.    
  712.    #define RF_DEVICE_FONT               1
  713.    #define RF_LOAD_ENGINE_FONT          2
  714.    #define RF_DELETE_FONT               3
  715.    #define RF_DELETE_ENGINE_FONT        4
  716.    
  717. #endif  /* INCL_DDIMISC2 */
  718.  
  719. #ifdef INCL_DDIBUNDLES
  720.    
  721.    /* Device Line Bundle */
  722.    
  723.    typedef struct _LINEDEFS   /* ldef */
  724.    {
  725.       ULONG      defType;
  726.    } LINEDEFS;
  727.    typedef LINEDEFS *PLINDEFS;
  728.    
  729.    typedef struct _DLINEBUNDLE   /* dlbnd */
  730.    {
  731.       LONG       cAttr;
  732.       LONG       cDefs;
  733.       LINEBUNDLE lbnd;
  734.       LINEDEFS   ldef;
  735.    } DLINEBUNDLE;
  736.    typedef DLINEBUNDLE *PDLINEBUNDLE;
  737.    
  738.    /* Device Area Bundle */
  739.    
  740.    typedef struct _AREADEFS   /* adef */
  741.    {
  742.       ULONG      defSet;
  743.       ULONG      fFlags;
  744.       ULONG      CodePage;
  745.    } AREADEFS;
  746.    typedef AREADEFS *PAREADEFS;
  747.    
  748.    typedef struct _DAREABUNDLE   /* dabnd */
  749.    {
  750.       LONG       cAttr;
  751.       LONG       cDefs;
  752.       AREABUNDLE abnd;
  753.       AREADEFS   adef;
  754.    } DAREABUNDLE;
  755.    typedef DAREABUNDLE *PDAREABUNDLE;
  756.    
  757.    /* Device Character Bundle */
  758.    
  759.    typedef struct _CHARDEFS   /* cdef */
  760.    {
  761.       ULONG      defSet;
  762.       ULONG      fFlags;
  763.       ULONG      CodePage;
  764.       ULONG      charSpacing;
  765.    } CHARDEFS;
  766.    typedef CHARDEFS *PCHARDEFS;
  767.    
  768.    typedef struct _DCHARBUNDLE   /* dcbnd */
  769.    {
  770.       LONG       cAttr;
  771.       LONG       cDefs;
  772.       CHARBUNDLE cbnd;
  773.       CHARDEFS   cdef;
  774.    } DCHARBUNDLE;
  775.    typedef DCHARBUNDLE *PDCHARBUNDLE;
  776.    
  777.    /* Device Image Bundle */
  778.    
  779.    #ifdef BOGUS
  780.       typedef struct _IMAGEDEFS   /* idef */
  781.       {
  782.       } IMAGEDEFS;
  783.    #endif       /* BOGUS */
  784.    
  785.    typedef struct _DIMAGEBUNDLE   /* dibnd */
  786.    {
  787.       LONG       cAttr;
  788.       LONG       cDefs;
  789.       IMAGEBUNDLE ibnd;
  790.       /* IMAGEDEFS     idef; */
  791.    } DIMAGEBUNDLE;
  792.    typedef DIMAGEBUNDLE *PDIMAGEBUNDLE;
  793.    
  794.    /* Device Marker Bundle */
  795.    
  796.    typedef struct _MARKERDEFS   /* mdef */
  797.    {
  798.       ULONG      defSet;
  799.       ULONG      fFlags;
  800.       ULONG      CodePage;
  801.    } MARKERDEFS;
  802.    typedef MARKERDEFS *PMARKERDEFS;
  803.    
  804.    typedef struct _DMARKERBUNDLE   /* dmbnd */
  805.    {
  806.       LONG       cAttr;
  807.       LONG       cDefs;
  808.       MARKERBUNDLE mbnd;
  809.       MARKERDEFS   mdef;
  810.    } DMARKERBUNDLE;
  811.    typedef DMARKERBUNDLE *PDMARKERBUNDLE;
  812.    
  813.    
  814. #endif /* INCL_DDIBUNDLES */
  815.  
  816. #ifdef INCL_DDIFONTSTRUCS
  817.    #include <pmfont.h>
  818. #endif /* INCL_DDIFONTSTRUCS */
  819.  
  820. #ifdef INCL_DDIBITMAPFILE
  821.    #include <pmbitmap.h>
  822. #endif /* INCL_DDIBITMAPFILE */
  823.  
  824. #ifdef INCL_DDIPATHS
  825.    /* Curve types */
  826.    
  827.    #define CURVE_IDENTIFIER             0x43
  828.    #define LINE_IDENTIFIER              0x4C
  829.    #define CURVE_DO_FIRST_PEL           0x0002
  830.    
  831.    typedef struct _CURVE   /* cv */
  832.    {
  833.       BYTE        bIdent;             /*  1    1  */
  834.       BYTE        bType;              /*  1    2  */
  835.       USHORT      usReserved;         /*  2    4  */
  836.       ULONG       flStyle;            /*  4    8  */
  837.       ULONG       fl;                 /*  4   12  */
  838.       struct      _CURVE *pcvNext;    /*  4   16  */
  839.       struct      _CURVE *pcvPrev;    /*  4   20  */
  840.       struct      _CURVE *pcvAttrs;   /*  4   24  */
  841.       POINTFX     ptfxA;              /*  8   32  */
  842.       POINTFX     ptfxC;              /*  8   40  */
  843.       BYTE        Reserved2[28];      /* 28   68  */
  844.    } CURVE;
  845.    typedef CURVE *PCURVE;
  846.    
  847.    typedef struct _LINE   /* ln */
  848.    {
  849.       BYTE        bIdent;             /*  1    1  */
  850.       BYTE        bType;              /*  1    2  */
  851.       USHORT      usReserved;         /*  2    4  */
  852.       ULONG       flStyle;            /*  4    8  */
  853.       ULONG       fl;                 /*  4   12  */
  854.       PCURVE      pcvNext;            /*  4   16  */
  855.       PCURVE      pcvPrev;            /*  4   20  */
  856.       PCURVE      pcvAttrs;           /*  4   24  */
  857.       POINTFX     ptfxA;              /*  8   32  */
  858.       POINTFX     ptfxC;              /*  8   40  */
  859.       POINTL      ptlA;               /*  8   48  */
  860.       POINTL      ptlC;               /*  8   56  */
  861.       FIXED       fxRslope;           /*  4   60  */
  862.       BYTE        Reserved1[8];       /*  8   68  */
  863.    } LINE;
  864.    typedef LINE *PLINE;
  865.    
  866. #endif  /* INCL_DDIPATHS */
  867.  
  868. #ifdef INCL_GRE_JOURNALING
  869.    #define JNL_TEMP_FILE            0x00000001L
  870.    #define JNL_PERM_FILE            0x00000002L
  871.    #define JNL_ENGINERAM_FILE       0x00000004L
  872.    #define JNL_USERRAM_FILE         0x00000008L
  873.    #define JNL_DRAW_OPTIMIZATION    0x00000010L
  874.    #define JNL_BOUNDS_OPTIMIZATION  0x00000020L
  875. #endif  /* INCL_GRE_JOURNALING */
  876.  
  877.  
  878. #ifdef INCL_GRE_DEVICE
  879.    
  880.    /* QueryDeviceBitmaps */
  881.    
  882.    typedef struct _BITMAPFORMAT   /* bmf */
  883.    {
  884.       ULONG cPlanes;
  885.       ULONG cBitCount;
  886.    } BITMAPFORMAT;
  887.    typedef BITMAPFORMAT *PBITMAPFORMAT;
  888.    
  889. #endif /* INCL_GRE_DEVICE */
  890.  
  891. #ifdef INCL_GRE_PALETTE
  892.    
  893.    typedef struct _PALETTEINFOHEADER   /* palinfohdr */
  894.    {
  895.       ULONG  flCmd;         /* options from creation                   */
  896.       ULONG  ulFormat;      /* specifies format of entries at creation */
  897.       ULONG  cclr;          /* number of elements supplied at creation */
  898.    } PALETTEINFOHEADER;
  899.    typedef PALETTEINFOHEADER *NPPALETTEINFOHEADER;
  900.    typedef PALETTEINFOHEADER *PPALETTEINFOHEADER;
  901.    
  902.    typedef struct _PALETTEINFO   /* palinfo */
  903.    {
  904.       ULONG  flCmd;         /* options from creation                   */
  905.       ULONG  ulFormat;      /* specifies format of entries at creation */
  906.       ULONG  cclr;          /* number of elements supplied at creation */
  907.       RGB2   argb[1];       /* the palette entries                     */
  908.    } PALETTEINFO;
  909.    typedef PALETTEINFO *NPPALETTEINFO;
  910.    typedef PALETTEINFO *PPALETTEINFO;
  911.    
  912.    /* flType values for RealizePalette */
  913.    #define RP_BACKGROUND                0
  914.    #define RP_FOREGROUND                1
  915.    #define RP_DEFAULTSCHANGED           2
  916.    
  917. #endif
  918.  
  919. #ifdef INCL_GRE_BITMAPS
  920.    #define LR_CLIPPED   2
  921.    #define LR_NOTBORDER 0
  922.    #define LR_BORDER    1
  923.    #define LR_LEFT      2
  924.    #define LR_RIGHT     4
  925. #endif
  926.  
  927. /* Flags  for GreOutlinePath */
  928. #define OPTH_NO_CLIPPING_REQD         0x0001L
  929. #define OPTH_QRY_PATH_POINTS          0x0002L
  930.  
  931. /*** 32-bit cursor/pointer stuff ******************************/
  932. typedef struct _MCDESCRIPTION   /* mcdesc */
  933. {
  934.    PVOID    pMoveCursor;
  935.    ULONG    ulCodeLength;
  936.    PVOID    pCursorData;
  937.    ULONG    ulDataLength;
  938. }  MCDESCRIPTION;
  939. typedef MCDESCRIPTION *PMCDESCRIPTION;
  940.  
  941. typedef struct _WINCURSORDATA   /* winmc */
  942. {
  943.    ULONG      pMoveCursor;
  944.    ULONG      pMoveCursorAlias;
  945.    ULONG      pCursorData;
  946.    ULONG      pCursorDataAlias;
  947.    ULONG      ulRoutineType;
  948.    HMODULE    hModDisplay;
  949.    PVOID      pWCThunkCode;
  950.    ULONG      ulThunkLen;
  951.    USHORT     usR0CS;
  952.    USHORT     usR0DS;
  953. }  WINCURSORDATA;
  954. typedef WINCURSORDATA *PWINCURSORDATA;
  955.  
  956. #define MC_32BIT   32
  957. #define MC_16BIT   16
  958.  
  959. #ifdef INCL_GRE_SCREEN
  960.    
  961.    /* GetScreenBits */
  962.    
  963.    typedef LHANDLE   HSCA;     /* hsca */
  964.    typedef HSCA *PHSCA;
  965.    
  966.    #define GSB_OPT_4BPP    0x0000L
  967.    #define GSB_OPT_8BPP    0x0001L
  968.    #define GSB_OPT_16BPP   0x0002L
  969.    #define GSB_OPT_LINEAR  0x0000L
  970.    #define GSB_OPT_PLANAR  0x0008L
  971.    #define GSB_OPT_HRGN    0x0010L
  972.    
  973. #endif /* INCL_GRE_SCREEN */
  974.  
  975. #ifdef INCL_VMANDDI
  976.    
  977.    #define CAPS_MAX_CAPS    41
  978.    #define DEFAULT_PATTERNS_NUMBER 20
  979.    
  980.    //*******************************************************************************
  981.    // Halftoning and Dithering support for OS/2
  982.    //*******************************************************************************
  983.    
  984.    /******************************************************************************/
  985.    /*    PPOINTL     pptlSrc;            // src left, bottom, width and height.  */
  986.    /*    PPOINTL     pptlDst;            // dst left, bottom, width and height.  */
  987.    /*    ULONG       ulSrcBytesPerLine;  // src bytes per line                   */
  988.    /*    PBYTE       pbSrcBits;          // pointer to src image data            */
  989.    /*    ULONG       ulTrgBytesPerLine;  // dst bytes per line                   */
  990.    /*    PBYTE       pbTrgBits;          // pointer to dst image data            */
  991.    /*    ULONG       ulOptions;          // options                              */
  992.    /*    ULONG       ulcClrs;            // count of colors in rgb2 table        */
  993.    /*    PRGB2       pargb2;             // rgb2 table                           */
  994.    /******************************************************************************/
  995.    
  996.    typedef struct _IMAGEINFOS          /* imginfo */
  997.    {
  998.       PPOINTL     pptlSrc;
  999.       PPOINTL     pptlDst;
  1000.       ULONG       ulSrcBpp;
  1001.       ULONG       ulSrcBytesPerLine;
  1002.       PBYTE       pbSrcBits;
  1003.       ULONG       ulcSrcClrs;
  1004.       ULONG       ulSrcClrType;
  1005.       PRGB2       pargb2Src;
  1006.       ULONG       ulTrgBpp;
  1007.       ULONG       ulTrgBytesPerLine;
  1008.       PBYTE       pbTrgBits;
  1009.       ULONG       ulcTrgClrs;
  1010.       ULONG       ulTrgClrType;
  1011.       PRGB2       pargb2Trg;
  1012.       ULONG       ulOptions;
  1013.    } IMAGEINFOS;
  1014.    typedef IMAGEINFOS * PIMAGEINFO;    /* pimginfo */
  1015.    
  1016.    #define  GDM_NO_DITHER               0x0000   // No dithering in system
  1017.    #define  GDM_USERDEF_DITHER          0x0001   // Users supplies own Dithering routines
  1018.    #define  GDM_MATRIX_DITHER           0x0002   // Use System ordered dithering
  1019.    #define  GDM_ERRORDIF_DITHER         0x0004   // Use System error diffusion dithering
  1020.    #define  GDM_DITHER_BEGIN            0x0008   // Use System Floyd-Steinberg dithering
  1021.    #define  GDM_DITHER_END              0x0010   // Use System error propigation dithering
  1022.    #define  GDM_COLOR_CONVERT           0x0020   // Use device's clr mapping functions
  1023.    
  1024.    /*******************************************************************************************/
  1025.    /*    ULONG       ulLength;      // Length of dither matrix structure                      */
  1026.    /*    ULONG       fExt2IntSup;   // Gre Dither Flags for Ext to Int                        */
  1027.    /*    PVOID       pExt2IntDI;    // Used for GDM_USERDEF - pointer to users dither info    */
  1028.    /*    ULONG       fStretchSup;   // Gre Dither Flags for Stretch Support                   */
  1029.    /*    PVOID       pStretchDI;    // Used for GDM_USERDEF - pointer to users dither info    */
  1030.    /*    ULONG       fLog2PhysSup;  // Gre Dither Flags for Log to Phys clr mapping           */
  1031.    /*    PVOID       pLog2PhysDI;   // Used for GDM_USERDEF - pointer to users dither info    */
  1032.    /*    PFN         pfnDither;     // Used for GDM_USERDEF - pointer to users dither function*/
  1033.    /*******************************************************************************************/
  1034.    
  1035.    typedef struct _DITHERMATRIX   /* dthmtx */
  1036.    {
  1037.       ULONG       ulLength;
  1038.       ULONG       fExt2IntSup;
  1039.       PVOID       pExt2IntDI;
  1040.       ULONG       fStretchSup;
  1041.       PVOID       pStretchDI;
  1042.       ULONG       fLog2PhysSup;
  1043.       PVOID       pLog2PhysDI;
  1044.       PFN         pfnDither;
  1045.    } DITHERMATRIX;
  1046.    typedef DITHERMATRIX *PDITHERMATRIX;  /* pdthmtx */
  1047.    
  1048.    #define  GDM_EXT2INT_DITHER   0x01
  1049.    #define  GDM_STRETCH_DITHER   0x02
  1050.    #define  GDM_LOG2PHY_DITHER   0x04
  1051.    
  1052.    typedef struct _COLORCONVERTINFO             /* cci  */
  1053.    {
  1054.       ULONG              ulLength;
  1055.       ULONG              ulType;
  1056.       ULONG              ulOptions;
  1057.       ULONG (* APIENTRY pfnRGB2ToPhyIndex) () ;
  1058.       ULONG (* APIENTRY pfnPhyIndexToRGB2) () ;
  1059.    } COLORCONVERTINFO;
  1060.    typedef COLORCONVERTINFO *PCOLORCONVERTINFO; /* pcci */
  1061.    
  1062.    ULONG (* APIENTRY pfnRGB2ToPhyIndex) (ULONG ulClr) ;
  1063.    ULONG (* APIENTRY pfnPhyIndexToRGB2) (ULONG ulClr) ;
  1064.    ULONG (* APIENTRY pfnConvertBits)    (PIMAGEINFO pimginfo,
  1065.           PCOLORCONVERTINFO pcci,
  1066.           ULONG ulFlags) ;
  1067.    
  1068.    // pfnDither(PDITHERINFO pdi, PIMAGEINFO pii, ULONG ulFlags);
  1069.    
  1070.    /*******************************************************************************************/
  1071.    /*    ULONG       ulLength;      // length of structure                 - 88               */
  1072.    /*    ULONG       ulType;        // type of dither info structure       - GDM_MATRIX_DITHER*/
  1073.    /*    ULONG       fOptions;      // dither info options - DI_MONOINVERT - 00               */
  1074.    /*    ULONG       ulIntensity;   // RGB Gama Correction Value           - 00               */
  1075.    /*    BYTE        bRedWt;        // weight of primary color red         - 25               */
  1076.    /*    BYTE        bGreenWt;      // weight of primary color green       - 60               */
  1077.    /*    BYTE        bBlueWt;       // weight of primary color blue        - 15               */
  1078.    /*    BYTE        bPad;          // 4 byte align                        - 00               */
  1079.    /*    SIZEL       szMatrix;      // halftone pattern size               - 8                */
  1080.    /*    BYTE        bHalftone[];   // array of halftone patterns          - see 32gdata.c    */
  1081.    /*******************************************************************************************/
  1082.    
  1083.    typedef struct _MATRIXDITHERINFO      /* mtrxdi */
  1084.    {
  1085.       ULONG       ulLength;
  1086.       ULONG       ulType;
  1087.       ULONG       fOptions;
  1088.       ULONG       ulIntensity;
  1089.       BYTE        bRedWt;
  1090.       BYTE        bGreenWt;
  1091.       BYTE        bBlueWt;
  1092.       BYTE        bPad;
  1093.       SIZEL       szMatrix;
  1094.       BYTE        bHalftone[1];
  1095.    } MATRIXDITHERINFO;
  1096.    typedef MATRIXDITHERINFO *PMDI;  /* pmtrxdi */
  1097.    
  1098.    #define STUCKI_DIF 0x01
  1099.    #define JJN_DIF    0x02
  1100.    #define RND_DIF    0x04
  1101.    #define USER_DIF   0x08
  1102.    
  1103.    typedef struct _DIFFUSIONDITHERINFO      /* difdi */
  1104.    {
  1105.       ULONG       ulLength;
  1106.       ULONG       ulType;        // Stucki, J,J & N, RANDOM, User defined
  1107.       ULONG       fOptions;
  1108.       ULONG       ulIntensity;
  1109.       BYTE        bRedWt;
  1110.       BYTE        bGreenWt;
  1111.       BYTE        bBlueWt;
  1112.       BYTE        bPad;
  1113.       PBYTE       pBuffer;
  1114.       SIZEL       szFilter;
  1115.       BYTE        bFilterArry[1];
  1116.       
  1117.    } DIFFUSIONDITHERINFO;
  1118.    typedef DIFFUSIONDITHERINFO *PDDI;  /* pdifdi */
  1119.    
  1120.    typedef struct _DEVICESURFACE          /* devsur */
  1121.    {
  1122.       ULONG         ulLength;
  1123.       BMAPINFO      SurfaceBmapInfo;
  1124.       ULONG         ulDSFlgs;
  1125.       ULONG         ulStyleRatio;
  1126.       BMAPINFO      abmapinfoDefPattern[DEFAULT_PATTERNS_NUMBER];
  1127.       PVOID         pHWPalette;
  1128.       DITHERMATRIX  DitherMatrix;
  1129.       PFN           pfnDevLockDC;
  1130.       PFN           pfnDevUnLockDC;
  1131.       PFN           pfnBitBlt;
  1132.       PFN           pfnLine;
  1133.       #ifdef DEV_FNT_SUP
  1134.          PFN           pfnTextBlt;
  1135.       #else
  1136.          PFN           pfnReserved;
  1137.       #endif
  1138.       PFN           pfnLockPhysDev;
  1139.       PFN           pfnUnLockPhysDev;
  1140.       ULONG         hddc;
  1141.       ULONG         ulReserved[4];
  1142.       ULONG         ulCapsCnt;
  1143.       ULONG         DevCaps[CAPS_MAX_CAPS + 1];
  1144.    } DEVICESURFACE;
  1145.    typedef DEVICESURFACE *PDEVICESURFACE; /* pdevsur */
  1146.    
  1147.    APIRET APIENTRY GreSetDitherInfo(HDC hdc,
  1148.                                     ULONG ulDitherType,
  1149.                                     PVOID pDitherInfo);
  1150.    APIRET APIENTRY SetDeviceSurface(HDC hdc,
  1151.                                     PDEVICESURFACE pds);
  1152.    
  1153.    // Surface definition flags
  1154.    //
  1155.    #define DS_MEMORY                      0x00000001  // memory DS for a memory DC.
  1156.    #define DS_ROTATION                    0x00000002  // 90 degree rotation.
  1157.    
  1158.    #define DS_HORIZONTAL_SCAN             0x00000004  // horizontal scan DS.
  1159.    #define DS_VERTICAL_SCAN               0x00000008  // vertical scan DS.
  1160.    // DS must be TOPBOTTOM.
  1161.    #define DS_BYTEALIGN                   0x00000010  // DS scan line alignment.
  1162.    #define DS_WORDALIGN                   0x00000020  // DS scan line alignment
  1163.    #define DS_DWORDALIGN                  0x00000040  // DS scan line alignment
  1164.    
  1165.    #define DS_KEEP_EXTFORMAT              0x00000100  // bitmaps are created
  1166.    // in the external format.
  1167.    #define DS_MONO_INVERT                 0x00000200  // mono ROPs are inverted.
  1168.    #define DS_EXTERNAL_BITMAP_SELECTED    0x00000400  // Reserved.
  1169.    #define DS_NOTIFY_LAST_SDBITBLT        0x00000800  //
  1170.    #define DS_QUEUED_RAW_DEFAULT          0x00001000  //
  1171.    
  1172.    #define DS_DOWNLOAD_FONTS              0x00002000  // Device Supports Downloaded Fonts
  1173.    #define DS_FONT_CLIP_SUPPORT           0x00004000  // Device will clip fonts
  1174.    #define DS_DEVICE_FONTS                0x00008000  // Device has Hardware Fonts
  1175.    
  1176.    #define DS_BOTTOMTOP                   0x00010000  // bottom to top is Y positive.
  1177.    #define DS_TOPBOTTOM                   0x00020000  // top to bottom is Y positive.
  1178.    
  1179.    #define DS_BITBLT_YPOSITIVE_XPOSITIVE  0x00100000  // see below
  1180.    #define DS_BITBLT_YNEGATIVE_XPOSITIVE  0x00200000  // see below
  1181.    #define DS_BITBLT_YPOSITIVE_XNEGATIVE  0x00400000  // see below
  1182.    #define DS_BITBLT_YNEGATIVE_XNEGATIVE  0x00800000  // see below
  1183.    
  1184.    #define DS_BITBLT_XPOSITIVE_YPOSITIVE  0x01000000  // see below
  1185.    #define DS_BITBLT_XNEGATIVE_YPOSITIVE  0x02000000  // see below
  1186.    #define DS_BITBLT_XPOSITIVE_YNEGATIVE  0x04000000  // see below
  1187.    #define DS_BITBLT_XNEGATIVE_YNEGATIVE  0x08000000  // see below
  1188.    //
  1189.    //  Row Order   Y positive       Y Negative       Y positive      Y negative
  1190.    //
  1191.    //  Scan Dir    X positive       X positive       X negative      X negative
  1192.    //
  1193.    //              ┌───────X                             X──────┐
  1194.    //              │ ┌────────┐       ┌────────┐     ┌────────┐ │    ┌────────┐
  1195.    //              │ │ ┌────┐ │       │ ┌────┐ │     │ ┌────┐ │ │    │ ┌────┐ │
  1196.    //              │ │ │    │ │       │ │    │ │     │ │    │ │ │    │ │    │ │
  1197.    //              Y │ │ ───┘ │     Y │ │ ───┘ │     │ │ ───┘ │ Y    │ │ ───┘ │ Y
  1198.    //                │ │  \   │     │ │ │  \   │     │ │  \   │      │ │  \   │ │
  1199.    //                │ │   \  │     │ │ │   \  │     │ │   \  │      │ │   \  │ │
  1200.    //                └────────┘     │ └────────┘     └────────┘      └────────┘ │
  1201.    //                               └───────X                            X──────┘
  1202.    //
  1203.    //
  1204.    //  Row Order   X positive       X positive       X negative      X negative
  1205.    //
  1206.    //  Scan Dir    Y positive       Y Negative       Y positive      Y negative
  1207.    //
  1208.    //              ┌───────y                             y──────┐
  1209.    //              │ ┌────────┐       ┌────────┐     ┌────────┐ │    ┌────────┐
  1210.    //              │ │ ┌────┐ │       │ ┌────┐ │     │ ┌────┐ │ │    │ ┌────┐ │
  1211.    //              │ │ │    │ │       │ │    │ │     │ │    │ │ │    │ │    │ │
  1212.    //              x │ │ ───┘ │     x │ │ ───┘ │     │ │ ───┘ │ x    │ │ ───┘ │ x
  1213.    //                │ │  \   │     │ │ │  \   │     │ │  \   │      │ │  \   │ │
  1214.    //                │ │   \  │     │ │ │   \  │     │ │   \  │      │ │   \  │ │
  1215.    //                └────────┘     │ └────────┘     └────────┘      └────────┘ │
  1216.    //                               └───────y                            y──────┘
  1217.    //
  1218.    //
  1219.    
  1220.    #define DS_COLOR_RGB2                  0x00000000  // color is in RGB2             (default)
  1221.    #define DS_COLOR_RGB                   0x10000000  // color is in RGB
  1222.    
  1223.    #define DS_COLOR_24BIT_BGR             0x00000000  // 1st byte=blue,               (default)
  1224.    // 2nd byte=green 3rd byte=red
  1225.    #define DS_COLOR_24BIT_RGB             0x10000000  // 1st byte=red, 2nd byte=green
  1226.    // 3rd byte=blue
  1227.    
  1228.    #define DS_COLOR_16BIT_565_BGR         0x00000000  // blue - 5 bits,               (default)
  1229.    // green - 6 bits, red - 5 bits
  1230.    // ---------------------------------
  1231.    // |b|b|b|b|b|g|g|g|g|g|g|r|r|r|r|r|
  1232.    // ---------------------------------
  1233.    #define DS_COLOR_16BIT_565_RGB         0x10000000  // red - 5 bits,
  1234.    // green - 6 bits, blue - 5 bits
  1235.    // ---------------------------------
  1236.    // |r|r|r|r|r|g|g|g|g|g|g|b|b|b|b|b|
  1237.    // ---------------------------------
  1238.    #define DS_COLOR_16BIT_1555_BGR        0x20000000  // overlay - 1, red - 5 bits,
  1239.    // green - 5 bits, blue - 5 bits
  1240.    // ---------------------------------
  1241.    // |o|b|b|b|b|b|g|g|g|g|g|r|r|r|r|r|
  1242.    // ---------------------------------
  1243.    #define DS_COLOR_16BIT_1555_RGB        0x40000000  // overlay - 1, red - 5 bits,
  1244.    // green - 5 bits, blue - 5 bits
  1245.    // ---------------------------------
  1246.    // |o|r|r|r|r|r|g|g|g|g|g|b|b|b|b|b|
  1247.    // ---------------------------------
  1248.    
  1249.    #define DS_COLOR_32BIT_BGR             0x00000000  // 1st byte=blue, 2nd byte=green  (default)
  1250.    // 3rd byte=red,  4th byte = not used.
  1251.    #define DS_COLOR_32BIT_RGB             0x10000000  // 1st byte=red,  2nd byte=green
  1252.    // 3rd byte=blue  4th byte = not used.
  1253.    
  1254.    #ifndef FONTDEFFONT1
  1255.       #include <pmfont.h>
  1256.    #endif
  1257.    
  1258.    #ifndef VMANDDI_INCLUDED
  1259.       #include <ddi.h>
  1260.    #endif
  1261.    
  1262.    typedef struct _DEVFONTMETRICS                        /* dfm */
  1263.    {
  1264.       ULONG                  flOptions;
  1265.       PFOCAFONT              pFoca;
  1266.       PVOID                  pUniPanhose;
  1267.       char                   achFileName[260];
  1268.       PSZ                    pszFullFamilyName;
  1269.       PSZ                    pszFullFaceName;
  1270.       char                   achGlyphListName[16];
  1271.       PFN                    pfnDevQueryCodePage;
  1272.       LONG                   lDevMatch;
  1273.    } DEVFONTMETRICS;
  1274.    typedef DEVFONTMETRICS *PDEVFONTMETRICS;
  1275.    
  1276.    
  1277.    typedef struct _FONTINFO       /* fntinfo */
  1278.    {
  1279.       DEVFONTINFO            dfi;
  1280.       FOCAFONT               foca;
  1281.    } FONTINFO;
  1282.    typedef FONTINFO *PFONTINFO;
  1283.    
  1284. #endif /* INCL_VMANDDI */
  1285.  
  1286. #include <pmddim.h>
  1287.  
  1288. /* NOINC */
  1289. #ifdef __cplusplus
  1290.         }
  1291. #endif
  1292. #if __IBMC__ || __IBMCPP__
  1293.    #pragma info( none )
  1294.    #ifndef __CHKHDR__
  1295.       #pragma info( restore )
  1296.    #endif
  1297.    #pragma info( restore )
  1298. #endif
  1299. /* INC */
  1300.  
  1301. /**************************** end of file **********************************/
  1302.