Added -O2, added (but commented out) CopyRect.

This commit is contained in:
Michael Jumper
2010-09-06 01:57:54 -07:00
parent 776445013d
commit 2a2eb6ae39
2 changed files with 30 additions and 4 deletions

View File

@@ -4,16 +4,16 @@
all: guacd all: guacd
guacd: daemon.o proxy.o guacio.o guacd: daemon.o proxy.o guacio.o
$(CC) -g daemon.o proxy.o guacio.o -l png -l vncclient -o guacd $(CC) -O2 daemon.o proxy.o guacio.o -l png -l vncclient -o guacd
proxy.o: proxy.c proxy.h guacio.h proxy.o: proxy.c proxy.h guacio.h
$(CC) -g -c -ansi -pedantic proxy.c $(CC) -O2 -c -ansi -pedantic proxy.c
guacio.o: guacio.c guacio.h guacio.o: guacio.c guacio.h
$(CC) -g -c -ansi -pedantic guacio.c $(CC) -O2 -c -ansi -pedantic guacio.c
daemon.o: daemon.c proxy.h daemon.o: daemon.c proxy.h
$(CC) -g -c -ansi -pedantic daemon.c $(CC) -O2 -c -ansi -pedantic daemon.c
clean: clean:
$(RM) *.o guacd $(RM) *.o guacd

View File

@@ -93,6 +93,22 @@ void guac_send_size(GUACIO* io, int w, int h) {
guac_write_string(io, ";"); guac_write_string(io, ";");
} }
void guac_send_copy(GUACIO* io, int srcx, int srcy, int w, int h, int dstx, int dsty) {
guac_write_string(io, "copy:");
guac_write_int(io, srcx);
guac_write_string(io, ",");
guac_write_int(io, srcy);
guac_write_string(io, ",");
guac_write_int(io, w);
guac_write_string(io, ",");
guac_write_int(io, h);
guac_write_string(io, ",");
guac_write_int(io, dstx);
guac_write_string(io, ",");
guac_write_int(io, dsty);
guac_write_string(io, ";");
}
void guac_send_png(GUACIO* io, int x, int y, png_byte** png_rows, int w, int h) { void guac_send_png(GUACIO* io, int x, int y, png_byte** png_rows, int w, int h) {
png_structp png; png_structp png;
@@ -210,6 +226,15 @@ void guac_vnc_update(rfbClient* client, int x, int y, int w, int h) {
} }
void guac_vnc_copyrect(rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y) {
GUACIO* io = rfbClientGetClientData(client, __GUAC_VNC_TAG_IO);
guac_send_copy(io, src_x, src_y, w, h, dest_x, dest_y);
guac_flush(io);
}
char* guac_vnc_get_password(rfbClient* client) { char* guac_vnc_get_password(rfbClient* client) {
/* Freed after use by libvncclient */ /* Freed after use by libvncclient */
@@ -240,6 +265,7 @@ void proxy(int client_fd) {
/* Framebuffer update handler */ /* Framebuffer update handler */
rfb_client->GotFrameBufferUpdate = guac_vnc_update; rfb_client->GotFrameBufferUpdate = guac_vnc_update;
/*rfb_client->GotCopyRect = guac_vnc_copyrect;*/
/* Password */ /* Password */
rfb_client->GetPassword = guac_vnc_get_password; rfb_client->GetPassword = guac_vnc_get_password;