imported irssi.
[silc.git] / apps / irssi / src / fe-text / mainwindows.h
1 #ifndef __MAINWINDOWS_H
2 #define __MAINWINDOWS_H
3
4 #include "fe-windows.h"
5 #include "screen.h"
6
7 #define WINDOW_MIN_SIZE 2
8
9 typedef struct {
10         WINDOW_REC *active;
11         GSList *sticky_windows; /* list of windows allowed to show only in this mainwindow */
12
13 #ifdef USE_CURSES_WINDOWS
14         WINDOW *curses_win;
15 #else
16 #error disable-curses-windows is currently broken /* FIXME */
17 #endif
18         int first_line, last_line, width, height;
19         int statusbar_lines;
20         void *statusbar;
21         void *statusbar_window_item;
22 } MAIN_WINDOW_REC;
23
24 extern GSList *mainwindows;
25 extern MAIN_WINDOW_REC *active_mainwin;
26
27 void mainwindows_init(void);
28 void mainwindows_deinit(void);
29
30 MAIN_WINDOW_REC *mainwindow_create(void);
31 void mainwindow_destroy(MAIN_WINDOW_REC *window);
32
33 void mainwindows_redraw(void);
34 void mainwindows_recreate(void);
35
36 void mainwindow_set_size(MAIN_WINDOW_REC *window, int size);
37 void mainwindows_resize(int width, int height);
38
39 int mainwindows_reserve_lines(int count, int up);
40 GSList *mainwindows_get_sorted(int reverse);
41
42 #endif