14#include <X11/Xmu/Drawing.h>
29static Pixmap
FindBitmap(
const char *name,
unsigned int *widthp,
30 unsigned int *heightp);
52 if(! strchr(name,
'%')) {
82 unsigned int *heightp)
113 pm = XmuLocateBitmapFile(ScreenOfDisplay(
dpy,
Scr->screen), bigname, NULL,
114 0, (
int *)widthp, (
int *)heightp, &
HotX, &
HotY);
115 if(pm == None &&
Scr->IconDirectory && bigname[0] !=
'/') {
121 asprintf(&bigname,
"%s/%s",
Scr->IconDirectory, name);
122 if(XReadBitmapFile(
dpy,
Scr->Root, bigname, widthp, heightp, &pm,
129 fprintf(stderr,
"%s: unable to find bitmap \"%s\"\n",
ProgramName, name);
141 unsigned int width, height;
144 if(
Scr->rootGC == (GC) 0) {
145 Scr->rootGC = XCreateGC(
dpy,
Scr->Root, 0, &gcvalues);
153 image->
pixmap = XCreatePixmap(
dpy,
Scr->Root, width, height,
Scr->d_depth);
154 gcvalues.background = cp.
back;
155 gcvalues.foreground = cp.
fore;
156 XChangeGC(
dpy,
Scr->rootGC, GCForeground | GCBackground, &gcvalues);
157 XCopyPlane(
dpy, bm, image->
pixmap,
Scr->rootGC, 0, 0, width, height,
158 0, 0, (
unsigned long) 1);
159 XFreePixmap(
dpy, bm);
160 image->
width = width;
Image * get_image_anim_cp(const char *name, ColorPair cp, Image *(*imgloader)(const char *, ColorPair))
static Image * LoadBitmapImage(const char *name, ColorPair cp)
static Pixmap FindBitmap(const char *name, unsigned int *widthp, unsigned int *heightp)
Image * GetBitmapImage(const char *name, ColorPair cp)
Pixmap GetBitmap(const char *name)
Pixmap get_builtin_plain_pixmap(const char *name, unsigned int *widthp, unsigned int *heightp)
char * ExpandFilename(const char *name)