mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
sideways split support for Irssi
warning: * may be buggy This commit adds support for sideways splits into Irssi. To that regard, there are a number of new commands available the "R" commands: /window new rsplit - make a new sideways split /window rshow - show an existing window to the right /window rgrow/rshrink/rsize/rbalance - manipulate the size of your sideways split windows the "D" commands: /window dup/ddown/dleft/dright - navigate the windows directionally, as an alternative to /window up/down that you can bind to some key /window move dleft/dright - the same for moving Enjoy!
This commit is contained in:
parent
451019d05d
commit
4e71a1f485
18 changed files with 1373 additions and 345 deletions
|
|
@ -5,36 +5,48 @@
|
|||
#include "term.h"
|
||||
|
||||
#define WINDOW_MIN_SIZE 2
|
||||
#define NEW_WINDOW_WIDTH 10
|
||||
|
||||
#define MAIN_WINDOW_TEXT_HEIGHT(window) \
|
||||
((window)->height-(window)->statusbar_lines)
|
||||
|
||||
#define MAIN_WINDOW_TEXT_WIDTH(window) \
|
||||
((window)->width-(window)->statusbar_columns)
|
||||
|
||||
typedef struct {
|
||||
WINDOW_REC *active;
|
||||
|
||||
TERM_WINDOW *screen_win;
|
||||
int sticky_windows; /* number of sticky windows */
|
||||
int sticky_windows; /* number of sticky windows */
|
||||
|
||||
int first_line, last_line; /* first/last line used by this window (0..x) (includes statusbars) */
|
||||
int first_column, last_column; /* first/last column used by this window (0..x) (includes statusbars) */
|
||||
int width, height; /* width/height of the window (includes statusbars) */
|
||||
|
||||
GSList *statusbars;
|
||||
int statusbar_lines_top;
|
||||
int statusbar_lines_bottom;
|
||||
int statusbar_lines_top, statusbar_lines_bottom;
|
||||
int statusbar_lines; /* top+bottom */
|
||||
int statusbar_columns_left, statusbar_columns_right;
|
||||
int statusbar_columns; /* left+right */
|
||||
|
||||
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. */
|
||||
} MAIN_WINDOW_REC;
|
||||
|
||||
typedef struct {
|
||||
char *color;
|
||||
TERM_WINDOW *window;
|
||||
} MAIN_WINDOW_BORDER_REC;
|
||||
|
||||
extern GSList *mainwindows;
|
||||
extern MAIN_WINDOW_REC *active_mainwin;
|
||||
extern MAIN_WINDOW_BORDER_REC *clrtoeol_info;
|
||||
extern int screen_reserved_top, screen_reserved_bottom;
|
||||
|
||||
void mainwindows_init(void);
|
||||
void mainwindows_deinit(void);
|
||||
|
||||
MAIN_WINDOW_REC *mainwindow_create(void);
|
||||
MAIN_WINDOW_REC *mainwindow_create(int);
|
||||
void mainwindow_destroy(MAIN_WINDOW_REC *window);
|
||||
|
||||
void mainwindows_redraw(void);
|
||||
|
|
@ -45,6 +57,7 @@ void mainwindows_recreate(void);
|
|||
to be resized instead of upper window. */
|
||||
void mainwindow_set_size(MAIN_WINDOW_REC *window, int height,
|
||||
int resize_lower);
|
||||
void mainwindow_set_rsize(MAIN_WINDOW_REC *window, int width);
|
||||
void mainwindows_resize(int width, int height);
|
||||
|
||||
void mainwindow_change_active(MAIN_WINDOW_REC *mainwin,
|
||||
|
|
@ -56,5 +69,6 @@ int mainwindow_set_statusbar_lines(MAIN_WINDOW_REC *window,
|
|||
void mainwindows_redraw_dirty(void);
|
||||
|
||||
GSList *mainwindows_get_sorted(int reverse);
|
||||
GSList *mainwindows_get_line(MAIN_WINDOW_REC *rec);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue