From ee324aed69651f3f498537f0b77fc64d24245c2f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 27 Feb 2012 16:01:02 -0800 Subject: [PATCH] Fixed merge of unstable, refactored rect and clip. --- libguac/include/protocol.h | 5 +++-- libguac/src/protocol.c | 25 ++----------------------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/libguac/include/protocol.h b/libguac/include/protocol.h index 24459a39..70e3e8b7 100644 --- a/libguac/include/protocol.h +++ b/libguac/include/protocol.h @@ -405,6 +405,7 @@ int guac_protocol_send_lpath(guac_socket* socket, const guac_layer* layer, * @return Zero on success, non-zero on error. */ int guac_protocol_send_qpath(guac_socket* socket, const guac_layer* layer, + int x, int y, int cpx, int cpy); /** * Sends a cpath instruction over the given guac_socket connection. @@ -638,8 +639,8 @@ guac_instruction* guac_protocol_read_instruction(guac_socket* socket, int usec_t * a different opcode, NULL is returned and guac_error is set to * GUAC_STATUS_BAD_STATE. */ -guac_instruction* guac_protocol_expect_instruction(guac_socket* socket, int usec_timeout, - const char* opcode); +guac_instruction* guac_protocol_expect_instruction(guac_socket* socket, + int usec_timeout, const char* opcode); /** * Returns an arbitrary timestamp. The difference between return values of any diff --git a/libguac/src/protocol.c b/libguac/src/protocol.c index 58e1d7f7..fae8ed67 100644 --- a/libguac/src/protocol.c +++ b/libguac/src/protocol.c @@ -232,14 +232,10 @@ int guac_protocol_send_transfer(guac_socket* socket, } int guac_protocol_send_rect(guac_socket* socket, - guac_composite_mode mode, const guac_layer* layer, - int x, int y, int width, int height, - int r, int g, int b, int a) { + const guac_layer* layer, int x, int y, int width, int height) { return guac_socket_write_string(socket, "4.rect,") - || __guac_socket_write_length_int(socket, mode) - || guac_socket_write_string(socket, ",") || __guac_socket_write_length_int(socket, layer->index) || guac_socket_write_string(socket, ",") || __guac_socket_write_length_int(socket, x) @@ -249,32 +245,15 @@ int guac_protocol_send_rect(guac_socket* socket, || __guac_socket_write_length_int(socket, width) || guac_socket_write_string(socket, ",") || __guac_socket_write_length_int(socket, height) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, r) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, g) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, b) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, a) || guac_socket_write_string(socket, ";"); } -int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer, - int x, int y, int width, int height) { +int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer) { return guac_socket_write_string(socket, "4.clip,") || __guac_socket_write_length_int(socket, layer->index) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, x) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, y) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, width) - || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_int(socket, height) || guac_socket_write_string(socket, ";"); }