|
|
1.1 root 1: /***************************************************************************\
2: *
3: * Module Name: PMDEV.H
4: *
5: * OS/2 Presentation Manager Device Context constants, types and
6: * function declarations
7: *
1.1.1.2 ! root 8: * Copyright (c) 1989 Microsoft Corporation
1.1 root 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: \***************************************************************************/
1.1.1.2 ! root 23:
1.1 root 24: #ifdef INCL_ERRORS /* if errors are required then allow DEV errors */
25: #define INCL_DEVERRORS
26: #endif /* INCL_ERRORS */
1.1.1.2 ! root 27:
1.1 root 28: #ifdef INCL_DDIDEFS /* if only DDI required then enable all of DEV */
29: #define INCL_DEV
30: #endif /* INCL_DDIDEFS */
1.1.1.2 ! root 31:
1.1 root 32: #ifdef INCL_SAADEFS /* if only SAA required then enable all of DEV */
33: #define INCL_DEV
34: #endif /* INCL_SAADEFS */
1.1.1.2 ! root 35:
! 36: #if (defined(INCL_DEV) || !defined(INCL_NOCOMMON))
! 37:
1.1 root 38: /* General DEV return values */
39: #define DEV_ERROR 0L
40: #define DEV_OK 1L
1.1.1.2 ! root 41:
1.1 root 42: /* pointer data for DevOpenDC */
43: typedef PSZ FAR *PDEVOPENDATA;
1.1.1.2 ! root 44:
1.1 root 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
1.1.1.2 ! root 50:
1.1 root 51: #ifndef INCL_SAADEFS
52: #define OD_MEMORY 8L
53: #endif /* no INCL_SAADEFS */
1.1.1.2 ! root 54:
1.1 root 55: /* codes for DevQueryCaps */
1.1.1.2 ! root 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
1.1 root 79: #ifndef INCL_SAADEFS
1.1.1.2 ! root 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
1.1 root 96: #endif /* no INCL_SAADEFS */
1.1.1.2 ! root 97:
1.1 root 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
1.1.1.2 ! root 103:
1.1 root 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
1.1.1.2 ! root 110: #define CAPS_TECH_POSTSCRIPT 5L
! 111:
1.1 root 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
1.1.1.2 ! root 117:
1.1 root 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
1.1.1.2 ! root 125:
1.1 root 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
1.1.1.2 ! root 131:
1.1 root 132: /* Constants for CAPS_DEVICE_WINDOWING */
133: #define CAPS_DEV_WINDOWING_SUPPORT 1L
1.1.1.2 ! root 134:
1.1 root 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
1.1.1.2 ! root 140: #endif /* no INCL_SAADEFS */
! 141: #define CAPS_SCALED_DEFAULT_MARKERS 16L
! 142: #ifndef INCL_SAADEFS
! 143:
1.1 root 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
1.1.1.2 ! root 148:
1.1 root 149: /* Constants for CAPS_RASTER_CAPS */
1.1.1.2 ! root 150: #define CAPS_RASTER_BITBLT 1L
! 151: #define CAPS_RASTER_BANDING 2L
! 152: #define CAPS_RASTER_BITBLT_SCALING 4L
1.1 root 153: #define CAPS_RASTER_SET_PEL 16L
1.1.1.2 ! root 154: #define CAPS_RASTER_FONTS 32L
1.1 root 155: #endif /* no INCL_SAADEFS */
1.1.1.2 ! root 156:
1.1 root 157: #ifndef INCL_DDIDEFS
1.1.1.2 ! root 158: HDC APIENTRY DevOpenDC(HAB, LONG, PSZ, LONG, PDEVOPENDATA, HDC);
1.1 root 159: HMF APIENTRY DevCloseDC(HDC);
160: BOOL APIENTRY DevQueryCaps(HDC,LONG,LONG,PLONG);
161: #endif /* no INCL_DDIDEFS */
1.1.1.2 ! root 162:
1.1 root 163: #endif /* common DEV */
164: #ifdef INCL_DEV
1.1.1.2 ! root 165:
1.1 root 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
1.1.1.2 ! root 181:
! 182: /* codes for DevEscape PM_Q_ESC spool files */
1.1 root 183: #define DEVESC_STD_JOURNAL 32600L
1.1.1.2 ! root 184:
1.1 root 185: /* return codes for DevPostDeviceModes */
186: #define DPDM_ERROR (-1L)
187: #define DPDM_NONE 0L
1.1.1.2 ! root 188:
1.1 root 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;
1.1.1.2 ! root 196:
1.1 root 197: /* return code for DevQueryHardcopyCaps */
198: #define DQHC_ERROR (-1L)
1.1.1.2 ! root 199: /* codes for DevQueryHardcopyCaps */
! 200: #define HCAPS_CURRENT 1L
! 201:
1.1 root 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;
1.1.1.2 ! root 216:
1.1 root 217: /*** Device Context Functions */
218: #ifndef INCL_DDIDEFS
1.1.1.2 ! root 219:
1.1 root 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);
1.1.1.2 ! root 224: LONG APIENTRY DevPostDeviceModes(HAB,PDRIVDATA,PSZ,PSZ,PSZ,ULONG);
! 225:
1.1 root 226: #endif /* no INCL_DDIDEFS */
1.1.1.2 ! root 227: #endif /* no INCL_SAADEFS */
! 228:
1.1 root 229: #endif /* non-common DEV */
1.1.1.2 ! root 230:
1.1 root 231: #ifdef INCL_DEVERRORS
1.1.1.2 ! root 232:
1.1 root 233: /* AAB error codes for the DEV - same as GPI errors at present */
1.1.1.2 ! root 234:
1.1 root 235: #endif /* INCL_DEVERRORS */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.