mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
Signal handler with cleaner shutdown.
Window title and stuff. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@248 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+20
-12
@@ -27,6 +27,20 @@ public:
|
||||
|
||||
void erase() { werase(m_window); }
|
||||
|
||||
void print_border(chtype ls, chtype rs,
|
||||
chtype ts, chtype bs,
|
||||
chtype tl, chtype tr,
|
||||
chtype bl, chtype br) { wborder(m_window, ls, rs, ts, bs, tl, tr, bl, br); }
|
||||
|
||||
// Initialize stdscr.
|
||||
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(); }
|
||||
|
||||
void print(int x, int y, const char* str) { mvwprintw(m_window, y, x, str); }
|
||||
|
||||
template <typename A1>
|
||||
@@ -43,19 +57,13 @@ public:
|
||||
void print(int x, int y, const char* str,
|
||||
A1 a1, A2 a2, A3 a3, A4 a4) { mvwprintw(m_window, y, x, str, a1, a2, a3, a4); }
|
||||
|
||||
void print_border(chtype ls, chtype rs,
|
||||
chtype ts, chtype bs,
|
||||
chtype tl, chtype tr,
|
||||
chtype bl, chtype br) { wborder(m_window, ls, rs, ts, bs, tl, tr, bl, br); }
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5>
|
||||
void print(int x, int y, const char* str,
|
||||
A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { mvwprintw(m_window, y, x, str, a1, a2, a3, a4, a5); }
|
||||
|
||||
// Initialize stdscr.
|
||||
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(); }
|
||||
template <typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
|
||||
void print(int x, int y, const char* str,
|
||||
A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { mvwprintw(m_window, y, x, str, a1, a2, a3, a4, a5, a6); }
|
||||
|
||||
private:
|
||||
WINDOW* m_window;
|
||||
|
||||
Reference in New Issue
Block a user