572 #ifndef IMGVIEW_H #define IMGVIEW_H #include #include #define WIN_X 0 #define WIN_Y 0 #define WIN_W 800 #define WIN_H 600 #define BGCOLOR "black" #define TBGCOLOR "#d9d9d9" #define XYMOVE 50 #define DELAY 10 #define JBIGW WIN_W #define JBIGH WIN_H /********************* End of user configurable stuff *********************/ #define APPNAME "imgview" #define CLASSNAME "Imgview" #define WINNAME "ImgView" #define FMT_PPM 0 #define FMT_GIF 1 #define FMT_JPEG 2 #define FMT_TIFF 3 #define FMT_PNG 4 #define FMT_PCX 5 #define FMT_JBIG 6 typedef struct { int win_x, win_y, win_w, win_h; char bgcolor_s[50], tbgcolor_s[50]; unsigned long bgcolor, tbgcolor; XColor bgcolor_rgb, tbgcolor_rgb; int xymove; int delay; int jbigw, jbigh; XImage *img, *zimg, *curimg; int img_x, img_y; double zoom; int keepzoom; int slide; int timeout; int verbose; } VARS; extern VARS v; /* config.c */ void readconfig(FILE *f); void writeconfig(void); /* ppm.c */ XImage *readppm(int fd); /* gif.c */ XImage *readgif(int fd); /* jpeg.c */ XImage *readjpeg(int fd); /* tiff.c */ XImage *readtiff(int fd, char *fname); /* png.c */ XImage *readpng(int fd); /* pcx.c */ XImage *readpcx(int fd); /* jbig.c */ XImage *readjbig(int fd); #endif . 0