home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / c / os2h / pmddi.h__ / pmddi.h
Encoding:
C/C++ Source or Header  |  1993-04-22  |  24.0 KB  |  863 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_DEVICE
  35. *   INCL_GRE_DEVMISC
  36. *   INCL_GRE_DEVSUPPORT
  37. *   INCL_GRE_FONTS
  38. *   INCL_GRE_JOURNALING
  39. *   INCL_GRE_LCID
  40. *   INCL_GRE_LINES
  41. *   INCL_GRE_MARKERS
  42. *   INCL_GRE_PALETTE
  43. *   INCL_GRE_PATHS
  44. *   INCL_GRE_PICK
  45. *   INCL_GRE_POLYGON
  46. *   INCL_GRE_REGIONS
  47. *   INCL_GRE_SCANS
  48. *   INCL_GRE_SETID
  49. *   INCL_GRE_STRINGS
  50. *   INCL_GRE_XFORMS
  51. *
  52. * ===========================================================================
  53. *
  54. * Comments at the end of each typedef line give the name tags used in
  55. * the assembler include version of this file.
  56. *
  57. * The assembler include version of this file excludes lines between NOINC
  58. * and INC comments.
  59. *
  60. \***************************************************************************/
  61. /* NOINC */
  62. #ifdef __IBMC__
  63.    #pragma checkout( suspend )
  64.    #ifndef __CHKHDR__
  65.       #pragma checkout( suspend )
  66.    #endif
  67.    #pragma checkout( resume )
  68. #endif
  69. /* INC */
  70.  
  71. #define DDI_INCLUDED
  72.  
  73.  
  74. #ifdef INCL_GREALL
  75.    #define INCL_GRE_ARCS
  76.    #define INCL_GRE_BITMAPS
  77.    #define INCL_GRE_CLIP
  78.    #define INCL_GRE_COLORTABLE
  79.    #define INCL_GRE_DCS
  80.    #define INCL_GRE_DEVICE
  81.    #define INCL_GRE_DEVMISC
  82.    #define INCL_GRE_DEVSUPPORT
  83.    #define INCL_GRE_FONTS
  84.    #define INCL_GRE_JOURNALING
  85.    #define INCL_GRE_LCID
  86.    #define INCL_GRE_LINES
  87.    #define INCL_GRE_MARKERS
  88.    #define INCL_GRE_PALETTE
  89.    #define INCL_GRE_PATHS
  90.    #define INCL_GRE_PICK
  91.    #define INCL_GRE_POLYGON
  92.    #define INCL_GRE_REGIONS
  93.    #define INCL_GRE_SCANS
  94.    #define INCL_GRE_SCREEN
  95.    #define INCL_GRE_SETID
  96.    #define INCL_GRE_STRINGS
  97.    #define INCL_GRE_XFORMS
  98. #endif /* INCL_GREALL */
  99.  
  100. #ifdef INCL_GRE_DEVMISC
  101.    #define INCL_GRE_DEVMISC1
  102.    #define INCL_GRE_DEVMISC2
  103.    #define INCL_GRE_DEVMISC3
  104. #endif  /* INCL_GRE_DEVMISC */
  105.  
  106.  
  107. /*** Engine dispatch tables ************************************************/
  108.  
  109. #define MAXTABLEENTRIES        223
  110. #define NUMBEROFMAJORFUN       MAXTABLEENTRIES
  111. #define NUMBEROFMINORFUN       86
  112.  
  113. typedef struct _DISPATCHER    /* dr */
  114. {
  115.    PFN    pfnTblEntry[MAXTABLEENTRIES];
  116. } DISPATCHER;
  117. typedef DISPATCHER *PDISPATCHER;
  118.  
  119. typedef struct _FUNINFOTABLE    /* fit */
  120. {
  121.    BYTE   FunInfo_00[NUMBEROFMAJORFUN];
  122.    BYTE   FunInfo_02[NUMBEROFMINORFUN];
  123. } FUNINFOTABLE;
  124. typedef FUNINFOTABLE *PFUNINFOTABLE;
  125.  
  126. /*** exported Engine DDI functions *****************************************/
  127.  
  128. LONG  APIENTRY SetDriverInfo(ULONG hDrv,
  129.                              LHANDLE hEng,
  130.                              ULONG ulIndex,
  131.                              HDC hdc);
  132.  
  133. LONG  APIENTRY GetDriverInfo(LHANDLE hEng,
  134.                              ULONG ulIndex,
  135.                              HDC hdc);
  136.  
  137. LONG  APIENTRY PostDeviceModes(PDRIVDATA pDrvData,
  138.                                PSZ pszDrvName,
  139.                                PSZ pszDevName,
  140.                                PSZ pszPrtName,
  141.                                ULONG ulOptions);
  142.  
  143. BOOL  APIENTRY GreInitialize(VOID);
  144.  
  145. ULONG APIENTRY SSAllocMem(PVOID ppAddr,
  146.                           ULONG ulSize,
  147.                           ULONG ulReserved);
  148.  
  149. ULONG APIENTRY SSFreeMem(PVOID pAddr);
  150.  
  151. /*** define common types in the Engine and DDI *****************************/
  152.  
  153. typedef struct _RECTS   /* rcs */
  154. {
  155.    POINTS pts1;
  156.    POINTS pts2;
  157. } RECTS;
  158. typedef RECTS *PRECTS;
  159.  
  160. /* NOINC */
  161. #ifndef POINTFX_DEFINED
  162.    #define POINTFX_DEFINED
  163.    /* INC */
  164.    typedef struct _POINTFX   /* ptfx */
  165.    {
  166.       FIXED x;
  167.       FIXED y;
  168.    } POINTFX;
  169.    typedef POINTFX *PPOINTFX;
  170.    /* NOINC */
  171. #endif
  172. /* INC */
  173.  
  174. typedef struct _RECTFX   /* rcfx */
  175. {
  176.    POINTFX ptfx1;
  177.    POINTFX ptfx2;
  178. } RECTFX;
  179. typedef RECTFX *PRECTFX;
  180.  
  181. typedef struct _XFORM   /* xform */
  182. {
  183.    FIXED fxM11;
  184.    FIXED fxM12;
  185.    FIXED fxM21;
  186.    FIXED fxM22;
  187.    LONG  lM41;
  188.    LONG  lM42;
  189. } XFORM;
  190. typedef XFORM *PXFORM;
  191.  
  192. typedef LONG LCID;      /* locally-coded id */
  193. typedef LCID *PLCID;
  194. typedef LONG PHID;      /* path id */
  195. typedef ULONG HDEVPAL;
  196.  
  197. #ifdef INCL_GRE_HFONT
  198.    typedef LHANDLE HFONT;       /* font handle */
  199. #endif /* INCL_GRE_HFONT */
  200.  
  201. #ifdef INCL_DDICOMFLAGS
  202.    #define COM_DRAW16                      0x00000001L
  203.    #define COM_BOUND16                     0x00000002L
  204.    #define COM_CORRELATE16                 0x00000004L
  205.    #define COM_ALT_BOUND16                 0x00000008L
  206.    #define COM_AREA16                      0x00000010L
  207.    #define COM_PATH16                      0x00000020L
  208.    #define COM_TRANSFORM16                 0x00000040L
  209.    #define COM_RECORDING16                 0x00000080L
  210.    #define COM_DEVICE16                    0x00000100L
  211.    #define COM_SCR_BOUND16                 0x00000200L
  212.    #define COM_PRECLIP16                   0x04000000L
  213.    
  214.    #define COM_DRAW                        0x00010000L
  215.    #define COM_BOUND                       0x00020000L
  216.    #define COM_CORRELATE                   0x00040000L
  217.    #define COM_ALT_BOUND                   0x00080000L
  218.    #define COM_AREA                        0x00100000L
  219.    #define COM_PATH                        0x00200000L
  220.    #define COM_TRANSFORM                   0x00400000L
  221.    #define COM_RECORDING                   0x00800000L
  222.    #define COM_DEVICE                      0x01000000L
  223.    #define COM_SCR_BOUND                   0x02000000L
  224.    #define COM_PRECLIP                     0x04000000L
  225. #endif /* INCL_DDICOMFLAGS */
  226.  
  227. #ifdef INCL_GRE_ARCS
  228.    
  229.    /* BoxBoundary */
  230.    /* BoxInterior */
  231.    /* BoxBoth */
  232.    
  233.    typedef struct _BOXPARAMS      /* boxp */
  234.    {
  235.       POINTL ptl;
  236.       SIZEL  sizl;
  237.    } BOXPARAMS;
  238.    typedef BOXPARAMS *PBOXPARAMS;
  239. #endif /* INCL_GRE_ARCS */
  240.  
  241. #ifdef INCL_GRE_CLIP
  242.    
  243.    /* CopyClipRegion */
  244.    
  245.    #define COPYCRGN_ALLINTERSECT        0L
  246.    #define COPYCRGN_VISRGN              1L
  247.    #define COPYCRGN_CLIPRGN             2L
  248.    
  249.    /* SetupDC */
  250.    
  251.    #define SETUPDC_VISRGN               0x00000001L
  252.    #define SETUPDC_ORIGIN               0x00000002L
  253.    #define SETUPDC_ACCUMBOUNDSON        0x00000004L
  254.    #define SETUPDC_ACCUMBOUNDSOFF       0x00000008L
  255.    #define SETUPDC_RECALCCLIP           0x00000010L
  256.    #define SETUPDC_SETOWNER             0x00000020L
  257.    #define SETUPDC_CLEANDC              0x00000040L
  258.    
  259. #endif /* INCL_GRE_CLIP */
  260.  
  261. #ifdef INCL_GRE_XFORMS
  262.    
  263.    /* QueryViewportSize */
  264.    typedef struct _VIEWPORTSIZE   /* vs */
  265.    {
  266.       ULONG cx;
  267.       ULONG cy;
  268.    } VIEWPORTSIZE;
  269.    typedef VIEWPORTSIZE *PVIEWPORTSIZE;
  270.    
  271. #endif /* INCL_GRE_XFORMS */
  272.  
  273. #ifdef INCL_GRE_DEVSUPPORT
  274.    
  275.    /* Constants for GreInitializeAttributes */
  276.    
  277.    #define INAT_DEFAULTATTRIBUTES       1L
  278.    #define INAT_CURRENTATTRIBUTES       2L
  279.    
  280.    /* InvalidateVisRegion */
  281.    
  282.    typedef struct _DC_BLOCK   /* ivr */
  283.    {
  284.       ULONG hdc;
  285.       ULONG hddc;
  286.    } DC_BLOCK;
  287.    typedef DC_BLOCK *PDC_BLOCK;
  288.    
  289. #endif /* INCL_GRE_DEVSUPPORT */
  290.  
  291. #ifdef INCL_DDIMISC
  292.    
  293.    /* Display information resource structure (RT_DISPLAYINFO) */
  294.    typedef struct _DISPLAYINFO           /* dspinfo */
  295.    {
  296.       USHORT cb;
  297.       SHORT cxIcon;
  298.       SHORT cyIcon;
  299.       SHORT cxPointer;
  300.       SHORT cyPointer;
  301.       SHORT cxBorder;
  302.       SHORT cyBorder;
  303.       SHORT cxHSlider;
  304.       SHORT cyVSlider;
  305.       SHORT cxSizeBorder;
  306.       SHORT cySizeBorder;
  307.       SHORT cxDeviceAlign;
  308.       SHORT cyDeviceAlign;
  309.    } DISPLAYINFO;
  310.    typedef DISPLAYINFO *PDISPLAYINFO;
  311.    
  312.    /* Parameters for the DC Enable function */
  313.    
  314.    typedef struct _DENPARAMS   /* den */
  315.    {
  316.       ULONG ulStateInfo;
  317.       ULONG ulType;
  318.       ULONG ulHDC;
  319.    } DENPARAMS;
  320.    typedef DENPARAMS *PDENPARAMS;
  321.    
  322.    
  323.    typedef struct _STYLERATIO   /* sr */
  324.    {
  325.       BYTE dx;
  326.       BYTE dy;
  327.    } STYLERATIO;
  328.    typedef STYLERATIO *PSTYLERATIO;
  329.    
  330.    /* Options flags for SetGlobalAttribute */
  331.    
  332.    #define GATTR_DEFAULT                   1L
  333.    
  334.    /* Attribute Types for SetGlobalAttribute */
  335.    
  336.    #define ATYPE_COLOR                     1L
  337.    #define ATYPE_BACK_COLOR                2L
  338.    #define ATYPE_MIX_MODE                  3L
  339.    #define ATYPE_BACK_MIX_MODE             4L
  340.    
  341.    /* Options for CharStringPos */
  342.    
  343.    #define CHS_START_XY                    0x00000020L
  344.    #define CHS_ATTR_INFO                   0x00000040L
  345.    
  346.    typedef struct _CSP_INFO   /* csp */
  347.    {
  348.       LONG  cSize;
  349.       LONG  lColor;
  350.       LONG  lBackColor;
  351.    } CSP_INFO;
  352.    typedef CSP_INFO *PCSP_INFO;
  353.    
  354.    /* Set/GetProcessControl */
  355.    
  356.    #define PCTL_DRAW                       0x00000001L
  357.    #define PCTL_BOUND                      0x00000002L
  358.    #define PCTL_CORRELATE                  0x00000004L
  359.    #define PCTL_USERBOUNDS                 0x00000008L
  360.    #define PCTL_AREA                       0x00000010L
  361.    
  362.    /* ResetBounds */
  363.    
  364.    #define RB_GPI                          0x00000001L
  365.    #define RB_USER                         0x00000002L
  366.    
  367.    /* GetBoundsData */
  368.    
  369.    #define GBD_GPI                         0L
  370.    #define GBD_USER                        1L
  371.    
  372.    /* EndArea Cancel Option */
  373.    
  374.    #define EA_DRAW                         0x00000000L
  375.    #define EA_CANCEL                       0x00000001L
  376.    
  377.    /* Bitblt Style */
  378.    
  379.    #define BLTMODE_SRC_BITMAP              0x00010000L
  380.    #define BLTMODE_ATTRS_PRES              0x00020000L
  381.    #define BBO_TARGWORLD                   0x00000100L
  382.    
  383.    typedef struct _BITBLTPARAMETERS   /* bbp */
  384.    {
  385.       RECTL rclTarg;
  386.       RECTL rclSrc;
  387.    } BITBLTPARAMETERS;
  388.    typedef BITBLTPARAMETERS *PBITBLTPARAMETERS;
  389.    
  390.    typedef struct _BITBLTATTRS   /* bba */
  391.    {
  392.       LONG cSize;
  393.       LONG lColor;
  394.       LONG lBackColor;
  395.    } BITBLTATTRS;
  396.    typedef BITBLTATTRS *PBITBLTATTRS;
  397.    
  398.    /* LCIDs */
  399.    
  400.    #define LCID_AVIO_1                     (-2L)
  401.    #define LCID_AVIO_2                     (-3L)
  402.    #define LCID_AVIO_3                     (-4L)
  403.    #define LCID_BITMAP_ID_REQUEST          (-5L)
  404.    
  405.    #define LCID_RANGE_GPI                  1L
  406.    #define LCID_RANGE_AVIO                 2L
  407.    #define LCID_RANGE_BOTH                 3L
  408.    #define LCID_GRAPHICS_MIN               1
  409.    #define LCID_GRAPHICS_MAX               254
  410.    
  411.    #define LCIDT_NONE                      0L
  412.    
  413.    /* ResetDC */
  414.    
  415.    #define RDC_RGBMODE                     0x1L
  416.    #define RDC_SETOWNERTOSHELL             0x2L
  417.    
  418.    /* SetRandomXform */
  419.    
  420.    #define SX_UNITY                        0L
  421.    #define SX_CAT_AFTER                    1L
  422.    #define SX_CAT_BEFORE                   2L
  423.    #define SX_OVERWRITE                    3L
  424.    
  425.    /* transform accelerators                    */
  426.    /*  These bits are only valid if the MATRIX_SIMPLE bit is set.           */
  427.    /*  The X and Y negate flags are only meaningful if MATRIX_UNITS is set.*/
  428.    
  429.    #define MATRIX_SIMPLE            0x0001L  /* two entries are zero */
  430.    #define MATRIX_UNITS             0x0002L  /* all entries are +1 or -1 */
  431.    #define MATRIX_XY_EXCHANGE       0x0004L  /* zeros are on the diagonal*/
  432.    #define MATRIX_X_NEGATE          0x0008L  /* X is hit by negative */
  433.    #define MATRIX_Y_NEGATE          0x0010L  /* Y is hit by negative */
  434.    #define MATRIX_TRANSLATION       0x0020L  /* non-zero translation */
  435.    
  436.    /* NotifyClipChange */
  437.    
  438.    #define NCC_CLEANDC              0x0002L  /* clear DC dirty bit */
  439.    
  440.    /* NotifyTransformChange */
  441.    
  442.    typedef struct _NOTIFYTRANSFORMDATA   /* ntd */
  443.    {
  444.       ULONG  usType;
  445.       XFORM  xform;
  446.    } NOTIFYTRANSFORMDATA;
  447.    typedef NOTIFYTRANSFORMDATA *PNOTIFYTRANSFORMDATA;
  448.    
  449.    /* ColorTable */
  450.    
  451.    #define LCOL_SYSCOLORS           0x0010L
  452.    
  453.    
  454.    /* query device caps */
  455.    
  456.    typedef struct _QCDARRAY   /* qcd */
  457.    {
  458.       LONG    iFormat;
  459.       LONG    iSmallest;
  460.       LONG    iLargest;
  461.       LONG    cAvailable;
  462.       LONG    cSpecifiable;
  463.       LONG    iMax;
  464.    } QCDARRAY;
  465.    typedef QCDARRAY *PQCDARRAY;
  466.    
  467.    #define CAPS_MIX_OR                  0x00000001L
  468.    #define CAPS_MIX_COPY                0x00000002L
  469.    #define CAPS_MIX_UNDERPAINT          0x00000004L
  470.    #define CAPS_MIX_XOR                 0x00000008L
  471.    #define CAPS_MIX_INVISIBLE           0x00000010L
  472.    #define CAPS_MIX_AND                 0x00000020L
  473.    #define CAPS_MIX_OTHER               0x00000040L
  474.    
  475.    #define CAPS_DEV_FONT_SIM_BOLD       1L      /* for CAPS_DEVICE_FONT_SIM */
  476.    #define CAPS_DEV_FONT_SIM_ITALIC     2L
  477.    #define CAPS_DEV_FONT_SIM_UNDERSCORE 4L
  478.    #define CAPS_DEV_FONT_SIM_STRIKEOUT  8L
  479.    
  480.    #define CAPS_BACKMIX_OR              0x00000001L
  481.    #define CAPS_BACKMIX_COPY            0x00000002L
  482.    #define CAPS_BACKMIX_UNDERPAINT      0x00000004L
  483.    #define CAPS_BACKMIX_XOR             0x00000008L
  484.    #define CAPS_BACKMIX_INVISIBLE       0x00000010L
  485.    
  486.    
  487.    /*#define CAPS_RASTER_BITBLT         0x00000001L defined in pmdev.h */
  488.    /*#define CAPS_RASTER_BANDING        0x00000002L */
  489.    /*#define CAPS_RASTER_STRETCHBLT     0x00000004L */
  490.    /*#define CAPS_RASTER_SETPEL         0x00000010L */
  491.    #define CAPS_FONT_OUTLINE_MANAGE     16L
  492.    #define CAPS_FONT_IMAGE_MANAGE       32L
  493.    #define SFONT_RASTER                 100
  494.    #define SFONT_OUTLINE                101
  495.    #define FONT              1000       /* must not conflict with RT_XXX */
  496.    /* constants in BSEDOS.H */
  497.    
  498.    /* DCCaps */
  499.    
  500.    #define DCCAPS_LINE                  0x0100
  501.    #define DCCAPS_CURVE                 0x0200
  502.    #define DCCAPS_AREA                  0x0400
  503.    #define DCCAPS_MARKER                0x0800
  504.    #define DCCAPS_TEXT                  0x1000
  505.    
  506.    /* DeviceDeleteBitmap */
  507.    #define BITMAP_USAGE_TRANSLATE       0x0004
  508.    
  509.    /* DeleteBitmap return structure */
  510.    typedef struct _DELETERETURN   /* dr */
  511.    {
  512.       ULONG      pInfo;
  513.       ULONG      pBits;
  514.    } DELETERETURN;
  515.    typedef DELETERETURN *PDELETERETURN;
  516.    
  517.    /* Short Line Header */
  518.    
  519.    #define SLH_FORMAT_IS_16_DOT_16 1
  520.    #define PSL_YMAJOR 0x8000    /* bit mask for usStyle */
  521.    
  522.    typedef struct _SHORTLINEHEADER   /* slh */
  523.    {
  524.       ULONG  ulStyle;
  525.       ULONG  ulFormat;
  526.       POINTL ptlStart;
  527.       POINTL ptlStop;
  528.       LONG   lxLeft;
  529.       LONG   lxRight;
  530.       struct _SHORTLINEHEADER *pslhNext;
  531.       struct _SHORTLINEHEADER *pslhPrev;
  532.    } SHORTLINEHEADER;
  533.    typedef SHORTLINEHEADER *PSHORTLINEHEADER;
  534.    /* Short Line */
  535.    
  536.    typedef struct _SHORTLINE   /* sl */
  537.    {
  538.       SHORTLINEHEADER slh;
  539.       LONG      ax[1];
  540.    } SHORTLINE;
  541.    typedef SHORTLINE *PSHORTLINE;
  542.    
  543.    /* Bounding rectangle for subpaths. */
  544.    
  545.    typedef struct _BRECTL          /* brctl */
  546.    {
  547.       POINTL ptl1;
  548.       POINTL ptl2;
  549.    } BRECTL;
  550.    typedef BRECTL *PBRECTL;
  551.    
  552.    typedef struct _RLEHDR   /* rle */
  553.    {
  554.       LONG     lType;
  555.       BRECTL   brectlBounds;
  556.       PVOID    pRLE;
  557.    } RLEHDR;
  558.    typedef RLEHDR *PRLEHDR;
  559.    
  560.    
  561.    typedef struct _SCANDATA   /* sd */
  562.    {
  563.       PSHORTLINE pslFirstLeft;
  564.       PSHORTLINE pslLastLeft;
  565.       PSHORTLINE pslFirstRight;
  566.       PSHORTLINE pslLastRight;
  567.       ULONG      c;
  568.       RECTL      rclBound;
  569.    } SCANDATA;
  570.    typedef SCANDATA *PSCANDATA;
  571.    
  572.    /* Index for Set/GetDriverInfo */
  573.    
  574.    #define DI_HDC                      0x00000000L
  575.    #define DI_HBITMAP                  0x00000001L
  576.    
  577. #endif  /* INCL_DDIMISC */
  578.  
  579. #ifdef INCL_DDIMISC2
  580.    
  581.    /* RealizeFont */
  582.    
  583.    #define REALIZE_FONT                 1   /* To be removed */
  584.    #define REALIZE_ENGINE_FONT          2
  585.    #define DELETE_FONT                  3
  586.    
  587.    #define RF_DEVICE_FONT               1
  588.    #define RF_LOAD_ENGINE_FONT          2
  589.    #define RF_DELETE_FONT               3
  590.    #define RF_DELETE_ENGINE_FONT        4
  591.    
  592. #endif  /* INCL_DDIMISC2 */
  593.  
  594. #ifdef INCL_DDIBUNDLES
  595.    
  596.    /* Device Line Bundle */
  597.    
  598.    typedef struct _LINEDEFS   /* ldef */
  599.    {
  600.       ULONG      defType;
  601.    } LINEDEFS;
  602.    typedef LINEDEFS *PLINDEFS;
  603.    
  604.    typedef struct _DLINEBUNDLE   /* dlbnd */
  605.    {
  606.       LONG       cAttr;
  607.       LONG       cDefs;
  608.       LINEBUNDLE lbnd;
  609.       LINEDEFS   ldef;
  610.    } DLINEBUNDLE;
  611.    typedef DLINEBUNDLE *PDLINEBUNDLE;
  612.    
  613.    /* Device Area Bundle */
  614.    
  615.    typedef struct _AREADEFS   /* adef */
  616.    {
  617.       ULONG      defSet;
  618.       ULONG      fFlags;
  619.       ULONG      CodePage;
  620.    } AREADEFS;
  621.    typedef AREADEFS *PAREADEFS;
  622.    
  623.    typedef struct _DAREABUNDLE   /* dabnd */
  624.    {
  625.       LONG       cAttr;
  626.       LONG       cDefs;
  627.       AREABUNDLE abnd;
  628.       AREADEFS   adef;
  629.    } DAREABUNDLE;
  630.    typedef DAREABUNDLE *PDAREABUNDLE;
  631.    
  632.    /* Device Character Bundle */
  633.    
  634.    typedef struct _CHARDEFS   /* cdef */
  635.    {
  636.       ULONG      defSet;
  637.       ULONG      fFlags;
  638.       ULONG      CodePage;
  639.       ULONG      charSpacing;
  640.    } CHARDEFS;
  641.    typedef CHARDEFS *PCHARDEFS;
  642.    
  643.    typedef struct _DCHARBUNDLE   /* dcbnd */
  644.    {
  645.       LONG       cAttr;
  646.       LONG       cDefs;
  647.       CHARBUNDLE cbnd;
  648.       CHARDEFS   cdef;
  649.    } DCHARBUNDLE;
  650.    typedef DCHARBUNDLE *PDCHARBUNDLE;
  651.    
  652.    /* Device Image Bundle */
  653.    
  654.    #ifdef BOGUS
  655.       typedef struct _IMAGEDEFS   /* idef */
  656.       {
  657.       } IMAGEDEFS;
  658.    #endif       /* BOGUS */
  659.    
  660.    typedef struct _DIMAGEBUNDLE   /* dibnd */
  661.    {
  662.       LONG       cAttr;
  663.       LONG       cDefs;
  664.       IMAGEBUNDLE ibnd;
  665.       /* IMAGEDEFS     idef; */
  666.    } DIMAGEBUNDLE;
  667.    typedef DIMAGEBUNDLE *PDIMAGEBUNDLE;
  668.    
  669.    /* Device Marker Bundle */
  670.    
  671.    typedef struct _MARKERDEFS   /* mdef */
  672.    {
  673.       ULONG      defSet;
  674.       ULONG      fFlags;
  675.       ULONG      CodePage;
  676.    } MARKERDEFS;
  677.    typedef MARKERDEFS *PMARKERDEFS;
  678.    
  679.    typedef struct _DMARKERBUNDLE   /* dmbnd */
  680.    {
  681.       LONG       cAttr;
  682.       LONG       cDefs;
  683.       MARKERBUNDLE mbnd;
  684.       MARKERDEFS   mdef;
  685.    } DMARKERBUNDLE;
  686.    typedef DMARKERBUNDLE *PDMARKERBUNDLE;
  687.    
  688.    
  689. #endif /* INCL_DDIBUNDLES */
  690.  
  691. #ifdef INCL_DDIFONTSTRUCS
  692.    #include <pmfont.h>
  693. #endif /* INCL_DDIFONTSTRUCS */
  694.  
  695. #ifdef INCL_DDIBITMAPFILE
  696.    #include <pmbitmap.h>
  697. #endif /* INCL_DDIBITMAPFILE */
  698.  
  699. #ifdef INCL_DDIPATHS
  700.    /* Curve types */
  701.    
  702.    #define CURVE_IDENTIFIER             0x43
  703.    #define LINE_IDENTIFIER              0x4C
  704.    #define CURVE_DO_FIRST_PEL           0x0002
  705.    
  706.    typedef struct _CURVE   /* cv */
  707.    {
  708.       BYTE        bIdent;             /*  1    1  */
  709.       BYTE        bType;              /*  1    2  */
  710.       USHORT      usReserved;         /*  2    4  */
  711.       ULONG       flStyle;            /*  4    8  */
  712.       ULONG       fl;                 /*  4   12  */
  713.       struct      _CURVE *pcvNext;    /*  4   16  */
  714.       struct      _CURVE *pcvPrev;    /*  4   20  */
  715.       struct      _CURVE *pcvAttrs;   /*  4   24  */
  716.       POINTFX     ptfxA;              /*  8   32  */
  717.       POINTFX     ptfxC;              /*  8   40  */
  718.       BYTE        Reserved2[28];      /* 28   68  */
  719.    } CURVE;
  720.    typedef CURVE *PCURVE;
  721.    
  722.    typedef struct _LINE   /* ln */
  723.    {
  724.       BYTE        bIdent;             /*  1    1  */
  725.       BYTE        bType;              /*  1    2  */
  726.       USHORT      usReserved;         /*  2    4  */
  727.       ULONG       flStyle;            /*  4    8  */
  728.       ULONG       fl;                 /*  4   12  */
  729.       PCURVE      pcvNext;            /*  4   16  */
  730.       PCURVE      pcvPrev;            /*  4   20  */
  731.       PCURVE      pcvAttrs;           /*  4   24  */
  732.       POINTFX     ptfxA;              /*  8   32  */
  733.       POINTFX     ptfxC;              /*  8   40  */
  734.       POINTL      ptlA;               /*  8   48  */
  735.       POINTL      ptlC;               /*  8   56  */
  736.       FIXED       fxRslope;           /*  4   60  */
  737.       BYTE        Reserved1[8];       /*  8   68  */
  738.    } LINE;
  739.    typedef LINE *PLINE;
  740.    
  741. #endif  /* INCL_DDIPATHS */
  742.  
  743. #ifdef INCL_GRE_JOURNALING
  744.    #define JNL_TEMP_FILE            0x00000001L
  745.    #define JNL_PERM_FILE            0x00000002L
  746.    #define JNL_ENGINERAM_FILE       0x00000004L
  747.    #define JNL_USERRAM_FILE         0x00000008L
  748.    #define JNL_DRAW_OPTIMIZATION    0x00000010L
  749.    #define JNL_BOUNDS_OPTIMIZATION  0x00000020L
  750. #endif  /* INCL_GRE_JOURNALING */
  751.  
  752.  
  753. #ifdef INCL_GRE_DEVICE
  754.    
  755.    /* QueryDeviceBitmaps */
  756.    
  757.    typedef struct _BITMAPFORMAT   /* bmf */
  758.    {
  759.       ULONG cPlanes;
  760.       ULONG cBitCount;
  761.    } BITMAPFORMAT;
  762.    typedef BITMAPFORMAT *PBITMAPFORMAT;
  763.    
  764. #endif /* INCL_GRE_DEVICE */
  765.  
  766. #ifdef INCL_GRE_PALETTE
  767.    
  768.    typedef struct _PALETTEINFOHEADER   /* palinfohdr */
  769.    {
  770.       ULONG  flCmd;         /* options from creation                   */
  771.       ULONG  ulFormat;      /* specifies format of entries at creation */
  772.       ULONG  cclr;          /* number of elements supplied at creation */
  773.    } PALETTEINFOHEADER;
  774.    typedef PALETTEINFOHEADER *NPPALETTEINFOHEADER;
  775.    typedef PALETTEINFOHEADER *PPALETTEINFOHEADER;
  776.    
  777.    typedef struct _PALETTEINFO   /* palinfo */
  778.    {
  779.       ULONG  flCmd;         /* options from creation                   */
  780.       ULONG  ulFormat;      /* specifies format of entries at creation */
  781.       ULONG  cclr;          /* number of elements supplied at creation */
  782.       RGB2   argb[1];       /* the palette entries                     */
  783.    } PALETTEINFO;
  784.    typedef PALETTEINFO *NPPALETTEINFO;
  785.    typedef PALETTEINFO *PPALETTEINFO;
  786.    
  787.    /* flType values for RealizePalette */
  788.    #define RP_BACKGROUND                0
  789.    #define RP_FOREGROUND                1
  790.    #define RP_DEFAULTSCHANGED           2
  791.    
  792. #endif
  793.  
  794. #ifdef INCL_GRE_BITMAPS
  795.    #define LR_CLIPPED   2
  796.    #define LR_NOTBORDER 0
  797.    #define LR_BORDER    1
  798.    #define LR_LEFT      2
  799.    #define LR_RIGHT     4
  800. #endif
  801.  
  802. /* Flags  for GreOutlinePath */
  803. #define OPTH_NO_CLIPPING_REQD         0x0001L
  804. #define OPTH_QRY_PATH_POINTS          0x0002L
  805.  
  806. /*** 32-bit cursor/pointer stuff ******************************/
  807. typedef struct _MCDESCRIPTION   /* mcdesc */
  808. {
  809.    PVOID    pMoveCursor;
  810.    ULONG    ulCodeLength;
  811.    PVOID    pCursorData;
  812.    ULONG    ulDataLength;
  813. }  MCDESCRIPTION;
  814. typedef MCDESCRIPTION *PMCDESCRIPTION;
  815.  
  816. typedef struct _WINCURSORDATA   /* winmc */
  817. {
  818.    ULONG      pMoveCursor;
  819.    ULONG      pMoveCursorAlias;
  820.    ULONG      pCursorData;
  821.    ULONG      pCursorDataAlias;
  822.    ULONG      ulRoutineType;
  823.    HMODULE    hModDisplay;
  824.    PVOID      pWCThunkCode;
  825.    ULONG      ulThunkLen;
  826.    USHORT     usR0CS;
  827.    USHORT     usR0DS;
  828. }  WINCURSORDATA;
  829. typedef WINCURSORDATA *PWINCURSORDATA;
  830.  
  831. #define MC_32BIT   32
  832. #define MC_16BIT   16
  833.  
  834. #ifdef INCL_GRE_SCREEN
  835.    
  836.    /* GetScreenBits */
  837.    
  838.    typedef LHANDLE   HSCA;     /* hsca */
  839.    typedef HSCA *PHSCA;
  840.    
  841.    #define GSB_OPT_4BPP    0x0000L
  842.    #define GSB_OPT_8BPP    0x0001L
  843.    #define GSB_OPT_16BPP   0x0002L
  844.    #define GSB_OPT_LINEAR  0x0000L
  845.    #define GSB_OPT_PLANAR  0x0008L
  846.    #define GSB_OPT_HRGN    0x0010L
  847.    
  848. #endif /* INCL_GRE_SCREEN */
  849.  
  850. #include <pmddim.h>
  851.  
  852. /* NOINC */
  853. #ifdef __IBMC__
  854.    #pragma checkout( suspend )
  855.    #ifndef __CHKHDR__
  856.       #pragma checkout( resume )
  857.    #endif
  858.    #pragma checkout( resume )
  859. #endif
  860. /* INC */
  861.  
  862. /**************************** end of file **********************************/
  863.