rtorrent: Working on display.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@237 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-01-27 20:14:21 +00:00
parent f622f45f0b
commit 74b154f07e
21 changed files with 1438 additions and 71 deletions
+6 -3
View File
@@ -8,20 +8,20 @@ namespace display {
class Canvas {
public:
Canvas(int x, int y, int width = 0, int height = 0) :
Canvas(int x = 0, int y = 0, int width = 0, int height = 0) :
m_window(newwin(height, width, y, x)) {}
~Canvas() { delwin(m_window); }
void refresh() { wnoutrefresh(m_window); }
void redraw() { redrawwin(m_window); }
void update_size(int w, int h) { wresize(m_window, h, w); }
void resize(int w, int h) { wresize(m_window, h, w); }
void resize(int x, int y, int w, int h);
int get_x() { int x, y; getyx(m_window, y, x); return x; }
int get_y() { int x, y; getyx(m_window, y, x); return y; }
int get_width() { int x, y; getmaxyx(m_window, y, x); return x; }
int get_height() { int x, y; getmaxyx(m_window, y, x); return y; }
chtype get_background() { return getbkgd(m_window); }
void set_background(chtype c) { return wbkgdset(m_window, c); }
@@ -44,6 +44,9 @@ public:
static void init();
static void cleanup();
static int get_screen_width() { int x, y; getmaxyx(stdscr, y, x); return x; }
static int get_screen_height() { int x, y; getmaxyx(stdscr, y, x); return y; }
static void do_update() { doupdate(); }
private: