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