1
#ifndef __MAINWINDOWS_H
2
#define __MAINWINDOWS_H
4
#include <fe-common/core/fe-windows.h>
5
#include <fe-text/term.h>
7
#define WINDOW_MIN_SIZE 2
9
#define MAIN_WINDOW_TEXT_HEIGHT(window) \
10
((window)->height-(window)->statusbar_lines)
15
TERM_WINDOW *screen_win;
16
int sticky_windows; /* number of sticky windows */
18
int first_line, last_line; /* first/last line used by this window (0..x) (includes statusbars) */
19
int width, height; /* width/height of the window (includes statusbars) */
22
int statusbar_lines_top;
23
int statusbar_lines_bottom;
24
int statusbar_lines; /* top+bottom */
26
unsigned int dirty:1; /* This window needs a redraw */
27
unsigned int size_dirty:1; /* We'll need to resize the window, but haven't got around doing it just yet. */
30
extern GSList *mainwindows;
31
extern MAIN_WINDOW_REC *active_mainwin;
32
extern int screen_reserved_top, screen_reserved_bottom;
34
void mainwindows_init(void);
35
void mainwindows_deinit(void);
37
MAIN_WINDOW_REC *mainwindow_create(void);
38
void mainwindow_destroy(MAIN_WINDOW_REC *window);
40
void mainwindows_redraw(void);
41
void mainwindows_recreate(void);
43
/* Change the window height - the height includes the lines needed for
44
statusbars. If resize_lower is TRUE, the lower window is first tried
45
to be resized instead of upper window. */
46
void mainwindow_set_size(MAIN_WINDOW_REC *window, int height,
48
void mainwindows_resize(int width, int height);
50
void mainwindow_change_active(MAIN_WINDOW_REC *mainwin,
51
WINDOW_REC *skip_window);
53
int mainwindows_reserve_lines(int top, int bottom);
54
int mainwindow_set_statusbar_lines(MAIN_WINDOW_REC *window,
56
void mainwindows_redraw_dirty(void);
58
GSList *mainwindows_get_sorted(int reverse);