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