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
00317 int guac_protocol_send_audio_header(guac_socket* socket,
00318 int channel, const char* mimetype, double duration, int size);
00319
00337 int guac_protocol_send_audio_data(guac_socket* socket, void* data, int count);
00338
00350 int guac_protocol_send_audio_end(guac_socket* socket);
00351
00365 int guac_protocol_send_file(guac_socket* socket, const char* name,
00366 const char* mimetype, void* data, int size);
00367
00391 int guac_protocol_send_file_header(guac_socket* socket, const char* name,
00392 const char* mimetype, int size);
00393
00411 int guac_protocol_send_file_data(guac_socket* socket, void* data, int count);
00412
00424 int guac_protocol_send_file_end(guac_socket* socket);
00425
00440 int guac_protocol_send_video(guac_socket* socket, const guac_layer* layer,
00441 const char* mimetype, double duration, void* data, int size);
00442
00467 int guac_protocol_send_video_header(guac_socket* socket,
00468 const guac_layer* layer, const char* mimetype, double duration, int size);
00469
00487 int guac_protocol_send_video_data(guac_socket* socket, void* data, int count);
00488
00500 int guac_protocol_send_video_end(guac_socket* socket);
00501
00502
00503
00521 int guac_protocol_send_arc(guac_socket* socket, const guac_layer* layer,
00522 int x, int y, int radius, double startAngle, double endAngle,
00523 int negative);
00524
00540 int guac_protocol_send_cfill(guac_socket* socket,
00541 guac_composite_mode mode, const guac_layer* layer,
00542 int r, int g, int b, int a);
00543
00554 int guac_protocol_send_clip(guac_socket* socket, const guac_layer* layer);
00555
00566 int guac_protocol_send_close(guac_socket* socket, const guac_layer* layer);
00567
00588 int guac_protocol_send_copy(guac_socket* socket,
00589 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00590 guac_composite_mode mode, const guac_layer* dstl, int dstx, int dsty);
00591
00610 int guac_protocol_send_cstroke(guac_socket* socket,
00611 guac_composite_mode mode, const guac_layer* layer,
00612 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00613 int r, int g, int b, int a);
00614
00631 int guac_protocol_send_cursor(guac_socket* socket, int x, int y,
00632 const guac_layer* srcl, int srcx, int srcy, int w, int h);
00633
00650 int guac_protocol_send_curve(guac_socket* socket, const guac_layer* layer,
00651 int cp1x, int cp1y, int cp2x, int cp2y, int x, int y);
00652
00663 int guac_protocol_send_identity(guac_socket* socket, const guac_layer* layer);
00664
00677 int guac_protocol_send_lfill(guac_socket* socket,
00678 guac_composite_mode mode, const guac_layer* layer,
00679 const guac_layer* srcl);
00680
00693 int guac_protocol_send_line(guac_socket* socket, const guac_layer* layer,
00694 int x, int y);
00695
00711 int guac_protocol_send_lstroke(guac_socket* socket,
00712 guac_composite_mode mode, const guac_layer* layer,
00713 guac_line_cap_style cap, guac_line_join_style join, int thickness,
00714 const guac_layer* srcl);
00715
00731 int guac_protocol_send_png(guac_socket* socket, guac_composite_mode mode,
00732 const guac_layer* layer, int x, int y, cairo_surface_t* surface);
00733
00744 int guac_protocol_send_pop(guac_socket* socket, const guac_layer* layer);
00745
00756 int guac_protocol_send_push(guac_socket* socket, const guac_layer* layer);
00757
00772 int guac_protocol_send_rect(guac_socket* socket, const guac_layer* layer,
00773 int x, int y, int width, int height);
00774
00785 int guac_protocol_send_reset(guac_socket* socket, const guac_layer* layer);
00786
00799 int guac_protocol_send_start(guac_socket* socket, const guac_layer* layer,
00800 int x, int y);
00801
00822 int guac_protocol_send_transfer(guac_socket* socket,
00823 const guac_layer* srcl, int srcx, int srcy, int w, int h,
00824 guac_transfer_function fn, const guac_layer* dstl, int dstx, int dsty);
00825
00842 int guac_protocol_send_transform(guac_socket* socket,
00843 const guac_layer* layer,
00844 double a, double b, double c,
00845 double d, double e, double f);
00846
00847
00848
00859 int guac_protocol_send_dispose(guac_socket* socket, const guac_layer* layer);
00860
00877 int guac_protocol_send_distort(guac_socket* socket,
00878 const guac_layer* layer,
00879 double a, double b, double c,
00880 double d, double e, double f);
00881
00897 int guac_protocol_send_move(guac_socket* socket, const guac_layer* layer,
00898 const guac_layer* parent, int x, int y, int z);
00899
00911 int guac_protocol_send_shade(guac_socket* socket, const guac_layer* layer,
00912 int a);
00913
00926 int guac_protocol_send_size(guac_socket* socket, const guac_layer* layer,
00927 int w, int h);
00928
00929
00930
00941 int guac_protocol_send_clipboard(guac_socket* socket, const char* data);
00942
00950 int guac_protocol_send_name(guac_socket* socket, const char* name);
00951
00952 #endif
00953