diff options
Diffstat (limited to 'server/cursor-channel.h')
-rw-r--r-- | server/cursor-channel.h | 50 |
1 files changed, 4 insertions, 46 deletions
diff --git a/server/cursor-channel.h b/server/cursor-channel.h index 5d4f8ea2..887f8479 100644 --- a/server/cursor-channel.h +++ b/server/cursor-channel.h @@ -25,66 +25,24 @@ #include "cache-item.h" #include "stat.h" -#define CLIENT_CURSOR_CACHE_SIZE 256 - -#define CURSOR_CACHE_HASH_SHIFT 8 -#define CURSOR_CACHE_HASH_SIZE (1 << CURSOR_CACHE_HASH_SHIFT) -#define CURSOR_CACHE_HASH_MASK (CURSOR_CACHE_HASH_SIZE - 1) -#define CURSOR_CACHE_HASH_KEY(id) ((id) & CURSOR_CACHE_HASH_MASK) - -enum { - PIPE_ITEM_TYPE_CURSOR = PIPE_ITEM_TYPE_COMMON_LAST, - PIPE_ITEM_TYPE_CURSOR_INIT, - PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE, -}; - typedef struct CursorChannel CursorChannel; +typedef struct CursorChannelClient CursorChannelClient; -typedef struct CursorItem { - uint32_t group_id; - int refs; - RedCursorCmd *red_cursor; -} CursorItem; - -typedef struct CursorPipeItem { - PipeItem base; - CursorItem *cursor_item; - int refs; -} CursorPipeItem; - -typedef struct LocalCursor { - CursorItem base; - SpicePoint16 position; - uint32_t data_size; - SpiceCursor red_cursor; -} LocalCursor; - -typedef struct CursorChannelClient { - CommonChannelClient common; - - CacheItem *cursor_cache[CURSOR_CACHE_HASH_SIZE]; - Ring cursor_cache_lru; - long cursor_cache_available; - uint32_t cursor_cache_items; -} CursorChannelClient; - -G_STATIC_ASSERT(sizeof(CursorItem) <= QXL_CURSUR_DEVICE_DATA_SIZE); +#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_process_cmd (CursorChannel *cursor, RedCursorCmd *cursor_cmd, uint32_t group_id); void cursor_channel_set_mouse_mode(CursorChannel *cursor, uint32_t mode); -CursorItem* cursor_item_new (RedCursorCmd *cmd, uint32_t group_id); -void cursor_item_unref (QXLInstance *qxl, CursorItem *cursor); - - CursorChannelClient* cursor_channel_client_new(CursorChannel *cursor, RedClient *client, RedsStream *stream, int mig_target, uint32_t *common_caps, int num_common_caps, uint32_t *caps, int num_caps); +void cursor_channel_client_migrate(CursorChannelClient* client); #endif /* CURSOR_CHANNEL_H_ */ |