summaryrefslogtreecommitdiffstats
path: root/client/display_channel.h
diff options
context:
space:
mode:
authorYaniv Kamay <ykamay@redhat.com>2009-11-16 17:50:16 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-11-30 18:03:35 +0200
commit3b51087b3656b111886c7397d0ddd499a96f9e2d (patch)
tree21cdb7b0dc282062bd811f65ee295a7074b58275 /client/display_channel.h
parenta70110c4e50aad99de7a844bb78eb868768e7841 (diff)
downloadspice-3b51087b3656b111886c7397d0ddd499a96f9e2d.tar.gz
spice-3b51087b3656b111886c7397d0ddd499a96f9e2d.tar.xz
spice-3b51087b3656b111886c7397d0ddd499a96f9e2d.zip
client: interactive screen layer
Diffstat (limited to 'client/display_channel.h')
-rw-r--r--client/display_channel.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/client/display_channel.h b/client/display_channel.h
index 8600bfb4..e58be919 100644
--- a/client/display_channel.h
+++ b/client/display_channel.h
@@ -35,6 +35,8 @@ class RedScreen;
class ChannelFactory;
class VideoStream;
class DisplayChannel;
+class CursorData;
+class InputsChannel;
class StreamsTrigger: public EventSources::Trigger {
public:
@@ -93,6 +95,19 @@ public:
virtual void post_migrate();
#endif
virtual void update_interrupt();
+ void set_cursor(CursorData* cursor);
+ void hide_cursor();
+ void set_capture_mode(bool on);
+
+ virtual bool pointer_test(int x, int y);
+ virtual void on_pointer_enter(int x, int y, unsigned int buttons_state);
+ virtual void on_pointer_motion(int x, int y, unsigned int buttons_state);
+ virtual void on_pointer_leave();
+ virtual void on_mouse_button_press(int button, int buttons_state);
+ virtual void on_mouse_button_release(int button, int buttons_state);
+
+ void attach_inputs(InputsChannel* inputs_channel);
+ void detach_inputs();
static ChannelFactory& Factory();
@@ -115,6 +130,7 @@ private:
void create_canvas(const std::vector<int>& canvas_type, int width, int height,
int depth);
void destroy_strams();
+ void update_cursor();
void handle_mode(RedPeer::InMessage* message);
void handle_mark(RedPeer::InMessage* message);
@@ -175,6 +191,15 @@ private:
AutoRef<StreamsTimer> _streams_timer;
uint32_t _next_timer_time;
+ AutoRef<CursorData> _cursor;
+ bool _cursor_visibal;
+ bool _active_pointer;
+ bool _capture_mouse_mode;
+ InputsChannel* _inputs_channel;
+
+ Point _pointer_pos;
+ int _buttons_state;
+
std::vector<VideoStream*> _streams;
VideoStream* _active_streams;
StreamsTrigger _streams_trigger;
@@ -182,12 +207,15 @@ private:
GLInterruptRecreate _gl_interrupt_recreate;
#endif
InterruptUpdate _interrupt_update;
+
friend class SetModeEvent;
friend class ActivateTimerEvent;
friend class VideoStream;
friend class StreamsTrigger;
friend class GLInterupt;
friend class StreamsTimer;
+ friend class AttachChannelsEvent;
+ friend class DetachChannelsEvent;
};
#endif