/* draw the background bitmap */
if (sp->bdata) {
if (!sp->pix) {
- sp->pix = XCreatePixmapFromBitmapData(fl_display, fl_winget(),
+ sp->pix = XCreatePixmapFromBitmapData(fl_get_display(), fl_winget(),
(char*)sp->bdata,
sp->bw, sp->bh,
fl_get_flcolor(ob->lcol), fl_get_flcolor(ob->col1),
- /*DefaultDepth(fl_display, DefaultScreen(fl_display))*/ fl_state[fl_get_vclass()].depth);
- XFlush(fl_display);
+ /*DefaultDepth(fl_get_display(), DefaultScreen(fl_get_display()))*/ fl_state[fl_get_vclass()].depth);
+ XFlush(fl_get_display());
}
}
if (sp->pix) {
i = FL_abs(ob->bw);
j = hh - ((lx) ? sp->dy+2*i: 0);
- XCopyArea(fl_display, sp->pix, fl_winget(), gc, xx, yy, ww, j, mx, my);
- XFlush(fl_display);
+ XCopyArea(fl_get_display(), sp->pix, fl_winget(), gc, xx, yy, ww, j, mx, my);
+ XFlush(fl_get_display());
if (lx) {
- XCopyArea(fl_display, sp->pix, fl_winget(), gc, xx,
+ XCopyArea(fl_get_display(), sp->pix, fl_winget(), gc, xx,
yy+j, lx*sp->dx-2*i, hh-j, mx, my+j);
- XFlush(fl_display);
+ XFlush(fl_get_display());
}
}
return 1;
case FL_FREEMEM:
if (sp->pix) {
- XFreePixmap(fl_display, sp->pix);
- XFlush(fl_display);
+ XFreePixmap(fl_get_display(), sp->pix);
+ XFlush(fl_get_display());
}
fl_free(((BMTABLE_SPEC*)ob->spec));
break;
dumb_attributes.colormap = fl_state[fl_get_vclass()].colormap;
dumb_attributes.closeness = 30000;
dumb_attributes.valuemask = XpmColormap | XpmCloseness;
- if (XCreatePixmapFromData(fl_display, fl_winget(), pdata,
+ if (XCreatePixmapFromData(fl_get_display(), fl_winget(), pdata,
&(sp->pix), &dummy_shapemask,
&dumb_attributes) == XpmSuccess) {
sp->bw = dumb_attributes.width;
sp->bh = dumb_attributes.height;
XpmFreeAttributes(&dumb_attributes);
if (dummy_shapemask) {
- XFreePixmap(fl_display, dummy_shapemask);
+ XFreePixmap(fl_get_display(), dummy_shapemask);
}
}
}
unsigned int bw, bh;
unsigned char * bdata;
- if(XReadBitmapFileData(filename, &bw, &bh,
+ if (XReadBitmapFileData(filename, &bw, &bh,
&bdata, &xh, &yh) == BitmapSuccess)
fl_set_bmtable_data(ob, nx, ny, bw, bh, bdata);
- XFlush(fl_display);
+ XFlush(fl_get_display());
}
#else
dumb_attributes.closeness = 30000;
dumb_attributes.valuemask = XpmColormap | XpmCloseness;
- if (XReadPixmapFile(fl_display, fl_winget(), (char *)filename,
+ if (XReadPixmapFile(fl_get_display(), fl_winget(), (char *)filename,
&(sp->pix), &dummy_shapemask,
&dumb_attributes) == XpmSuccess) {
sp->bw = dumb_attributes.width;
sp->bh = dumb_attributes.height;
XpmFreeAttributes(&dumb_attributes);
if (dummy_shapemask) {
- XFreePixmap(fl_display, dummy_shapemask);
+ XFreePixmap(fl_get_display(), dummy_shapemask);
}
}
- /* XFlush(fl_display); */
+ /* XFlush(fl_get_display()); */
}
}
y = (i/sp->nx)*sp->dy + FL_abs(ob->bw);
w = sp->dx-2*FL_abs(ob->bw);
h = sp->dy-2*FL_abs(ob->bw);
- XCopyArea(fl_display, sp->pix, d, gc, x, y, w, h, xx, yy);
- XFlush(fl_display);
+ XCopyArea(fl_get_display(), sp->pix, d, gc, x, y, w, h, xx, yy);
+ XFlush(fl_get_display());
}
}
/* dump the temporary pixmap */
if (sp && sp->pix) {
- XFreePixmap(fl_display, sp->pix);
- XFlush(fl_display);
+ XFreePixmap(fl_get_display(), sp->pix);
+ XFlush(fl_get_display());
sp->pix = 0;
}
/* dump the temporary pixmap */
if (sp && sp->pix) {
- XFreePixmap(fl_display, sp->pix);
- XFlush(fl_display);
+ XFreePixmap(fl_get_display(), sp->pix);
+ XFlush(fl_get_display());
sp->pix = 0;
}
}