// Copyright status: this file is in the public domain. #include #include #include #include #include #include void lx_shape_Combine(LX_CONN *xc, LX_XID dst, LX_SHAPE_KIND dstkind, LX_SHAPE_OP op, int xoff, int yoff, LX_XID src, LX_SHAPE_KIND srckind) { LX_SHAPE_PRIV *p; unsigned char req[20]; int proto_dstkind; int proto_srckind; int proto_op; 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_Combine"); return; } proto_dstkind = lx_shape__kind_to_proto(dstkind); proto_op = lx_shape__op_to_proto(op); proto_srckind = lx_shape__kind_to_proto(srckind); if ( (proto_dstkind < 0) || (proto_op < 0) || (proto_srckind < 0) || (xoff < -32768) || (xoff > 32767) || (yoff < -32768) || (yoff > 32767) ) { lxxi_bad_call(xc,"lx_shape_Combine"); return; } lxxi_nochain(xc); req[0] = p->major; req[1] = SHAPE_Combine; lxxi_w_card16(&req[2],5); req[4] = proto_op; req[5] = proto_dstkind; req[6] = proto_srckind; req[7] = 0; lxxi_w_card32(&req[8],dst); lxxi_w_int16(&req[12],xoff); lxxi_w_int16(&req[14],yoff); lxxi_w_int16(&req[16],src); lxxi_send_req(xc,req,-1); }