mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-06 12:16:51 +00:00
Hide CursorChannelClient implementation details
The existence of this class can be hidden to user of CursorChannel class Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
6ad393d82b
commit
1d3cd7d617
@ -31,6 +31,8 @@
|
||||
#define CURSOR_CACHE_HASH_MASK (CURSOR_CACHE_HASH_SIZE - 1)
|
||||
#define CURSOR_CACHE_HASH_KEY(id) ((id) & CURSOR_CACHE_HASH_MASK)
|
||||
|
||||
typedef struct CursorChannelClient CursorChannelClient;
|
||||
|
||||
enum {
|
||||
RED_PIPE_ITEM_TYPE_CURSOR = RED_PIPE_ITEM_TYPE_COMMON_LAST,
|
||||
RED_PIPE_ITEM_TYPE_CURSOR_INIT,
|
||||
@ -362,9 +364,9 @@ CursorChannel* cursor_channel_new(RedWorker *worker)
|
||||
return cursor_channel;
|
||||
}
|
||||
|
||||
void cursor_channel_client_migrate(CursorChannelClient* client)
|
||||
void cursor_channel_client_migrate(RedChannelClient *rcc)
|
||||
{
|
||||
RedChannelClient *rcc;
|
||||
CursorChannelClient* client = (CursorChannelClient*)rcc;
|
||||
|
||||
spice_return_if_fail(client);
|
||||
rcc = RED_CHANNEL_CLIENT(client);
|
||||
@ -471,7 +473,7 @@ void cursor_channel_reset(CursorChannel *cursor)
|
||||
}
|
||||
}
|
||||
|
||||
void cursor_channel_init(CursorChannel *cursor, CursorChannelClient *client)
|
||||
static void cursor_channel_init_client(CursorChannel *cursor, CursorChannelClient *client)
|
||||
{
|
||||
spice_return_if_fail(cursor);
|
||||
|
||||
@ -488,6 +490,11 @@ void cursor_channel_init(CursorChannel *cursor, CursorChannelClient *client)
|
||||
red_channel_pipes_add_type(RED_CHANNEL(cursor), RED_PIPE_ITEM_TYPE_CURSOR_INIT);
|
||||
}
|
||||
|
||||
void cursor_channel_init(CursorChannel *cursor)
|
||||
{
|
||||
cursor_channel_init_client(cursor, NULL);
|
||||
}
|
||||
|
||||
void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode)
|
||||
{
|
||||
spice_return_if_fail(cursor);
|
||||
@ -515,5 +522,5 @@ void cursor_channel_connect(CursorChannel *cursor, RedClient *client, RedsStream
|
||||
red_channel_client_ack_zero_messages_window(rcc);
|
||||
red_channel_client_push_set_ack(rcc);
|
||||
|
||||
cursor_channel_init(cursor, ccc);
|
||||
cursor_channel_init_client(cursor, ccc);
|
||||
}
|
||||
|
||||
@ -24,14 +24,11 @@
|
||||
#include "red-parse-qxl.h"
|
||||
|
||||
typedef struct CursorChannel CursorChannel;
|
||||
typedef struct CursorChannelClient CursorChannelClient;
|
||||
|
||||
#define CURSOR_CHANNEL_CLIENT(Client) ((CursorChannelClient*)(Client))
|
||||
|
||||
CursorChannel* cursor_channel_new (RedWorker *worker);
|
||||
void cursor_channel_disconnect (CursorChannel *cursor_channel);
|
||||
void cursor_channel_reset (CursorChannel *cursor);
|
||||
void cursor_channel_init (CursorChannel *cursor, CursorChannelClient* client);
|
||||
void cursor_channel_init (CursorChannel *cursor);
|
||||
void cursor_channel_process_cmd (CursorChannel *cursor, RedCursorCmd *cursor_cmd);
|
||||
void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode);
|
||||
void cursor_channel_connect (CursorChannel *cursor, RedClient *client,
|
||||
@ -40,6 +37,6 @@ void cursor_channel_connect (CursorChannel *cursor, RedClien
|
||||
uint32_t *common_caps, int num_common_caps,
|
||||
uint32_t *caps, int num_caps);
|
||||
|
||||
void cursor_channel_client_migrate(CursorChannelClient* client);
|
||||
void cursor_channel_client_migrate(RedChannelClient *client);
|
||||
|
||||
#endif /* CURSOR_CHANNEL_H_ */
|
||||
|
||||
@ -687,7 +687,7 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
|
||||
red_channel_push(&worker->display_channel->common.base);
|
||||
}
|
||||
|
||||
cursor_channel_init(worker->cursor_channel, NULL);
|
||||
cursor_channel_init(worker->cursor_channel);
|
||||
}
|
||||
|
||||
static void handle_dev_create_primary_surface(void *opaque, void *payload)
|
||||
@ -1000,7 +1000,7 @@ static void handle_dev_cursor_migrate(void *opaque, void *payload)
|
||||
RedChannelClient *rcc = msg->rcc;
|
||||
|
||||
spice_info("migrate cursor client");
|
||||
cursor_channel_client_migrate(CURSOR_CHANNEL_CLIENT(rcc));
|
||||
cursor_channel_client_migrate(rcc);
|
||||
}
|
||||
|
||||
static void handle_dev_set_compression(void *opaque, void *payload)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user