1 /* xloadimage.h: 2 * 3 * jim frost 06.21.89 4 * 5 * Copyright 1989 Jim Frost. See included file "copyright.h" for complete 6 * copyright information. 7 */ 8 9 #include "copyright.h" 10 #include <stdio.h> 11 #include <X11/X.h> 12 #include <X11/Xlib.h> 13 #include <X11/Xutil.h> 14 15 #include "image.h" 16 #include "options.h" 17 18 /* This struct holds the X-client side bits for a rendered image. 19 */ 20 21 typedef struct { 22 Display *disp; /* destination display */ 23 int scrn; /* destination screen */ 24 int depth; /* depth of drawable we want/have */ 25 Drawable drawable; /* drawable to send image to */ 26 Pixel foreground; /* foreground and background pixels for mono images */ 27 Pixel background; 28 Colormap cmap; /* colormap used for image */ 29 GC gc; /* cached gc for sending image */ 30 XImage *ximage; /* ximage structure */ 31 } XImageInfo; 32 33 #ifndef MAXIMAGES 34 #define MAXIMAGES BUFSIZ /* max # of images we'll try to load at once */ 35 #endif 36 37 /* function declarations 38 */ 39 40 void supportedImageTypes(); /* imagetypes.c */ 41 void dumpImage(); 42 43 char *tail(); /* misc.c */ 44 void memoryExhausted(); 45 void internalError(); 46 void version(); 47 void usage(); 48 void goodImage(); 49 int errorHandler(); 50 51 void showConfiguration(); /* config.c */ 52 void listImages(); 53 54 char *expandPath(); /* path.c */ 55 int findImage(); 56 void listImages(); 57 void loadPathsAndExts(); 58 void showPath(); 59 60 void imageOnRoot(); /* root.c */ 61 62 void sendXImage(); /* send.c */ 63 XImageInfo *imageToXImage(); 64 Pixmap ximageToPixmap(); 65 void freeXImage(); 66 67 Visual *getBestVisual(); /* visual.c */ 68 69 int visualClassFromName(); /* window.c */ 70 char *nameOfVisualClass(); 71 void cleanUpWindow(); 72 char imageInWindow(); 73