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