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"
|
2000-08-12 16:40:39 +00:00
|
|
|
#include "screen.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-06-01 21:49:07 +00:00
|
|
|
SCREEN_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;
|
|
|
|
|
int statusbar_lines; /* top+bottom */
|
2000-05-04 10:32:42 +00:00
|
|
|
} MAIN_WINDOW_REC;
|
|
|
|
|
|
|
|
|
|
extern GSList *mainwindows;
|
|
|
|
|
extern MAIN_WINDOW_REC *active_mainwin;
|
|
|
|
|
|
|
|
|
|
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-02-10 07:26:54 +00:00
|
|
|
void mainwindow_set_size(MAIN_WINDOW_REC *window, int size);
|
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-02-10 07:26:54 +00:00
|
|
|
GSList *mainwindows_get_sorted(int reverse);
|
2000-05-04 10:32:42 +00:00
|
|
|
|
|
|
|
|
#endif
|