Table of Contents
The arc instruction adds the specified arc subpath to the existing path, creating a new path if no path exists. The path created can be modified further by other path-type instructions, and finally stroked, filled, and/or closed.
layer
-
The layer which should have the specified arc subpath added.
x
-
The X coordinate of the center of the circle containing the arc to be drawn.
y
-
The Y coordinate of the center of the circle containing the arc to be drawn.
radius
-
The radius of the circle containing the arc to be drawn, in pixels.
start
-
The starting angle of the arc to be drawn, in radians.
end
-
The ending angle of the arc to be drawn, in radians.
negative
-
Non-zero if the arc should be drawn from START to END in order of decreasing angle, zero otherwise.
Fills the current path with the specified color. This instruction completes the current path. Future path instructions will begin a new path.
mask
-
The channel mask to apply when filling the current path in the specified layer.
layer
-
The layer whose path should be filled.
r
-
The red component of the color to use to fill the current path in the specified layer.
g
-
The green component of the color to use to fill the current path in the specified layer.
b
-
The blue component of the color to use to fill the current path in the specified layer.
a
-
The alpha component of the color to use to fill the current path in the specified layer.
Applies the current path as the clipping path. Future operations will only draw within the current path. Note that future clip instructions will also be limited by this path. To set a completely new clipping path, you must first reset the layer with a reset instruction. If you wish to only reset the clipping path, but preserve the current transform matrix, push the layer state before setting the clipping path, and pop the layer state to reset.
layer
-
The layer whose clipping path should be set.
Closes the current path by connecting the start and end points with a straight line.
layer
-
The layer whose path should be closed.
Copies image data from the specified rectangle of the specified layer or buffer to a different location of another specified layer or buffer.
srclayer
-
The index of the layer to copy image data from.
srcx
-
The X coordinate of the upper-left corner of the source rectangle within the source layer.
srcy
-
The Y coordinate of the upper-left corner of the source rectangle within the source layer.
srcwidth
-
The width of the source rectangle within the source layer.
srcheight
-
The height of the source rectangle within the source layer.
mask
-
The channel mask to apply when drawing the image data on the destination layer.
dstlayer
-
The index of the layer to draw the image data to.
dstx
-
The X coordinate of the upper-left corner of the destination within the destination layer.
dsty
-
The Y coordinate of the upper-left corner of the destination within the destination layer.
Strokes the current path with the specified color. This instruction completes the current path. Future path instructions will begin a new path.
mask
-
The channel mask to apply when stroking the current path in the specified layer.
layer
-
The layer whose path should be stroked.
cap
-
The index of the line cap style to use. This can be either butt (0), round (1), or square (2).
join
-
The index of the line join style to use. This can be either bevel (0), miter (1), or round (2).
thickness
-
The thickness of the stroke to draw, in pixels.
r
-
The red component of the color to use to stroke the current path in the specified layer.
g
-
The green component of the color to use to stroke the current path in the specified layer.
b
-
The blue component of the color to use to stroke the current path in the specified layer.
a
-
The alpha component of the color to use to stroke the current path in the specified layer.
Sets the client's cursor to the image data from the specified rectangle of a layer, with the specified hotspot.
x
-
The X coordinate of the cursor's hotspot.
y
-
The Y coordinate of the cursor's hotspot.
srclayer
-
The index of the layer to copy image data from.
srcx
-
The X coordinate of the upper-left corner of the source rectangle within the source layer.
srcy
-
The Y coordinate of the upper-left corner of the source rectangle within the source layer.
srcwidth
-
The width of the source rectangle within the source layer.
srcheight
-
The height of the source rectangle within the source layer.
Adds the specified cubic bezier curve subpath.
layer
-
The layer which should have the specified curve subpath added.
cp1x
-
The X coordinate of the first control point of the curve.
cp1y
-
The Y coordinate of the first control point of the curve.
cp2x
-
The X coordinate of the second control point of the curve.
cp2y
-
The Y coordinate of the second control point of the curve.
x
-
The X coordinate of the endpoint of the curve.
y
-
The Y coordinate of the endpoint of the curve.
Removes the specified layer. The specified layer will be recreated as a new layer if it is referenced again.
layer
-
The layer to remove.
Sets the given affine transformation matrix to the layer. Unlike transform, this operation is independent of any previously sent transformation matrix. This operation can be undone by setting the layer's transformation matrix to the identity matrix using distort
layer
-
The layer to distort.
a
-
The matrix value in row 1, column 1.
b
-
The matrix value in row 2, column 1.
c
-
The matrix value in row 1, column 2.
d
-
The matrix value in row 2, column 2.
e
-
The matrix value in row 1, column 3.
f
-
The matrix value in row 2, column 3.
Resets the transform matrix of the specified layer to the identity matrix.
layer
-
The layer whose transform matrix should be reset.
Fills the current path with a tiled pattern of the image data from the specified layer. This instruction completes the current path. Future path instructions will begin a new path.
mask
-
The channel mask to apply when filling the current path in the specified layer.
layer
-
The layer whose path should be filled.
srclayer
-
The layer to use as the pattern.
Adds the specified line subpath.
layer
-
The layer which should have the specified line subpath added.
x
-
The X coordinate of the endpoint of the line.
y
-
The Y coordinate of the endpoint of the line.
Strokes the current path with a tiled pattern of the image data from the specified layer. This instruction completes the current path. Future path instructions will begin a new path.
mask
-
The channel mask to apply when filling the current path in the specified layer.
layer
-
The layer whose path should be filled.
cap
-
The index of the line cap style to use. This can be either butt (0), round (1), or square (2).
join
-
The index of the line join style to use. This can be either bevel (0), miter (1), or round (2).
thickness
-
The thickness of the stroke to draw, in pixels.
srclayer
-
The layer to use as the pattern.
Moves the given layer to the given location within the specified parent layer. This operation is applicable only to layers, and cannot be applied to buffers (layers with negative indices). Applying this operation to the default layer (layer 0) also has no effect.
layer
-
The layer to move.
parent
-
The layer that should be the parent of the given layer.
x
-
The X coordinate to move the layer to.
y
-
The Y coordinate to move the layer to.
z
-
The relative Z-ordering of this layer. Layers with larger values will appear above layers with smaller values.
Loads PNG data into the specified location of the specified layer or buffer.
mask
-
The channel mask to apply when drawing the image data.
layer
-
The destination layer.
x
-
The X coordinate of the upper-left corner of the destination within the destination layer.
y
-
The Y coordinate of the upper-left corner of the destination within the destination layer.
data
-
Base64-encoded PNG data.
Restores the previous state of the specified layer from the stack. The state restored includes the transformation matrix and clipping path.
layer
-
The layer whose state should be restored.
Saves the current state of the specified layer to the stack. The state saved includes the current transformation matrix and clipping path.
layer
-
The layer whose state should be saved.
Adds a rectangular path to the specified layer.
mask
-
The channel mask to apply when drawing the image data.
layer
-
The destination layer.
x
-
The X coordinate of the upper-left corner of the rectangle to draw.
y
-
The Y coordinate of the upper-left corner of the rectangle to draw.
width
-
The width of the rectangle to draw.
height
-
The width of the rectangle to draw.
Sets the given client-side property to the specified value. Currently there is only one property: miter-limit, the maximum distance between the inner and outer points of a miter joint, proportional to stroke width (if miter-limit is set to 10.0, the default, then the maximum distance between the points of the joint is 10 times the stroke width).
layer
-
The layer whose property should be set.
property
-
The name of the property to set.
value
-
The value to set the given property to.
Sets the opacity of the given layer.
layer
-
The layer whose opacity should be set.
opacity
-
The opacity of the layer, where 0 is completely transparent, and 255 is completely opaque.
Sets the size of the specified layer.
layer
-
The layer to resize.
width
-
The new width of the layer
height
-
The new height of the layer
Starts a new subpath at the specified point.
layer
-
The layer which should start a new subpath.
x
-
The X coordinate of the first point of the new subpath.
y
-
The Y coordinate of the first point of the new subpath.
Transfers image data from the specified rectangle of the specified layer or buffer to a different location of another specified layer or buffer, using the specified transfer function. For a list of available functions, see [[http://guac-dev.org/trac/browser/libguac/include/protocol.h|guacamole/protocol.h.
srclayer
-
The index of the layer to transfer image data from.
srcx
-
The X coordinate of the upper-left corner of the source rectangle within the source layer.
srcy
-
The Y coordinate of the upper-left corner of the source rectangle within the source layer.
srcwidth
-
The width of the source rectangle within the source layer.
srcheight
-
The height of the source rectangle within the source layer.
function
-
The index of the transfer function to use. For a list of available functions, see [[http://guac-dev.org/trac/browser/libguac/include/protocol.h|guacamole/protocol.h.
dstlayer
-
The index of the layer to draw the image data to.
dstx
-
The X coordinate of the upper-left corner of the destination within the destination layer.
dsty
-
The Y coordinate of the upper-left corner of the destination within the destination layer.
Applies the specified transformation matrix to future operations. Unlike distort, this operation is dependent on any previously sent transformation matrices, and only affects future operations. This operation can be undone by setting the layer's transformation matrix to the identity matrix using identity, but image data already drawn will not be affected.
layer
-
The layer to apply the given transformation matrix to.
a
-
The matrix value in row 1, column 1.
b
-
The matrix value in row 2, column 1.
c
-
The matrix value in row 1, column 2.
d
-
The matrix value in row 2, column 2.
e
-
The matrix value in row 1, column 3.
f
-
The matrix value in row 2, column 3.
Sends a full chunk of audio data to the client. This chunk must be a full, self-contained, audio file encoded with the codec specified by the mimetype given, which must be a mimetype previously specified by the client during the handshake procedure.
channel
-
The index of the audio channel to use. All audio chunks within the same channel play sequentially, while audio chunks in separate channels play in parallel. This is not the same as the left or right audio channel, and refers only to a channel to which audio data is streamed, where that audio data consists of chunks that may themselves consist of multiple channels in the usual sense of the word. This number is completely arbitrary, and denotes only how audio data should be scheduled for playback.
mimetype
-
The mimetype of the audio data being sent.
duration
-
The duration of the audio data being sent, in milliseconds. This value may be a decimal, and need not be expressed in whole milliseconds. This is particularly important for audio formats that do not encode their own durations losslessly (MP3, for example), as well as for scheduling playback of future chunks within the same channel.
data
-
The actual audio data, base64-encoded.
Sends a file to the client.
name
-
A human-readable name associated with the file.
mimetype
-
The mimetype of the file being sent.
data
-
The actual audio data, base64-encoded.
Encodes part of one or more instructions within a single instruction, associating that packet of data with a stream index. Future nest instructions with the same stream index will append their data to the same logical stream on the client side. Once nested data is received on the client side, the client immediately executes any completed instructions within the associated stream, in order.
index
-
The index of the stream this data should be appended to. This index is completely arbitrary, and denotes only how nested data should be reassembled.
data
-
The protocol data, containing part of one or more instructions.
Sends a full chunk of audio video to the client. This chunk must be a full, self-contained, video file encoded with the codec specified by the mimetype given, which must be a mimetype previously specified by the client during the handshake procedure.
layer
-
The index of the layer to stream the video data into. Future drawing operations into this layer will block until the video has finished playing. Playback of this video will not block operations in other layers.
mimetype
-
The mimetype of the video data being sent.
duration
-
The duration of the video data being sent, in milliseconds. This value may be a decimal, and need not be expressed in whole milliseconds.
data
-
The actual video data, base64-encoded.
Specifies which audio mimetypes are supported by the client. Each parameter must be a single mimetype, listed in order of client preference, with the optimal mimetype being the first parameter. This is the third instruction sent during the handshake phase.
Begins the connection using the previously specified protocol with the given arguments. This is the last instruction sent during the handshake phase.
The parameters of this instruction correspond exactly to the parameters of the received args instruction. If the received args instruction has, for example, three parameters, the responding connect instruction must also have three parameters.
Requests that the connection be made using the specified protocol. This is the first instruction sent during the handshake phase.
protocol
-
The protocol to use.
Reports the expected format of the argument list for the protocol requested by the client. This message can be sent by the server during the handshake phase only.
The parameters of the args instruction are the names of all parameters accepted by the server for the protocol in selected by the client, in order. The client's responding connect instruction must the values of each of these parameters in the same order.
Notifies the server that the connection is about to be closed by the client. This message can be sent by the client during any phase, and takes no parameters.
Reports that all operations as of the given server-relative timestamp have been completed. If a sync is received from the server, the client must respond with a corresponding sync once all previous operations have been completed, or the server may stop sending updates until the client catches up. For the client, sending a sync with a timestamp newer than any timestamp received from the server is an error.
Both client and server are expected to occasionally send sync to report on current operation execution state.
timestamp
-
A valid server-relative timestamp.
Notifies the client that the connection is about to be closed due to the specified error. This message can be sent by the server during any phase.
text
-
An arbitrary message describing the error
Indicates that the given timestamp is the current timestamp as of all previous operations. The client must respond to every sync instruction received.
Both client and server are expected to occasionally send sync to report on current operation execution state.
timestamp
-
A valid server-relative timestamp.
Sends the specified key press or release event.
keysym
-
The X11 keysym of the key being pressed or released.
pressed
-
0 if the key is not pressed, 1 if the key is pressed.