#include "lx.h" #include "proto.h" #include "internal.h" LX_XID lx_CreatePixmap(LX_CONN *xc, LX_XID drawable, unsigned int depth, unsigned int width, unsigned int height) { LX_XID pm; unsigned char req[16]; if ( (xc->flags & XCF_FAIL) || (depth > 255) || (width > 65535) || (height > 65535) ) { lx__bad_call(xc,"lx_CreatePixmap"); return(LX_PIXMAP_None); } lx__nochain(xc); pm = lx__new_resource_id(xc); req[0] = XP_REQ_CreatePixmap; req[1] = depth; w_card16(&req[2],4); w_card32(&req[4],pm); w_card32(&req[8],drawable); w_card16(&req[12],width); w_card16(&req[14],height); lx__send_req(xc,&req[0],-1); return(pm); }