Xmd/libXmd/XmdIcon.c
2023-11-03 17:59:24 -04:00

15 lines
394 B
C

#include <Xmd/Icon.h>
Pixmap _XmdLoadBitmapIcon (Widget widget, unsigned char *bits, int width, int height) {
Pixel fg, bg;
XtVaGetValues (widget,
XmNforeground, &fg,
XmNbackground, &bg,
NULL);
return XCreatePixmapFromBitmapData (
XtDisplay (widget),
RootWindowOfScreen(XtScreen(widget)),
(char *)(bits), width, height,
fg, bg, DefaultDepthOfScreen(XtScreen(widget)));
}