// Copyright status: this file is in the public domain. #include #include #include #include #include #include void lx_shape_Offset(LX_CONN *xc, LX_XID dst, LX_SHAPE_KIND kind, int xoff, int yoff) { LX_SHAPE_PRIV *p; unsigned char req[16]; int proto_kind; if (lxxi_conn_failed(xc)) { lxxi_bad_call(xc,"ls_shape_GetRectangles"); return; } p = lx_get_private(xc,lx_shape__px); if (! p) { lxxi_bad_call(xc,"lx_shape_Offset"); return; } proto_kind = lx_shape__kind_to_proto(kind); if ( (proto_kind < 0) || (xoff < -32768) || (xoff > 32767) || (yoff < -32768) || (yoff > 32767) ) { lxxi_bad_call(xc,"lx_shape_Offset"); return; } lxxi_nochain(xc); req[0] = p->major; req[1] = SHAPE_Offset; lxxi_w_card16(&req[2],4); req[4] = proto_kind; req[5] = 0; req[6] = 0; req[7] = 0; lxxi_w_card32(&req[8],dst); lxxi_w_int16(&req[12],xoff); lxxi_w_int16(&req[14],yoff); lxxi_send_req(xc,req,-1); }