home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 7.ddi / INC11 / PMDEV.H$ / PMDEV.bin
Encoding:
Text File  |  1990-01-09  |  8.0 KB  |  236 lines

  1. /**************************************************************************\
  2. *
  3. * Module Name: PMDEV.H
  4. *
  5. * OS/2 Presentation Manager Device Context constants, types and
  6. * function declarations
  7. *
  8. * Copyright (c) 1989-1990, Microsoft Corporation. All rights reserved.
  9. *
  10. * ==========================================================================
  11. *
  12. * INCL_DEVERRORS                - defined if INCL_ERRORS defined
  13. *
  14. * There is a symbol used in this file called INCL_DDIDEFS. This is used to
  15. * include only the definitions for the DDI. THe programmer using the GPI
  16. * can ignore this symbol
  17. *
  18. * There is a symbol used in this file called INCL_SAADEFS. This is used to
  19. * include only the definitions for the SAA. The programmer using the GPI
  20. * can ignore this symbol
  21. *
  22. \**************************************************************************/
  23.  
  24. #ifdef INCL_ERRORS /* if errors are required then allow DEV errors */
  25.     #define INCL_DEVERRORS
  26. #endif /* INCL_ERRORS */
  27.  
  28. #ifdef INCL_DDIDEFS /* if only DDI required then enable all of DEV */
  29.     #define INCL_DEV
  30. #endif /* INCL_DDIDEFS */
  31.  
  32. #ifdef INCL_SAADEFS /* if only SAA required then enable all of DEV */
  33.     #define INCL_DEV
  34. #endif /* INCL_SAADEFS */
  35.  
  36. #if (defined(INCL_DEV) || !defined(INCL_NOCOMMON))
  37.  
  38. /* General DEV return values */
  39. #define DEV_ERROR     0L
  40. #define DEV_OK        1L
  41.  
  42. /* pointer data for DevOpenDC */
  43. typedef PSZ FAR *PDEVOPENDATA;
  44.  
  45. /* DC type for DevOpenDC */
  46. #define OD_QUEUED     2L
  47. #define OD_DIRECT     5L
  48. #define OD_INFO       6L
  49. #define OD_METAFILE   7L
  50.  
  51. #ifndef INCL_SAADEFS
  52. #define OD_MEMORY     8L
  53. #endif /* no INCL_SAADEFS */
  54.  
  55. /* codes for DevQueryCaps */
  56. #define CAPS_FAMILY                      0L
  57. #define CAPS_IO_CAPS                     1L
  58. #define CAPS_TECHNOLOGY                  2L
  59. #define CAPS_DRIVER_VERSION              3L
  60. #define CAPS_WIDTH                       4L      /* pels            */
  61. #define CAPS_HEIGHT                      5L      /* pels            */
  62. #define CAPS_WIDTH_IN_CHARS              6L
  63. #define CAPS_HEIGHT_IN_CHARS             7L
  64. #define CAPS_HORIZONTAL_RESOLUTION       8L      /* pels per meter  */
  65. #define CAPS_VERTICAL_RESOLUTION         9L      /* pels per meter  */
  66. #define CAPS_CHAR_WIDTH                 10L      /* pels            */
  67. #define CAPS_CHAR_HEIGHT                11L      /* pels            */
  68. #define CAPS_SMALL_CHAR_WIDTH           12L      /* pels            */
  69. #define CAPS_SMALL_CHAR_HEIGHT          13L      /* pels            */
  70. #define CAPS_COLORS                     14L
  71. #define CAPS_COLOR_PLANES               15L
  72. #define CAPS_COLOR_BITCOUNT             16L
  73. #define CAPS_COLOR_TABLE_SUPPORT        17L
  74. #define CAPS_MOUSE_BUTTONS              18L
  75. #define CAPS_FOREGROUND_MIX_SUPPORT     19L
  76. #define CAPS_BACKGROUND_MIX_SUPPORT     20L
  77. #define CAPS_DEVICE_WINDOWING           31L
  78. #define CAPS_ADDITIONAL_GRAPHICS        32L
  79. #ifndef INCL_SAADEFS
  80. #define CAPS_VIO_LOADABLE_FONTS         21L
  81. #define CAPS_WINDOW_BYTE_ALIGNMENT      22L
  82. #define CAPS_BITMAP_FORMATS             23L
  83. #define CAPS_RASTER_CAPS                24L
  84. #define CAPS_MARKER_HEIGHT              25L      /* pels            */
  85. #define CAPS_MARKER_WIDTH               26L      /* pels            */
  86. #define CAPS_DEVICE_FONTS               27L
  87. #define CAPS_GRAPHICS_SUBSET            28L
  88. #define CAPS_GRAPHICS_VERSION           29L
  89. #define CAPS_GRAPHICS_VECTOR_SUBSET     30L
  90. #define CAPS_PHYS_COLORS                33L
  91. #define CAPS_COLOR_INDEX                34L
  92. #define CAPS_GRAPHICS_CHAR_WIDTH        35L
  93. #define CAPS_GRAPHICS_CHAR_HEIGHT       36L
  94. #define CAPS_HORIZONTAL_FONT_RES        37L
  95. #define CAPS_VERTICAL_FONT_RES          38L
  96. #endif /* no INCL_SAADEFS */
  97.  
  98. /* Constants for CAPS_IO_CAPS */
  99. #define CAPS_IO_DUMMY                   1L
  100. #define CAPS_IO_SUPPORTS_OP             2L
  101. #define CAPS_IO_SUPPORTS_IP             3L
  102. #define CAPS_IO_SUPPORTS_IO             4L
  103.  
  104. /* Constants for CAPS_TECHNOLOGY */
  105. #define CAPS_TECH_UNKNOWN               0L
  106. #define CAPS_TECH_VECTOR_PLOTTER        1L
  107. #define CAPS_TECH_RASTER_DISPLAY        2L
  108. #define CAPS_TECH_RASTER_PRINTER        3L
  109. #define CAPS_TECH_RASTER_CAMERA         4L
  110. #define CAPS_TECH_POSTSCRIPT            5L
  111.  
  112. /* Constants for CAPS_COLOR_TABLE_SUPPORT */
  113. #define CAPS_COLTABL_RGB_8              1L
  114. #define CAPS_COLTABL_RGB_8_PLUS         2L
  115. #define CAPS_COLTABL_TRUE_MIX           4L
  116. #define CAPS_COLTABL_REALIZE            8L
  117.  
  118. /* Constants for CAPS_FOREGROUND_MIX_SUPPORT */
  119. #define CAPS_FM_OR                      1L
  120. #define CAPS_FM_OVERPAINT               2L
  121. #define CAPS_FM_XOR                     8L
  122. #define CAPS_FM_LEAVEALONE             16L
  123. #define CAPS_FM_AND                    32L
  124. #define CAPS_FM_GENERAL_BOOLEAN        64L
  125.  
  126. /* Constants for CAPS_BACKGROUND_MIX_SUPPORT */
  127. #define CAPS_BM_OR                      1L
  128. #define CAPS_BM_OVERPAINT               2L
  129. #define CAPS_BM_XOR                     8L
  130. #define CAPS_BM_LEAVEALONE             16L
  131.  
  132. /* Constants for CAPS_DEVICE_WINDOWING */
  133. #define CAPS_DEV_WINDOWING_SUPPORT      1L
  134.  
  135. /* Constants for CAPS_ADDITIONAL_GRAPHICS */
  136. #define CAPS_GRAPHICS_KERNING_SUPPORT   2L
  137. #ifndef INCL_SAADEFS
  138. #define CAPS_FONT_OUTLINE_DEFAULT       4L
  139. #define CAPS_FONT_IMAGE_DEFAULT         8L
  140. #endif /* no INCL_SAADEFS */
  141. #define CAPS_SCALED_DEFAULT_MARKERS    16L
  142. #ifndef INCL_SAADEFS
  143.  
  144. /* Constants for CAPS_WINDOW_BYTE_ALIGNMENT */
  145. #define CAPS_BYTE_ALIGN_REQUIRED       0L
  146. #define CAPS_BYTE_ALIGN_RECOMMENDED    1L
  147. #define CAPS_BYTE_ALIGN_NOT_REQUIRED   2L
  148.  
  149. /* Constants for CAPS_RASTER_CAPS */
  150. #define CAPS_RASTER_BITBLT              1L
  151. #define CAPS_RASTER_BANDING             2L
  152. #define CAPS_RASTER_BITBLT_SCALING      4L
  153. #define CAPS_RASTER_SET_PEL            16L
  154. #define CAPS_RASTER_FONTS              32L
  155. #endif /* no INCL_SAADEFS */
  156.  
  157. #ifndef INCL_DDIDEFS
  158. HDC  APIENTRY DevOpenDC(HAB, LONG, PSZ, LONG, PDEVOPENDATA, HDC);
  159. HMF  APIENTRY DevCloseDC(HDC);
  160. BOOL APIENTRY DevQueryCaps(HDC,LONG,LONG,PLONG);
  161. #endif /* no INCL_DDIDEFS */
  162.  
  163. #endif /* common DEV */
  164. #ifdef INCL_DEV
  165.  
  166. #ifndef INCL_SAADEFS
  167. /* return codes for DevEscape */
  168. #define DEVESC_ERROR            (-1L)
  169. #define DEVESC_NOTIMPLEMENTED   0L
  170. /* codes for DevEscape */
  171. #define DEVESC_QUERYESCSUPPORT  0L
  172. #define DEVESC_GETSCALINGFACTOR 1L
  173. #define DEVESC_STARTDOC         8150L
  174. #define DEVESC_ENDDOC           8151L
  175. #define DEVESC_NEXTBAND         8152L
  176. #define DEVESC_ABORTDOC         8153L
  177. #define DEVESC_NEWFRAME         16300L
  178. #define DEVESC_DRAFTMODE        16301L
  179. #define DEVESC_FLUSHOUTPUT      16302L
  180. #define DEVESC_RAWDATA          16303L
  181.  
  182. /* codes for DevEscape PM_Q_ESC spool files */
  183. #define DEVESC_STD_JOURNAL      32600L
  184.  
  185. /* return codes for DevPostDeviceModes */
  186. #define DPDM_ERROR   (-1L)
  187. #define DPDM_NONE    0L
  188.  
  189. /* string types for DevQueryDeviceNames */
  190. typedef CHAR STR16[16];     /* str16 */
  191. typedef STR16 FAR *PSTR16;
  192. typedef CHAR STR32[32];     /* str32 */
  193. typedef STR32 FAR *PSTR32;
  194. typedef CHAR STR64[64];     /* str64 */
  195. typedef STR64 FAR *PSTR64;
  196.  
  197. /* return code for DevQueryHardcopyCaps */
  198. #define DQHC_ERROR   (-1L)
  199. /* codes for DevQueryHardcopyCaps */
  200. #define HCAPS_CURRENT 1L
  201.  
  202. /* structure for DevQueryHardcopyCaps */
  203. typedef struct _HCINFO {        /* hci */
  204.     CHAR   szFormname[32];
  205.     LONG   cx;
  206.     LONG   cy;
  207.     LONG   xLeftClip;
  208.     LONG   yBottomClip;
  209.     LONG   xRightClip;
  210.     LONG   yTopClip;
  211.     LONG   xPels;
  212.     LONG   yPels;
  213.     LONG   flAttributes;
  214. } HCINFO;
  215. typedef HCINFO FAR *PHCINFO;
  216.  
  217. /*** Device Context Functions */
  218. #ifndef INCL_DDIDEFS
  219.  
  220. LONG APIENTRY DevEscape(HDC, LONG, LONG, PBYTE, PLONG, PBYTE);
  221. BOOL APIENTRY DevQueryDeviceNames(HAB, PSZ, PLONG, PSTR32, PSTR64,
  222.                                   PLONG, PSTR16);
  223. LONG APIENTRY DevQueryHardcopyCaps(HDC, LONG, LONG, PHCINFO);
  224. LONG APIENTRY DevPostDeviceModes(HAB, PDRIVDATA, PSZ, PSZ, PSZ, ULONG);
  225.  
  226. #endif /* no INCL_DDIDEFS */
  227. #endif /* no INCL_SAADEFS */
  228.  
  229. #endif /* non-common DEV */
  230.  
  231. #ifdef INCL_DEVERRORS
  232.  
  233. /* AAB error codes for the DEV - same as GPI errors at present */
  234.  
  235. #endif /* INCL_DEVERRORS */
  236.