home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / PMDEV.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  14KB  |  381 lines

  1. /****************************** Module Header ******************************\
  2. *
  3. * Module Name: PMDEV.H
  4. *
  5. * OS/2 Presentation Manager Device Context constants, types and
  6. * function declarations
  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_DEVERRORS          error definitions
  17. *   INCL_DEV                Dev APIs and structures
  18. *
  19. * There is a symbol used in this file called INCL_DDIDEFS. This is used to
  20. * include only the definitions for the DDI. The programmer using the GPI
  21. * can ignore this symbol
  22. *
  23. * There is a symbol used in this file called INCL_SAADEFS. This is used to
  24. * include only the definitions for the SAA. The programmer using the GPI
  25. * can ignore this symbol
  26. *
  27. * ===========================================================================
  28. *
  29. * Comments at the end of each typedef line give the name tags used in
  30. * the assembler include version of this file.
  31. *
  32. * The assembler include version of this file excludes lines between NOINC
  33. * and INC comments.
  34. *
  35. \***************************************************************************/
  36.  
  37. #if defined(__IBMC__)
  38.    #pragma info( none )
  39.    #ifndef __CHKHDR__
  40.       #pragma info( none )
  41.    #endif
  42.    #pragma info( restore )
  43. #endif    /* __IBMC__ */
  44.  
  45. #ifdef __cplusplus
  46.       extern "C" {
  47. #endif
  48.  
  49. #define DEV_INCLUDED
  50.  
  51.  
  52. #ifdef INCL_ERRORS /* if errors are required then allow DEV errors */
  53.    #define INCL_DEVERRORS
  54. #endif /* INCL_ERRORS */
  55.  
  56. #ifdef INCL_DDIDEFS /* if only DDI required then enable all of DEV */
  57.    #define INCL_DEV
  58. #endif /* INCL_DDIDEFS */
  59.  
  60. #ifdef INCL_SAADEFS /* if only SAA required then enable all of DEV */
  61.    #define INCL_DEV
  62. #endif /* INCL_SAADEFS */
  63.  
  64. #if (defined(INCL_DEV) || !defined(INCL_NOCOMMON))
  65.  
  66.    /* General DEV return values */
  67.    #define DEV_ERROR                       0L
  68.    #define DEV_OK                          1L
  69.  
  70.    /* DC type for DevOpenDC */
  71.    #define OD_QUEUED                       2L
  72.    #define OD_DIRECT                       5L
  73.    #define OD_INFO                         6L
  74.    #define OD_METAFILE                     7L
  75.    #define OD_MEMORY                       8L
  76.    #define OD_METAFILE_NOQUERY             9L
  77.  
  78.    /* codes for DevQueryCaps */
  79.    #define CAPS_FAMILY                     0L
  80.    #define CAPS_IO_CAPS                    1L
  81.    #define CAPS_TECHNOLOGY                 2L
  82.    #define CAPS_DRIVER_VERSION             3L
  83.    #define CAPS_WIDTH                      4L      /* pels            */
  84.    #define CAPS_HEIGHT                     5L      /* pels            */
  85.    #define CAPS_WIDTH_IN_CHARS             6L
  86.    #define CAPS_HEIGHT_IN_CHARS            7L
  87.    #define CAPS_HORIZONTAL_RESOLUTION      8L      /* pels per meter  */
  88.    #define CAPS_VERTICAL_RESOLUTION        9L      /* pels per meter  */
  89.    #define CAPS_CHAR_WIDTH                10L      /* pels            */
  90.    #define CAPS_CHAR_HEIGHT               11L      /* pels            */
  91.    #define CAPS_SMALL_CHAR_WIDTH          12L      /* pels            */
  92.    #define CAPS_SMALL_CHAR_HEIGHT         13L      /* pels            */
  93.    #define CAPS_COLORS                    14L
  94.    #define CAPS_COLOR_PLANES              15L
  95.    #define CAPS_COLOR_BITCOUNT            16L
  96.    #define CAPS_COLOR_TABLE_SUPPORT       17L
  97.    #define CAPS_MOUSE_BUTTONS             18L
  98.    #define CAPS_FOREGROUND_MIX_SUPPORT    19L
  99.    #define CAPS_BACKGROUND_MIX_SUPPORT    20L
  100.    #define CAPS_DEVICE_WINDOWING          31L
  101.    #define CAPS_ADDITIONAL_GRAPHICS       32L
  102.    #define CAPS_VIO_LOADABLE_FONTS        21L
  103.    #define CAPS_WINDOW_BYTE_ALIGNMENT     22L
  104.    #define CAPS_BITMAP_FORMATS            23L
  105.    #define CAPS_RASTER_CAPS               24L
  106.    #define CAPS_MARKER_HEIGHT             25L      /* pels            */
  107.    #define CAPS_MARKER_WIDTH              26L      /* pels            */
  108.    #define CAPS_DEVICE_FONTS              27L
  109.    #define CAPS_GRAPHICS_SUBSET           28L
  110.    #define CAPS_GRAPHICS_VERSION          29L
  111.    #define CAPS_GRAPHICS_VECTOR_SUBSET    30L
  112.    #define CAPS_PHYS_COLORS               33L
  113.    #define CAPS_COLOR_INDEX               34L
  114.    #define CAPS_GRAPHICS_CHAR_WIDTH       35L
  115.    #define CAPS_GRAPHICS_CHAR_HEIGHT      36L
  116.    #define CAPS_HORIZONTAL_FONT_RES       37L
  117.    #define CAPS_VERTICAL_FONT_RES         38L
  118.    #define CAPS_DEVICE_FONT_SIM           39L
  119.    #define CAPS_LINEWIDTH_THICK           40L
  120.    #define CAPS_DEVICE_POLYSET_POINTS     41L
  121.  
  122.    /* Constants for CAPS_IO_CAPS */
  123.    #define CAPS_IO_DUMMY                   1L
  124.    #define CAPS_IO_SUPPORTS_OP             2L
  125.    #define CAPS_IO_SUPPORTS_IP             3L
  126.    #define CAPS_IO_SUPPORTS_IO             4L
  127.  
  128.    /* Constants for CAPS_TECHNOLOGY */
  129.    #define CAPS_TECH_UNKNOWN               0L
  130.    #define CAPS_TECH_VECTOR_PLOTTER        1L
  131.    #define CAPS_TECH_RASTER_DISPLAY        2L
  132.    #define CAPS_TECH_RASTER_PRINTER        3L
  133.    #define CAPS_TECH_RASTER_CAMERA         4L
  134.    #define CAPS_TECH_POSTSCRIPT            5L
  135.  
  136.    /* Constants for CAPS_COLOR_TABLE_SUPPORT */
  137.    #define CAPS_COLTABL_RGB_8              1L
  138.    #define CAPS_COLTABL_RGB_8_PLUS         2L
  139.    #define CAPS_COLTABL_TRUE_MIX           4L
  140.    #define CAPS_COLTABL_REALIZE            8L
  141.  
  142.    /* Constants for CAPS_FOREGROUND_MIX_SUPPORT */
  143.    #define CAPS_FM_OR                      1L
  144.    #define CAPS_FM_OVERPAINT               2L
  145.    #define CAPS_FM_XOR                     8L
  146.    #define CAPS_FM_LEAVEALONE             16L
  147.    #define CAPS_FM_AND                    32L
  148.    #define CAPS_FM_GENERAL_BOOLEAN        64L
  149.  
  150.    /* Constants for CAPS_BACKGROUND_MIX_SUPPORT */
  151.    #define CAPS_BM_OR                      1L
  152.    #define CAPS_BM_OVERPAINT               2L
  153.    #define CAPS_BM_XOR                     8L
  154.    #define CAPS_BM_LEAVEALONE             16L
  155.    #define CAPS_BM_AND                    32L
  156.    #define CAPS_BM_GENERAL_BOOLEAN        64L
  157.    #define CAPS_BM_SRCTRANSPARENT        128L
  158.    #define CAPS_BM_DESTTRANSPARENT       256L
  159.  
  160.    /* Constants for CAPS_DEVICE_WINDOWING */
  161.    #define CAPS_DEV_WINDOWING_SUPPORT      1L
  162.  
  163.    /* Constants for CAPS_ADDITIONAL_GRAPHICS */
  164.    #define CAPS_VDD_DDB_TRANSFER            1L
  165.    #define CAPS_GRAPHICS_KERNING_SUPPORT    2L
  166.    #define CAPS_FONT_OUTLINE_DEFAULT        4L
  167.    #define CAPS_FONT_IMAGE_DEFAULT          8L
  168.    /* bits represented by values 16L and 32L are reserved */
  169.    #define CAPS_SCALED_DEFAULT_MARKERS     64L
  170.    #define CAPS_COLOR_CURSOR_SUPPORT      128L
  171.    #define CAPS_PALETTE_MANAGER           256L
  172.    #define CAPS_COSMETIC_WIDELINE_SUPPORT 512L
  173.    #define CAPS_DIRECT_FILL              1024L
  174.    #define CAPS_REBUILD_FILLS            2048L
  175.    #define CAPS_CLIP_FILLS               0x00001000 /* 4096L  */
  176.    #define CAPS_ENHANCED_FONTMETRICS     0x00002000 /* 8192L  */
  177.    #define CAPS_TRANSFORM_SUPPORT        0x00004000 /* 16384L */
  178.  
  179.    #ifndef INCL_SAADEFS
  180.  
  181.       /* Constants for CAPS_WINDOW_BYTE_ALIGNMENT */
  182.       #define CAPS_BYTE_ALIGN_REQUIRED        0L
  183.       #define CAPS_BYTE_ALIGN_RECOMMENDED     1L
  184.       #define CAPS_BYTE_ALIGN_NOT_REQUIRED    2L
  185.    #endif /* no INCL_SAADEFS */
  186.  
  187.    /* Constants for CAPS_RASTER_CAPS */
  188.    #define CAPS_RASTER_BITBLT              1L
  189.    #define CAPS_RASTER_BANDING             2L
  190.    #define CAPS_RASTER_BITBLT_SCALING      4L
  191.    #define CAPS_RASTER_SET_PEL            16L
  192.    #define CAPS_RASTER_FONTS              32L
  193.    #define CAPS_RASTER_FLOOD_FILL         64L
  194.  
  195.    #ifndef INCL_DDIDEFS
  196.  
  197.       HDC  APIENTRY DevOpenDC(HAB hab,
  198.                               LONG lType,
  199.                               PCSZ pszToken,
  200.                               LONG lCount,
  201.                               PDEVOPENDATA pdopData,
  202.                               HDC hdcComp);
  203.  
  204.       HMF  APIENTRY DevCloseDC(HDC hdc);
  205.  
  206.       BOOL  APIENTRY DevQueryCaps(HDC hdc,
  207.                                   LONG lStart,
  208.                                   LONG lCount,
  209.                                   PLONG alArray);
  210.    #endif /* no INCL_DDIDEFS */
  211.  
  212. #endif /* common DEV */
  213.  
  214. #ifdef INCL_DEV
  215.  
  216.    #ifndef INCL_SAADEFS
  217.  
  218.       /* structures for DEVESC_QUERYVIOCELLSIZES */
  219.       typedef struct _VIOSIZECOUNT    /* vios */
  220.       {
  221.          LONG maxcount;
  222.          LONG count;
  223.       } VIOSIZECOUNT;
  224.       typedef VIOSIZECOUNT *PVIOSIZECOUNT;
  225.  
  226.       typedef struct _VIOFONTCELLSIZE    /* viof */
  227.       {
  228.          LONG cx;
  229.          LONG cy;
  230.       } VIOFONTCELLSIZE;
  231.       typedef VIOFONTCELLSIZE *PVIOFONTCELLSIZE;
  232.  
  233.       /* structure for DEVESC_GETSCALINGFACTOR */
  234.       typedef struct _SFACTORS    /* sfactors */
  235.       {
  236.          LONG x;
  237.          LONG y;
  238.       } SFACTORS;
  239.       typedef SFACTORS *PSFACTORS;
  240.  
  241.       /* structure for DEVESC_NEXTBAND */
  242.       typedef struct _BANDRECT    /* bandrect */
  243.       {
  244.          LONG  xleft;
  245.          LONG  ybottom;
  246.          LONG  xright;
  247.          LONG  ytop;
  248.       } BANDRECT;
  249.       typedef BANDRECT *PBANDRECT;
  250.  
  251.       /* return codes for DevEscape */
  252.       #define DEVESC_ERROR                  (-1L)
  253.       #define DEVESC_NOTIMPLEMENTED           0L
  254.  
  255.       /* codes for DevEscape */
  256.       #define DEVESC_QUERYESCSUPPORT          0L
  257.       #define DEVESC_GETSCALINGFACTOR         1L
  258.       #define DEVESC_QUERYVIOCELLSIZES        2L
  259.       #define DEVESC_GETCP                 8000L
  260.  
  261.       #define DEVESC_STARTDOC              8150L
  262.       #define DEVESC_ENDDOC                8151L
  263.       #define DEVESC_NEXTBAND              8152L
  264.       #define DEVESC_ABORTDOC              8153L
  265.  
  266.       #define DEVESC_NEWFRAME             16300L
  267.       #define DEVESC_DRAFTMODE            16301L
  268.       #define DEVESC_FLUSHOUTPUT          16302L
  269.       #define DEVESC_RAWDATA              16303L
  270.       #define DEVESC_SETMODE              16304L
  271.  
  272.       #define DEVESC_DBE_FIRST            24450L
  273.       #define DEVESC_DBE_LAST             24455L
  274.  
  275.       /* DevEscape codes for adding extra space to character strings */
  276.       #define DEVESC_CHAR_EXTRA           16998L
  277.       #define DEVESC_BREAK_EXTRA          16999L
  278.  
  279.       /* codes for DevEscape PM_Q_ESC spool files */
  280.       #define DEVESC_STD_JOURNAL          32600L
  281.  
  282.       /* structure for DEVESC_SETMODE */
  283.       typedef struct _ESCMODE     /* em */
  284.       {
  285.          ULONG mode;
  286.          BYTE  modedata[1];
  287.       } ESCMODE;
  288.       typedef ESCMODE *PESCMODE;
  289.  
  290.       /* return codes for DevPostDeviceModes */
  291.       #define DPDM_ERROR                    (-1L)
  292.       #define DPDM_NONE                       0L
  293.  
  294.       /* codes for DevPostDeviceModes */
  295.       #define DPDM_POSTJOBPROP                0L
  296.       #define DPDM_CHANGEPROP                 1L
  297.       #define DPDM_QUERYJOBPROP               2L
  298.  
  299.       /* string types for DevQueryDeviceNames */
  300.       typedef CHAR STR16[16];     /* str16 */
  301.       typedef STR16 *PSTR16;
  302.       typedef CHAR STR32[32];     /* str32 */
  303.       typedef STR32 *PSTR32;
  304.       typedef CHAR STR64[64];     /* str64 */
  305.       typedef STR64 *PSTR64;
  306.  
  307.       /* return code for DevQueryHardcopyCaps */
  308.       #define DQHC_ERROR                    (-1L)
  309.  
  310.       /* codes for DevQueryHardcopyCaps */
  311.       #define HCAPS_CURRENT                   1L
  312.       #define HCAPS_SELECTABLE                2L
  313.  
  314.       /* structure for DevQueryHardcopyCaps */
  315.       typedef struct _HCINFO           /* hci */
  316.       {
  317.          CHAR   szFormname[32];
  318.          LONG   cx;
  319.          LONG   cy;
  320.          LONG   xLeftClip;
  321.          LONG   yBottomClip;
  322.          LONG   xRightClip;
  323.          LONG   yTopClip;
  324.          LONG   xPels;
  325.          LONG   yPels;
  326.          LONG   flAttributes;
  327.       } HCINFO;
  328.       typedef HCINFO *PHCINFO;
  329.  
  330.       /* Device Context Functions */
  331.       #ifndef INCL_DDIDEFS
  332.  
  333.          LONG  APIENTRY DevEscape(HDC hdc,
  334.                                   LONG lCode,
  335.                                   LONG lInCount,
  336.                                   PBYTE pbInData,
  337.                                   PLONG plOutCount,
  338.                                   PBYTE pbOutData);
  339.  
  340.          BOOL  APIENTRY DevQueryDeviceNames(HAB hab,
  341.                                             PCSZ pszDriverName,
  342.                                             PLONG pldn,
  343.                                             PSTR32 aDeviceName,
  344.                                             PSTR64 aDeviceDesc,
  345.                                             PLONG pldt,
  346.                                             PSTR16 aDataType);
  347.  
  348.          LONG  APIENTRY DevQueryHardcopyCaps(HDC hdc,
  349.                                              LONG lStartForm,
  350.                                              LONG lForms,
  351.                                              PHCINFO phciHcInfo);
  352.  
  353.          LONG  APIENTRY DevPostDeviceModes(HAB hab,
  354.                                            PDRIVDATA pdrivDriverData ,
  355.                                            PCSZ pszDriverName,
  356.                                            PCSZ pszDeviceName,
  357.                                            PCSZ pszName,
  358.                                            ULONG flOptions);
  359.  
  360.       #endif /* no INCL_DDIDEFS */
  361.    #endif /* no INCL_SAADEFS */
  362. #endif /* non-common DEV */
  363.  
  364. #ifdef INCL_DEVERRORS
  365.    /* AAB error codes for the DEV - same as GPI errors at present */
  366. #endif /* INCL_DEVERRORS */
  367.  
  368. #ifdef __cplusplus
  369.         }
  370. #endif
  371.  
  372. #if defined(__IBMC__)
  373.    #pragma info( none )
  374.    #ifndef __CHKHDR__
  375.       #pragma info( restore )
  376.    #endif
  377.    #pragma info( restore )
  378. #endif    /* __IBMC__ */
  379.  
  380. /**************************** end of file **********************************/
  381.