diff options
Diffstat (limited to 'client/screen.h')
-rw-r--r-- | client/screen.h | 14 |
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; |