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