diff options
author | ben <benjaminfranzke@googlemail.com> | 2010-07-20 00:29:17 +0200 |
---|---|---|
committer | ben <benjaminfranzke@googlemail.com> | 2010-07-20 00:29:17 +0200 |
commit | f85eae90b27e6e18d3d1632fcbe102a4fc1671c0 (patch) | |
tree | 62324f1f43b2ddfcbf8d25678bf0eff128dad14b /src | |
parent | b1c10f85ccd12621ec4d58eb6ade9e3e41796a20 (diff) | |
parent | d5824490d8ea7fb470bcce5fb0b406446ba1d9da (diff) | |
download | pa-sink-ctl-f85eae90b27e6e18d3d1632fcbe102a4fc1671c0.tar.gz pa-sink-ctl-f85eae90b27e6e18d3d1632fcbe102a4fc1671c0.tar.bz2 pa-sink-ctl-f85eae90b27e6e18d3d1632fcbe102a4fc1671c0.zip |
Merge branch 'master' of gitorious.org:pa-sink-ctl/pa-sink-ctl
Diffstat (limited to 'src')
-rw-r--r-- | src/interface.c | 12 | ||||
-rw-r--r-- | src/interface.h | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/interface.c b/src/interface.c index fbf924a..e7ec6b1 100644 --- a/src/interface.c +++ b/src/interface.c @@ -15,13 +15,13 @@ // ncurses WINDOW *menu_win; +int height; +int width; int chooser_sink; int chooser_input; - int selected_index; extern GArray *sink_list; - extern pa_context* context; void resize(int signal); @@ -56,13 +56,19 @@ void interface_init(void) refresh(); } +void interface_resize(void) +{ + getmaxyx(stdscr, height, width); + wresize(menu_win, height, width); +} + void print_sink_list(void) { int i = 0; int x = 2; int y = 2; int offset = 0; - + werase(menu_win); box(menu_win, 0, 0); diff --git a/src/interface.h b/src/interface.h index 0290d1f..20aa559 100644 --- a/src/interface.h +++ b/src/interface.h @@ -12,6 +12,7 @@ void print_input_list(int sink_num); void print_volume(pa_volume_t, int, int); void get_input(void); void interface_init(void); +void interface_resize(void); void interface_clear(void); #endif |