Fixed merge of unstable, refactored rect and clip.

This commit is contained in:
Michael Jumper 2012-02-27 16:01:02 -08:00
parent f6659c5264
commit ee324aed69
2 changed files with 5 additions and 25 deletions

View File

@ -405,6 +405,7 @@ int guac_protocol_send_lpath(guac_socket* socket, const guac_layer* layer,
* @return Zero on success, non-zero on error. * @return Zero on success, non-zero on error.
*/ */
int guac_protocol_send_qpath(guac_socket* socket, const guac_layer* layer, 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. * 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 * a different opcode, NULL is returned and guac_error is set to
* GUAC_STATUS_BAD_STATE. * GUAC_STATUS_BAD_STATE.
*/ */
guac_instruction* guac_protocol_expect_instruction(guac_socket* socket, int usec_timeout, guac_instruction* guac_protocol_expect_instruction(guac_socket* socket,
const char* opcode); int usec_timeout, const char* opcode);
/** /**
* Returns an arbitrary timestamp. The difference between return values of any * Returns an arbitrary timestamp. The difference between return values of any

View File

@ -232,14 +232,10 @@ int guac_protocol_send_transfer(guac_socket* socket,
} }
int guac_protocol_send_rect(guac_socket* socket, int guac_protocol_send_rect(guac_socket* socket,
guac_composite_mode mode, const guac_layer* layer, const guac_layer* layer, int x, int y, int width, int height) {
int x, int y, int width, int height,
int r, int g, int b, int a) {
return return
guac_socket_write_string(socket, "4.rect,") 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_length_int(socket, layer->index)
|| guac_socket_write_string(socket, ",") || guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_int(socket, x) || __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_length_int(socket, width)
|| guac_socket_write_string(socket, ",") || guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_int(socket, height) || __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, ";"); || guac_socket_write_string(socket, ";");
} }
int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer, int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer) {
int x, int y, int width, int height) {
return return
guac_socket_write_string(socket, "4.clip,") guac_socket_write_string(socket, "4.clip,")
|| __guac_socket_write_length_int(socket, layer->index) || __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, ";"); || guac_socket_write_string(socket, ";");
} }