1 #ifndef EL__TERMINAL_WINDOW_H
2 #define EL__TERMINAL_WINDOW_H
4 #include "util/lists.h"
12 /* Used for things like dialogs. The default type when adding windows
13 * with add_window(). */
17 /* Tabs are a separate session and has separate history, current
18 * document and action-in-progress .. basically a separate browsing
23 typedef void (window_handler_T
)(struct window
*, struct term_event
*);
26 LIST_HEAD(struct window
);
28 enum window_type type
;
30 /* The window event handler */
31 window_handler_T
*handler
;
33 /* For tab windows the session is stored in @data. For normal windows
34 * it can contain dialog data. */
35 /* It is free()'d by delete_window() */
38 /* The terminal (and screen) that hosts the window */
39 struct terminal
*term
;
41 /* Used for tabs focus detection. */
45 /* For delayed tab resizing */
46 unsigned int resize
:1;
49 void redraw_from_window(struct window
*);
50 void redraw_below_window(struct window
*);
51 void add_window(struct terminal
*, window_handler_T
, void *);
52 void delete_window(struct window
*);
53 void delete_window_ev(struct window
*, struct term_event
*ev
);
54 #define set_window_ptr(window, x_, y_) do { (window)->x = (x_); (window)->y = (y_); } while (0)
55 void get_parent_ptr(struct window
*, int *, int *);
57 void add_empty_window(struct terminal
*, void (*)(void *), void *);