widl: Remove unnecessary casts in the generated code.
[wine.git] / dlls / wineps.drv / psdrv.h
blobfcdc78df20c4e01a87f2d388084e904572768900
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 #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 allow 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;
118 extern const AFM *const PSDRV_BuiltinAFMs[]; /* last element is NULL */
120 typedef struct _tagFONTNAME {
121 char *Name;
122 struct _tagFONTNAME *next;
123 } FONTNAME;
125 typedef struct {
126 float llx, lly, urx, ury;
127 } IMAGEABLEAREA;
129 typedef struct {
130 float x, y;
131 } PAPERDIMENSION;
133 /* Solaris kludge */
134 #undef PAGESIZE
135 typedef struct _tagPAGESIZE {
136 struct list entry;
137 char *Name;
138 char *FullName;
139 char *InvocationString;
140 IMAGEABLEAREA *ImageableArea;
141 PAPERDIMENSION *PaperDimension;
142 WORD WinPage; /*eg DMPAPER_A4. Doesn't really belong here */
143 } PAGESIZE;
146 /* For BANDINFO Escape */
147 typedef struct _BANDINFOSTRUCT
149 BOOL GraphicsFlag;
150 BOOL TextFlag;
151 RECT GraphicsRect;
152 } BANDINFOSTRUCT, *PBANDINFOSTRUCT;
154 typedef struct _tagOPTIONENTRY {
155 char *Name; /* eg "True" */
156 char *FullName; /* eg "Installed" */
157 char *InvocationString; /* Often NULL */
158 struct _tagOPTIONENTRY *next;
159 } OPTIONENTRY;
161 typedef struct _tagOPTION { /* Treat bool as a special case of pickone */
162 char *OptionName; /* eg "*Option1" */
163 char *FullName; /* eg "Envelope Feeder" */
164 char *DefaultOption; /* eg "False" */
165 OPTIONENTRY *Options;
166 struct _tagOPTION *next;
167 } OPTION;
169 typedef struct _tagCONSTRAINT {
170 char *Feature1;
171 char *Value1;
172 char *Feature2;
173 char *Value2;
174 struct _tagCONSTRAINT *next;
175 } CONSTRAINT;
177 typedef struct _tagINPUTSLOT {
178 const char *Name;
179 const char *FullName;
180 char *InvocationString;
181 WORD WinBin; /* eg DMBIN_LOWER */
182 struct _tagINPUTSLOT *next;
183 } INPUTSLOT;
185 typedef enum _RASTERIZEROPTION
186 {RO_None, RO_Accept68K, RO_Type42, RO_TrueImage} RASTERIZEROPTION;
188 typedef struct _tagDUPLEX {
189 char *Name;
190 char *FullName;
191 char *InvocationString;
192 WORD WinDuplex; /* eg DMDUP_SIMPLEX */
193 struct _tagDUPLEX *next;
194 } DUPLEX;
196 /* Many Mac OS X based ppd files don't include a *ColorDevice line, so
197 we use a tristate here rather than a boolean. Code that
198 cares is expected to treat these as if they were colour. */
199 typedef enum {
200 CD_NotSpecified,
201 CD_False,
202 CD_True
203 } COLORDEVICE;
205 typedef struct {
206 char *NickName;
207 int LanguageLevel;
208 COLORDEVICE ColorDevice;
209 int DefaultResolution;
210 signed int LandscapeOrientation;
211 char *JCLBegin;
212 char *JCLToPSInterpreter;
213 char *JCLEnd;
214 char *DefaultFont;
215 FONTNAME *InstalledFonts; /* ptr to a list of FontNames */
216 struct list PageSizes;
217 PAGESIZE *DefaultPageSize;
218 OPTION *InstalledOptions;
219 CONSTRAINT *Constraints;
220 INPUTSLOT *InputSlots;
221 RASTERIZEROPTION TTRasterizer;
222 DUPLEX *Duplexes;
223 DUPLEX *DefaultDuplex;
224 } PPD;
226 typedef struct {
227 DEVMODEA dmPublic;
228 struct _tagdocprivate {
229 int dummy;
230 } dmDocPrivate;
231 struct _tagdrvprivate {
232 UINT numInstalledOptions; /* Options at end of struct */
233 } dmDrvPrivate;
235 /* Now comes:
237 numInstalledOptions of OPTIONs
241 } PSDRV_DEVMODEA;
243 typedef struct _tagPI {
244 char *FriendlyName;
245 PPD *ppd;
246 PSDRV_DEVMODEA *Devmode;
247 FONTFAMILY *Fonts;
248 PPRINTER_ENUM_VALUESA FontSubTable;
249 DWORD FontSubTableSize;
250 struct _tagPI *next;
251 } PRINTERINFO;
253 typedef struct {
254 float r, g, b;
255 } PSRGB;
257 typedef struct {
258 float i;
259 } PSGRAY;
262 /* def's for PSCOLOR.type */
263 #define PSCOLOR_GRAY 0
264 #define PSCOLOR_RGB 1
266 typedef struct {
267 int type;
268 union {
269 PSRGB rgb;
270 PSGRAY gray;
271 } value;
272 } PSCOLOR;
274 typedef struct {
275 const AFM *afm;
276 float scale;
277 TEXTMETRICW tm;
278 } BUILTIN;
280 typedef struct tagTYPE42 TYPE42;
282 typedef struct tagTYPE1 TYPE1;
284 enum downloadtype {
285 Type1, Type42
288 typedef struct _tagDOWNLOAD {
289 enum downloadtype type;
290 union {
291 TYPE1 *Type1;
292 TYPE42 *Type42;
293 } typeinfo;
294 char *ps_name;
295 struct _tagDOWNLOAD *next;
296 } DOWNLOAD;
298 enum fontloc {
299 Builtin, Download
302 typedef struct {
303 enum fontloc fontloc;
304 union {
305 BUILTIN Builtin;
306 DOWNLOAD *Download;
307 } fontinfo;
309 int size;
310 PSCOLOR color;
311 BOOL set; /* Have we done a setfont yet */
313 /* These are needed by PSDRV_ExtTextOut */
314 int escapement;
315 int underlineThickness;
316 int underlinePosition;
317 int strikeoutThickness;
318 int strikeoutPosition;
320 } PSFONT;
322 typedef struct {
323 PSCOLOR color;
324 BOOL set;
325 } PSBRUSH;
327 typedef struct {
328 INT style;
329 INT width;
330 const char* dash;
331 PSCOLOR color;
332 BOOL set;
333 } PSPEN;
335 typedef struct {
336 HANDLE16 hJob;
337 LPSTR output; /* Output file/port */
338 LPSTR DocName; /* Document Name */
339 BOOL banding; /* Have we received a NEXTBAND */
340 BOOL OutOfPage; /* Page header not sent yet */
341 INT PageNo;
342 BOOL quiet; /* Don't actually output anything */
343 BOOL in_passthrough; /* In PASSTHROUGH mode */
344 BOOL had_passthrough_rect; /* See the comment in PSDRV_Rectangle */
345 } JOB;
347 typedef struct {
348 HDC hdc;
349 PSFONT font; /* Current PS font */
350 DOWNLOAD *downloaded_fonts;
351 PSPEN pen;
352 PSBRUSH brush;
353 PSCOLOR bkColor;
354 PSCOLOR inkColor; /* Last colour set */
355 JOB job;
356 PSDRV_DEVMODEA *Devmode;
357 PRINTERINFO *pi;
358 SIZE PageSize; /* Physical page size in device units */
359 RECT ImageableArea; /* Imageable area in device units */
360 /* NB both PageSize and ImageableArea
361 are not rotated in landscape mode,
362 so PageSize.cx is generally
363 < PageSize.cy */
364 int horzRes; /* device caps */
365 int vertRes;
366 int horzSize;
367 int vertSize;
368 int logPixelsX;
369 int logPixelsY;
371 int pathdepth;
372 } PSDRV_PDEVICE;
374 typedef struct {
375 PRINTERINFO *pi;
376 PSDRV_DEVMODEA *dlgdm;
377 } PSDRV_DLGINFO;
381 * Every glyph name in the Adobe Glyph List and the 35 core PostScript fonts
384 extern const INT PSDRV_AGLGlyphNamesSize;
385 extern GLYPHNAME PSDRV_AGLGlyphNames[];
389 * The AGL encoding vector
392 extern const INT PSDRV_AGLbyNameSize; /* sorted by name - */
393 extern const UNICODEGLYPH PSDRV_AGLbyName[]; /* duplicates omitted */
395 extern const INT PSDRV_AGLbyUVSize; /* sorted by UV - */
396 extern const UNICODEGLYPH PSDRV_AGLbyUV[]; /* duplicates included */
399 extern INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
400 LPDEVMODEA lpdmOutput, LPSTR lpszDevice, LPSTR lpszPort,
401 LPDEVMODEA lpdmInput, LPSTR lpszProfile, WORD fwMode);
403 extern HINSTANCE PSDRV_hInstance;
404 extern HANDLE PSDRV_Heap;
405 extern char *PSDRV_ANSIVector[256];
407 extern void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
408 PRINTERINFO *pi);
409 extern BOOL PSDRV_GetFontMetrics(void);
410 extern PPD *PSDRV_ParsePPD(char *fname);
411 extern PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name);
412 extern const AFM *PSDRV_FindAFMinList(FONTFAMILY *head, LPCSTR name);
413 extern BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm,
414 BOOL *p_added);
415 extern void PSDRV_FreeAFMList( FONTFAMILY *head );
417 extern INT PSDRV_XWStoDS( PSDRV_PDEVICE *physDev, INT width );
418 extern INT PSDRV_YWStoDS( PSDRV_PDEVICE *physDev, INT height );
420 extern BOOL PSDRV_Brush(PSDRV_PDEVICE *physDev, BOOL EO);
421 extern BOOL PSDRV_SetFont( PSDRV_PDEVICE *physDev );
422 extern BOOL PSDRV_SetPen( PSDRV_PDEVICE *physDev );
424 extern void PSDRV_SetClip(PSDRV_PDEVICE* phyDev);
425 extern void PSDRV_ResetClip(PSDRV_PDEVICE* phyDev);
427 extern BOOL PSDRV_CmpColor(PSCOLOR *col1, PSCOLOR *col2);
428 extern BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2);
429 extern void PSDRV_CreateColor( PSDRV_PDEVICE *physDev, PSCOLOR *pscolor,
430 COLORREF wincolor );
431 extern char PSDRV_UnicodeToANSI(int u);
433 extern INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title );
434 extern INT PSDRV_WriteFooter( PSDRV_PDEVICE *physDev );
435 extern INT PSDRV_WriteNewPage( PSDRV_PDEVICE *physDev );
436 extern INT PSDRV_WriteEndPage( PSDRV_PDEVICE *physDev );
437 extern BOOL PSDRV_WriteMoveTo(PSDRV_PDEVICE *physDev, INT x, INT y);
438 extern BOOL PSDRV_WriteLineTo(PSDRV_PDEVICE *physDev, INT x, INT y);
439 extern BOOL PSDRV_WriteStroke(PSDRV_PDEVICE *physDev);
440 extern BOOL PSDRV_WriteRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
441 INT height);
442 extern BOOL PSDRV_WriteRRectangle(PSDRV_PDEVICE *physDev, INT x, INT y, INT width,
443 INT height);
444 extern BOOL PSDRV_WriteSetFont(PSDRV_PDEVICE *physDev, const char *name, INT size,
445 INT escapement);
446 extern BOOL PSDRV_WriteGlyphShow(PSDRV_PDEVICE *physDev, LPCSTR g_name);
447 extern BOOL PSDRV_WriteSetPen(PSDRV_PDEVICE *physDev);
448 extern BOOL PSDRV_WriteArc(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h,
449 double ang1, double ang2);
450 extern BOOL PSDRV_WriteSetColor(PSDRV_PDEVICE *physDev, PSCOLOR *color);
451 extern BOOL PSDRV_WriteSetBrush(PSDRV_PDEVICE *physDev);
452 extern BOOL PSDRV_WriteFill(PSDRV_PDEVICE *physDev);
453 extern BOOL PSDRV_WriteEOFill(PSDRV_PDEVICE *physDev);
454 extern BOOL PSDRV_WriteGSave(PSDRV_PDEVICE *physDev);
455 extern BOOL PSDRV_WriteGRestore(PSDRV_PDEVICE *physDev);
456 extern BOOL PSDRV_WriteNewPath(PSDRV_PDEVICE *physDev);
457 extern BOOL PSDRV_WriteClosePath(PSDRV_PDEVICE *physDev);
458 extern BOOL PSDRV_WriteInitClip(PSDRV_PDEVICE *physDev);
459 extern BOOL PSDRV_WriteClip(PSDRV_PDEVICE *physDev);
460 extern BOOL PSDRV_WriteRectClip(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h);
461 extern BOOL PSDRV_WriteRectClip2(PSDRV_PDEVICE *physDev, CHAR *pszArrayName);
462 extern BOOL PSDRV_WriteEOClip(PSDRV_PDEVICE *physDev);
463 extern BOOL PSDRV_WriteHatch(PSDRV_PDEVICE *physDev);
464 extern BOOL PSDRV_WriteRotate(PSDRV_PDEVICE *physDev, float ang);
465 extern BOOL PSDRV_WriteIndexColorSpaceBegin(PSDRV_PDEVICE *physDev, int size);
466 extern BOOL PSDRV_WriteIndexColorSpaceEnd(PSDRV_PDEVICE *physDev);
467 extern BOOL PSDRV_WriteRGB(PSDRV_PDEVICE *physDev, COLORREF *map, int number);
468 extern BOOL PSDRV_WriteImage(PSDRV_PDEVICE *physDev, WORD depth, INT xDst, INT yDst,
469 INT widthDst, INT heightDst, INT widthSrc,
470 INT heightSrc, BOOL mask);
471 extern BOOL PSDRV_WriteBytes(PSDRV_PDEVICE *physDev, const BYTE *bytes, DWORD number);
472 extern BOOL PSDRV_WriteData(PSDRV_PDEVICE *physDev, const BYTE *byte, DWORD number);
473 extern DWORD PSDRV_WriteSpool(PSDRV_PDEVICE *physDev, LPCSTR lpData, DWORD cch);
474 extern BOOL PSDRV_WritePatternDict(PSDRV_PDEVICE *physDev, BITMAP *bm, BYTE *bits);
475 extern BOOL PSDRV_WriteDIBPatternDict(PSDRV_PDEVICE *physDev, BITMAPINFO *bmi, UINT usage);
476 extern BOOL PSDRV_WriteArrayPut(PSDRV_PDEVICE *physDev, CHAR *pszArrayName, INT nIndex, LONG lCoord);
477 extern BOOL PSDRV_WriteArrayDef(PSDRV_PDEVICE *physDev, CHAR *pszArrayName, INT nSize);
479 extern BOOL PSDRV_Arc( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
480 INT bottom, INT xstart, INT ystart,
481 INT xend, INT yend );
482 extern BOOL PSDRV_Chord( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
483 INT bottom, INT xstart, INT ystart,
484 INT xend, INT yend );
485 extern BOOL PSDRV_Ellipse( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
486 INT bottom );
487 extern INT PSDRV_EndDoc( PSDRV_PDEVICE *physDev );
488 extern INT PSDRV_EndPage( PSDRV_PDEVICE *physDev );
489 extern BOOL PSDRV_ExtTextOut( PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags,
490 const RECT *lprect, LPCWSTR str, UINT count,
491 const INT *lpDx );
492 extern BOOL PSDRV_GetCharWidth( PSDRV_PDEVICE *physDev, UINT firstChar, UINT lastChar,
493 LPINT buffer );
494 extern BOOL PSDRV_GetTextExtentExPoint( PSDRV_PDEVICE *physDev, LPCWSTR str, INT count,
495 INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size );
496 extern BOOL PSDRV_GetTextMetrics( PSDRV_PDEVICE *physDev, TEXTMETRICW *metrics );
497 extern BOOL PSDRV_LineTo( PSDRV_PDEVICE *physDev, INT x, INT y );
498 extern BOOL PSDRV_PatBlt( PSDRV_PDEVICE *physDev, INT x, INT y, INT width, INT height, DWORD
499 dwRop);
500 extern BOOL PSDRV_Pie( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
501 INT bottom, INT xstart, INT ystart,
502 INT xend, INT yend );
503 extern BOOL PSDRV_Polygon( PSDRV_PDEVICE *physDev, const POINT* pt, INT count );
504 extern BOOL PSDRV_Polyline( PSDRV_PDEVICE *physDev, const POINT* pt, INT count );
505 extern BOOL PSDRV_PolyPolygon( PSDRV_PDEVICE *physDev, const POINT* pts, const INT* counts,
506 UINT polygons );
507 extern BOOL PSDRV_PolyPolyline( PSDRV_PDEVICE *physDev, const POINT* pts, const DWORD* counts,
508 DWORD polylines );
509 extern BOOL PSDRV_Rectangle( PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
510 INT bottom );
511 extern BOOL PSDRV_RoundRect(PSDRV_PDEVICE *physDev, INT left, INT top, INT right,
512 INT bottom, INT ell_width, INT ell_height);
513 extern COLORREF PSDRV_SetBkColor( PSDRV_PDEVICE *physDev, COLORREF color );
514 extern COLORREF PSDRV_SetPixel( PSDRV_PDEVICE *physDev, INT x, INT y, COLORREF color );
515 extern COLORREF PSDRV_SetTextColor( PSDRV_PDEVICE *physDev, COLORREF color );
516 extern INT PSDRV_StartDoc( PSDRV_PDEVICE *physDev, const DOCINFOW *doc );
517 extern INT PSDRV_StartPage( PSDRV_PDEVICE *physDev );
518 extern INT PSDRV_StretchDIBits( PSDRV_PDEVICE *physDev, INT xDst, INT yDst,
519 INT widthDst, INT heightDst, INT xSrc,
520 INT ySrc, INT widthSrc, INT heightSrc,
521 const void *bits, const BITMAPINFO *info,
522 UINT wUsage, DWORD dwRop );
524 extern INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd,
525 LPDEVMODEA lpdmOutput,
526 LPSTR lpszDevice, LPSTR lpszPort,
527 LPDEVMODEA lpdmInput, LPSTR lpszProfile,
528 DWORD dwMode);
529 extern DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice,
530 LPCSTR lpszPort,
531 WORD fwCapability, LPSTR lpszOutput,
532 LPDEVMODEA lpdm);
533 INT PSDRV_GlyphListInit(void);
534 const GLYPHNAME *PSDRV_GlyphName(LPCSTR szName);
535 VOID PSDRV_IndexGlyphList(void);
536 BOOL PSDRV_GetTrueTypeMetrics(void);
537 BOOL PSDRV_GetType1Metrics(void);
538 const AFMMETRICS *PSDRV_UVMetrics(LONG UV, const AFM *afm);
539 SHORT PSDRV_CalcAvgCharWidth(const AFM *afm);
541 extern BOOL PSDRV_SelectBuiltinFont(PSDRV_PDEVICE *physDev, HFONT hfont,
542 LOGFONTW *plf, LPSTR FaceName);
543 extern BOOL PSDRV_WriteSetBuiltinFont(PSDRV_PDEVICE *physDev);
544 extern BOOL PSDRV_WriteBuiltinGlyphShow(PSDRV_PDEVICE *physDev, LPCWSTR str, INT count);
546 extern BOOL PSDRV_SelectDownloadFont(PSDRV_PDEVICE *physDev);
547 extern BOOL PSDRV_WriteSetDownloadFont(PSDRV_PDEVICE *physDev);
548 extern BOOL PSDRV_WriteDownloadGlyphShow(PSDRV_PDEVICE *physDev, WORD *glpyhs,
549 UINT count);
550 extern BOOL PSDRV_EmptyDownloadList(PSDRV_PDEVICE *physDev, BOOL write_undef);
552 #define MAX_G_NAME 31 /* max length of PS glyph name */
553 extern void get_glyph_name(HDC hdc, WORD index, char *name);
555 extern TYPE1 *T1_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
556 RECT *bbox, UINT emsize);
557 extern BOOL T1_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl,
558 DWORD index, char *glyph_name);
559 extern void T1_free(TYPE1 *t1);
561 extern TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
562 RECT *bbox, UINT emsize);
563 extern BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl,
564 DWORD index, char *glyph_name);
565 extern void T42_free(TYPE42 *t42);
567 extern DWORD RLE_encode(BYTE *in_buf, DWORD len, BYTE *out_buf);
568 extern DWORD ASCII85_encode(BYTE *in_buf, DWORD len, BYTE *out_buf);
570 #define push_lc_numeric(x) do { \
571 const char *tmplocale = setlocale(LC_NUMERIC,NULL); \
572 setlocale(LC_NUMERIC,x);
574 #define pop_lc_numeric() \
575 setlocale(LC_NUMERIC,tmplocale); \
576 } while (0)
579 #endif