Rename default pointer.
This commit is contained in:
parent
735c5778db
commit
c4518c7781
@ -30,14 +30,14 @@ lib_LTLIBRARIES = libguac-client-vnc.la
|
|||||||
libguac_client_vnc_la_SOURCES = \
|
libguac_client_vnc_la_SOURCES = \
|
||||||
client.c \
|
client.c \
|
||||||
convert.c \
|
convert.c \
|
||||||
default_pointer.c \
|
dot_cursor.c \
|
||||||
guac_handlers.c \
|
guac_handlers.c \
|
||||||
vnc_handlers.c
|
vnc_handlers.c
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
client.h \
|
client.h \
|
||||||
convert.h \
|
convert.h \
|
||||||
default_pointer.h \
|
dot_cursor.h \
|
||||||
guac_handlers.h \
|
guac_handlers.h \
|
||||||
vnc_handlers.h
|
vnc_handlers.h
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "default_pointer.h"
|
#include "dot_cursor.h"
|
||||||
#include "guac_handlers.h"
|
#include "guac_handlers.h"
|
||||||
#include "vnc_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->key_handler = vnc_guac_client_key_handler;
|
||||||
client->clipboard_handler = vnc_guac_client_clipboard_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)
|
if (guac_client_data->remote_cursor)
|
||||||
guac_vnc_set_default_pointer(client);
|
guac_vnc_set_dot_cursor(client);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,15 +33,15 @@
|
|||||||
#define _ 0x00,0x00,0x00,0x00
|
#define _ 0x00,0x00,0x00,0x00
|
||||||
|
|
||||||
/* Dimensions */
|
/* Dimensions */
|
||||||
const int guac_vnc_default_pointer_width = 5;
|
const int guac_vnc_dot_cursor_width = 5;
|
||||||
const int guac_vnc_default_pointer_height = 5;
|
const int guac_vnc_dot_cursor_height = 5;
|
||||||
|
|
||||||
/* Format */
|
/* Format */
|
||||||
const cairo_format_t guac_vnc_default_pointer_format = CAIRO_FORMAT_ARGB32;
|
const cairo_format_t guac_vnc_dot_cursor_format = CAIRO_FORMAT_ARGB32;
|
||||||
const int guac_vnc_default_pointer_stride = 20;
|
const int guac_vnc_dot_cursor_stride = 20;
|
||||||
|
|
||||||
/* Embedded pointer graphic */
|
/* Embedded pointer graphic */
|
||||||
unsigned char guac_vnc_default_pointer[] = {
|
unsigned char guac_vnc_dot_cursor[] = {
|
||||||
|
|
||||||
_,O,O,O,_,
|
_,O,O,O,_,
|
||||||
O,X,X,X,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;
|
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);
|
guac_layer* cursor = guac_client_alloc_buffer(client);
|
||||||
|
|
||||||
cairo_surface_t* graphic = cairo_image_surface_create_for_data(
|
cairo_surface_t* graphic = cairo_image_surface_create_for_data(
|
||||||
guac_vnc_default_pointer,
|
guac_vnc_dot_cursor,
|
||||||
guac_vnc_default_pointer_format,
|
guac_vnc_dot_cursor_format,
|
||||||
guac_vnc_default_pointer_width,
|
guac_vnc_dot_cursor_width,
|
||||||
guac_vnc_default_pointer_height,
|
guac_vnc_dot_cursor_height,
|
||||||
guac_vnc_default_pointer_stride);
|
guac_vnc_dot_cursor_stride);
|
||||||
|
|
||||||
guac_protocol_send_png(socket, GUAC_COMP_SRC, cursor, 0, 0, graphic);
|
guac_protocol_send_png(socket, GUAC_COMP_SRC, cursor, 0, 0, graphic);
|
||||||
cairo_surface_destroy(graphic);
|
cairo_surface_destroy(graphic);
|
||||||
@ -71,8 +71,8 @@ void guac_vnc_set_default_pointer(guac_client* client) {
|
|||||||
/* Set cursor */
|
/* Set cursor */
|
||||||
guac_protocol_send_cursor(socket, 2, 2, cursor,
|
guac_protocol_send_cursor(socket, 2, 2, cursor,
|
||||||
0, 0,
|
0, 0,
|
||||||
guac_vnc_default_pointer_width,
|
guac_vnc_dot_cursor_width,
|
||||||
guac_vnc_default_pointer_height);
|
guac_vnc_dot_cursor_height);
|
||||||
|
|
||||||
/* Free buffer */
|
/* Free buffer */
|
||||||
guac_client_free_buffer(client, cursor);
|
guac_client_free_buffer(client, cursor);
|
@ -21,8 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _GUAC_VNC_DEFAULT_POINTER_H
|
#ifndef _GUAC_VNC_DOT_CURSOR_H
|
||||||
#define _GUAC_VNC_DEFAULT_POINTER_H
|
#define _GUAC_VNC_DOT_CURSOR_H
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
@ -32,33 +32,33 @@
|
|||||||
/**
|
/**
|
||||||
* Width of the embedded mouse cursor graphic.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* 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.
|
* Set the cursor of the remote display to the embedded cursor graphic.
|
||||||
*
|
*
|
||||||
* @param client The guac_client to send the cursor to.
|
* @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
|
#endif
|
Loading…
Reference in New Issue
Block a user