4
void MCursor::load(const char *name, int masked) {
5
static char *dir = strdup(
6
access(XBILL_HOME "pixmaps/logo.xpm", R_OK) ? "" : XBILL_HOME);
9
unsigned width, height;
12
sprintf (file, "%sbitmaps/%s.xbm", dir, name);
13
i = XReadBitmapFile (ui.display, ui.rootwindow, file,
14
&width, &height, &bitmap, &xh, &yh);
15
if (i == BitmapOpenFailed) {
16
printf ("cannot open %s\n", file);
19
if (masked == SEP_MASK) {
20
sprintf (mfile, "%sbitmaps/%s_mask.xbm", dir, name);
21
i = XReadBitmapFile (ui.display, ui.rootwindow,
22
mfile, &width, &height, &mask, &xh, &yh);
26
if (i == BitmapOpenFailed) {
27
printf ("cannot open %s\n", file);
30
cursor = XCreatePixmapCursor(ui.display, bitmap, mask,
31
&ui.black, &ui.white, width/2, height/2);