2000-05-04 10:32:42 +00:00
|
|
|
#ifndef __MAINWINDOWS_H
|
|
|
|
|
#define __MAINWINDOWS_H
|
|
|
|
|
|
2000-11-17 16:27:14 +00:00
|
|
|
#include "fe-windows.h"
|
2001-10-28 11:30:26 +00:00
|
|
|
#include "term.h"
|
2000-05-04 10:32:42 +00:00
|
|
|
|
2001-02-10 07:26:54 +00:00
|
|
|
#define WINDOW_MIN_SIZE 2
|
|
|
|
|
|
2001-10-13 16:11:13 +00:00
|
|
|
#define MAIN_WINDOW_TEXT_HEIGHT(window) \
|
|
|
|
|
((window)->height-(window)->statusbar_lines)
|
|
|
|
|
|
2000-05-04 10:32:42 +00:00
|
|
|
typedef struct {
|
|
|
|
|
WINDOW_REC *active;
|
|
|
|
|
|
2001-10-28 11:30:26 +00:00
|
|
|
TERM_WINDOW *screen_win;
|
2001-08-07 12:41:10 +00:00
|
|
|
int sticky_windows; /* number of sticky windows */
|
2001-06-01 21:49:07 +00:00
|
|
|
|
2001-10-13 16:11:13 +00:00
|
|
|
int first_line, last_line; /* first/last line used by this window (0..x) (includes statusbars) */
|
|
|
|
|
int width, height; /* width/height of the window (includes statusbars) */
|
2001-08-07 12:41:10 +00:00
|
|
|
|
2001-10-13 16:11:13 +00:00
|
|
|
GSList *statusbars;
|
|
|
|
|
int statusbar_lines_top;
|
|
|
|
|
int statusbar_lines_bottom;
|
2001-10-20 14:30:20 +00:00
|
|
|
int statusbar_lines; /* top+bottom */
|
|
|
|
|
|
2001-10-28 18:40:12 +00:00
|
|
|
unsigned int dirty:1; /* This window needs a redraw */
|
|
|
|
|
unsigned int size_dirty:1; /* We'll need to resize the window, but haven't got around doing it just yet. */
|
2000-05-04 10:32:42 +00:00
|
|
|
} MAIN_WINDOW_REC;
|
|
|
|
|
|
|
|
|
|
extern GSList *mainwindows;
|
|
|
|
|
extern MAIN_WINDOW_REC *active_mainwin;
|
2001-10-20 10:01:29 +00:00
|
|
|
extern int screen_reserved_top, screen_reserved_bottom;
|
2000-05-04 10:32:42 +00:00
|
|
|
|
|
|
|
|
void mainwindows_init(void);
|
|
|
|
|
void mainwindows_deinit(void);
|
|
|
|
|
|
|
|
|
|
MAIN_WINDOW_REC *mainwindow_create(void);
|
|
|
|
|
void mainwindow_destroy(MAIN_WINDOW_REC *window);
|
|
|
|
|
|
|
|
|
|
void mainwindows_redraw(void);
|
2000-08-10 20:01:32 +00:00
|
|
|
void mainwindows_recreate(void);
|
2000-05-04 10:32:42 +00:00
|
|
|
|
2001-10-20 10:01:29 +00:00
|
|
|
/* Change the window height - the height includes the lines needed for
|
|
|
|
|
statusbars. If resize_lower is TRUE, the lower window is first tried
|
|
|
|
|
to be resized instead of upper window. */
|
|
|
|
|
void mainwindow_set_size(MAIN_WINDOW_REC *window, int height,
|
|
|
|
|
int resize_lower);
|
2001-04-14 22:24:56 +00:00
|
|
|
void mainwindows_resize(int width, int height);
|
2001-02-10 07:26:54 +00:00
|
|
|
|
2001-08-03 23:39:35 +00:00
|
|
|
void mainwindow_change_active(MAIN_WINDOW_REC *mainwin,
|
|
|
|
|
WINDOW_REC *skip_window);
|
|
|
|
|
|
2001-10-13 16:11:13 +00:00
|
|
|
int mainwindows_reserve_lines(int top, int bottom);
|
|
|
|
|
int mainwindow_set_statusbar_lines(MAIN_WINDOW_REC *window,
|
|
|
|
|
int top, int bottom);
|
2001-10-28 18:40:12 +00:00
|
|
|
void mainwindows_redraw_dirty(void);
|
2001-10-13 16:11:13 +00:00
|
|
|
|
2001-02-10 07:26:54 +00:00
|
|
|
GSList *mainwindows_get_sorted(int reverse);
|
2000-05-04 10:32:42 +00:00
|
|
|
|
|
|
|
|
#endif
|