3 typedef struct Document Document;
9 char* (*pagename)(Document*, int);
10 Image* (*drawpage)(Document*, int);
11 int (*addpage)(Document*, char*);
12 int (*rmpage)(Document*, int);
18 typedef struct Graphic Graphic;
49 void *erealloc(void*, int);
51 int spawncmd(char*, char **, int, int, int);
53 int spooltodisk(uchar*, int, char**);
54 int stdinpipe(uchar*, int);
55 Document *initps(Biobuf*, int, char**, uchar*, int);
56 Document *initpdf(Biobuf*, int, char**, uchar*, int);
57 Document *initgfx(Biobuf*, int, char**, uchar*, int);
58 Document *inittroff(Biobuf*, int, char**, uchar*, int);
59 Document *initdvi(Biobuf*, int, char**, uchar*, int);
60 Document *initmsdoc(Biobuf*, int, char**, uchar*, int);
62 void viewer(Document*);
63 extern Cursor reading;
66 extern int textbits, gfxbits;
71 extern int truetoboundingbox;
74 extern int mknewwindow;
79 Image *rot270(Image*);
80 Image *resample(Image*, Image*);
82 /* ghostscript interface shared by ps, pdf */
83 typedef struct GSInfo GSInfo;
84 typedef struct PDFInfo PDFInfo;
85 typedef struct Page Page;
86 typedef struct PSInfo PSInfo;
100 int offset; /* offset of page beginning within file */
104 Rectangle bbox; /* default bounding box */
107 int clueless; /* don't know where page boundaries are */
108 long psoff; /* location of %! in file */
112 void waitgs(GSInfo*);
113 int gscmd(GSInfo*, char*, ...);
114 int spawngs(GSInfo*, char*);
115 void setdim(GSInfo*, Rectangle, int, int);
116 int spawnwriter(GSInfo*, Biobuf*);
117 Rectangle screenrect(void);
120 Rectangle winrect(void);
121 void resize(int, int);
125 Image* xallocimage(Display*, Rectangle, ulong, int, ulong);
126 int bell(void*, char*);
127 Image* convert(Graphic *g);
128 Image* cachedpage(Document*, int, int);
129 void cacheflush(void);
132 extern char tempfile[40];
135 extern int truecolor;
138 /* BUG BUG BUG BUG BUG: cannot use new draw operations in drawterm,
139 * or in vncs, and there is a bug in the kernel for copying images
140 * from cpu memory -> video memory (memmove is not being used).
141 * until all that is settled, ignore the draw operators.
143 #define drawop(a,b,c,d,e,f) draw(a,b,c,d,e)
144 #define gendrawop(a,b,c,d,e,f,g) gendraw(a,b,c,d,e,f)