#include "lx.h" #include "proto.h" #include "internal.h" static void do_RecolorCursor(const char *call, LX_CONN *xc, LX_XID cursor, int fr, int fg, int fb, int br, int bg, int bb) { unsigned char req[20]; if ( (xc->flags & XCF_FAIL) || (fr < 0) || (fr > 65535) || (fg < 0) || (fg > 65535) || (fb < 0) || (fb > 65535) || (br < 0) || (br > 65535) || (bg < 0) || (bg > 65535) || (bb < 0) || (bb > 65535) ) { lx__bad_call(xc,call); return; } lx__nochain(xc); req[0] = XP_REQ_RecolorCursor; req[1] = 0; w_card16(&req[2],5); w_card32(&req[4],cursor); w_card16(&req[8],fr); w_card16(&req[10],fg); w_card16(&req[12],fb); w_card16(&req[14],br); w_card16(&req[16],bg); w_card16(&req[18],bb); lx__send_req(xc,&req[0],-1); } void lx_RecolorCursor(LX_CONN *xc, LX_XID cursor, int fr, int fg, int fb, int br, int bg, int bb) { do_RecolorCursor("lx_RecolorCursor",xc,cursor,fr,fg,fb,br,bg,bb); } void lx_RecolorCursor_rgb(LX_CONN *xc, LX_XID cursor, LX_RGB fg, LX_RGB bg) { do_RecolorCursor("lx_RecolorCursor_rgb",xc,cursor,fg.r,fg.g,fg.b,bg.r,bg.g,bg.b); }