summaryrefslogtreecommitdiffstats
path: root/client/screen.h
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-11-09 18:05:40 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-11-09 19:06:44 +0200
commitec34856feadfb56971bc06f7da7ada67394440a8 (patch)
tree9ef91c6a0ca613d500ddc9dda829cf1c8c62545d /client/screen.h
parent4c72ba138c391c27d15e23c349c87e23fd813ac6 (diff)
downloadspice-ec34856feadfb56971bc06f7da7ada67394440a8.tar.gz
spice-ec34856feadfb56971bc06f7da7ada67394440a8.tar.xz
spice-ec34856feadfb56971bc06f7da7ada67394440a8.zip
spice client: remove timer interface from platform - use Application (via ProcessLoop interface).
Diffstat (limited to 'client/screen.h')
-rw-r--r--client/screen.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/client/screen.h b/client/screen.h
index 3e2ffdb4..957cece1 100644
--- a/client/screen.h
+++ b/client/screen.h
@@ -27,10 +27,12 @@
#include "platform.h"
#include "process_loop.h"
#include "threads.h"
+#include "utils.h"
class Application;
class ScreenLayer;
class Monitor;
+class RedScreen;
enum {
SCREEN_LAYER_DISPLAY,
@@ -38,6 +40,14 @@ enum {
SCREEN_LAYER_GUI,
};
+class UpdateTimer: public Timer {
+public:
+ UpdateTimer(RedScreen* screen) : _screen (screen) {}
+ virtual void response(AbstractProcessLoop& events_loop);
+private:
+ RedScreen* _screen;
+};
+
class RedScreen: public RedWindow::Listener {
public:
RedScreen(Application& owner, int id, const std::wstring& name, int width, int height);
@@ -87,8 +97,8 @@ public:
void update();
private:
- friend void periodic_update_proc(void *opaque, TimerID timer);
friend class UpdateEvent;
+ friend class UpdateTimer;
virtual ~RedScreen();
void create_composit_area();
@@ -153,7 +163,7 @@ private:
bool _key_interception;
bool _update_by_timer;
int _forec_update_timer;
- TimerID _update_timer;
+ AutoRef<UpdateTimer> _update_timer;
RedDrawable* _composit_area;
uint64_t _update_mark;