From 05a4d855f167ae2d0d2c0ba0e386d933172b71ea Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 26 Mar 2007 20:55:26 +0000 Subject: add page (Kris Maglione) --- src/cmd/page/page.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/cmd/page/page.h') diff --git a/src/cmd/page/page.h b/src/cmd/page/page.h index be54e386..7e6c526e 100644 --- a/src/cmd/page/page.h +++ b/src/cmd/page/page.h @@ -1,3 +1,5 @@ +#undef pipe + typedef struct Document Document; struct Document { @@ -12,6 +14,31 @@ struct Document { void *extra; }; +typedef struct Graphic Graphic; + +struct Graphic { + int type; + int fd; + char *name; +}; + +enum { + Ipic, + Itiff, + Ijpeg, + Igif, + Iinferno, + Ifax, + Icvt2pic, + Iplan9bm, + Iccittg4, + Ippm, + Ipng, + Iyuv, + Ibmp, +}; + + void *emalloc(int); void *erealloc(void*, int); char *estrdup(char*); @@ -48,10 +75,10 @@ Image *resample(Image*, Image*); /* ghostscript interface shared by ps, pdf */ typedef struct GSInfo GSInfo; struct GSInfo { + Graphic g; int gsfd; Biobuf gsrd; int gspid; - int gsdfd; int ppi; }; void waitgs(GSInfo*); @@ -70,6 +97,7 @@ void wexits(char*); Image* xallocimage(Display*, Rectangle, ulong, int, ulong); int bell(void*, char*); int opentemp(char *template); +Image* convert(Graphic *g); extern int stdinfd; extern int truecolor; -- cgit v1.2.3