earlybrowserreborn - Blame information for rev 4

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 roytam 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 #include "copyright.h"
9  
10 #ifndef LIBIMG
4 roytam 11 #define XLIB_ILLEGAL_ACCESS
1 roytam 12 #include <stdio.h>
13 #include <X11/X.h>
14 #include <X11/Xlib.h>
15 #include <X11/Xutil.h>
16 #endif
17  
18 #include "image.h"
19 #include "options.h"
20  
21 /* image name and option structure used when processing arguments
22  */
23  
24 typedef struct {
25   char         *name;         /* name of image */
26   int           atx, aty;     /* location to load image at */
27   unsigned int  bright;       /* brightness multiplier */
28   unsigned int  center;       /* true if image is to be centered */
29   unsigned int  clipx, clipy; /* area of image to be used */
30   unsigned int  clipw, cliph;
31   unsigned int  colors;       /* max # of colors to use for this image */
32   unsigned int  delay;        /* # of seconds delay before auto pic advance */
33   unsigned int  dither;       /* true if image is to be dithered */
34   float         gamma;        /* display gamma */
35   char         *go_to;        /* label to goto */
36   unsigned int  gray;         /* true if image is to be grayed */
37   unsigned int  merge;        /* true if we should merge onto previous */
38   unsigned int  normalize;    /* true if image is to be normalized */
39   int           rotate;       /* # degrees to rotate image */
40   unsigned int  smooth;       /* true if image is to be smoothed */
41   unsigned int  xzoom, yzoom; /* zoom percentages */
42   char         *fg, *bg;      /* foreground/background colors if mono image */
43 } ImageOptions;
44  
45 /* This struct holds the X-client side bits for a rendered image.
46  */
47  
48 typedef struct {
49   Display  *disp;       /* destination display */
50   int       scrn;       /* destination screen */
51   int       depth;      /* depth of drawable we want/have */
52   Drawable  drawable;   /* drawable to send image to */
53   Pixel     foreground; /* foreground and background pixels for mono images */
54   Pixel     background;
55   Colormap  cmap;       /* colormap used for image */
56   GC        gc;         /* cached gc for sending image */
57   XImage   *ximage;     /* ximage structure */
58 } XImageInfo;
59  
60 #ifndef MAXIMAGES
61 #define MAXIMAGES BUFSIZ /* max # of images we'll try to load at once */
62 #endif
63  
64 /* function declarations
65  */
66  
67 void supportedImageTypes(); /* imagetypes.c */
68  
69 char *tail(); /* misc.c */
70 void memoryExhausted();
71 void internalError();
72 void version();
73 void usage();
74 void goodImage();
75 Image *processImage();
76 int errorHandler();
77  
78 char *expandPath(); /* path.c */
79 int findImage();
80 void listImages();
81 void loadPathsAndExts();
82 void showPath();
83  
84 void imageOnRoot(); /* root.c */
85  
86 void        sendXImage(); /* send.c */
87 XImageInfo *imageToXImage();
88 Pixmap      ximageToPixmap();
89 void        freeXImage();
90  
91 Visual *getBestVisual(); /* visual.c */
92  
93 int   visualClassFromName(); /* window.c */
94 char *nameOfVisualClass();
95 void cleanUpWindow();
96 /*char imageInWindow();*/
97 XImageInfo *imageInWindow();
98  
99 int loadImgLib();
100 int initImg();