Provides functions and structures required for communicating using the Guacamole protocol over a guac_socket connection, such as that provided by guac_client objects. More...
#include <cairo/cairo.h>#include "socket.h"Go to the source code of this file.
Data Structures | |
| struct | guac_layer |
| Represents a single layer within the Guacamole protocol. More... | |
| struct | guac_instruction |
| Represents a single instruction within the Guacamole protocol. More... | |
Typedefs | |
| typedef int64_t | guac_timestamp |
| An arbitrary timestamp denoting a relative time value in milliseconds. | |
Enumerations | |
| enum | guac_composite_mode { GUAC_COMP_ROUT = 0x2, GUAC_COMP_ATOP = 0x6, GUAC_COMP_XOR = 0xA, GUAC_COMP_ROVER = 0xB, GUAC_COMP_OVER = 0xE, GUAC_COMP_PLUS = 0xF, GUAC_COMP_RIN = 0x1, GUAC_COMP_IN = 0x4, GUAC_COMP_OUT = 0x8, GUAC_COMP_RATOP = 0x9, GUAC_COMP_SRC = 0xC } |
Composite modes used by Guacamole draw instructions. More... | |
| enum | guac_transfer_function { GUAC_TRANSFER_BINARY_BLACK = 0x0, GUAC_TRANSFER_BINARY_WHITE = 0xF, GUAC_TRANSFER_BINARY_SRC = 0x3, GUAC_TRANSFER_BINARY_DEST = 0x5, GUAC_TRANSFER_BINARY_NSRC = 0xC, GUAC_TRANSFER_BINARY_NDEST = 0xA, GUAC_TRANSFER_BINARY_AND = 0x1, GUAC_TRANSFER_BINARY_NAND = 0xE, GUAC_TRANSFER_BINARY_OR = 0x7, GUAC_TRANSFER_BINARY_NOR = 0x8, GUAC_TRANSFER_BINARY_XOR = 0x6, GUAC_TRANSFER_BINARY_XNOR = 0x9, GUAC_TRANSFER_BINARY_NSRC_AND = 0x4, GUAC_TRANSFER_BINARY_NSRC_NAND = 0xB, GUAC_TRANSFER_BINARY_NSRC_OR = 0xD, GUAC_TRANSFER_BINARY_NSRC_NOR = 0x2, GUAC_TRANSFER_BINARY_NDEST_AND = 0x2, GUAC_TRANSFER_BINARY_NDEST_NAND = 0xD, GUAC_TRANSFER_BINARY_NDEST_OR = 0xB, GUAC_TRANSFER_BINARY_NDEST_NOR = 0x4 } |
Default transfer functions. More... | |
| enum | guac_line_cap_style { GUAC_LINE_CAP_BUTT = 0x0, GUAC_LINE_CAP_ROUND = 0x1, GUAC_LINE_CAP_SQUARE = 0x2 } |
Supported line cap styles. | |
| enum | guac_line_join_style { GUAC_LINE_JOIN_BEVEL = 0x0, GUAC_LINE_JOIN_MITER = 0x1, GUAC_LINE_JOIN_ROUND = 0x2 } |
Supported line join styles. | |
Functions | |
| void | guac_instruction_free (guac_instruction *instruction) |
| Frees all memory allocated to the given instruction. | |
| int | guac_protocol_instructions_waiting (guac_socket *socket, int usec_timeout) |
| Returns whether new instruction data is available on the given guac_socket connection for parsing. | |
| guac_instruction * | guac_protocol_read_instruction (guac_socket *socket, int usec_timeout) |
| Reads a single instruction from the given guac_socket connection. | |
| guac_instruction * | guac_protocol_expect_instruction (guac_socket *socket, int usec_timeout, const char *opcode) |
| Reads a single instruction with the given opcode from the given guac_socket connection. | |
| guac_timestamp | guac_protocol_get_timestamp () |
| Returns an arbitrary timestamp. | |
| int | guac_protocol_send_args (guac_socket *socket, const char **args) |
| Sends an args instruction over the given guac_socket connection. | |
| int | guac_protocol_send_connect (guac_socket *socket, const char **args) |
| Sends a connect instruction over the given guac_socket connection. | |
| int | guac_protocol_send_disconnect (guac_socket *socket) |
| Sends a disconnect instruction over the given guac_socket connection. | |
| int | guac_protocol_send_error (guac_socket *socket, const char *error) |
| Sends an error instruction over the given guac_socket connection. | |
| int | guac_protocol_send_set (guac_socket *socket, const guac_layer *layer, const char *name, const char *value) |
| Sends a set instruction over the given guac_socket connection. | |
| int | guac_protocol_send_select (guac_socket *socket, const char *protocol) |
| Sends a select instruction over the given guac_socket connection. | |
| int | guac_protocol_send_sync (guac_socket *socket, guac_timestamp timestamp) |
| Sends a sync instruction over the given guac_socket connection. | |
| int | guac_protocol_send_arc (guac_socket *socket, const guac_layer *layer, int x, int y, int radius, double startAngle, double endAngle, int negative) |
| Sends an arc instruction over the given guac_socket connection. | |
| int | guac_protocol_send_cfill (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, int r, int g, int b, int a) |
| Sends a cfill instruction over the given guac_socket connection. | |
| int | guac_protocol_send_clip (guac_socket *socket, const guac_layer *layer) |
| Sends a clip instruction over the given guac_socket connection. | |
| int | guac_protocol_send_close (guac_socket *socket, const guac_layer *layer) |
| Sends a close instruction over the given guac_socket connection. | |
| int | guac_protocol_send_copy (guac_socket *socket, const guac_layer *srcl, int srcx, int srcy, int w, int h, guac_composite_mode mode, const guac_layer *dstl, int dstx, int dsty) |
| Sends a copy instruction over the given guac_socket connection. | |
| int | guac_protocol_send_cstroke (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, guac_line_cap_style cap, guac_line_join_style join, int thickness, int r, int g, int b, int a) |
| Sends a cstroke instruction over the given guac_socket connection. | |
| int | guac_protocol_send_cursor (guac_socket *socket, int x, int y, const guac_layer *srcl, int srcx, int srcy, int w, int h) |
| Sends a cursor instruction over the given guac_socket connection. | |
| int | guac_protocol_send_curve (guac_socket *socket, const guac_layer *layer, int cp1x, int cp1y, int cp2x, int cp2y, int x, int y) |
| Sends a curve instruction over the given guac_socket connection. | |
| int | guac_protocol_send_identity (guac_socket *socket, const guac_layer *layer) |
| Sends an identity instruction over the given guac_socket connection. | |
| int | guac_protocol_send_lfill (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, const guac_layer *srcl) |
| Sends an lfill instruction over the given guac_socket connection. | |
| int | guac_protocol_send_line (guac_socket *socket, const guac_layer *layer, int x, int y) |
| Sends a line instruction over the given guac_socket connection. | |
| int | guac_protocol_send_lstroke (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, guac_line_cap_style cap, guac_line_join_style join, int thickness, const guac_layer *srcl) |
| Sends an lstroke instruction over the given guac_socket connection. | |
| int | guac_protocol_send_png (guac_socket *socket, guac_composite_mode mode, const guac_layer *layer, int x, int y, cairo_surface_t *surface) |
| Sends a png instruction over the given guac_socket connection. | |
| int | guac_protocol_send_pop (guac_socket *socket, const guac_layer *layer) |
| Sends a pop instruction over the given guac_socket connection. | |
| int | guac_protocol_send_push (guac_socket *socket, const guac_layer *layer) |
| Sends a push instruction over the given guac_socket connection. | |
| int | guac_protocol_send_rect (guac_socket *socket, const guac_layer *layer, int x, int y, int width, int height) |
| Sends a rect instruction over the given guac_socket connection. | |
| int | guac_protocol_send_reset (guac_socket *socket, const guac_layer *layer) |
| Sends a reset instruction over the given guac_socket connection. | |
| int | guac_protocol_send_start (guac_socket *socket, const guac_layer *layer, int x, int y) |
| Sends a start instruction over the given guac_socket connection. | |
| int | guac_protocol_send_transfer (guac_socket *socket, const guac_layer *srcl, int srcx, int srcy, int w, int h, guac_transfer_function fn, const guac_layer *dstl, int dstx, int dsty) |
| Sends a transfer instruction over the given guac_socket connection. | |
| int | guac_protocol_send_transform (guac_socket *socket, const guac_layer *layer, double a, double b, double c, double d, double e, double f) |
| Sends a transform instruction over the given guac_socket connection. | |
| int | guac_protocol_send_dispose (guac_socket *socket, const guac_layer *layer) |
| Sends a dispose instruction over the given guac_socket connection. | |
| int | guac_protocol_send_distort (guac_socket *socket, const guac_layer *layer, double a, double b, double c, double d, double e, double f) |
| Sends a distort instruction over the given guac_socket connection. | |
| int | guac_protocol_send_move (guac_socket *socket, const guac_layer *layer, const guac_layer *parent, int x, int y, int z) |
| Sends a move instruction over the given guac_socket connection. | |
| int | guac_protocol_send_shade (guac_socket *socket, const guac_layer *layer, int a) |
| Sends a shade instruction over the given guac_socket connection. | |
| int | guac_protocol_send_size (guac_socket *socket, const guac_layer *layer, int w, int h) |
| Sends a size instruction over the given guac_socket connection. | |
| int | guac_protocol_send_clipboard (guac_socket *socket, const char *data) |
| Sends a clipboard instruction over the given guac_socket connection. | |
| int | guac_protocol_send_name (guac_socket *socket, const char *name) |
| Sends a name instruction over the given guac_socket connection. | |
Provides functions and structures required for communicating using the Guacamole protocol over a guac_socket connection, such as that provided by guac_client objects.
| enum guac_composite_mode |
Composite modes used by Guacamole draw instructions.
Each composite mode maps to a unique channel mask integer.
Default transfer functions.
There is no current facility in the Guacamole protocol to define custom transfer functions.
| void guac_instruction_free | ( | guac_instruction * | instruction | ) |
Frees all memory allocated to the given instruction.
| instruction | The instruction to free. |
| guac_instruction* guac_protocol_expect_instruction | ( | guac_socket * | socket, | |
| int | usec_timeout, | |||
| const char * | opcode | |||
| ) |
Reads a single instruction with the given opcode from the given guac_socket connection.
If an error occurs reading the instruction, NULL is returned, and guac_error is set appropriately.
If the instruction read is not the expected instruction, NULL is returned, and guac_error is set to GUAC_STATUS_BAD_STATE.
| socket | The guac_socket connection to use. | |
| usec_timeout | The maximum number of microseconds to wait before giving up. | |
| opcode | The opcode of the instruction to read. |
| guac_timestamp guac_protocol_get_timestamp | ( | ) |
Returns an arbitrary timestamp.
The difference between return values of any two calls is equal to the amount of time in milliseconds between those calls. The return value from a single call will not have any useful (or defined) meaning.
| int guac_protocol_instructions_waiting | ( | guac_socket * | socket, | |
| int | usec_timeout | |||
| ) |
Returns whether new instruction data is available on the given guac_socket connection for parsing.
| socket | The guac_socket connection to use. | |
| usec_timeout | The maximum number of microseconds to wait before giving up. |
| guac_instruction* guac_protocol_read_instruction | ( | guac_socket * | socket, | |
| int | usec_timeout | |||
| ) |
Reads a single instruction from the given guac_socket connection.
If an error occurs reading the instruction, NULL is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| usec_timeout | The maximum number of microseconds to wait before giving up. |
| int guac_protocol_send_arc | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | x, | |||
| int | y, | |||
| int | radius, | |||
| double | startAngle, | |||
| double | endAngle, | |||
| int | negative | |||
| ) |
Sends an arc instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. | |
| x | The X coordinate of the center of the circle containing the arc. | |
| y | The Y coordinate of the center of the circle containing the arc. | |
| radius | The radius of the circle containing the arc. | |
| startAngle | The starting angle, in radians. | |
| endAngle | The ending angle, in radians. | |
| negative | Zero if the arc should be drawn in order of increasing angle, non-zero otherwise. |
| int guac_protocol_send_args | ( | guac_socket * | socket, | |
| const char ** | args | |||
| ) |
Sends an args instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| args | The NULL-terminated array of argument names (strings). |
| int guac_protocol_send_cfill | ( | guac_socket * | socket, | |
| guac_composite_mode | mode, | |||
| const guac_layer * | layer, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) |
Sends a cfill instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| mode | The composite mode to use. | |
| layer | The destination layer. | |
| r | The red component of the color of the rectangle. | |
| g | The green component of the color of the rectangle. | |
| b | The blue component of the color of the rectangle. | |
| a | The alpha (transparency) component of the color of the rectangle. |
| int guac_protocol_send_clip | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends a clip instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to set the clipping region of. |
| int guac_protocol_send_clipboard | ( | guac_socket * | socket, | |
| const char * | data | |||
| ) |
Sends a clipboard instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| data | The clipboard data to send. |
| int guac_protocol_send_close | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends a close instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. |
| int guac_protocol_send_connect | ( | guac_socket * | socket, | |
| const char ** | args | |||
| ) |
Sends a connect instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| args | The NULL-terminated array of argument values (strings). |
| int guac_protocol_send_copy | ( | guac_socket * | socket, | |
| const guac_layer * | srcl, | |||
| int | srcx, | |||
| int | srcy, | |||
| int | w, | |||
| int | h, | |||
| guac_composite_mode | mode, | |||
| const guac_layer * | dstl, | |||
| int | dstx, | |||
| int | dsty | |||
| ) |
Sends a copy instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| srcl | The source layer. | |
| srcx | The X coordinate of the source rectangle. | |
| srcy | The Y coordinate of the source rectangle. | |
| w | The width of the source rectangle. | |
| h | The height of the source rectangle. | |
| mode | The composite mode to use. | |
| dstl | The destination layer. | |
| dstx | The X coordinate of the destination, where the source rectangle should be copied. | |
| dsty | The Y coordinate of the destination, where the source rectangle should be copied. |
| int guac_protocol_send_cstroke | ( | guac_socket * | socket, | |
| guac_composite_mode | mode, | |||
| const guac_layer * | layer, | |||
| guac_line_cap_style | cap, | |||
| guac_line_join_style | join, | |||
| int | thickness, | |||
| int | r, | |||
| int | g, | |||
| int | b, | |||
| int | a | |||
| ) |
Sends a cstroke instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| mode | The composite mode to use. | |
| layer | The destination layer. | |
| cap | The style of line cap to use when drawing the stroke. | |
| join | The style of line join to use when drawing the stroke. | |
| thickness | The thickness of the stroke in pixels. | |
| r | The red component of the color of the rectangle. | |
| g | The green component of the color of the rectangle. | |
| b | The blue component of the color of the rectangle. | |
| a | The alpha (transparency) component of the color of the rectangle. |
| int guac_protocol_send_cursor | ( | guac_socket * | socket, | |
| int | x, | |||
| int | y, | |||
| const guac_layer * | srcl, | |||
| int | srcx, | |||
| int | srcy, | |||
| int | w, | |||
| int | h | |||
| ) |
Sends a cursor instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| x | The X coordinate of the cursor hotspot. | |
| y | The Y coordinate of the cursor hotspot. | |
| srcl | The source layer. | |
| srcx | The X coordinate of the source rectangle. | |
| srcy | The Y coordinate of the source rectangle. | |
| w | The width of the source rectangle. | |
| h | The height of the source rectangle. |
| int guac_protocol_send_curve | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | cp1x, | |||
| int | cp1y, | |||
| int | cp2x, | |||
| int | cp2y, | |||
| int | x, | |||
| int | y | |||
| ) |
Sends a curve instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. | |
| cp1x | The X coordinate of the first control point. | |
| cp1y | The Y coordinate of the first control point. | |
| cp2x | The X coordinate of the second control point. | |
| cp2y | The Y coordinate of the second control point. | |
| x | The X coordinate of the endpoint of the curve. | |
| y | The Y coordinate of the endpoint of the curve. |
| int guac_protocol_send_disconnect | ( | guac_socket * | socket | ) |
Sends a disconnect instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. |
| int guac_protocol_send_dispose | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends a dispose instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to dispose. |
| int guac_protocol_send_distort | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| double | a, | |||
| double | b, | |||
| double | c, | |||
| double | d, | |||
| double | e, | |||
| double | f | |||
| ) |
Sends a distort instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to distort with the given transform matrix. | |
| a | The first value of the affine transform matrix. | |
| b | The second value of the affine transform matrix. | |
| c | The third value of the affine transform matrix. | |
| d | The fourth value of the affine transform matrix. | |
| e | The fifth value of the affine transform matrix. | |
| f | The sixth value of the affine transform matrix. |
| int guac_protocol_send_error | ( | guac_socket * | socket, | |
| const char * | error | |||
| ) |
Sends an error instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| error | The description associated with the error. |
| int guac_protocol_send_identity | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends an identity instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. |
| int guac_protocol_send_lfill | ( | guac_socket * | socket, | |
| guac_composite_mode | mode, | |||
| const guac_layer * | layer, | |||
| const guac_layer * | srcl | |||
| ) |
Sends an lfill instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| mode | The composite mode to use. | |
| layer | The destination layer. | |
| srcl | The source layer. |
| int guac_protocol_send_line | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | x, | |||
| int | y | |||
| ) |
Sends a line instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. | |
| x | The X coordinate of the endpoint of the line. | |
| y | The Y coordinate of the endpoint of the line. |
| int guac_protocol_send_lstroke | ( | guac_socket * | socket, | |
| guac_composite_mode | mode, | |||
| const guac_layer * | layer, | |||
| guac_line_cap_style | cap, | |||
| guac_line_join_style | join, | |||
| int | thickness, | |||
| const guac_layer * | srcl | |||
| ) |
Sends an lstroke instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| mode | The composite mode to use. | |
| layer | The destination layer. | |
| cap | The style of line cap to use when drawing the stroke. | |
| join | The style of line join to use when drawing the stroke. | |
| thickness | The thickness of the stroke in pixels. | |
| srcl | The source layer. |
| int guac_protocol_send_move | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| const guac_layer * | parent, | |||
| int | x, | |||
| int | y, | |||
| int | z | |||
| ) |
Sends a move instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to move. | |
| parent | The parent layer the specified layer will be positioned relative to. | |
| x | The X coordinate of the layer. | |
| y | The Y coordinate of the layer. | |
| z | The Z index of the layer, relative to other layers in its parent. |
| int guac_protocol_send_name | ( | guac_socket * | socket, | |
| const char * | name | |||
| ) |
Sends a name instruction over the given guac_socket connection.
| socket | The guac_socket connection to use. | |
| name | The name to send within the name instruction. |
| int guac_protocol_send_png | ( | guac_socket * | socket, | |
| guac_composite_mode | mode, | |||
| const guac_layer * | layer, | |||
| int | x, | |||
| int | y, | |||
| cairo_surface_t * | surface | |||
| ) |
Sends a png instruction over the given guac_socket connection.
The PNG image data given will be automatically base64-encoded for transmission.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| mode | The composite mode to use. | |
| layer | The destination layer. | |
| x | The destination X coordinate. | |
| y | The destination Y coordinate. | |
| surface | A cairo surface containing the image data to send. |
| int guac_protocol_send_pop | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends a pop instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to set the clipping region of. |
| int guac_protocol_send_push | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends a push instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to set the clipping region of. |
| int guac_protocol_send_rect | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | x, | |||
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) |
Sends a rect instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. | |
| x | The X coordinate of the rectangle. | |
| y | The Y coordinate of the rectangle. | |
| width | The width of the rectangle. | |
| height | The height of the rectangle. |
| int guac_protocol_send_reset | ( | guac_socket * | socket, | |
| const guac_layer * | layer | |||
| ) |
Sends a reset instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to set the clipping region of. |
| int guac_protocol_send_select | ( | guac_socket * | socket, | |
| const char * | protocol | |||
| ) |
Sends a select instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| protocol | The protocol to request. |
| int guac_protocol_send_set | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| const char * | name, | |||
| const char * | value | |||
| ) |
Sends a set instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to set the parameter of. | |
| name | The name of the parameter to set. | |
| value | The value to set the parameter to. |
| int guac_protocol_send_shade | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | a | |||
| ) |
Sends a shade instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to shade. | |
| a | The alpha value of the layer. |
| int guac_protocol_send_size | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | w, | |||
| int | h | |||
| ) |
Sends a size instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to resize. | |
| w | The new width of the layer. | |
| h | The new height of the layer. |
| int guac_protocol_send_start | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| int | x, | |||
| int | y | |||
| ) |
Sends a start instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The destination layer. | |
| x | The X coordinate of the first point of the subpath. | |
| y | The Y coordinate of the first point of the subpath. |
| int guac_protocol_send_sync | ( | guac_socket * | socket, | |
| guac_timestamp | timestamp | |||
| ) |
Sends a sync instruction over the given guac_socket connection.
The current time in milliseconds should be passed in as the timestamp.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| timestamp | The current timestamp (in milliseconds). |
| int guac_protocol_send_transfer | ( | guac_socket * | socket, | |
| const guac_layer * | srcl, | |||
| int | srcx, | |||
| int | srcy, | |||
| int | w, | |||
| int | h, | |||
| guac_transfer_function | fn, | |||
| const guac_layer * | dstl, | |||
| int | dstx, | |||
| int | dsty | |||
| ) |
Sends a transfer instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| srcl | The source layer. | |
| srcx | The X coordinate of the source rectangle. | |
| srcy | The Y coordinate of the source rectangle. | |
| w | The width of the source rectangle. | |
| h | The height of the source rectangle. | |
| fn | The transfer function to use. | |
| dstl | The destination layer. | |
| dstx | The X coordinate of the destination, where the source rectangle should be copied. | |
| dsty | The Y coordinate of the destination, where the source rectangle should be copied. |
| int guac_protocol_send_transform | ( | guac_socket * | socket, | |
| const guac_layer * | layer, | |||
| double | a, | |||
| double | b, | |||
| double | c, | |||
| double | d, | |||
| double | e, | |||
| double | f | |||
| ) |
Sends a transform instruction over the given guac_socket connection.
If an error occurs sending the instruction, a non-zero value is returned, and guac_error is set appropriately.
| socket | The guac_socket connection to use. | |
| layer | The layer to apply the given transform matrix to. | |
| a | The first value of the affine transform matrix. | |
| b | The second value of the affine transform matrix. | |
| c | The third value of the affine transform matrix. | |
| d | The fourth value of the affine transform matrix. | |
| e | The fifth value of the affine transform matrix. | |
| f | The sixth value of the affine transform matrix. |
1.6.1