Assorted spelling fixes.
[wine/hacks.git] / dlls / wineps.drv / psdrv.h
blobe6b6edccfeb54061eaf7e1618696d62b8587a902
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 "wine/wingdi16.h"
30 #include "winspool.h"
32 typedef struct {
33 INT index;
34 LPCSTR sz;
35 } GLYPHNAME;
37 typedef struct {
38 LONG UV;
39 const GLYPHNAME *name;
40 } UNICODEGLYPH;
42 typedef struct {
43 float llx, lly, urx, ury;
44 } AFMBBOX;
46 typedef struct _tagAFMLIGS {
47 char *successor;
48 char *ligature;
49 struct _tagAFMLIGS *next;
50 } AFMLIGS;
52 typedef struct {
53 int C; /* character */
54 LONG UV;
55 float WX;
56 const GLYPHNAME *N; /* name */
57 AFMBBOX B;
58 const AFMLIGS *L; /* Ligatures */
59 } OLD_AFMMETRICS;
61 typedef struct {
62 INT C; /* AFM encoding (or -1) */
63 LONG UV; /* Unicode value */
64 FLOAT WX; /* Advance width */
65 const GLYPHNAME *N; /* Glyph name */
66 } AFMMETRICS;
68 typedef struct {
69 USHORT usUnitsPerEm; /* head:unitsPerEm */
70 SHORT sAscender; /* hhea:Ascender */
71 SHORT sDescender; /* hhea:Descender */
72 SHORT sLineGap; /* hhea:LineGap */
73 SHORT sAvgCharWidth; /* OS/2:xAvgCharWidth */
74 SHORT sTypoAscender; /* OS/2:sTypoAscender */
75 SHORT sTypoDescender; /* OS/2:sTypoDescender */
76 SHORT sTypoLineGap; /* OS/2:sTypeLineGap */
77 USHORT usWinAscent; /* OS/2:usWinAscent */
78 USHORT usWinDescent; /* OS/2:usWinDescent */
79 } WINMETRICS;
81 typedef struct _tagAFM {
82 LPCSTR FontName;
83 LPCSTR FullName;
84 LPCSTR FamilyName;
85 LPCSTR EncodingScheme;
86 LONG Weight; /* FW_NORMAL etc. */
87 float ItalicAngle;
88 BOOL IsFixedPitch;
89 float UnderlinePosition;
90 float UnderlineThickness;
91 AFMBBOX FontBBox;
92 float Ascender;
93 float Descender;
94 WINMETRICS WinMetrics;
95 int NumofMetrics;
96 const AFMMETRICS *Metrics;
97 } AFM;
99 /* Note no 'next' in AFM. Use AFMLISTENTRY as a container. This allow more than
100 one list to exist without having to reallocate the entire AFM structure. We
101 keep a global list of all afms (PSDRV_AFMFontList) plus a list of available
102 fonts for each DC (dc->physDev->Fonts) */
104 typedef struct _tagAFMLISTENTRY {
105 const AFM *afm;
106 struct _tagAFMLISTENTRY *next;
107 } AFMLISTENTRY;
109 typedef struct _tagFONTFAMILY {
110 char *FamilyName; /* family name */
111 AFMLISTENTRY *afmlist; /* list of afms for this family */
112 struct _tagFONTFAMILY *next; /* next family */
113 } FONTFAMILY;
115 extern FONTFAMILY *PSDRV_AFMFontList;
116 extern const AFM *const PSDRV_BuiltinAFMs[]; /* last element is NULL */
118 typedef struct _tagFONTNAME {
119 char *Name;
120 struct _tagFONTNAME *next;
121 } FONTNAME;
123 typedef struct {
124 float llx, lly, urx, ury;
125 } IMAGEABLEAREA;
127 typedef struct {
128 float x, y;
129 } PAPERDIMENSION;
131 /* Solaris kludge */
132 #undef PAGESIZE
133 typedef struct _tagPAGESIZE {
134 char *Name;
135 char *FullName;
136 char *InvocationString;
137 IMAGEABLEAREA *ImageableArea;
138 PAPERDIMENSION *PaperDimension;
139 WORD WinPage; /*eg DMPAPER_A4. Doesn't really belong here */
140 struct _tagPAGESIZE *next;
141 } PAGESIZE;
144 /* For BANDINFO Escape */
145 typedef struct _BANDINFOSTRUCT
147 BOOL GraphicsFlag;
148 BOOL TextFlag;
149 RECT GraphicsRect;
150 } BANDINFOSTRUCT, *PBANDINFOSTRUCT;
152 typedef struct _tagOPTIONENTRY {
153 char *Name; /* eg "True" */
154 char *FullName; /* eg "Installed" */
155 char *InvocationString; /* Often NULL */
156 struct _tagOPTIONENTRY *next;
157 } OPTIONENTRY;
159 typedef struct _tagOPTION { /* Treat bool as a special case of pickone */
160 char *OptionName; /* eg "*Option1" */
161 char *FullName; /* eg "Envelope Feeder" */
162 char *DefaultOption; /* eg "False" */
163 OPTIONENTRY *Options;
164 struct _tagOPTION *next;
165 } OPTION;
167 typedef struct _tagCONSTRAINT {
168 char *Feature1;
169 char *Value1;
170 char *Feature2;
171 char *Value2;
172 struct _tagCONSTRAINT *next;
173 } CONSTRAINT;
175 typedef struct _tagINPUTSLOT {
176 const char *Name;
177 const char *FullName;
178 char *InvocationString;
179 WORD WinBin; /* eg DMBIN_LOWER */
180 struct _tagINPUTSLOT *next;
181 } INPUTSLOT;
183 typedef enum _RASTERIZEROPTION
184 {RO_None, RO_Accept68K, RO_Type42, RO_TrueImage} RASTERIZEROPTION;
186 typedef struct _tagDUPLEX {
187 char *Name;
188 char *FullName;
189 char *InvocationString;
190 WORD WinDuplex; /* eg DMDUP_SIMPLEX */
191 struct _tagDUPLEX *next;
192 } DUPLEX;
194 /* Many Mac OS X based ppd files don't include a *ColorDevice line, so
195 we use a tristate here rather than a boolean. Code that
196 cares is expected to treat these as if they were colour. */
197 typedef enum {
198 CD_NotSpecified,
199 CD_False,
200 CD_True
201 } COLORDEVICE;
203 typedef struct {
204 char *NickName;
205 int LanguageLevel;
206 COLORDEVICE ColorDevice;
207 int DefaultResolution;
208 signed int LandscapeOrientation;
209 char *JCLBegin;
210 char *JCLToPSInterpreter;
211 char *JCLEnd;
212 char *DefaultFont;
213 FONTNAME *InstalledFonts; /* ptr to a list of FontNames */
214 PAGESIZE *PageSizes;
215 PAGESIZE *DefaultPageSize;
216 OPTION *InstalledOptions;
217 CONSTRAINT *Constraints;
218 INPUTSLOT *InputSlots;
219 RASTERIZEROPTION TTRasterizer;
220 DUPLEX *Duplexes;
221 DUPLEX *DefaultDuplex;
222 } PPD;
224 typedef struct {
225 DEVMODEA dmPublic;
226 struct _tagdocprivate {
227 int dummy;
228 } dmDocPrivate;
229 struct _tagdrvprivate {
230 UINT numInstalledOptions; /* Options at end of struct */
231 } dmDrvPrivate;
233 /* Now comes:
235 numInstalledOptions of OPTIONs
239 } PSDRV_DEVMODEA;
241 typedef struct _tagPI {
242 char *FriendlyName;
243 PPD *ppd;
244 PSDRV_DEVMODEA *Devmode;
245 FONTFAMILY *Fonts;
246 PPRINTER_ENUM_VALUESA FontSubTable;
247 DWORD FontSubTableSize;
248 struct _tagPI *next;
249 } PRINTERINFO;
251 typedef struct {
252 float r, g, b;
253 } PSRGB;
255 typedef struct {
256 float i;
257 } PSGRAY;
260 /* def's for PSCOLOR.type */
261 #define PSCOLOR_GRAY 0
262 #define PSCOLOR_RGB 1
264 typedef struct {
265 int type;
266 union {
267 PSRGB rgb;
268 PSGRAY gray;
269 } value;
270 } PSCOLOR;
272 typedef struct {
273 const AFM *afm;
274 float scale;
275 TEXTMETRICW tm;
276 } BUILTIN;
278 typedef struct tagTYPE42 TYPE42;
280 typedef struct tagTYPE1 TYPE1;
282 enum downloadtype {
283 Type1, Type42
286 typedef struct _tagDOWNLOAD {
287 enum downloadtype type;
288 union {
289 TYPE1 *Type1;
290 TYPE42 *Type42;
291 } typeinfo;
292 char *ps_name;
293 struct _tagDOWNLOAD *next;
294 } DOWNLOAD;
296 enum fontloc {
297 Builtin, Download
300 typedef struct {
301 enum fontloc fontloc;
302 union {
303 BUILTIN Builtin;
304 DOWNLOAD *Download;
305 } fontinfo;
307 int size;
308 PSCOLOR color;
309 BOOL set; /* Have we done a setfont yet */
311 /* These are needed by PSDRV_ExtTextOut */
312 int escapement;
313 int underlineThickness;
314 int underlinePosition;
315 int strikeoutThickness;
316 int strikeoutPosition;
318 } PSFONT;
320 typedef struct {
321 PSCOLOR color;
322 BOOL set;
323 } PSBRUSH;
325 typedef struct {
326 INT style;
327 INT width;
328 const char* dash;
329 PSCOLOR color;
330 BOOL set;
331 } PSPEN;
333 typedef struct {
334 HANDLE16 hJob;
335 LPSTR output; /* Output file/port */
336 LPSTR DocName; /* Document Name */
337 BOOL banding; /* Have we received a NEXTBAND */
338 BOOL OutOfPage; /* Page header not sent yet */
339 INT PageNo;
340 BOOL quiet; /* Don't actually output anything */
341 BOOL in_passthrough; /* In PASSTHROUGH mode */
342 BOOL had_passthrough_rect; /* See the comment in PSDRV_Rectangle */
343 } JOB;
345 typedef struct {
346 HDC hdc;
347 PSFONT font; /* Current PS font */
348 DOWNLOAD *downloaded_fonts;
349 PSPEN pen;
350 PSBRUSH brush;
351 PSCOLOR bkColor;
352 PSCOLOR inkColor; /* Last colour set */
353 JOB job;
354 PSDRV_DEVMODEA *Devmode;
355 PRINTERINFO *pi;
356 SIZE PageSize; /* Physical page size in device units */
357 RECT ImageableArea; /* Imageable area in device units */
358 /* NB both PageSize and ImageableArea
359 are not rotated in landscape mode,
360 so PageSize.cx is generally
361 < PageSize.cy */
362 int horzRes; /* device caps */
363 int vertRes;
364 int horzSize;
365 int vertSize;
366 int logPixelsX;
367 int logPixelsY;
369 int pathdepth;
370 } PSDRV_PDEVICE;
372 typedef struct {
373 PRINTERINFO *pi;
374 PSDRV_DEVMODEA *dlgdm;
375 } PSDRV_DLGINFO;
379 * Every glyph name in the Adobe Glyph List and the 35 core PostScript fonts
382 extern const INT PSDRV_AGLGlyphNamesSize;
383 extern GLYPHNAME PSDRV_AGLGlyphNames[];
387 * The AGL encoding vector
390 extern const INT PSDRV_AGLbyNameSize; /* sorted by name - */
391 extern const UNICODEGLYPH PSDRV_AGLbyName[]; /* duplicates omitted */
393 extern const INT PSDRV_AGLbyUVSize; /* sorted by UV - */
394 extern const UNICODEGLYPH PSDRV_AGLbyUV[]; /* duplicates included */
397 extern INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
398 LPDEVMODEA lpdmOutput, LPSTR lpszDevice, LPSTR lpszPort,
399 LPDEVMODEA lpdmInput, LPSTR lpszProfile, WORD fwMode);
401 extern HINSTANCE PSDRV_hInstance;
402 extern HANDLE PSDRV_Heap;
403 extern char *PSDRV_ANSIVector[256];
405 extern void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
406 PRINTERINFO *pi);
407 extern BOOL PSDRV_GetFontMetrics(void);
408 extern PPD *PSDRV_ParsePPD(char *fname);
409 extern PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name);
410 extern const AFM *PSDRV_FindAFMinList(FONTFAMILY *head, LPCSTR name);
411 extern BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm,
412 BOOL *p_added);
413 extern void PSDRV_FreeAFMList( FONTFAMILY *head );
415 extern INT PSDRV_XWStoDS( PSDRV_PDEVICE *physDev, INT width );
416 extern INT PSDRV_YWStoDS( PSDRV_PDEVICE *physDev, INT height );
418 extern BOOL PSDRV_Brush(PSDRV_PDEVICE *physDev, BOOL EO);
419 extern BOOL PSDRV_SetFont( PSDRV_PDEVICE *physDev );
420 extern BOOL PSDRV_SetPen( PSDRV_PDEVICE *physDev );
422 extern void PSDRV_SetClip(PSDRV_PDEVICE* phyDev);
423 extern void PSDRV_ResetClip(PSDRV_PDEVICE* phyDev);
425 extern BOOL PSDRV_CmpColor(PSCOLOR *col1, PSCOLOR *col2);
426 extern BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2);
427 extern void PSDRV_CreateColor( PSDRV_PDEVICE *physDev, PSCOLOR *pscolor,
428 COLORREF wincolor );
429 extern char PSDRV_UnicodeToANSI(int u);
431 extern INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title );
432 extern INT PSDRV_WriteFooter( PSDRV_PDEVICE *physDev );
433 extern INT PSDRV_WriteNewPage( PSDRV_PDEVICE *physDev );
434 extern INT PSDRV_WriteEndPage( PSDRV_PDEVICE *physDev );
435 extern BOOL PSDRV_WriteMoveTo(PSDRV_PDEVICE *physDev, INT x, INT y);
436 extern BOOL PSDRV_WriteLineTo(PSDRV_PDEVICE *physDev, INT x, INT y);
437 extern BOOL PSDRV_WriteStroke(PSDRV_PDEVICE *physDev);
438 extern BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
439 INT height);
440 extern BOOL PSDRV_WriteRRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
441 INT height);
442 extern BOOL PSDRV_WriteSetFont(PSDRV_PDEVICE *physDev, const char *name, INT size,
443 INT escapement);
444 extern BOOL PSDRV_WriteGlyphShow(PSDRV_PDEVICE *physDev, LPCSTR g_name);
445 extern BOOL PSDRV_WriteSetPen(PSDRV_PDEVICE *physDev);
446 extern BOOL PSDRV_WriteArc(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h,
447 double ang1, double ang2);
448 extern BOOL PSDRV_WriteSetColor(PSDRV_PDEVICE *physDev, PSCOLOR *color);
449 extern BOOL PSDRV_WriteSetBrush(PSDRV_PDEVICE *physDev);
450 extern BOOL PSDRV_WriteFill(PSDRV_PDEVICE *physDev);
451 extern BOOL PSDRV_WriteEOFill(PSDRV_PDEVICE *physDev);
452 extern BOOL PSDRV_WriteGSave(PSDRV_PDEVICE *physDev);
453 extern BOOL PSDRV_WriteGRestore(PSDRV_PDEVICE *physDev);
454 extern BOOL PSDRV_WriteNewPath(PSDRV_PDEVICE *physDev);
455 extern BOOL PSDRV_WriteClosePath(PSDRV_PDEVICE *physDev);
456 extern BOOL PSDRV_WriteInitClip(PSDRV_PDEVICE *physDev);
457 extern BOOL PSDRV_WriteClip(PSDRV_PDEVICE *physDev);
458 extern BOOL PSDRV_WriteRectClip(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h);
459 extern BOOL PSDRV_WriteRectClip2(PSDRV_PDEVICE *physDev, CHAR *pszArrayName);
460 extern BOOL PSDRV_WriteEOClip(PSDRV_PDEVICE *physDev);
461 extern BOOL PSDRV_WriteHatch(PSDRV_PDEVICE *physDev);
462 extern BOOL PSDRV_WriteRotate(PSDRV_PDEVICE *physDev, float ang);
463 extern BOOL PSDRV_WriteIndexColorSpaceBegin(PSDRV_PDEVICE *physDev, int size);
464 extern BOOL PSDRV_WriteIndexColorSpaceEnd(PSDRV_PDEVICE *physDev);
465 extern BOOL PSDRV_WriteRGB(PSDRV_PDEVICE *physDev, COLORREF *map, int number);
466 extern BOOL PSDRV_WriteImage(PSDRV_PDEVICE *physDev, WORD depth, INT xDst, INT yDst,
467 INT widthDst, INT heightDst, INT widthSrc,
468 INT heightSrc, BOOL mask);
469 extern BOOL PSDRV_WriteBytes(PSDRV_PDEVICE *physDev, const BYTE *bytes, DWORD number);
470 extern BOOL PSDRV_WriteData(PSDRV_PDEVICE *physDev, const BYTE *byte, DWORD number);
471 extern DWORD PSDRV_WriteSpool(PSDRV_PDEVICE *physDev, LPCSTR lpData, DWORD cch);
472 extern BOOL PSDRV_WritePatternDict(PSDRV_PDEVICE *physDev, BITMAP *bm, BYTE *bits);
473 extern BOOL PSDRV_WriteDIBPatternDict(PSDRV_PDEVICE *physDev, BITMAPINFO *bmi, UINT usage);
474 extern BOOL PSDRV_WriteArrayPut(PSDRV_PDEVICE *physDev, CHAR *pszArrayName, INT nIndex, LONG lCoord);
475 extern BOOL PSDRV_WriteArrayDef(PSDRV_PDEVICE *physDev, CHAR *pszArrayName, INT nSize);
477 extern BOOL PSDRV_Arc( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
478 INT bottom, INT xstart, INT ystart,
479 INT xend, INT yend );
480 extern BOOL PSDRV_Chord( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
481 INT bottom, INT xstart, INT ystart,
482 INT xend, INT yend );
483 extern BOOL PSDRV_Ellipse( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
484 INT bottom );
485 extern INT PSDRV_EndDoc( PSDRV_PDEVICE *physDev );
486 extern INT PSDRV_EndPage( PSDRV_PDEVICE *physDev );
487 extern BOOL PSDRV_ExtTextOut( PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
488 const RECT *lprect, LPCWSTR str, UINT count,
489 const INT *lpDx );
490 extern BOOL PSDRV_GetCharWidth( PSDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar,
491 LPINT buffer );
492 extern BOOL PSDRV_GetTextExtentExPoint( PSDRV_PDEVICE *physDev, LPCWSTR str, INT count,
493 INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size );
494 extern BOOL PSDRV_GetTextMetrics( PSDRV_PDEVICE *physDev, TEXTMETRICW *metrics );
495 extern BOOL PSDRV_LineTo( PSDRV_PDEVICE *physDev, INT x, INT y );
496 extern BOOL PSDRV_PatBlt( PSDRV_PDEVICE *physDev, INT x, INT y, INT width, INT height, DWORD
497 dwRop);
498 extern BOOL PSDRV_Pie( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
499 INT bottom, INT xstart, INT ystart,
500 INT xend, INT yend );
501 extern BOOL PSDRV_Polygon( PSDRV_PDEVICE *physDev, const POINT* pt, INT count );
502 extern BOOL PSDRV_Polyline( PSDRV_PDEVICE *physDev, const POINT* pt, INT count );
503 extern BOOL PSDRV_PolyPolygon( PSDRV_PDEVICE *physDev, const POINT* pts, const INT* counts,
504 UINT polygons );
505 extern BOOL PSDRV_PolyPolyline( PSDRV_PDEVICE *physDev, const POINT* pts, const DWORD* counts,
506 DWORD polylines );
507 extern BOOL PSDRV_Rectangle( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
508 INT bottom );
509 extern BOOL PSDRV_RoundRect(PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
510 INT bottom, INT ell_width, INT ell_height);
511 extern COLORREF PSDRV_SetBkColor( PSDRV_PDEVICE *physDev, COLORREF color );
512 extern COLORREF PSDRV_SetPixel( PSDRV_PDEVICE *physDev, INT x, INT y, COLORREF color );
513 extern COLORREF PSDRV_SetTextColor( PSDRV_PDEVICE *physDev, COLORREF color );
514 extern INT PSDRV_StartDoc( PSDRV_PDEVICE *physDev, const DOCINFOW *doc );
515 extern INT PSDRV_StartPage( PSDRV_PDEVICE *physDev );
516 extern INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst,
517 INT widthDst, INT heightDst, INT xSrc,
518 INT ySrc, INT widthSrc, INT heightSrc,
519 const void *bits, const BITMAPINFO *info,
520 UINT wUsage, DWORD dwRop );
522 extern INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd,
523 LPDEVMODEA lpdmOutput,
524 LPSTR lpszDevice, LPSTR lpszPort,
525 LPDEVMODEA lpdmInput, LPSTR lpszProfile,
526 DWORD dwMode);
527 extern DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice,
528 LPCSTR lpszPort,
529 WORD fwCapability, LPSTR lpszOutput,
530 LPDEVMODEA lpdm);
531 INT PSDRV_GlyphListInit(void);
532 const GLYPHNAME *PSDRV_GlyphName(LPCSTR szName);
533 VOID PSDRV_IndexGlyphList(void);
534 BOOL PSDRV_GetTrueTypeMetrics(void);
535 BOOL PSDRV_GetType1Metrics(void);
536 const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm);
537 SHORT PSDRV_CalcAvgCharWidth(const AFM *afm);
539 extern BOOL PSDRV_SelectBuiltinFont(PSDRV_PDEVICE *physDev, HFONT hfont,
540 LOGFONTW *plf, LPSTR FaceName);
541 extern BOOL PSDRV_WriteSetBuiltinFont(PSDRV_PDEVICE *physDev);
542 extern BOOL PSDRV_WriteBuiltinGlyphShow(PSDRV_PDEVICE *physDev, LPCWSTR str, INT count);
544 extern BOOL PSDRV_SelectDownloadFont(PSDRV_PDEVICE *physDev);
545 extern BOOL PSDRV_WriteSetDownloadFont(PSDRV_PDEVICE *physDev);
546 extern BOOL PSDRV_WriteDownloadGlyphShow(PSDRV_PDEVICE *physDev, WORD *glpyhs,
547 UINT count);
548 extern BOOL PSDRV_EmptyDownloadList(PSDRV_PDEVICE *physDev, BOOL write_undef);
550 #define MAX_G_NAME 31 /* max length of PS glyph name */
551 extern void get_glyph_name(HDC hdc, WORD index, char *name);
553 extern TYPE1 *T1_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
554 RECT *bbox, UINT emsize);
555 extern BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl,
556 DWORD index, char *glyph_name);
557 extern void T1_free(TYPE1 *t1);
559 extern TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
560 RECT *bbox, UINT emsize);
561 extern BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl,
562 DWORD index, char *glyph_name);
563 extern void T42_free(TYPE42 *t42);
565 extern DWORD RLE_encode(BYTE *in_buf, DWORD len, BYTE *out_buf);
566 extern DWORD ASCII85_encode(BYTE *in_buf, DWORD len, BYTE *out_buf);
568 #define push_lc_numeric(x) do { \
569 const char *tmplocale = setlocale(LC_NUMERIC,NULL); \
570 setlocale(LC_NUMERIC,x);
572 #define pop_lc_numeric() \
573 setlocale(LC_NUMERIC,tmplocale); \
574 } while (0)
577 #endif