2001-05-08 10:21:00 -04:00
|
|
|
#include "xlib.h"
|
2001-07-30 10:11:41 -04:00
|
|
|
#include "scheme48.h"
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
s48_value scx_Free_Cursor(s48_value Xdisplay, s48_value Xcursor) {
|
|
|
|
XFreeCursor(SCX_EXTRACT_DISPLAY(Xdisplay),
|
|
|
|
SCX_EXTRACT_CURSOR(Xcursor));
|
2001-07-30 10:11:41 -04:00
|
|
|
return S48_UNSPECIFIC;
|
|
|
|
}
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
s48_value scx_Create_Pixmap_Cursor(s48_value Xdisplay,
|
2001-07-30 10:11:41 -04:00
|
|
|
s48_value src, s48_value mask, s48_value x,
|
|
|
|
s48_value y, s48_value foreground,
|
|
|
|
s48_value background) {
|
2001-07-31 10:51:21 -04:00
|
|
|
Cursor xc = XCreatePixmapCursor(SCX_EXTRACT_DISPLAY(Xdisplay),
|
|
|
|
SCX_EXTRACT_PIXMAP(src),
|
|
|
|
SCX_EXTRACT_PIXMAP(mask),
|
|
|
|
SCX_EXTRACT_COLOR(foreground),
|
|
|
|
SCX_EXTRACT_COLOR(background),
|
2001-07-30 10:11:41 -04:00
|
|
|
s48_extract_integer(x),
|
|
|
|
s48_extract_integer(y));
|
2001-07-31 10:51:21 -04:00
|
|
|
return SCX_ENTER_CURSOR(xc);
|
2001-07-30 10:11:41 -04:00
|
|
|
}
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
s48_value scx_Create_Glyph_Cursor(s48_value Xdisplay,
|
2001-07-30 10:11:41 -04:00
|
|
|
s48_value src, s48_value srcc,
|
|
|
|
s48_value mask, s48_value maskc,
|
|
|
|
s48_value foreground, s48_value background) {
|
2001-07-31 10:51:21 -04:00
|
|
|
Cursor xc = XCreateGlyphCursor(SCX_EXTRACT_DISPLAY(Xdisplay),
|
|
|
|
SCX_EXTRACT_FONT(src),
|
|
|
|
SCX_EXTRACT_FONT(mask),
|
2001-07-30 10:11:41 -04:00
|
|
|
s48_extract_integer(srcc),
|
|
|
|
s48_extract_integer(maskc),
|
2001-07-31 10:51:21 -04:00
|
|
|
SCX_EXTRACT_COLOR(foreground),
|
|
|
|
SCX_EXTRACT_COLOR(background));
|
|
|
|
return SCX_ENTER_CURSOR(xc);
|
2001-07-30 10:11:41 -04:00
|
|
|
}
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
s48_value scx_Recolor_Cursor(s48_value Xdisplay, s48_value Xcursor,
|
2001-07-30 10:11:41 -04:00
|
|
|
s48_value f, s48_value b) {
|
2001-07-31 10:51:21 -04:00
|
|
|
XRecolorCursor(SCX_EXTRACT_DISPLAY(Xdisplay),
|
|
|
|
SCX_EXTRACT_CURSOR(Xcursor),
|
|
|
|
SCX_EXTRACT_COLOR(f),
|
|
|
|
SCX_EXTRACT_COLOR(b));
|
2001-07-30 10:11:41 -04:00
|
|
|
return S48_UNSPECIFIC;
|
|
|
|
}
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
void scx_init_cursor(void) {
|
|
|
|
S48_EXPORT_FUNCTION(scx_Free_Cursor);
|
|
|
|
S48_EXPORT_FUNCTION(scx_Create_Pixmap_Cursor);
|
|
|
|
S48_EXPORT_FUNCTION(scx_Create_Glyph_Cursor);
|
|
|
|
S48_EXPORT_FUNCTION(scx_Recolor_Cursor);
|
2001-05-08 10:21:00 -04:00
|
|
|
}
|