3 * PostScript driver definitions
5 * Copyright 1998 Huw D M Davies
11 float llx
, lly
, urx
, ury
;
14 typedef struct _tagAFMLIGS
{
17 struct _tagAFMLIGS
*next
;
20 typedef struct _tagAFMMETRICS
{
21 int C
; /* character */
25 AFMLIGS
*L
; /* Ligatures */
26 struct _tagAFMMETRICS
*next
;
29 typedef struct _tagAFM
{
33 int Weight
; /* FW_NORMAL etc. */
36 float UnderlinePosition
;
37 float UnderlineThickness
;
43 float FullAscender
; /* Ascent of Aring character */
44 float CharWidths
[256];
47 } AFM
; /* CharWidths is a shortcut to the WX values of numbered glyphs */
49 /* Note no 'next' in AFM. Use AFMLISTENTRY as a container. This allow more than
50 one list to exist without having to reallocate the entire AFM structure. We
51 keep a global list of all afms (PSDRV_AFMFontList) plus a list of available
52 fonts for each DC (dc->physDev->Fonts) */
54 typedef struct _tagAFMLISTENTRY
{
56 struct _tagAFMLISTENTRY
*next
;
59 typedef struct _tagFONTFAMILY
{
60 char *FamilyName
; /* family name */
61 AFMLISTENTRY
*afmlist
; /* list of afms for this family */
62 struct _tagFONTFAMILY
*next
; /* next family */
65 extern FONTFAMILY
*PSDRV_AFMFontList
;
67 typedef struct _tagFONTNAME
{
69 struct _tagFONTNAME
*next
;
73 float llx
, lly
, urx
, ury
;
80 typedef struct _tagPAGESIZE
{
83 char *InvocationString
;
84 IMAGEABLEAREA
*ImageableArea
;
85 PAPERDIMENSION
*PaperDimension
;
86 WORD WinPage
; /*eg DMPAPER_A4. Doesn't really belong here */
87 struct _tagPAGESIZE
*next
;
91 typedef struct _tagOPTIONENTRY
{
92 char *Name
; /* eg "True" */
93 char *FullName
; /* eg "Installed" */
94 char *InvocationString
; /* Often NULL */
95 struct _tagOPTIONENTRY
*next
;
98 typedef struct _tagOPTION
{ /* Treat bool as a special case of pickone */
99 char *OptionName
; /* eg "*Option1" */
100 char *FullName
; /* eg "Envelope Feeder" */
101 char *DefaultOption
; /* eg "False" */
102 OPTIONENTRY
*Options
;
103 struct _tagOPTION
*next
;
106 typedef struct _tagCONSTRAINT
{
111 struct _tagCONSTRAINT
*next
;
114 typedef struct _tagINPUTSLOT
{
117 char *InvocationString
;
118 WORD WinBin
; /* eg DMBIN_LOWER */
119 struct _tagINPUTSLOT
*next
;
126 int DefaultResolution
;
127 int LandscapeOrientation
;
129 char *JCLToPSInterpreter
;
132 FONTNAME
*InstalledFonts
; /* ptr to a list of FontNames */
134 OPTION
*InstalledOptions
;
135 CONSTRAINT
*Constraints
;
136 INPUTSLOT
*InputSlots
;
141 struct _tagdocprivate
{
143 struct _tagdrvprivate
{
144 char ppdFileName
[100]; /* Hack */
145 UINT32 numInstalledOptions
; /* Options at end of struct */
150 numInstalledOptions of OPTIONs
156 typedef struct _tagPI
{
159 PSDRV_DEVMODE16
*Devmode
;
170 BOOL32 set
; /* Have we done a setfont yet */
175 LPSTR output
; /* Output file/port */
176 BOOL32 banding
; /* Have we received a NEXTBAND */
177 BOOL32 NeedPageHeader
; /* Page header not sent yet */
183 PSFONT font
; /* Current PS font */
185 PSDRV_DEVMODE16
*Devmode
;
189 extern HANDLE32 PSDRV_Heap
;
191 extern void PSDRV_MergeDevmodes(PSDRV_DEVMODE16
*dm1
, PSDRV_DEVMODE16
*dm2
,
193 extern BOOL32
PSDRV_GetFontMetrics(void);
194 extern PPD
*PSDRV_ParsePPD(char *fname
);
195 extern PRINTERINFO
*PSDRV_FindPrinterInfo(LPCSTR name
);
196 extern AFM
*PSDRV_FindAFMinList(FONTFAMILY
*head
, char *name
);
197 extern void PSDRV_AddAFMtoList(FONTFAMILY
**head
, AFM
*afm
);
198 extern void PSDRV_FreeAFMList( FONTFAMILY
*head
);
200 extern BOOL32
PSDRV_Init(void);
201 extern HFONT16
PSDRV_FONT_SelectObject( DC
*dc
, HFONT16 hfont
, FONTOBJ
*font
);
202 extern BOOL32
PSDRV_SetFont( DC
*dc
);
204 extern INT32
PSDRV_WriteHeader( DC
*dc
, char *title
, int len
);
205 extern INT32
PSDRV_WriteFooter( DC
*dc
);
206 extern INT32
PSDRV_WriteNewPage( DC
*dc
);
207 extern INT32
PSDRV_WriteEndPage( DC
*dc
);
208 extern BOOL32
PSDRV_WriteMoveTo(DC
*dc
, INT32 x
, INT32 y
);
209 extern BOOL32
PSDRV_WriteLineTo(DC
*dc
, INT32 x
, INT32 y
);
210 extern BOOL32
PSDRV_WriteStroke(DC
*dc
);
211 extern BOOL32
PSDRV_WriteRectangle(DC
*dc
, INT32 x
, INT32 y
, INT32 width
,
213 extern BOOL32
PSDRV_WriteSetFont(DC
*dc
);
214 extern BOOL32
PSDRV_WriteShow(DC
*dc
, char *str
, INT32 count
);
215 extern BOOL32
PSDRV_WriteReencodeFont(DC
*dc
);
224 extern BOOL32
PSDRV_EnumDeviceFonts( DC
* dc
, LPLOGFONT16 plf
,
225 DEVICEFONTENUMPROC proc
, LPARAM lp
);
226 extern INT32
PSDRV_Escape( DC
*dc
, INT32 nEscape
, INT32 cbInput
,
227 SEGPTR lpInData
, SEGPTR lpOutData
);
228 extern BOOL32
PSDRV_ExtTextOut( DC
*dc
, INT32 x
, INT32 y
, UINT32 flags
,
229 const RECT32
*lprect
, LPCSTR str
, UINT32 count
,
231 extern BOOL32
PSDRV_GetTextExtentPoint( DC
*dc
, LPCSTR str
, INT32 count
,
233 extern BOOL32
PSDRV_GetTextMetrics( DC
*dc
, TEXTMETRIC32A
*metrics
);
234 extern BOOL32
PSDRV_LineTo( DC
*dc
, INT32 x
, INT32 y
);
235 extern BOOL32
PSDRV_MoveToEx( DC
*dc
, INT32 x
, INT32 y
, LPPOINT32 pt
);
236 extern BOOL32
PSDRV_Polyline( DC
*dc
, const LPPOINT32 pt
, INT32 count
);
237 extern BOOL32
PSDRV_Polygon( DC
*dc
, LPPOINT32 pt
, INT32 count
);
238 extern HGDIOBJ32
PSDRV_SelectObject( DC
*dc
, HGDIOBJ32 handle
);
240 extern BOOL32
PSDRV_Rectangle(DC
*dc
, INT32 left
, INT32 top
, INT32 right
,
242 extern BOOL32
PSDRV_Ellipse(DC
*dc
, INT32 left
, INT32 top
, INT32 right
,