mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-10 16:19:23 +00:00
Moved over to a next time based display update.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@320 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <sigc++/slot.h>
|
||||
|
||||
#include "canvas.h"
|
||||
#include "utils/timer.h"
|
||||
|
||||
namespace display {
|
||||
@@ -20,17 +21,19 @@ public:
|
||||
|
||||
bool is_active() { return m_active; }
|
||||
bool is_dynamic() { return m_dynamic; }
|
||||
bool is_dirty() { return m_lastDraw == 0; }
|
||||
bool is_dirty() { return m_nextDraw <= utils::Timer::cache(); }
|
||||
|
||||
utils::Timer get_next_draw() { return m_nextDraw; }
|
||||
|
||||
int get_min_height() { return m_minHeight; }
|
||||
|
||||
bool get_active() { return m_active; }
|
||||
void set_active(bool a) { m_active = a; }
|
||||
|
||||
void refresh();
|
||||
void refresh() { m_canvas->refresh(); }
|
||||
void resize(int x, int y, int w, int h);
|
||||
|
||||
void mark_dirty() { m_lastDraw = 0; }
|
||||
void mark_dirty() { m_nextDraw = utils::Timer::min(); }
|
||||
|
||||
virtual void redraw() = 0;
|
||||
|
||||
@@ -48,7 +51,7 @@ protected:
|
||||
bool m_dynamic;
|
||||
int m_minHeight;
|
||||
|
||||
utils::Timer m_lastDraw;
|
||||
utils::Timer m_nextDraw;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user