Make layout windows visible, makes the whole thing way simpler.
[apps/madmutt.git] / lib-ui / layout.h
index 7bc2161..b6e1446 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef MUTT_LIB_UI_LAYOUT_H
 #define MUTT_LIB_UI_LAYOUT_H
 
+extern WINDOW *sidebar_w, *main_w;
+
 void ui_layout_init(void);
 void ui_layout_resize(void);
 
@@ -29,4 +31,16 @@ void mutt_need_hard_redraw(void);
 void mutt_refresh(void);
 void mutt_endwin(const char *);
 
+static inline int ui_get_width(WINDOW *w) {
+    int x, y;
+    getmaxyx(w, y, x);
+    return y;
+}
+
+static inline int ui_get_height(WINDOW *w) {
+    int x, y;
+    getmaxyx(w, y, x);
+    return x;
+}
+
 #endif