2001-05-08 10:21:00 -04:00
|
|
|
#include "xlib.h"
|
2001-06-11 11:25:39 -04:00
|
|
|
#include "scheme48.h"
|
2001-05-08 10:21:00 -04:00
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
s48_value scx_Black_Pixel(s48_value Xdisplay) {
|
|
|
|
Display* dpy = SCX_EXTRACT_DISPLAY(Xdisplay);
|
|
|
|
return SCX_ENTER_PIXEL( BlackPixel(dpy, DefaultScreen(dpy)) );
|
2001-05-08 10:21:00 -04:00
|
|
|
}
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
s48_value scx_White_Pixel(s48_value Xdisplay) {
|
|
|
|
Display* dpy = SCX_EXTRACT_DISPLAY(Xdisplay);
|
|
|
|
return SCX_ENTER_PIXEL( WhitePixel(dpy, DefaultScreen(dpy)) );
|
2001-05-08 10:21:00 -04:00
|
|
|
}
|
|
|
|
|
2001-10-09 11:45:26 -04:00
|
|
|
s48_value scx_Free_Pixel(s48_value Xpixel, s48_value Xdisplay, s48_value Xcolormap) {
|
|
|
|
unsigned long pixels[1];
|
|
|
|
pixels[0] = SCX_EXTRACT_PIXEL(Xpixel);
|
|
|
|
|
|
|
|
XFreeColors(SCX_EXTRACT_DISPLAY(Xdisplay), SCX_EXTRACT_COLORMAP(Xcolormap),
|
|
|
|
pixels, 1, 0);
|
|
|
|
|
|
|
|
return S48_UNSPECIFIC;
|
|
|
|
}
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
void scx_init_pixel(void) {
|
|
|
|
S48_EXPORT_FUNCTION(scx_Black_Pixel);
|
|
|
|
S48_EXPORT_FUNCTION(scx_White_Pixel);
|
2001-10-09 11:45:26 -04:00
|
|
|
S48_EXPORT_FUNCTION(scx_Free_Pixel);
|
2001-05-08 10:21:00 -04:00
|
|
|
}
|