diff options
author | Yaniv Kamay <ykamay@redhat.com> | 2009-11-16 17:50:16 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2009-11-30 18:03:35 +0200 |
commit | 3b51087b3656b111886c7397d0ddd499a96f9e2d (patch) | |
tree | 21cdb7b0dc282062bd811f65ee295a7074b58275 /client/cursor_channel.h | |
parent | a70110c4e50aad99de7a844bb78eb868768e7841 (diff) | |
download | spice-3b51087b3656b111886c7397d0ddd499a96f9e2d.tar.gz spice-3b51087b3656b111886c7397d0ddd499a96f9e2d.tar.xz spice-3b51087b3656b111886c7397d0ddd499a96f9e2d.zip |
client: interactive screen layer
Diffstat (limited to 'client/cursor_channel.h')
-rw-r--r-- | client/cursor_channel.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/client/cursor_channel.h b/client/cursor_channel.h index 5ac40c10..699d5197 100644 --- a/client/cursor_channel.h +++ b/client/cursor_channel.h @@ -25,6 +25,7 @@ class ChannelFactory; class CursorChannel; +class DisplayChannel; class CursorCacheTreat { public: @@ -43,28 +44,25 @@ public: typedef Cache<CursorData, CursorCacheTreat, 1024> CursorCache; -class CursorModeTrigger: public EventSources::Trigger { -public: - CursorModeTrigger(CursorChannel& channel); - virtual void on_event(); - -private: - CursorChannel& _channel; -}; - class CursorChannel: public RedChannel, public ScreenLayer { public: CursorChannel(RedClient& client, uint32_t id); virtual ~CursorChannel(); static ChannelFactory& Factory(); - void set_cursor_mode(); + void on_mouse_mode_change(); + + void attach_display(DisplayChannel* channel); + void detach_display(); protected: virtual void on_connect(); virtual void on_disconnect(); private: + static void create_native_cursor(CursorData* cursor); + + void update_display_cursor(); void set_cursor(RedCursor& red_cursor, int data_size, int x, int y, bool visible); void remove_cursor(); @@ -79,21 +77,17 @@ private: void handle_inval_one(RedPeer::InMessage* message); void handle_inval_all(RedPeer::InMessage* message); - friend class CursorSetEvent; - friend class CursorMoveEvent; - friend class CursorHideEvent; - friend class CursorRemoveEvent; - friend class CursorModeTrigger; - friend class CursorModeEvent; + friend class AttachDispayEvent; + friend class CursorUpdateEvent; private: CursorCache _cursor_cache; CursorData* _cursor; - CursorModeTrigger _cursor_trigger; Point _hot_pos; Rect _cursor_rect; Mutex _update_lock; bool _cursor_visible; + DisplayChannel* _display_channel; }; #endif |