home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 7.ddi / INCLUDE / PMDEV.H$ / PMDEV.bin
Encoding:
Text File  |  1989-11-28  |  8.4 KB  |  281 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. * The folowing symbols are used in this file for conditional sections.
  13. *
  14. * INCL_DEVERRORS        - defined if INCL_ERRORS defined
  15. *
  16. * There is a symbol used in this file called INCL_DDIDEFS. This is used to
  17. * include only the definitions for the DDI. The programmer using the GPI
  18. * can ignore this symbol
  19. *
  20. * There is a symbol used in this file called INCL_SAADEFS. This is used to
  21. * include only the definitions for the SAA. The programmer using the GPI
  22. * can ignore this symbol
  23. *
  24. \***************************************************************************/
  25.  
  26. #ifdef INCL_ERRORS /* if errors are required then allow DEV errors */
  27.     #define INCL_DEVERRORS
  28. #endif /* INCL_ERRORS */
  29.  
  30. #ifdef INCL_DDIDEFS /* if only DDI required then enable all of DEV */
  31.     #define INCL_DEV
  32. #endif /* INCL_DDIDEFS */
  33.  
  34. #ifdef INCL_SAADEFS /* if only SAA required then enable all of DEV */
  35.     #define INCL_DEV
  36. #endif /* INCL_SAADEFS */
  37.  
  38. #if ((defined(INCL_DEV) || !defined(INCL_NOCOMMON)) && !defined(INCL_DEV_INCLUDED))
  39. #define INCL_DEV_INCLUDED
  40.  
  41. /* General DEV return values */
  42. #define DEV_ERROR            0L
  43. #define DEV_OK                1L
  44.  
  45. /* pointer data for DevOpenDC */
  46. typedef PSZ FAR *PDEVOPENDATA;
  47.  
  48. /* DC type for DevOpenDC */
  49. #define OD_QUEUED            2L
  50. #define OD_DIRECT            5L
  51. #define OD_INFO             6L
  52. #define OD_METAFILE            7L
  53. #define OD_MEMORY            8L
  54. #define OD_METAFILE_NOQUERY        9L
  55.  
  56. /* codes for DevQueryCaps */
  57. #define CAPS_FAMILY             0L
  58. #define CAPS_IO_CAPS             1L
  59. #define CAPS_TECHNOLOGY          2L
  60. #define CAPS_DRIVER_VERSION         3L
  61. #define CAPS_WIDTH             4L    /* pels       */
  62. #define CAPS_HEIGHT             5L    /* pels       */
  63. #define CAPS_WIDTH_IN_CHARS         6L
  64. #define CAPS_HEIGHT_IN_CHARS         7L
  65. #define CAPS_HORIZONTAL_RESOLUTION     8L    /* pels per meter */
  66. #define CAPS_VERTICAL_RESOLUTION     9L    /* pels per meter */
  67. #define CAPS_CHAR_WIDTH         10L    /* pels       */
  68. #define CAPS_CHAR_HEIGHT        11L    /* pels       */
  69. #define CAPS_SMALL_CHAR_WIDTH        12L    /* pels       */
  70. #define CAPS_SMALL_CHAR_HEIGHT        13L    /* pels       */
  71. #define CAPS_COLORS            14L
  72. #define CAPS_COLOR_PLANES        15L
  73. #define CAPS_COLOR_BITCOUNT        16L
  74. #define CAPS_COLOR_TABLE_SUPPORT    17L
  75. #define CAPS_MOUSE_BUTTONS        18L
  76. #define CAPS_FOREGROUND_MIX_SUPPORT    19L
  77. #define CAPS_BACKGROUND_MIX_SUPPORT    20L
  78. #define CAPS_DEVICE_WINDOWING        31L
  79. #define CAPS_ADDITIONAL_GRAPHICS    32L
  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. #define CAPS_DEVICE_FONT_SIM        39L
  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. #define CAPS_FONT_OUTLINE_DEFAULT     4L
  138. #define CAPS_FONT_IMAGE_DEFAULT      8L
  139. /* bits represented by values 16L and 32L are reserved */
  140. #define CAPS_SCALED_DEFAULT_MARKERS    64L
  141. #ifndef INCL_SAADEFS
  142.  
  143. /* Constants for CAPS_WINDOW_BYTE_ALIGNMENT */
  144. #define CAPS_BYTE_ALIGN_REQUIRED    0L
  145. #define CAPS_BYTE_ALIGN_RECOMMENDED    1L
  146. #define CAPS_BYTE_ALIGN_NOT_REQUIRED    2L
  147. #endif /* no INCL_SAADEFS */
  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.  
  156. #ifndef INCL_DDIDEFS
  157. HDC  APIENTRY DevOpenDC(HAB hab, LONG lType, PSZ pszToken,
  158.             LONG lCount, PDEVOPENDATA pdopData, HDC hdcComp);
  159. HMF  APIENTRY DevCloseDC(HDC hdc);
  160. BOOL APIENTRY DevQueryCaps(HDC hdc, LONG lStart, LONG lCount, PLONG alArray);
  161. #endif /* no INCL_DDIDEFS */
  162.  
  163. /* end of common DEV */
  164.  
  165. #ifdef    INCL_DEV
  166.  
  167. #ifndef INCL_SAADEFS
  168. /* structures for DEVESC_QUERYVIOCELLSIZES */
  169. typedef struct _VIOSIZECOUNT { /* vios */
  170.     LONG maxcount;
  171.     LONG count;
  172. } VIOSIZECOUNT;
  173. typedef VIOSIZECOUNT FAR * PVIOSIZECOUNT;
  174.  
  175. typedef struct _VIOFONTCELLSIZE { /* viof */
  176.     LONG cx;
  177.     LONG cy;
  178. } VIOFONTCELLSIZE;
  179. typedef VIOFONTCELLSIZE FAR * PVIOFONTCELLSIZE;
  180.  
  181. /* structure for DEVESC_GETCP */
  182. typedef struct _ESCGETCP { /* escgcp */
  183.     ULONG  options;
  184.     USHORT codepage;
  185.     USHORT fontid;
  186. } ESCGETCP;
  187. typedef ESCGETCP FAR * PESCGETCP;
  188.  
  189. /* return codes for DevEscape */
  190. #define DEVESC_ERROR              (-1L)
  191. #define DEVESC_NOTIMPLEMENTED        0L
  192.  
  193. /* codes for DevEscape */
  194. #define DEVESC_QUERYESCSUPPORT        0L
  195. #define DEVESC_GETSCALINGFACTOR     1L
  196. #define DEVESC_QUERYVIOCELLSIZES    2L
  197. #define DEVESC_GETCP             8000L
  198.  
  199. #define DEVESC_STARTDOC          8150L
  200. #define DEVESC_ENDDOC             8151L
  201. #define DEVESC_NEXTBAND          8152L
  202. #define DEVESC_ABORTDOC          8153L
  203.  
  204. #define DEVESC_NEWFRAME         16300L
  205. #define DEVESC_DRAFTMODE        16301L
  206. #define DEVESC_FLUSHOUTPUT        16302L
  207. #define DEVESC_RAWDATA            16303L
  208. #define DEVESC_DBE_FIRST        24450L
  209. #define DEVESC_DBE_LAST         24455L
  210.  
  211. /* DevEscape codes for adding extra space to character strings */
  212. #define DEVESC_CHAR_EXTRA        16998L
  213. #define DEVESC_BREAK_EXTRA        16999L
  214.  
  215. /* codes for DevEscape PM_Q_ESC spool files */
  216. #define DEVESC_STD_JOURNAL        32600L
  217.  
  218. /* return codes for DevPostDeviceModes */
  219. #define DPDM_ERROR              (-1L)
  220. #define DPDM_NONE            0L
  221.  
  222. /* codes for DevPostDeviceModes */
  223. #define DPDM_POSTJOBPROP        0L
  224. #define DPDM_CHANGEPROP         1L
  225. #define DPDM_QUERYJOBPROP        2L
  226.  
  227. /* string types for DevQueryDeviceNames */
  228. typedef CHAR STR16[16];     /* str16 */
  229. typedef STR16 FAR *PSTR16;
  230. typedef CHAR STR32[32];     /* str32 */
  231. typedef STR32 FAR *PSTR32;
  232. typedef CHAR STR64[64];     /* str64 */
  233. typedef STR64 FAR *PSTR64;
  234.  
  235. /* return code for DevQueryHardcopyCaps */
  236. #define DQHC_ERROR              (-1L)
  237. /* codes for DevQueryHardcopyCaps */
  238. #define HCAPS_CURRENT            1L
  239. #define HCAPS_SELECTABLE        2L
  240.  
  241. /* structure for DevQueryHardcopyCaps */
  242. typedef struct _HCINFO {    /* hci */
  243.     CHAR szFormname[32];
  244.     LONG cx;
  245.     LONG cy;
  246.     LONG xLeftClip;
  247.     LONG yBottomClip;
  248.     LONG xRightClip;
  249.     LONG yTopClip;
  250.     LONG xPels;
  251.     LONG yPels;
  252.     LONG flAttributes;
  253. } HCINFO;
  254. typedef HCINFO FAR *PHCINFO;
  255.  
  256. /* Device Context Functions */
  257. #ifndef INCL_DDIDEFS
  258.  
  259. LONG APIENTRY DevEscape(HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData,
  260.             PLONG plOutCount, PBYTE pbOutData);
  261. BOOL APIENTRY DevQueryDeviceNames(HAB hab, PSZ pszDriverName, PLONG pldn,
  262.                   PSTR32 aDeviceName, PSTR64 aDeviceDesc,
  263.                   PLONG pldt, PSTR16 aDataType);
  264. LONG APIENTRY DevQueryHardcopyCaps(HDC hdc, LONG lStartForm,
  265.                    LONG lForms, PHCINFO phciHcInfo);
  266. LONG APIENTRY DevPostDeviceModes(HAB hab, PDRIVDATA pdrivDriverData,
  267.                  PSZ pszDriverName, PSZ pszDeviceName,
  268.                  PSZ pszName, ULONG flOptions);
  269.  
  270. #endif /* no INCL_DDIDEFS */
  271. #endif /* no INCL_SAADEFS */
  272.  
  273. #endif /* INCL_DEV */
  274. #endif /* INCL_DEV or COMMON */
  275.  
  276. #ifdef INCL_DEVERRORS
  277.  
  278. /* AAB error codes for the DEV - same as GPI errors at present */
  279.  
  280. #endif /* INCL_DEVERRORS */
  281.