diff --git a/src/protocols/vnc/Makefile.am b/src/protocols/vnc/Makefile.am index 3ee23387..9268a7f4 100644 --- a/src/protocols/vnc/Makefile.am +++ b/src/protocols/vnc/Makefile.am @@ -30,14 +30,14 @@ lib_LTLIBRARIES = libguac-client-vnc.la libguac_client_vnc_la_SOURCES = \ client.c \ convert.c \ - default_pointer.c \ + dot_cursor.c \ guac_handlers.c \ vnc_handlers.c noinst_HEADERS = \ client.h \ convert.h \ - default_pointer.h \ + dot_cursor.h \ guac_handlers.h \ vnc_handlers.h diff --git a/src/protocols/vnc/client.c b/src/protocols/vnc/client.c index fe41007b..8855856a 100644 --- a/src/protocols/vnc/client.c +++ b/src/protocols/vnc/client.c @@ -23,7 +23,7 @@ #include "config.h" #include "client.h" -#include "default_pointer.h" +#include "dot_cursor.h" #include "guac_handlers.h" #include "vnc_handlers.h" @@ -353,9 +353,9 @@ int guac_client_init(guac_client* client, int argc, char** argv) { client->key_handler = vnc_guac_client_key_handler; client->clipboard_handler = vnc_guac_client_clipboard_handler; - /* If not read-only but cursor is remote, set a default pointer */ + /* If not read-only but cursor is remote, set a dot cursor */ if (guac_client_data->remote_cursor) - guac_vnc_set_default_pointer(client); + guac_vnc_set_dot_cursor(client); } diff --git a/src/protocols/vnc/default_pointer.c b/src/protocols/vnc/dot_cursor.c similarity index 76% rename from src/protocols/vnc/default_pointer.c rename to src/protocols/vnc/dot_cursor.c index 9f59ef07..b0a9457f 100644 --- a/src/protocols/vnc/default_pointer.c +++ b/src/protocols/vnc/dot_cursor.c @@ -33,15 +33,15 @@ #define _ 0x00,0x00,0x00,0x00 /* Dimensions */ -const int guac_vnc_default_pointer_width = 5; -const int guac_vnc_default_pointer_height = 5; +const int guac_vnc_dot_cursor_width = 5; +const int guac_vnc_dot_cursor_height = 5; /* Format */ -const cairo_format_t guac_vnc_default_pointer_format = CAIRO_FORMAT_ARGB32; -const int guac_vnc_default_pointer_stride = 20; +const cairo_format_t guac_vnc_dot_cursor_format = CAIRO_FORMAT_ARGB32; +const int guac_vnc_dot_cursor_stride = 20; /* Embedded pointer graphic */ -unsigned char guac_vnc_default_pointer[] = { +unsigned char guac_vnc_dot_cursor[] = { _,O,O,O,_, O,X,X,X,O, @@ -51,7 +51,7 @@ unsigned char guac_vnc_default_pointer[] = { }; -void guac_vnc_set_default_pointer(guac_client* client) { +void guac_vnc_set_dot_cursor(guac_client* client) { guac_socket* socket = client->socket; @@ -59,11 +59,11 @@ void guac_vnc_set_default_pointer(guac_client* client) { guac_layer* cursor = guac_client_alloc_buffer(client); cairo_surface_t* graphic = cairo_image_surface_create_for_data( - guac_vnc_default_pointer, - guac_vnc_default_pointer_format, - guac_vnc_default_pointer_width, - guac_vnc_default_pointer_height, - guac_vnc_default_pointer_stride); + guac_vnc_dot_cursor, + guac_vnc_dot_cursor_format, + guac_vnc_dot_cursor_width, + guac_vnc_dot_cursor_height, + guac_vnc_dot_cursor_stride); guac_protocol_send_png(socket, GUAC_COMP_SRC, cursor, 0, 0, graphic); cairo_surface_destroy(graphic); @@ -71,8 +71,8 @@ void guac_vnc_set_default_pointer(guac_client* client) { /* Set cursor */ guac_protocol_send_cursor(socket, 2, 2, cursor, 0, 0, - guac_vnc_default_pointer_width, - guac_vnc_default_pointer_height); + guac_vnc_dot_cursor_width, + guac_vnc_dot_cursor_height); /* Free buffer */ guac_client_free_buffer(client, cursor); diff --git a/src/protocols/vnc/default_pointer.h b/src/protocols/vnc/dot_cursor.h similarity index 80% rename from src/protocols/vnc/default_pointer.h rename to src/protocols/vnc/dot_cursor.h index 6de98426..e80e37a4 100644 --- a/src/protocols/vnc/default_pointer.h +++ b/src/protocols/vnc/dot_cursor.h @@ -21,8 +21,8 @@ */ -#ifndef _GUAC_VNC_DEFAULT_POINTER_H -#define _GUAC_VNC_DEFAULT_POINTER_H +#ifndef _GUAC_VNC_DOT_CURSOR_H +#define _GUAC_VNC_DOT_CURSOR_H #include "config.h" @@ -32,33 +32,33 @@ /** * Width of the embedded mouse cursor graphic. */ -extern const int guac_vnc_default_pointer_width; +extern const int guac_vnc_dot_cursor_width; /** * Height of the embedded mouse cursor graphic. */ -extern const int guac_vnc_default_pointer_height; +extern const int guac_vnc_dot_cursor_height; /** * Number of bytes in each row of the embedded mouse cursor graphic. */ -extern const int guac_vnc_default_pointer_stride; +extern const int guac_vnc_dot_cursor_stride; /** * The Cairo grapic format of the mouse cursor graphic. */ -extern const cairo_format_t guac_vnc_default_pointer_format; +extern const cairo_format_t guac_vnc_dot_cursor_format; /** * Embedded mouse cursor graphic. */ -extern unsigned char guac_vnc_default_pointer[]; +extern unsigned char guac_vnc_dot_cursor[]; /** * Set the cursor of the remote display to the embedded cursor graphic. * * @param client The guac_client to send the cursor to. */ -void guac_vnc_set_default_pointer(guac_client* client); +void guac_vnc_set_dot_cursor(guac_client* client); #endif