summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/interface.c12
-rw-r--r--src/interface.h1
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