1 | /* $Xorg: Ps.h,v 1.5 2001/02/09 02:04:35 xorgcvs Exp $ */
|
---|
2 | /*
|
---|
3 |
|
---|
4 | Copyright 1996, 1998 The Open Group
|
---|
5 |
|
---|
6 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
7 | documentation for any purpose is hereby granted without fee, provided that
|
---|
8 | the above copyright notice appear in all copies and that both that
|
---|
9 | copyright notice and this permission notice appear in supporting
|
---|
10 | documentation.
|
---|
11 |
|
---|
12 | The above copyright notice and this permission notice shall be included in
|
---|
13 | all copies or substantial portions of the Software.
|
---|
14 |
|
---|
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
18 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
19 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
21 |
|
---|
22 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
23 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
24 | in this Software without prior written authorization from The Open Group.
|
---|
25 |
|
---|
26 | */
|
---|
27 | /*
|
---|
28 | * (c) Copyright 1996 Hewlett-Packard Company
|
---|
29 | * (c) Copyright 1996 International Business Machines Corp.
|
---|
30 | * (c) Copyright 1996 Sun Microsystems, Inc.
|
---|
31 | * (c) Copyright 1996 Novell, Inc.
|
---|
32 | * (c) Copyright 1996 Digital Equipment Corp.
|
---|
33 | * (c) Copyright 1996 Fujitsu Limited
|
---|
34 | * (c) Copyright 1996 Hitachi, Ltd.
|
---|
35 | *
|
---|
36 | * Permission is hereby granted, free of charge, to any person obtaining
|
---|
37 | * a copy of this software and associated documentation files (the
|
---|
38 | * "Software"), to deal in the Software without restriction, including
|
---|
39 | * without limitation the rights to use, copy, modify, merge, publish,
|
---|
40 | * distribute, sublicense, and/or sell copies of the Software, and to
|
---|
41 | * permit persons to whom the Software is furnished to do so, subject
|
---|
42 | * to the following conditions:
|
---|
43 | *
|
---|
44 | * The above copyright notice and this permission notice shall be included
|
---|
45 | * in all copies or substantial portions of the Software.
|
---|
46 | *
|
---|
47 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
48 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
49 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
50 | * THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
---|
51 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
---|
52 | * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
---|
53 | * SOFTWARE.
|
---|
54 | *
|
---|
55 | * Except as contained in this notice, the names of the copyright holders
|
---|
56 | * shall not be used in advertising or otherwise to promote the sale, use
|
---|
57 | * or other dealings in this Software without prior written authorization
|
---|
58 | * from said copyright holders.
|
---|
59 | */
|
---|
60 |
|
---|
61 | /*******************************************************************
|
---|
62 | **
|
---|
63 | ** *********************************************************
|
---|
64 | ** *
|
---|
65 | ** * File: Ps.h
|
---|
66 | ** *
|
---|
67 | ** * Contents: defines and includes for the Ps driver
|
---|
68 | ** * for a printing X server.
|
---|
69 | ** *
|
---|
70 | ** * Created By: Roger Helmendach (Liberty Systems)
|
---|
71 | ** *
|
---|
72 | ** * Copyright: Copyright 1996 The Open Group, Inc.
|
---|
73 | ** *
|
---|
74 | ** *********************************************************
|
---|
75 | **
|
---|
76 | ********************************************************************/
|
---|
77 |
|
---|
78 | #ifdef HAVE_DIX_CONFIG_H
|
---|
79 | #include <dix-config.h>
|
---|
80 | #endif
|
---|
81 |
|
---|
82 | #ifndef _PS_H_
|
---|
83 | #define _PS_H_
|
---|
84 |
|
---|
85 | #include <stdio.h>
|
---|
86 |
|
---|
87 | #ifdef abs
|
---|
88 | #undef abs /* this is because of a non-Spec1170ness in misc.h */
|
---|
89 | #endif
|
---|
90 | #include <stdlib.h>
|
---|
91 | #include "scrnintstr.h"
|
---|
92 | #include "dix.h"
|
---|
93 |
|
---|
94 | #include "PsDef.h"
|
---|
95 | #include "psout.h"
|
---|
96 |
|
---|
97 | #include <X11/extensions/Print.h>
|
---|
98 | #include <X11/extensions/Printstr.h>
|
---|
99 |
|
---|
100 | #include "regionstr.h"
|
---|
101 | #include <X11/fonts/fontstruct.h>
|
---|
102 | #include "dixfontstr.h"
|
---|
103 | #include "gcstruct.h"
|
---|
104 |
|
---|
105 | /*
|
---|
106 | * Some sleazes to force the XrmDB stuff into the server
|
---|
107 | */
|
---|
108 | #ifndef HAVE_XPointer
|
---|
109 | typedef char *XPointer;
|
---|
110 | #define Status int
|
---|
111 | #define True 1
|
---|
112 | #define False 0
|
---|
113 | #endif
|
---|
114 |
|
---|
115 | #include "misc.h"
|
---|
116 | #include <X11/Xfuncproto.h>
|
---|
117 | #include <X11/Xresource.h>
|
---|
118 | #include "attributes.h"
|
---|
119 |
|
---|
120 |
|
---|
121 | /*
|
---|
122 | * Public index variables from PsInit.c
|
---|
123 | */
|
---|
124 |
|
---|
125 | extern int PsScreenPrivateIndex;
|
---|
126 | extern int PsWindowPrivateIndex;
|
---|
127 | extern int PsContextPrivateIndex;
|
---|
128 | extern int PsPixmapPrivateIndex;
|
---|
129 | extern XpValidatePoolsRec PsValidatePoolsRec;
|
---|
130 |
|
---|
131 | /*
|
---|
132 | * Display list structures
|
---|
133 | */
|
---|
134 |
|
---|
135 | #define DPY_BLOCKSIZE 4096
|
---|
136 |
|
---|
137 | typedef struct
|
---|
138 | {
|
---|
139 | int mode;
|
---|
140 | int nPoints;
|
---|
141 | xPoint *pPoints;
|
---|
142 | } PsPolyPointsRec;
|
---|
143 |
|
---|
144 | typedef struct
|
---|
145 | {
|
---|
146 | int nSegments;
|
---|
147 | xSegment *pSegments;
|
---|
148 | } PsSegmentsRec;
|
---|
149 |
|
---|
150 | typedef struct
|
---|
151 | {
|
---|
152 | int nRects;
|
---|
153 | xRectangle *pRects;
|
---|
154 | } PsRectanglesRec;
|
---|
155 |
|
---|
156 | typedef struct
|
---|
157 | {
|
---|
158 | int nArcs;
|
---|
159 | xArc *pArcs;
|
---|
160 | } PsArcsRec;
|
---|
161 |
|
---|
162 | typedef struct
|
---|
163 | {
|
---|
164 | int x;
|
---|
165 | int y;
|
---|
166 | int count;
|
---|
167 | char *string;
|
---|
168 | } PsText8Rec;
|
---|
169 |
|
---|
170 | typedef struct
|
---|
171 | {
|
---|
172 | int x;
|
---|
173 | int y;
|
---|
174 | int count;
|
---|
175 | unsigned short *string;
|
---|
176 | } PsText16Rec;
|
---|
177 |
|
---|
178 | typedef struct
|
---|
179 | {
|
---|
180 | int depth;
|
---|
181 | int x;
|
---|
182 | int y;
|
---|
183 | int w;
|
---|
184 | int h;
|
---|
185 | int leftPad;
|
---|
186 | int format;
|
---|
187 | int res; /* image resolution */
|
---|
188 | char *pData;
|
---|
189 | } PsImageRec;
|
---|
190 |
|
---|
191 | typedef struct
|
---|
192 | {
|
---|
193 | int x;
|
---|
194 | int y;
|
---|
195 | int w;
|
---|
196 | int h;
|
---|
197 | } PsFrameRec;
|
---|
198 |
|
---|
199 | typedef enum
|
---|
200 | {
|
---|
201 | PolyPointCmd,
|
---|
202 | PolyLineCmd,
|
---|
203 | PolySegmentCmd,
|
---|
204 | PolyRectangleCmd,
|
---|
205 | FillPolygonCmd,
|
---|
206 | PolyFillRectCmd,
|
---|
207 | PolyArcCmd,
|
---|
208 | PolyFillArcCmd,
|
---|
209 | Text8Cmd,
|
---|
210 | Text16Cmd,
|
---|
211 | TextI8Cmd,
|
---|
212 | TextI16Cmd,
|
---|
213 | PutImageCmd,
|
---|
214 | BeginFrameCmd,
|
---|
215 | EndFrameCmd
|
---|
216 | } DisplayElmType;
|
---|
217 |
|
---|
218 | typedef struct _DisplayElmRec
|
---|
219 | {
|
---|
220 | DisplayElmType type;
|
---|
221 | GCPtr gc;
|
---|
222 | union
|
---|
223 | {
|
---|
224 | PsPolyPointsRec polyPts;
|
---|
225 | PsSegmentsRec segments;
|
---|
226 | PsRectanglesRec rects;
|
---|
227 | PsArcsRec arcs;
|
---|
228 | PsText8Rec text8;
|
---|
229 | PsText16Rec text16;
|
---|
230 | PsImageRec image;
|
---|
231 | PsFrameRec frame;
|
---|
232 | } c;
|
---|
233 | } DisplayElmRec;
|
---|
234 |
|
---|
235 | typedef DisplayElmRec *DisplayElmPtr;
|
---|
236 |
|
---|
237 | typedef struct _DisplayListRec
|
---|
238 | {
|
---|
239 | struct _DisplayListRec *next;
|
---|
240 | int nelms;
|
---|
241 | DisplayElmRec elms[DPY_BLOCKSIZE];
|
---|
242 | } DisplayListRec;
|
---|
243 |
|
---|
244 | typedef DisplayListRec *DisplayListPtr;
|
---|
245 |
|
---|
246 | /*
|
---|
247 | * Private structures
|
---|
248 | */
|
---|
249 |
|
---|
250 | typedef struct
|
---|
251 | {
|
---|
252 | XrmDatabase resDB;
|
---|
253 | Bool (*DestroyWindow)(WindowPtr);
|
---|
254 | } PsScreenPrivRec, *PsScreenPrivPtr;
|
---|
255 |
|
---|
256 | typedef struct PsFontTypeInfoRec PsFontTypeInfoRec;
|
---|
257 |
|
---|
258 | /* Structure to hold information about one font on disk
|
---|
259 | * Notes:
|
---|
260 | * - multiple XLFD names can refer to the same |PsFontTypeInfoRec| (if
|
---|
261 | * they all use the same font on the disk)
|
---|
262 | * - the FreeType font download code uses multiple |PsFontTypeInfoRec|
|
---|
263 | * records for one font on disk if they differ in the encoding being
|
---|
264 | * used (this is an exception from the
|
---|
265 | * 'one-|PsFontTypeInfoRec|-per-font-on-disk'-design; maybe it it is better
|
---|
266 | * to rework that in a later step and add a new per-encoding structure).
|
---|
267 | */
|
---|
268 | struct PsFontTypeInfoRec
|
---|
269 | {
|
---|
270 | PsFontTypeInfoRec *next; /* Next record in list... */
|
---|
271 | char *adobe_ps_name; /* PostScript font name (from the
|
---|
272 | * "_ADOBE_POSTSCRIPT_FONTNAME" atom) */
|
---|
273 | char *download_ps_name; /* PostScript font name used for font download */
|
---|
274 | char *filename; /* File name of font */
|
---|
275 | #ifdef XP_USE_FREETYPE
|
---|
276 | char *ft_download_encoding; /* encoding used for download */
|
---|
277 | PsFTDownloadFontType ft_download_font_type; /* PS font type used for download (e.g. Type1/Type3/CID/etc.) */
|
---|
278 | #endif /* XP_USE_FREETYPE */
|
---|
279 | int is_iso_encoding; /* Is this font encoded in ISO Latin 1 ? */
|
---|
280 | int font_type; /* See PSFTI_FONT_TYPE_* below... */
|
---|
281 | Bool downloadableFont; /* Font can be downloaded */
|
---|
282 | Bool alreadyDownloaded[256]; /* Font has been downloaded (for 256 8bit "sub"-font) */
|
---|
283 | };
|
---|
284 |
|
---|
285 | #define PSFTI_FONT_TYPE_OTHER (0)
|
---|
286 | #define PSFTI_FONT_TYPE_PMF (1)
|
---|
287 | #define PSFTI_FONT_TYPE_PS_TYPE1_PFA (2)
|
---|
288 | #define PSFTI_FONT_TYPE_PS_TYPE1_PFB (3)
|
---|
289 | #define PSFTI_FONT_TYPE_TRUETYPE (4)
|
---|
290 | /* PSFTI_FONT_TYPE_FREETYPE is means the font is handled by the freetype engine */
|
---|
291 | #define PSFTI_FONT_TYPE_FREETYPE (5)
|
---|
292 |
|
---|
293 | typedef struct PsFontInfoRec PsFontInfoRec;
|
---|
294 |
|
---|
295 | /* Structure which represents our context info for a single XLFD font
|
---|
296 | * Note that multiple |PsFontInfoRec| records can share the same
|
---|
297 | * |PsFontTypeInfoRec| record - the |PsFontInfoRec| records represent
|
---|
298 | * different appearances of the same font on disk(=|PsFontTypeInfoRec|)).
|
---|
299 | */
|
---|
300 | struct PsFontInfoRec
|
---|
301 | {
|
---|
302 | PsFontInfoRec *next; /* Next record in list... */
|
---|
303 | /* |font| and |font_fontPrivate| are used by |PsFindFontInfoRec()| to
|
---|
304 | * identify a font */
|
---|
305 | FontPtr font; /* The font this record is for */
|
---|
306 | pointer font_fontPrivate;
|
---|
307 | PsFontTypeInfoRec *ftir; /* Record about the font file on disk */
|
---|
308 | const char *dfl_name; /* XLFD for this font */
|
---|
309 | int size; /* Font size. Use |mtx| if |size==0| */
|
---|
310 | float mtx[4]; /* Transformation matrix (see |size|) */
|
---|
311 | };
|
---|
312 |
|
---|
313 | typedef struct
|
---|
314 | {
|
---|
315 | char *jobFileName;
|
---|
316 | FILE *pJobFile;
|
---|
317 | GC lastGC;
|
---|
318 | unsigned char *dash;
|
---|
319 | int validGC;
|
---|
320 | ClientPtr getDocClient;
|
---|
321 | int getDocBufSize;
|
---|
322 | PsOutPtr pPsOut;
|
---|
323 | PsFontTypeInfoRec *fontTypeInfoRecords;
|
---|
324 | PsFontInfoRec *fontInfoRecords;
|
---|
325 | } PsContextPrivRec, *PsContextPrivPtr;
|
---|
326 |
|
---|
327 | typedef struct
|
---|
328 | {
|
---|
329 | int validContext;
|
---|
330 | XpContextPtr context;
|
---|
331 | } PsWindowPrivRec, *PsWindowPrivPtr;
|
---|
332 |
|
---|
333 | typedef struct
|
---|
334 | {
|
---|
335 | XpContextPtr context;
|
---|
336 | GC lastGC;
|
---|
337 | int validGC;
|
---|
338 | DisplayListPtr dispList;
|
---|
339 | } PsPixmapPrivRec, *PsPixmapPrivPtr;
|
---|
340 |
|
---|
341 | /*
|
---|
342 | * Macro functions
|
---|
343 | */
|
---|
344 |
|
---|
345 | #define SEND_PS(f,c) fwrite( c, sizeof( char ), strlen( c ), f )
|
---|
346 | #define MIN(a,b) (((a)<(b))?(a):(b))
|
---|
347 | #ifndef MAX
|
---|
348 | #define MAX(a,b) (((a)>(b))?(a):(b))
|
---|
349 | #endif
|
---|
350 |
|
---|
351 | /*
|
---|
352 | * Functions in PsInit.c
|
---|
353 | */
|
---|
354 |
|
---|
355 | extern Bool InitializePsDriver(int ndx, ScreenPtr pScreen, int argc,
|
---|
356 | char **argv);
|
---|
357 | extern XpContextPtr PsGetContextFromWindow(WindowPtr win);
|
---|
358 |
|
---|
359 | /*
|
---|
360 | * Functions in PsPrint.c
|
---|
361 | */
|
---|
362 |
|
---|
363 | extern int PsStartJob(XpContextPtr pCon, Bool sendClientData, ClientPtr client);
|
---|
364 | extern int PsEndJob(XpContextPtr pCon, Bool cancel);
|
---|
365 | extern int PsStartPage(XpContextPtr pCon, WindowPtr pWin);
|
---|
366 | extern int PsEndPage(XpContextPtr pCon, WindowPtr pWin);
|
---|
367 | extern int PsStartDoc(XpContextPtr pCon, XPDocumentType type);
|
---|
368 | extern int PsEndDoc(XpContextPtr pCon, Bool cancel);
|
---|
369 | extern int PsDocumentData(XpContextPtr pCon, DrawablePtr pDraw, char *pData,
|
---|
370 | int len_data, char *pFmt, int len_fmt, char *pOpt, int len_opt,
|
---|
371 | ClientPtr client);
|
---|
372 | extern int PsGetDocumentData(XpContextPtr pCon, ClientPtr client,
|
---|
373 | int maxBufferSize);
|
---|
374 |
|
---|
375 | /*
|
---|
376 | * Functions in PsGC.c
|
---|
377 | */
|
---|
378 |
|
---|
379 | extern Bool PsCreateGC(GCPtr pGC);
|
---|
380 | extern PsContextPrivPtr PsGetPsContextPriv( DrawablePtr pDrawable );
|
---|
381 | extern int PsUpdateDrawableGC(GCPtr pGC, DrawablePtr pDrawable,
|
---|
382 | PsOutPtr *psOut, ColormapPtr *cMap);
|
---|
383 | extern void PsValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
|
---|
384 | extern void PsChangeGC(GCPtr pGC, unsigned long changes);
|
---|
385 | extern void PsCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
|
---|
386 | extern void PsDestroyGC(GCPtr pGC);
|
---|
387 | extern void PsChangeClip(GCPtr pGC, int type, pointer pValue, int nrects);
|
---|
388 | extern void PsDestroyClip(GCPtr pGC);
|
---|
389 | extern void PsCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
|
---|
390 |
|
---|
391 | extern GCPtr PsCreateAndCopyGC(DrawablePtr pDrawable, GCPtr pSrc);
|
---|
392 |
|
---|
393 | /*
|
---|
394 | * Functions in PsMisc.c
|
---|
395 | */
|
---|
396 |
|
---|
397 | extern void PsQueryBestSize(int type, short *pwidth, short *pheight,
|
---|
398 | ScreenPtr pScreen);
|
---|
399 | extern Bool PsCloseScreen(int index, ScreenPtr pScreen);
|
---|
400 | extern void PsLineAttrs(PsOutPtr psOut, GCPtr pGC, ColormapPtr cMap);
|
---|
401 | extern int PsGetMediumDimensions(
|
---|
402 | XpContextPtr pCon,
|
---|
403 | CARD16 *pWidth,
|
---|
404 | CARD16 *pHeight);
|
---|
405 | extern int PsGetReproducibleArea(
|
---|
406 | XpContextPtr pCon,
|
---|
407 | xRectangle *pRect);
|
---|
408 | extern int PsSetImageResolution(
|
---|
409 | XpContextPtr pCon,
|
---|
410 | int imageRes,
|
---|
411 | Bool *status);
|
---|
412 |
|
---|
413 | /*
|
---|
414 | * Functions in PsSpans.c
|
---|
415 | */
|
---|
416 |
|
---|
417 | extern void PsFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans,
|
---|
418 | DDXPointPtr pPoints, int *pWidths, int fSorted);
|
---|
419 | extern void PsSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc,
|
---|
420 | DDXPointPtr pPoints, int *pWidths, int nSpans,
|
---|
421 | int fSorted);
|
---|
422 |
|
---|
423 | /*
|
---|
424 | * Functions in PsArea.c
|
---|
425 | */
|
---|
426 |
|
---|
427 | extern void PsPutScaledImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
|
---|
428 | int x, int y, int w, int h, int leftPad, int format,
|
---|
429 | int imageRes, char *pImage);
|
---|
430 | extern void PsPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
|
---|
431 | int x, int y, int w, int h, int leftPad, int format,
|
---|
432 | char *pImage);
|
---|
433 | extern void PsPutImageMask(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
---|
434 | int w, int h, int leftPad, int format, char *pImage);
|
---|
435 | extern RegionPtr PsCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
---|
436 | int srcx, int srcy, int width, int height,
|
---|
437 | int dstx, int dsty);
|
---|
438 | extern RegionPtr PsCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
---|
439 | int srcx, int srcy, int width, int height,
|
---|
440 | int dstx, int dsty, unsigned long plane);
|
---|
441 |
|
---|
442 | /*
|
---|
443 | * Functions in PsPixel.c
|
---|
444 | */
|
---|
445 |
|
---|
446 | extern void PsPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
|
---|
447 | int nPoints, xPoint *pPoints);
|
---|
448 | extern void PsPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable,
|
---|
449 | int width, int height, int x, int y);
|
---|
450 |
|
---|
451 | /*
|
---|
452 | * Functions in PsLine.c
|
---|
453 | */
|
---|
454 |
|
---|
455 | extern void PsPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode,
|
---|
456 | int nPoints, xPoint *pPoints);
|
---|
457 | extern void PsPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments,
|
---|
458 | xSegment *pSegments);
|
---|
459 |
|
---|
460 | /*
|
---|
461 | * Functions in PsPolygon.c
|
---|
462 | */
|
---|
463 |
|
---|
464 | extern void PsPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRects,
|
---|
465 | xRectangle *pRects);
|
---|
466 | extern void PsFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape,
|
---|
467 | int mode, int nPoints, DDXPointPtr pPoints);
|
---|
468 | extern void PsPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRects,
|
---|
469 | xRectangle *pRects);
|
---|
470 |
|
---|
471 | /*
|
---|
472 | * Functions in PsPolygon.c
|
---|
473 | */
|
---|
474 |
|
---|
475 | extern void PsPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs,
|
---|
476 | xArc *pArcs);
|
---|
477 | extern void PsPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs,
|
---|
478 | xArc *pArcs);
|
---|
479 |
|
---|
480 | /*
|
---|
481 | * Functions in PsText.c
|
---|
482 | */
|
---|
483 |
|
---|
484 | extern int PsPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
---|
485 | int count, char *string);
|
---|
486 | extern int PsPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
---|
487 | int count, unsigned short *string);
|
---|
488 | extern void PsImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
---|
489 | int count, char *string);
|
---|
490 | extern void PsImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
---|
491 | int count, unsigned short *string);
|
---|
492 | extern void PsImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
---|
493 | unsigned int nGlyphs, CharInfoPtr *pCharInfo,
|
---|
494 | pointer pGlyphBase);
|
---|
495 | extern void PsPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
|
---|
496 | unsigned int nGlyphs, CharInfoPtr *pCharInfo,
|
---|
497 | pointer pGlyphBase);
|
---|
498 |
|
---|
499 | /*
|
---|
500 | * Functions in PsWindow.c
|
---|
501 | */
|
---|
502 |
|
---|
503 | extern Bool PsCreateWindow(WindowPtr pWin);
|
---|
504 | extern Bool PsMapWindow(WindowPtr pWin);
|
---|
505 | extern Bool PsPositionWindow(WindowPtr pWin, int x, int y);
|
---|
506 | extern Bool PsUnmapWindow(WindowPtr pWin);
|
---|
507 | extern void PsCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
|
---|
508 | RegionPtr prgnSrc);
|
---|
509 | extern Bool PsChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
|
---|
510 | extern void PsPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
---|
511 | extern Bool PsDestroyWindow(WindowPtr pWin);
|
---|
512 |
|
---|
513 | /*
|
---|
514 | * Functions in PsFonts.c
|
---|
515 | */
|
---|
516 |
|
---|
517 | extern Bool PsRealizeFont(ScreenPtr pscr, FontPtr pFont);
|
---|
518 | extern Bool PsUnrealizeFont(ScreenPtr pscr, FontPtr pFont);
|
---|
519 | extern char *PsGetFontName(FontPtr pFont);
|
---|
520 | extern int PsGetFontSize(FontPtr pFont, float *mtx);
|
---|
521 | extern char *PsGetPSFontName(FontPtr pFont);
|
---|
522 | extern char *PsGetPSFaceOrFontName(FontPtr pFont);
|
---|
523 | extern int PsIsISOLatin1Encoding(FontPtr pFont);
|
---|
524 | extern char *PsGetEncodingName(FontPtr pFont);
|
---|
525 | extern PsFontInfoRec *PsGetFontInfoRec(DrawablePtr pDrawable, FontPtr pFont);
|
---|
526 | extern void PsFreeFontInfoRecords(PsContextPrivPtr priv);
|
---|
527 | extern PsFTDownloadFontType PsGetFTDownloadFontType(void);
|
---|
528 |
|
---|
529 | /*
|
---|
530 | * Functions in PsFTFonts.c
|
---|
531 | */
|
---|
532 |
|
---|
533 | extern char *PsGetFTFontFileName(FontPtr pFont);
|
---|
534 | extern Bool PsIsFreeTypeFont(FontPtr pFont);
|
---|
535 |
|
---|
536 | /*
|
---|
537 | * Functions in PsAttr.c
|
---|
538 | */
|
---|
539 |
|
---|
540 | extern char *PsGetAttributes(XpContextPtr pCon, XPAttributes pool);
|
---|
541 | extern char *PsGetOneAttribute(XpContextPtr pCon, XPAttributes pool,
|
---|
542 | char *attr);
|
---|
543 | extern int PsAugmentAttributes(XpContextPtr pCon, XPAttributes pool,
|
---|
544 | char *attrs);
|
---|
545 | extern int PsSetAttributes(XpContextPtr pCon, XPAttributes pool, char *attrs);
|
---|
546 |
|
---|
547 | /*
|
---|
548 | * Functions in PsColor.c
|
---|
549 | */
|
---|
550 |
|
---|
551 | extern Bool PsCreateColormap(ColormapPtr pColor);
|
---|
552 | extern void PsDestroyColormap(ColormapPtr pColor);
|
---|
553 | extern void PsInstallColormap(ColormapPtr pColor);
|
---|
554 | extern void PsUninstallColormap(ColormapPtr pColor);
|
---|
555 | extern int PsListInstalledColormaps(ScreenPtr pScreen, XID *pCmapList);
|
---|
556 | extern void PsStoreColors(ColormapPtr pColor, int ndef, xColorItem *pdefs);
|
---|
557 | extern void PsResolveColor(unsigned short *pRed, unsigned short *pGreen,
|
---|
558 | unsigned short *pBlue, VisualPtr pVisual);
|
---|
559 | extern PsOutColor PsGetPixelColor(ColormapPtr cMap, int pixval);
|
---|
560 | extern void PsSetFillColor(DrawablePtr pDrawable, GCPtr pGC, PsOutPtr psOut,
|
---|
561 | ColormapPtr cMap);
|
---|
562 |
|
---|
563 | /*
|
---|
564 | * Functions in PsPixmap.c
|
---|
565 | */
|
---|
566 |
|
---|
567 | extern PixmapPtr PsCreatePixmap(ScreenPtr pScreen, int width, int height,
|
---|
568 | int depth);
|
---|
569 | extern void PsScrubPixmap(PixmapPtr pPixmap);
|
---|
570 | extern Bool PsDestroyPixmap(PixmapPtr pPixmap);
|
---|
571 | extern DisplayListPtr PsGetFreeDisplayBlock(PsPixmapPrivPtr priv);
|
---|
572 | extern void PsReplayPixmap(PixmapPtr pix, DrawablePtr pDrawable);
|
---|
573 | extern int PsCloneDisplayElm(PixmapPtr dst,
|
---|
574 | DisplayElmPtr elm, DisplayElmPtr newElm,
|
---|
575 | int xoff, int yoff);
|
---|
576 | extern void PsCopyDisplayList(PixmapPtr src, PixmapPtr dst, int xoff,
|
---|
577 | int yoff, int x, int y, int w, int h);
|
---|
578 | extern PsElmPtr PsCreateFillElementList(PixmapPtr pix, int *nElms);
|
---|
579 | extern PsElmPtr PsCloneFillElementList(int nElms, PsElmPtr elms);
|
---|
580 | extern void PsDestroyFillElementList(int nElms, PsElmPtr elms);
|
---|
581 |
|
---|
582 | /*
|
---|
583 | * Functions in PsImageUtil.c
|
---|
584 | */
|
---|
585 |
|
---|
586 | extern unsigned long
|
---|
587 | PsGetImagePixel(char *pImage, int depth, int w, int h, int leftPad, int format,
|
---|
588 | int px, int py);
|
---|
589 |
|
---|
590 | #endif /* _PS_H_ */
|
---|