00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef _GUAC_PROTOCOL_H
00039 #define _GUAC_PROTOCOL_H
00040
00041 #include <cairo/cairo.h>
00042
00043 #include "layer.h"
00044 #include "socket.h"
00045 #include "timestamp.h"
00046
00059 typedef enum guac_composite_mode {
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 GUAC_COMP_ROUT = 0x2,
00071 GUAC_COMP_ATOP = 0x6,
00072 GUAC_COMP_XOR = 0xA,
00073 GUAC_COMP_ROVER = 0xB,
00074 GUAC_COMP_OVER = 0xE,
00075 GUAC_COMP_PLUS = 0xF,
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 GUAC_COMP_RIN = 0x1,
00086 GUAC_COMP_IN = 0x4,
00087 GUAC_COMP_OUT = 0x8,
00088 GUAC_COMP_RATOP = 0x9,
00089 GUAC_COMP_SRC = 0xC
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 } guac_composite_mode;
00103
00104
00109 typedef enum guac_transfer_function {
00110
00111
00112 GUAC_TRANSFER_BINARY_BLACK = 0x0,
00113 GUAC_TRANSFER_BINARY_WHITE = 0xF,
00114
00115
00116 GUAC_TRANSFER_BINARY_SRC = 0x3,
00117 GUAC_TRANSFER_BINARY_DEST = 0x5,
00118 GUAC_TRANSFER_BINARY_NSRC = 0xC,
00119 GUAC_TRANSFER_BINARY_NDEST = 0xA,
00120
00121
00122 GUAC_TRANSFER_BINARY_AND = 0x1,
00123 GUAC_TRANSFER_BINARY_NAND = 0xE,
00124
00125
00126 GUAC_TRANSFER_BINARY_OR = 0x7,
00127 GUAC_TRANSFER_BINARY_NOR = 0x8,
00128
00129
00130 GUAC_TRANSFER_BINARY_XOR = 0x6,
00131 GUAC_TRANSFER_BINARY_XNOR = 0x9,
00132
00133
00134 GUAC_TRANSFER_BINARY_NSRC_AND = 0x4,
00135 GUAC_TRANSFER_BINARY_NSRC_NAND = 0xB,
00136
00137
00138 GUAC_TRANSFER_BINARY_NSRC_OR = 0xD,
00139 GUAC_TRANSFER_BINARY_NSRC_NOR = 0x2,
00140
00141
00142 GUAC_TRANSFER_BINARY_NDEST_AND = 0x2,
00143 GUAC_TRANSFER_BINARY_NDEST_NAND = 0xD,
00144
00145
00146 GUAC_TRANSFER_BINARY_NDEST_OR = 0xB,
00147 GUAC_TRANSFER_BINARY_NDEST_NOR = 0x4
00148
00149 } guac_transfer_function;
00150
00154 typedef enum guac_line_cap_style {
00155 GUAC_LINE_CAP_BUTT = 0x0,
00156 GUAC_LINE_CAP_ROUND = 0x1,
00157 GUAC_LINE_CAP_SQUARE = 0x2
00158 } guac_line_cap_style;
00159
00163 typedef enum guac_line_join_style {
00164 GUAC_LINE_JOIN_BEVEL = 0x0,
00165 GUAC_LINE_JOIN_MITER = 0x1,
00166 GUAC_LINE_JOIN_ROUND = 0x2
00167 } guac_line_join_style;
00168
00169
00170
00181 int guac_protocol_send_args(guac_socket* socket, const char** args);
00182
00193 int guac_protocol_send_connect(guac_socket* socket, const char** args);
00194
00204 int guac_protocol_send_disconnect(guac_socket* socket);
00205
00216 int guac_protocol_send_error(guac_socket* socket, const char* error);
00217
00231 int guac_protocol_send_nest(guac_socket* socket, int index,
00232 const char* data);
00233
00246 int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer,
00247 const char* name, const char* value);
00248
00259 int guac_protocol_send_select(guac_socket* socket, const char* protocol);
00260
00272 int guac_protocol_send_sync(guac_socket* socket, guac_timestamp timestamp);
00273
00274
00275
00290 int guac_protocol_send_audio(guac_socket* socket, int channel,
00291 const char* mimetype, double duration, void* data, int size);
00292
00321 int guac_protocol_send_audio_header(guac_socket* socket,
00322 int channel, const char* mimetype, double duration, int size);
00323
00341 int guac_protocol_send_audio_data(guac_socket* socket, void* data, int count);
00342
00354 int guac_protocol_send_audio_end(guac_socket* socket);
00355
00369 int guac_protocol_send_file(guac_socket* socket, int index, const char* mimetype, const char* name);
00370
00385 int guac_protocol_send_blob(guac_socket* socket, int index, void* data, int count);
00386
00397 int guac_protocol_send_end(guac_socket* socket, int index);
00398
00413 int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
00414 const char* mimetype, double duration, void* data, int size);
00415
00444 int guac_protocol_send_video_header(guac_socket* socket,
00445 const guac_layer* layer, const char* mimetype, double duration, int size);
00446
00464 int guac_protocol_send_video_data(guac_socket* socket, void* data, int count);
00465
00477 int guac_protocol_send_video_end(guac_socket* socket);
00478
00479
00480
00498 int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer,
00499 int x, int y, int radius, double startAngle, double endAngle,
00500 int negative);
00501
00517 int guac_protocol_send_cfill(guac_socket* socket,
00518 guac_composite_mode mode, const guac_layer* layer,
00519 int r, int g, int b, int a);
00520
00531 int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer);
00532
00543 int guac_protocol_send_close(guac_socket* socket, const guac_layer* layer);
00544
00565 int guac_protocol_send_copy(guac_socket* socket,
00566 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00567 guac_composite_mode mode, const guac_layer* dstl, int dstx, int dsty);
00568
00587 int guac_protocol_send_cstroke(guac_socket* socket,
00588 guac_composite_mode mode, const guac_layer* layer,
00589 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00590 int r, int g, int b, int a);
00591
00608 int guac_protocol_send_cursor(guac_socket* socket, int x, int y,
00609 const guac_layer* srcl, int srcx, int srcy, int w, int h);
00610
00627 int guac_protocol_send_curve(guac_socket* socket, const guac_layer* layer,
00628 int cp1x, int cp1y, int cp2x, int cp2y, int x, int y);
00629
00640 int guac_protocol_send_identity(guac_socket* socket, const guac_layer* layer);
00641
00654 int guac_protocol_send_lfill(guac_socket* socket,
00655 guac_composite_mode mode, const guac_layer* layer,
00656 const guac_layer* srcl);
00657
00670 int guac_protocol_send_line(guac_socket* socket, const guac_layer* layer,
00671 int x, int y);
00672
00688 int guac_protocol_send_lstroke(guac_socket* socket,
00689 guac_composite_mode mode, const guac_layer* layer,
00690 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00691 const guac_layer* srcl);
00692
00708 int guac_protocol_send_png(guac_socket* socket, guac_composite_mode mode,
00709 const guac_layer* layer, int x, int y, cairo_surface_t* surface);
00710
00721 int guac_protocol_send_pop(guac_socket* socket, const guac_layer* layer);
00722
00733 int guac_protocol_send_push(guac_socket* socket, const guac_layer* layer);
00734
00749 int guac_protocol_send_rect(guac_socket* socket, const guac_layer* layer,
00750 int x, int y, int width, int height);
00751
00762 int guac_protocol_send_reset(guac_socket* socket, const guac_layer* layer);
00763
00776 int guac_protocol_send_start(guac_socket* socket, const guac_layer* layer,
00777 int x, int y);
00778
00799 int guac_protocol_send_transfer(guac_socket* socket,
00800 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00801 guac_transfer_function fn, const guac_layer* dstl, int dstx, int dsty);
00802
00819 int guac_protocol_send_transform(guac_socket* socket,
00820 const guac_layer* layer,
00821 double a, double b, double c,
00822 double d, double e, double f);
00823
00824
00825
00836 int guac_protocol_send_dispose(guac_socket* socket, const guac_layer* layer);
00837
00854 int guac_protocol_send_distort(guac_socket* socket,
00855 const guac_layer* layer,
00856 double a, double b, double c,
00857 double d, double e, double f);
00858
00874 int guac_protocol_send_move(guac_socket* socket, const guac_layer* layer,
00875 const guac_layer* parent, int x, int y, int z);
00876
00888 int guac_protocol_send_shade(guac_socket* socket, const guac_layer* layer,
00889 int a);
00890
00903 int guac_protocol_send_size(guac_socket* socket, const guac_layer* layer,
00904 int w, int h);
00905
00906
00907
00918 int guac_protocol_send_clipboard(guac_socket* socket, const char* data);
00919
00927 int guac_protocol_send_name(guac_socket* socket, const char* name);
00928
00929 #endif
00930