|
|
1.1 root 1: /***************************************************************************\
2: *
3: * Copyright (c) IBM Corporation 1987, 1989
4: * Copyright (c) MicroSoft Corporation 1987,1989
5: *
6: * Module Name: PMDEV.H
7: *
8: * OS/2 Presentation Manager Device Context constants, types and
9: * function declarations
10: *
11: *
12: * =======================================================================
13: *
14: * The folowing symbols are used in this file for conditional sections.
15: *
16: * INCL_DEVERRORS - defined if INCL_ERRORS defined
17: *
18: * There is a symbol used in this file called INCL_DDIDEFS. This is used to
19: * include only the definitions for the DDI. The programmer using the GPI
20: * can ignore this symbol
21: *
22: * There is a symbol used in this file called INCL_SAADEFS. This is used to
23: * include only the definitions for the SAA. The programmer using the GPI
24: * can ignore this symbol
25: *
26: \***************************************************************************/
27:
28:
29: #if !(defined(INCL_32) || defined(INCL_16))
30: #ifdef M_I386
31: #define INCL_32
32: #else /* not M_I386 */
33: #define INCL_16
34: #endif /* M_I386 */
35: #endif /* INCL_32 || INCL_16 */
36:
37: #ifdef INCL_ERRORS /* if errors are required then allow DEV errors */
38: #define INCL_DEVERRORS
39: #endif /* INCL_ERRORS */
40:
41: #ifdef INCL_DDIDEFS /* if only DDI required then enable all of DEV */
42: #define INCL_DEV
43: #endif /* INCL_DDIDEFS */
44:
45: #ifdef INCL_SAADEFS /* if only SAA required then enable all of DEV */
46: #define INCL_DEV
47: #endif /* INCL_SAADEFS */
48:
49: #if (defined(INCL_DEV) || !defined(INCL_NOCOMMON))
50:
51: /* General DEV return values */
52: #define DEV_ERROR 0L
53: #define DEV_OK 1L
54:
55: /* pointer data for DevOpenDC */
56: typedef PSZ FAR *PDEVOPENDATA;
57:
58: /* DC type for DevOpenDC */
59: #define OD_QUEUED 2L
60: #define OD_DIRECT 5L
61: #define OD_INFO 6L
62: #define OD_METAFILE 7L
63: #define OD_MEMORY 8L
64: #define OD_METAFILE_NOQUERY 9L
65:
66: /* codes for DevQueryCaps */
67: #define CAPS_FAMILY 0L
68: #define CAPS_IO_CAPS 1L
69: #define CAPS_TECHNOLOGY 2L
70: #define CAPS_DRIVER_VERSION 3L
71: #define CAPS_WIDTH 4L /* pels */
72: #define CAPS_HEIGHT 5L /* pels */
73: #define CAPS_WIDTH_IN_CHARS 6L
74: #define CAPS_HEIGHT_IN_CHARS 7L
75: #define CAPS_HORIZONTAL_RESOLUTION 8L /* pels per meter */
76: #define CAPS_VERTICAL_RESOLUTION 9L /* pels per meter */
77: #define CAPS_CHAR_WIDTH 10L /* pels */
78: #define CAPS_CHAR_HEIGHT 11L /* pels */
79: #define CAPS_SMALL_CHAR_WIDTH 12L /* pels */
80: #define CAPS_SMALL_CHAR_HEIGHT 13L /* pels */
81: #define CAPS_COLORS 14L
82: #define CAPS_COLOR_PLANES 15L
83: #define CAPS_COLOR_BITCOUNT 16L
84: #define CAPS_COLOR_TABLE_SUPPORT 17L
85: #define CAPS_MOUSE_BUTTONS 18L
86: #define CAPS_FOREGROUND_MIX_SUPPORT 19L
87: #define CAPS_BACKGROUND_MIX_SUPPORT 20L
88: #define CAPS_DEVICE_WINDOWING 31L
89: #define CAPS_ADDITIONAL_GRAPHICS 32L
90: #define CAPS_VIO_LOADABLE_FONTS 21L
91: #define CAPS_WINDOW_BYTE_ALIGNMENT 22L
92: #define CAPS_BITMAP_FORMATS 23L
93: #define CAPS_RASTER_CAPS 24L
94: #define CAPS_MARKER_HEIGHT 25L /* pels */
95: #define CAPS_MARKER_WIDTH 26L /* pels */
96: #define CAPS_DEVICE_FONTS 27L
97: #define CAPS_GRAPHICS_SUBSET 28L
98: #define CAPS_GRAPHICS_VERSION 29L
99: #define CAPS_GRAPHICS_VECTOR_SUBSET 30L
100: #define CAPS_PHYS_COLORS 33L
101: #define CAPS_COLOR_INDEX 34L
102: #define CAPS_GRAPHICS_CHAR_WIDTH 35L
103: #define CAPS_GRAPHICS_CHAR_HEIGHT 36L
104: #define CAPS_HORIZONTAL_FONT_RES 37L
105: #define CAPS_VERTICAL_FONT_RES 38L
106: #define CAPS_DEVICE_FONT_SIM 39L
107: #define CAPS_LINEWIDTH_THICK 40L /*@D2A*/
108:
109: /* Constants for CAPS_IO_CAPS */
110: #define CAPS_IO_DUMMY 1L
111: #define CAPS_IO_SUPPORTS_OP 2L
112: #define CAPS_IO_SUPPORTS_IP 3L
113: #define CAPS_IO_SUPPORTS_IO 4L
114:
115: /* Constants for CAPS_TECHNOLOGY */
116: #define CAPS_TECH_UNKNOWN 0L
117: #define CAPS_TECH_VECTOR_PLOTTER 1L
118: #define CAPS_TECH_RASTER_DISPLAY 2L
119: #define CAPS_TECH_RASTER_PRINTER 3L
120: #define CAPS_TECH_RASTER_CAMERA 4L
121: #define CAPS_TECH_POSTSCRIPT 5L
122:
123: /* Constants for CAPS_COLOR_TABLE_SUPPORT */
124: #define CAPS_COLTABL_RGB_8 1L
125: #define CAPS_COLTABL_RGB_8_PLUS 2L
126: #define CAPS_COLTABL_TRUE_MIX 4L
127: #define CAPS_COLTABL_REALIZE 8L
128:
129: /* Constants for CAPS_FOREGROUND_MIX_SUPPORT */
130: #define CAPS_FM_OR 1L
131: #define CAPS_FM_OVERPAINT 2L
132: #define CAPS_FM_XOR 8L
133: #define CAPS_FM_LEAVEALONE 16L
134: #define CAPS_FM_AND 32L
135: #define CAPS_FM_GENERAL_BOOLEAN 64L
136:
137: /* Constants for CAPS_BACKGROUND_MIX_SUPPORT */
138: #define CAPS_BM_OR 1L
139: #define CAPS_BM_OVERPAINT 2L
140: #define CAPS_BM_XOR 8L
141: #define CAPS_BM_LEAVEALONE 16L
142:
143: /* Constants for CAPS_DEVICE_WINDOWING */
144: #define CAPS_DEV_WINDOWING_SUPPORT 1L
145:
146: /* Constants for CAPS_ADDITIONAL_GRAPHICS */
147: #define CAPS_GRAPHICS_KERNING_SUPPORT 2L
148: #define CAPS_FONT_OUTLINE_DEFAULT 4L
149: #define CAPS_FONT_IMAGE_DEFAULT 8L
150: /* bits represented by values 16L and 32L are reserved */
151: #define CAPS_SCALED_DEFAULT_MARKERS 64L
152: #define CAPS_COLOR_CURSOR_SUPPORT 128L /*@D3A*/
153: #define CAPS_PALETTE_MANAGER 256L /*@D3A*/
154: #define CAPS_COSMETIC_WIDELINE_SUPPORT 512L /*@D2A*/
155:
156: #ifndef INCL_SAADEFS
157:
158: /* Constants for CAPS_WINDOW_BYTE_ALIGNMENT */
159: #define CAPS_BYTE_ALIGN_REQUIRED 0L
160: #define CAPS_BYTE_ALIGN_RECOMMENDED 1L
161: #define CAPS_BYTE_ALIGN_NOT_REQUIRED 2L
162: #endif /* no INCL_SAADEFS */
163:
164: /* Constants for CAPS_RASTER_CAPS */
165: #define CAPS_RASTER_BITBLT 1L
166: #define CAPS_RASTER_BANDING 2L
167: #define CAPS_RASTER_BITBLT_SCALING 4L
168: #define CAPS_RASTER_SET_PEL 16L
169: #define CAPS_RASTER_FONTS 32L
170: #define CAPS_RASTER_FLOOD_FILL 64L /* @D1A */
171:
172: #ifndef INCL_DDIDEFS
173: /* XLATOFF */
174: #ifdef INCL_16
175: #define DevOpenDC Dev16OpenDC
176: #define DevCloseDC Dev16CloseDC
177: #define DevQueryCaps Dev16QueryCaps
178: #endif /* INCL_16 */
179: /* XLATON */
180:
181: HDC APIENTRY DevOpenDC( HAB hab, LONG lType, PSZ pszToken
182: , LONG lCount, PDEVOPENDATA pdopData, HDC hdcComp );
183: HMF APIENTRY DevCloseDC( HDC hdc );
184: BOOL APIENTRY DevQueryCaps( HDC hdc, LONG lStart, LONG lCount, PLONG alArray );
185: #endif /* no INCL_DDIDEFS */
186:
187: #endif /* common DEV */
188: #ifdef INCL_DEV
189:
190: #ifndef INCL_SAADEFS
191: /* structures for DEVESC_QUERYVIOCELLSIZES */
192: typedef struct _VIOSIZECOUNT { /* vios */
193: LONG maxcount;
194: LONG count;
195: } VIOSIZECOUNT;
196: typedef VIOSIZECOUNT FAR * PVIOSIZECOUNT;
197:
198: typedef struct _VIOFONTCELLSIZE { /* viof */
199: LONG cx;
200: LONG cy;
201: } VIOFONTCELLSIZE;
202: typedef VIOFONTCELLSIZE FAR * PVIOFONTCELLSIZE;
203:
204: /* structure for DEVESC_GETSCALINGFACTOR */ /*@P1A*/
205: typedef struct _SFACTORS { /* sfactors */ /*@P1A*/
206: LONG x; /*@P1A*/
207: LONG y; /*@P1A*/
208: } SFACTORS; /*@P1A*/
209: typedef SFACTORS FAR * PSFACTORS; /*@P1A*/
210:
211: /* structure for DEVESC_NEXTBAND */ /*@P1A*/
212: typedef struct _BANDRECT { /* bandrect */ /*@P1A*/
213: LONG xleft; /*@P1A*/
214: LONG ybottom; /*@P1A*/
215: LONG xright; /*@P1A*/
216: LONG ytop; /*@P1A*/
217: } BANDRECT; /*@P1A*/
218: typedef BANDRECT FAR * PBANDRECT; /*@P1A*/
219:
220: /* return codes for DevEscape */
221: #define DEVESC_ERROR (-1L)
222: #define DEVESC_NOTIMPLEMENTED 0L
223:
224: /* codes for DevEscape */
225: #define DEVESC_QUERYESCSUPPORT 0L
226: #define DEVESC_GETSCALINGFACTOR 1L
227: #define DEVESC_QUERYVIOCELLSIZES 2L
228: #define DEVESC_GETCP 8000L
229:
230: #define DEVESC_STARTDOC 8150L
231: #define DEVESC_ENDDOC 8151L
232: #define DEVESC_NEXTBAND 8152L
233: #define DEVESC_ABORTDOC 8153L
234:
235: #define DEVESC_NEWFRAME 16300L
236: #define DEVESC_DRAFTMODE 16301L
237: #define DEVESC_FLUSHOUTPUT 16302L
238: #define DEVESC_RAWDATA 16303L
239: #define DEVESC_SETMODE 16304L
240:
241: #define DEVESC_DBE_FIRST 24450L
242: #define DEVESC_DBE_LAST 24455L
243:
244: /* DevEscape codes for adding extra space to character strings */
245: #define DEVESC_CHAR_EXTRA 16998L
246: #define DEVESC_BREAK_EXTRA 16999L
247:
248: /* codes for DevEscape PM_Q_ESC spool files */
249: #define DEVESC_STD_JOURNAL 32600L
250:
251: /* structure for DEVESC_SETMODE */
252: typedef struct _ESCMODE { /* em */
253: ULONG mode;
254: BYTE modedata[1];
255: } ESCMODE;
256: typedef ESCMODE FAR * PESCMODE;
257:
258: /* return codes for DevPostDeviceModes */
259: #define DPDM_ERROR (-1L)
260: #define DPDM_NONE 0L
261:
262: /* codes for DevPostDeviceModes */
263: #define DPDM_POSTJOBPROP 0L
264: #define DPDM_CHANGEPROP 1L
265: #define DPDM_QUERYJOBPROP 2L
266:
267: /* string types for DevQueryDeviceNames */
268: typedef CHAR STR16[16]; /* str16 */
269: typedef STR16 FAR *PSTR16;
270: typedef CHAR STR32[32]; /* str32 */
271: typedef STR32 FAR *PSTR32;
272: typedef CHAR STR64[64]; /* str64 */
273: typedef STR64 FAR *PSTR64;
274:
275: /* return code for DevQueryHardcopyCaps */
276: #define DQHC_ERROR (-1L)
277: /* codes for DevQueryHardcopyCaps */
278: #define HCAPS_CURRENT 1L
279: #define HCAPS_SELECTABLE 2L
280:
281: /* structure for DevQueryHardcopyCaps */
282: typedef struct _HCINFO { /* hci */
283: CHAR szFormname[32];
284: LONG cx;
285: LONG cy;
286: LONG xLeftClip;
287: LONG yBottomClip;
288: LONG xRightClip;
289: LONG yTopClip;
290: LONG xPels;
291: LONG yPels;
292: LONG flAttributes;
293: } HCINFO;
294: typedef HCINFO FAR *PHCINFO;
295:
296: /* Device Context Functions */
297: #ifndef INCL_DDIDEFS
298:
299: /* XLATOFF */
300: #ifdef INCL_16
301: #define DevEscape Dev16Escape
302: #define DevQueryDeviceNames Dev16QueryDeviceNames
303: #define DevQueryHardcopyCaps Dev16QueryHardcopyCaps
304: #define DevPostDeviceModes Dev16PostDeviceModes
305: #endif /* INCL_16 */
306: /* XLATON */
307:
308: LONG APIENTRY DevEscape( HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData
309: , PLONG plOutCount, PBYTE pbOutData );
310: BOOL APIENTRY DevQueryDeviceNames( HAB hab, PSZ pszDriverName, PLONG pldn
311: , PSTR32 aDeviceName, PSTR64 aDeviceDesc
312: , PLONG pldt, PSTR16 aDataType );
313: LONG APIENTRY DevQueryHardcopyCaps( HDC hdc, LONG lStartForm
314: , LONG lForms, PHCINFO phciHcInfo );
315: LONG APIENTRY DevPostDeviceModes( HAB hab, PDRIVDATA pdrivDriverData
316: , PSZ pszDriverName, PSZ pszDeviceName
317: , PSZ pszName, ULONG flOptions );
318:
319: #endif /* no INCL_DDIDEFS */
320: #endif /* no INCL_SAADEFS */
321:
322: #endif /* non-common DEV */
323:
324: #ifdef INCL_DEVERRORS
325:
326: /* AAB error codes for the DEV - same as GPI errors at present */
327:
328: #endif /* INCL_DEVERRORS */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.