d3d9/tests: Accept AMD GPU sysmem sample failure in test_mipmap_upload.
[wine.git] / dlls / wineps.drv / psdrv.h
blob81cb0206e7ec741b0543dc543081abca1e3b5c56
1 /*
2 * PostScript driver definitions
4 * Copyright 1998 Huw D M Davies
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_PSDRV_H
22 #define __WINE_PSDRV_H
24 #include <stdarg.h>
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wingdi.h"
29 #include "winspool.h"
31 #include "wine/gdi_driver.h"
32 #include "wine/list.h"
34 typedef struct {
35 INT index;
36 LPCSTR sz;
37 } GLYPHNAME;
39 typedef struct {
40 LONG UV;
41 const GLYPHNAME *name;
42 } UNICODEGLYPH;
44 typedef struct {
45 float llx, lly, urx, ury;
46 } AFMBBOX;
48 typedef struct _tagAFMLIGS {
49 char *successor;
50 char *ligature;
51 struct _tagAFMLIGS *next;
52 } AFMLIGS;
54 typedef struct {
55 int C; /* character */
56 LONG UV;
57 float WX;
58 const GLYPHNAME *N; /* name */
59 AFMBBOX B;
60 const AFMLIGS *L; /* Ligatures */
61 } OLD_AFMMETRICS;
63 typedef struct {
64 INT C; /* AFM encoding (or -1) */
65 LONG UV; /* Unicode value */
66 FLOAT WX; /* Advance width */
67 const GLYPHNAME *N; /* Glyph name */
68 } AFMMETRICS;
70 typedef struct {
71 USHORT usUnitsPerEm; /* head:unitsPerEm */
72 SHORT sAscender; /* hhea:Ascender */
73 SHORT sDescender; /* hhea:Descender */
74 SHORT sLineGap; /* hhea:LineGap */
75 SHORT sAvgCharWidth; /* OS/2:xAvgCharWidth */
76 SHORT sTypoAscender; /* OS/2:sTypoAscender */
77 SHORT sTypoDescender; /* OS/2:sTypoDescender */
78 SHORT sTypoLineGap; /* OS/2:sTypeLineGap */
79 USHORT usWinAscent; /* OS/2:usWinAscent */
80 USHORT usWinDescent; /* OS/2:usWinDescent */
81 } WINMETRICS;
83 typedef struct _tagAFM {
84 LPCSTR FontName;
85 LPCSTR FullName;
86 LPCSTR FamilyName;
87 LPCSTR EncodingScheme;
88 LONG Weight; /* FW_NORMAL etc. */
89 float ItalicAngle;
90 BOOL IsFixedPitch;
91 float UnderlinePosition;
92 float UnderlineThickness;
93 AFMBBOX FontBBox;
94 float Ascender;
95 float Descender;
96 WINMETRICS WinMetrics;
97 int NumofMetrics;
98 const AFMMETRICS *Metrics;
99 } AFM;
101 /* Note no 'next' in AFM. Use AFMLISTENTRY as a container. This allows more than
102 one list to exist without having to reallocate the entire AFM structure. We
103 keep a global list of all afms (PSDRV_AFMFontList) plus a list of available
104 fonts for each DC (dc->physDev->Fonts) */
106 typedef struct _tagAFMLISTENTRY {
107 const AFM *afm;
108 struct _tagAFMLISTENTRY *next;
109 } AFMLISTENTRY;
111 typedef struct _tagFONTFAMILY {
112 char *FamilyName; /* family name */
113 AFMLISTENTRY *afmlist; /* list of afms for this family */
114 struct _tagFONTFAMILY *next; /* next family */
115 } FONTFAMILY;
117 extern FONTFAMILY *PSDRV_AFMFontList DECLSPEC_HIDDEN;
118 extern const AFM *const PSDRV_BuiltinAFMs[] DECLSPEC_HIDDEN; /* last element is NULL */
120 typedef struct
122 struct list entry;
123 char *Name;
124 } FONTNAME;
126 typedef struct {
127 float llx, lly, urx, ury;
128 } IMAGEABLEAREA;
130 typedef struct {
131 float x, y;
132 } PAPERDIMENSION;
134 /* Solaris kludge */
135 #undef PAGESIZE
136 typedef struct _tagPAGESIZE {
137 struct list entry;
138 char *Name;
139 char *FullName;
140 char *InvocationString;
141 IMAGEABLEAREA *ImageableArea;
142 PAPERDIMENSION *PaperDimension;
143 WORD WinPage; /*eg DMPAPER_A4. Doesn't really belong here */
144 } PAGESIZE;
147 /* For BANDINFO Escape */
148 typedef struct _BANDINFOSTRUCT
150 BOOL GraphicsFlag;
151 BOOL TextFlag;
152 RECT GraphicsRect;
153 } BANDINFOSTRUCT, *PBANDINFOSTRUCT;
155 typedef struct
157 struct list entry;
158 char *Feature1;
159 char *Value1;
160 char *Feature2;
161 char *Value2;
162 } CONSTRAINT;
164 typedef struct
166 struct list entry;
167 const char *Name;
168 const char *FullName;
169 char *InvocationString;
170 WORD WinBin; /* eg DMBIN_LOWER */
171 } INPUTSLOT;
173 typedef enum _RASTERIZEROPTION
174 {RO_None, RO_Accept68K, RO_Type42, RO_TrueImage} RASTERIZEROPTION;
176 typedef struct
178 struct list entry;
179 char *Name;
180 char *FullName;
181 char *InvocationString;
182 WORD WinDuplex; /* eg DMDUP_SIMPLEX */
183 } DUPLEX;
185 typedef struct
187 struct list entry;
188 int resx, resy;
189 char *InvocationString;
190 } RESOLUTION;
192 /* Many Mac OS X based ppd files don't include a *ColorDevice line, so
193 we use a tristate here rather than a boolean. Code that
194 cares is expected to treat these as if they were colour. */
195 typedef enum {
196 CD_NotSpecified,
197 CD_False,
198 CD_True
199 } COLORDEVICE;
201 typedef struct {
202 char *NickName;
203 int LanguageLevel;
204 COLORDEVICE ColorDevice;
205 struct list Resolutions;
206 int DefaultResolution;
207 signed int LandscapeOrientation;
208 char *JCLBegin;
209 char *JCLToPSInterpreter;
210 char *JCLEnd;
211 char *DefaultFont;
212 struct list InstalledFonts;
213 struct list PageSizes;
214 PAGESIZE *DefaultPageSize;
215 struct list Constraints;
216 struct list InputSlots;
217 RASTERIZEROPTION TTRasterizer;
218 struct list Duplexes;
219 DUPLEX *DefaultDuplex;
220 } PPD;
222 typedef struct {
223 DEVMODEW dmPublic;
224 struct _tagdocprivate {
225 int dummy;
226 } dmDocPrivate;
227 struct _tagdrvprivate {
228 UINT numInstalledOptions; /* Options at end of struct */
229 } dmDrvPrivate;
231 /* Now comes:
233 numInstalledOptions of OPTIONs
237 } PSDRV_DEVMODE;
239 typedef struct
241 struct list entry;
242 WCHAR *friendly_name;
243 PPD *ppd;
244 PSDRV_DEVMODE *Devmode;
245 FONTFAMILY *Fonts;
246 PPRINTER_ENUM_VALUESA FontSubTable;
247 DWORD FontSubTableSize;
248 } PRINTERINFO;
250 typedef struct {
251 float r, g, b;
252 } PSRGB;
254 typedef struct {
255 float i;
256 } PSGRAY;
259 /* def's for PSCOLOR.type */
260 #define PSCOLOR_GRAY 0
261 #define PSCOLOR_RGB 1
263 typedef struct {
264 int type;
265 union {
266 PSRGB rgb;
267 PSGRAY gray;
268 } value;
269 } PSCOLOR;
271 typedef struct {
272 const AFM *afm;
273 float scale;
274 TEXTMETRICW tm;
275 } BUILTIN;
277 typedef struct tagTYPE42 TYPE42;
279 typedef struct tagTYPE1 TYPE1;
281 enum downloadtype {
282 Type1, Type42
285 typedef struct _tagDOWNLOAD {
286 enum downloadtype type;
287 union {
288 TYPE1 *Type1;
289 TYPE42 *Type42;
290 } typeinfo;
291 char *ps_name;
292 struct _tagDOWNLOAD *next;
293 } DOWNLOAD;
295 enum fontloc {
296 Builtin, Download
299 typedef struct
301 INT xx, xy, yx, yy;
302 } matrix;
304 enum fontset { UNSET = 0, HORIZONTAL_SET, VERTICAL_SET };
306 typedef struct {
307 enum fontloc fontloc;
308 union {
309 BUILTIN Builtin;
310 DOWNLOAD *Download;
311 } fontinfo;
313 matrix size;
314 PSCOLOR color;
315 enum fontset set; /* Have we done a setfont yet */
317 /* These are needed by PSDRV_ExtTextOut */
318 int escapement;
319 int underlineThickness;
320 int underlinePosition;
321 int strikeoutThickness;
322 int strikeoutPosition;
324 } PSFONT;
326 typedef struct {
327 PSCOLOR color;
328 BOOL set;
329 struct brush_pattern pattern;
330 } PSBRUSH;
332 #define MAX_DASHLEN 16
334 typedef struct {
335 INT style;
336 INT width;
337 BYTE join;
338 BYTE endcap;
339 DWORD dash[MAX_DASHLEN];
340 DWORD dash_len;
341 PSCOLOR color;
342 BOOL set;
343 } PSPEN;
345 enum passthrough
347 passthrough_none,
348 passthrough_active,
349 passthrough_had_rect, /* See the comment in PSDRV_Rectangle */
352 typedef struct {
353 DWORD id; /* Job id */
354 HANDLE hprinter; /* Printer handle */
355 LPWSTR doc_name; /* Document Name */
356 BOOL banding; /* Have we received a NEXTBAND */
357 BOOL OutOfPage; /* Page header not sent yet */
358 INT PageNo;
359 BOOL quiet; /* Don't actually output anything */
360 enum passthrough passthrough_state;
361 } JOB;
363 typedef struct
365 struct gdi_physdev dev;
366 PSFONT font; /* Current PS font */
367 DOWNLOAD *downloaded_fonts;
368 PSPEN pen;
369 PSBRUSH brush;
370 PSCOLOR bkColor;
371 PSCOLOR inkColor; /* Last colour set */
372 JOB job;
373 PSDRV_DEVMODE *Devmode;
374 PRINTERINFO *pi;
375 SIZE PageSize; /* Physical page size in device units */
376 RECT ImageableArea; /* Imageable area in device units */
377 /* NB both PageSize and ImageableArea
378 are not rotated in landscape mode,
379 so PageSize.cx is generally
380 < PageSize.cy */
381 int horzRes; /* device caps */
382 int vertRes;
383 int horzSize;
384 int vertSize;
385 int logPixelsX;
386 int logPixelsY;
388 int pathdepth;
389 } PSDRV_PDEVICE;
391 static inline PSDRV_PDEVICE *get_psdrv_dev( PHYSDEV dev )
393 return (PSDRV_PDEVICE *)dev;
396 extern PSDRV_PDEVICE *create_psdrv_physdev( HDC hdc, const WCHAR *device,
397 const PSDRV_DEVMODE *devmode ) DECLSPEC_HIDDEN;
400 * Every glyph name in the Adobe Glyph List and the 35 core PostScript fonts
403 extern const INT PSDRV_AGLGlyphNamesSize DECLSPEC_HIDDEN;
404 extern GLYPHNAME PSDRV_AGLGlyphNames[] DECLSPEC_HIDDEN;
408 * The AGL encoding vector
411 extern const INT PSDRV_AGLbyNameSize DECLSPEC_HIDDEN; /* sorted by name */
412 extern const UNICODEGLYPH PSDRV_AGLbyName[] DECLSPEC_HIDDEN; /* duplicates omitted */
414 extern const INT PSDRV_AGLbyUVSize DECLSPEC_HIDDEN; /* sorted by UV */
415 extern const UNICODEGLYPH PSDRV_AGLbyUV[] DECLSPEC_HIDDEN; /* duplicates included */
417 extern HINSTANCE PSDRV_hInstance DECLSPEC_HIDDEN;
418 extern HANDLE PSDRV_Heap DECLSPEC_HIDDEN;
419 extern char *PSDRV_ANSIVector[256] DECLSPEC_HIDDEN;
420 extern HFONT PSDRV_DefaultFont DECLSPEC_HIDDEN;
422 extern INPUTSLOT *find_slot( PPD *ppd, const PSDRV_DEVMODE *dm ) DECLSPEC_HIDDEN;
423 extern PAGESIZE *find_pagesize( PPD *ppd, const PSDRV_DEVMODE *dm ) DECLSPEC_HIDDEN;
424 extern DUPLEX *find_duplex( PPD *ppd, const PSDRV_DEVMODE *dm ) DECLSPEC_HIDDEN;
426 /* GDI driver functions */
427 extern BOOL CDECL PSDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
428 INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
429 extern BOOL CDECL PSDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
430 INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
431 extern BOOL CDECL PSDRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN;
432 extern INT CDECL PSDRV_EndDoc( PHYSDEV dev ) DECLSPEC_HIDDEN;
433 extern INT CDECL PSDRV_EndPage( PHYSDEV dev ) DECLSPEC_HIDDEN;
434 extern BOOL CDECL PSDRV_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LPARAM lp ) DECLSPEC_HIDDEN;
435 extern INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
436 INT cbOutput, LPVOID out_data ) DECLSPEC_HIDDEN;
437 extern BOOL CDECL PSDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
438 const RECT *lprect, LPCWSTR str, UINT count, const INT *lpDx ) DECLSPEC_HIDDEN;
439 extern BOOL CDECL PSDRV_FillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
440 extern BOOL CDECL PSDRV_GetCharWidth(PHYSDEV dev, UINT first, UINT count, const WCHAR *chars, INT *buffer) DECLSPEC_HIDDEN;
441 extern BOOL CDECL PSDRV_GetTextExtentExPoint(PHYSDEV dev, LPCWSTR str, INT count, LPINT alpDx) DECLSPEC_HIDDEN;
442 extern BOOL CDECL PSDRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics) DECLSPEC_HIDDEN;
443 extern BOOL CDECL PSDRV_LineTo(PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
444 extern BOOL CDECL PSDRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
445 extern BOOL CDECL PSDRV_PatBlt(PHYSDEV dev, struct bitblt_coords *dst, DWORD dwRop) DECLSPEC_HIDDEN;
446 extern BOOL CDECL PSDRV_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
447 INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
448 extern BOOL CDECL PSDRV_PolyBezier( PHYSDEV dev, const POINT *pts, DWORD count ) DECLSPEC_HIDDEN;
449 extern BOOL CDECL PSDRV_PolyBezierTo( PHYSDEV dev, const POINT *pts, DWORD count ) DECLSPEC_HIDDEN;
450 extern BOOL CDECL PSDRV_PolyPolygon( PHYSDEV dev, const POINT* pts, const INT* counts, UINT polygons ) DECLSPEC_HIDDEN;
451 extern BOOL CDECL PSDRV_PolyPolyline( PHYSDEV dev, const POINT* pts, const DWORD* counts, DWORD polylines ) DECLSPEC_HIDDEN;
452 extern DWORD CDECL PSDRV_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
453 const struct gdi_image_bits *bits, struct bitblt_coords *src,
454 struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN;
455 extern BOOL CDECL PSDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
456 extern BOOL CDECL PSDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right,
457 INT bottom, INT ell_width, INT ell_height ) DECLSPEC_HIDDEN;
458 extern HBRUSH CDECL PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, const struct brush_pattern *pattern ) DECLSPEC_HIDDEN;
459 extern HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags ) DECLSPEC_HIDDEN;
460 extern HPEN CDECL PSDRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *pattern ) DECLSPEC_HIDDEN;
461 extern COLORREF CDECL PSDRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
462 extern COLORREF CDECL PSDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
463 extern COLORREF CDECL PSDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
464 extern COLORREF CDECL PSDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
465 extern COLORREF CDECL PSDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
466 extern INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc ) DECLSPEC_HIDDEN;
467 extern BOOL CDECL PSDRV_StrokeAndFillPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
468 extern BOOL CDECL PSDRV_StrokePath( PHYSDEV dev ) DECLSPEC_HIDDEN;
470 extern void PSDRV_MergeDevmodes(PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2,
471 PRINTERINFO *pi) DECLSPEC_HIDDEN;
472 extern BOOL PSDRV_GetFontMetrics(void) DECLSPEC_HIDDEN;
473 extern PPD *PSDRV_ParsePPD(const WCHAR *fname, HANDLE printer) DECLSPEC_HIDDEN;
474 extern PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name) DECLSPEC_HIDDEN;
475 extern const AFM *PSDRV_FindAFMinList(FONTFAMILY *head, LPCSTR name) DECLSPEC_HIDDEN;
476 extern BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm,
477 BOOL *p_added) DECLSPEC_HIDDEN;
478 extern void PSDRV_FreeAFMList( FONTFAMILY *head ) DECLSPEC_HIDDEN;
480 extern INT PSDRV_XWStoDS( PHYSDEV dev, INT width ) DECLSPEC_HIDDEN;
482 extern BOOL PSDRV_Brush(PHYSDEV dev, BOOL EO) DECLSPEC_HIDDEN;
483 extern BOOL PSDRV_SetFont( PHYSDEV dev, BOOL vertical ) DECLSPEC_HIDDEN;
484 extern BOOL PSDRV_SetPen( PHYSDEV dev ) DECLSPEC_HIDDEN;
486 extern void PSDRV_AddClip( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
487 extern void PSDRV_SetClip( PHYSDEV dev ) DECLSPEC_HIDDEN;
488 extern void PSDRV_ResetClip( PHYSDEV dev ) DECLSPEC_HIDDEN;
490 extern BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2) DECLSPEC_HIDDEN;
491 extern void PSDRV_CreateColor( PHYSDEV dev, PSCOLOR *pscolor,
492 COLORREF wincolor ) DECLSPEC_HIDDEN;
493 extern PSRGB rgb_to_grayscale_scale( void ) DECLSPEC_HIDDEN;
494 extern char PSDRV_UnicodeToANSI(int u) DECLSPEC_HIDDEN;
496 extern INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title ) DECLSPEC_HIDDEN;
497 extern INT PSDRV_WriteFooter( PHYSDEV dev ) DECLSPEC_HIDDEN;
498 extern INT PSDRV_WriteNewPage( PHYSDEV dev ) DECLSPEC_HIDDEN;
499 extern INT PSDRV_WriteEndPage( PHYSDEV dev ) DECLSPEC_HIDDEN;
500 extern BOOL PSDRV_WriteMoveTo(PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
501 extern BOOL PSDRV_WriteLineTo(PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
502 extern BOOL PSDRV_WriteStroke(PHYSDEV dev) DECLSPEC_HIDDEN;
503 extern BOOL PSDRV_WriteRectangle(PHYSDEV dev, INT x, INT y, INT width, INT height) DECLSPEC_HIDDEN;
504 extern BOOL PSDRV_WriteRRectangle(PHYSDEV dev, INT x, INT y, INT width, INT height) DECLSPEC_HIDDEN;
505 extern BOOL PSDRV_WriteSetFont(PHYSDEV dev, const char *name, matrix size, INT escapement,
506 BOOL fake_italic) DECLSPEC_HIDDEN;
507 extern BOOL PSDRV_WriteGlyphShow(PHYSDEV dev, LPCSTR g_name) DECLSPEC_HIDDEN;
508 extern BOOL PSDRV_WriteSetPen(PHYSDEV dev) DECLSPEC_HIDDEN;
509 extern BOOL PSDRV_WriteArc(PHYSDEV dev, INT x, INT y, INT w, INT h,
510 double ang1, double ang2) DECLSPEC_HIDDEN;
511 extern BOOL PSDRV_WriteCurveTo(PHYSDEV dev, POINT pts[3]) DECLSPEC_HIDDEN;
512 extern BOOL PSDRV_WriteSetColor(PHYSDEV dev, PSCOLOR *color) DECLSPEC_HIDDEN;
513 extern BOOL PSDRV_WriteSetBrush(PHYSDEV dev) DECLSPEC_HIDDEN;
514 extern BOOL PSDRV_WriteFill(PHYSDEV dev) DECLSPEC_HIDDEN;
515 extern BOOL PSDRV_WriteEOFill(PHYSDEV dev) DECLSPEC_HIDDEN;
516 extern BOOL PSDRV_WriteGSave(PHYSDEV dev) DECLSPEC_HIDDEN;
517 extern BOOL PSDRV_WriteGRestore(PHYSDEV dev) DECLSPEC_HIDDEN;
518 extern BOOL PSDRV_WriteNewPath(PHYSDEV dev) DECLSPEC_HIDDEN;
519 extern BOOL PSDRV_WriteClosePath(PHYSDEV dev) DECLSPEC_HIDDEN;
520 extern BOOL PSDRV_WriteClip(PHYSDEV dev) DECLSPEC_HIDDEN;
521 extern BOOL PSDRV_WriteRectClip(PHYSDEV dev, INT x, INT y, INT w, INT h) DECLSPEC_HIDDEN;
522 extern BOOL PSDRV_WriteRectClip2(PHYSDEV dev, CHAR *pszArrayName) DECLSPEC_HIDDEN;
523 extern BOOL PSDRV_WriteEOClip(PHYSDEV dev) DECLSPEC_HIDDEN;
524 extern BOOL PSDRV_WriteHatch(PHYSDEV dev) DECLSPEC_HIDDEN;
525 extern BOOL PSDRV_WriteRotate(PHYSDEV dev, float ang) DECLSPEC_HIDDEN;
526 extern BOOL PSDRV_WriteIndexColorSpaceBegin(PHYSDEV dev, int size) DECLSPEC_HIDDEN;
527 extern BOOL PSDRV_WriteIndexColorSpaceEnd(PHYSDEV dev) DECLSPEC_HIDDEN;
528 extern BOOL PSDRV_WriteRGBQUAD(PHYSDEV dev, const RGBQUAD *rgb, int number) DECLSPEC_HIDDEN;
529 extern BOOL PSDRV_WriteImage(PHYSDEV dev, WORD depth, BOOL grayscale, INT xDst, INT yDst,
530 INT widthDst, INT heightDst, INT widthSrc,
531 INT heightSrc, BOOL mask, BOOL top_down) DECLSPEC_HIDDEN;
532 extern BOOL PSDRV_WriteBytes(PHYSDEV dev, const BYTE *bytes, DWORD number) DECLSPEC_HIDDEN;
533 extern BOOL PSDRV_WriteData(PHYSDEV dev, const BYTE *byte, DWORD number) DECLSPEC_HIDDEN;
534 extern DWORD PSDRV_WriteSpool(PHYSDEV dev, LPCSTR lpData, DWORD cch) DECLSPEC_HIDDEN;
535 extern BOOL PSDRV_WriteDIBPatternDict(PHYSDEV dev, const BITMAPINFO *bmi, BYTE *bits, UINT usage) DECLSPEC_HIDDEN;
536 extern BOOL PSDRV_WriteArrayPut(PHYSDEV dev, CHAR *pszArrayName, INT nIndex, LONG lCoord) DECLSPEC_HIDDEN;
537 extern BOOL PSDRV_WriteArrayDef(PHYSDEV dev, CHAR *pszArrayName, INT nSize) DECLSPEC_HIDDEN;
539 extern INT CDECL PSDRV_StartPage( PHYSDEV dev ) DECLSPEC_HIDDEN;
541 INT PSDRV_GlyphListInit(void) DECLSPEC_HIDDEN;
542 const GLYPHNAME *PSDRV_GlyphName(LPCSTR szName) DECLSPEC_HIDDEN;
543 VOID PSDRV_IndexGlyphList(void) DECLSPEC_HIDDEN;
544 BOOL PSDRV_GetType1Metrics(void) DECLSPEC_HIDDEN;
545 const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm) DECLSPEC_HIDDEN;
546 SHORT PSDRV_CalcAvgCharWidth(const AFM *afm) DECLSPEC_HIDDEN;
548 extern BOOL PSDRV_SelectBuiltinFont(PHYSDEV dev, HFONT hfont,
549 LOGFONTW *plf, LPSTR FaceName) DECLSPEC_HIDDEN;
550 extern BOOL PSDRV_WriteSetBuiltinFont(PHYSDEV dev) DECLSPEC_HIDDEN;
551 extern BOOL PSDRV_WriteBuiltinGlyphShow(PHYSDEV dev, LPCWSTR str, INT count) DECLSPEC_HIDDEN;
553 extern BOOL PSDRV_SelectDownloadFont(PHYSDEV dev) DECLSPEC_HIDDEN;
554 extern BOOL PSDRV_WriteSetDownloadFont(PHYSDEV dev, BOOL vertical) DECLSPEC_HIDDEN;
555 extern BOOL PSDRV_WriteDownloadGlyphShow(PHYSDEV dev, const WORD *glyphs, UINT count) DECLSPEC_HIDDEN;
556 extern BOOL PSDRV_EmptyDownloadList(PHYSDEV dev, BOOL write_undef) DECLSPEC_HIDDEN;
558 extern DWORD write_spool( PHYSDEV dev, const void *data, DWORD num ) DECLSPEC_HIDDEN;
560 #define MAX_G_NAME 31 /* max length of PS glyph name */
561 extern void get_glyph_name(HDC hdc, WORD index, char *name) DECLSPEC_HIDDEN;
563 extern TYPE1 *T1_download_header(PHYSDEV dev, char *ps_name,
564 RECT *bbox, UINT emsize) DECLSPEC_HIDDEN;
565 extern BOOL T1_download_glyph(PHYSDEV dev, DOWNLOAD *pdl,
566 DWORD index, char *glyph_name) DECLSPEC_HIDDEN;
567 extern void T1_free(TYPE1 *t1) DECLSPEC_HIDDEN;
569 extern TYPE42 *T42_download_header(PHYSDEV dev, char *ps_name,
570 RECT *bbox, UINT emsize) DECLSPEC_HIDDEN;
571 extern BOOL T42_download_glyph(PHYSDEV dev, DOWNLOAD *pdl,
572 DWORD index, char *glyph_name) DECLSPEC_HIDDEN;
573 extern void T42_free(TYPE42 *t42) DECLSPEC_HIDDEN;
575 extern DWORD RLE_encode(BYTE *in_buf, DWORD len, BYTE *out_buf) DECLSPEC_HIDDEN;
576 extern DWORD ASCII85_encode(BYTE *in_buf, DWORD len, BYTE *out_buf) DECLSPEC_HIDDEN;
578 extern void passthrough_enter(PHYSDEV dev) DECLSPEC_HIDDEN;
579 extern void passthrough_leave(PHYSDEV dev) DECLSPEC_HIDDEN;
581 #define push_lc_numeric(x) do { \
582 const char *tmplocale = setlocale(LC_NUMERIC,NULL); \
583 setlocale(LC_NUMERIC,x);
585 #define pop_lc_numeric() \
586 setlocale(LC_NUMERIC,tmplocale); \
587 } while (0)
589 static inline WCHAR *strdupW( const WCHAR *str )
591 int size;
592 WCHAR *ret;
594 if (!str) return NULL;
595 size = (lstrlenW( str ) + 1) * sizeof(WCHAR);
596 ret = HeapAlloc( GetProcessHeap(), 0, size );
597 if (ret) memcpy( ret, str, size );
598 return ret;
601 #endif