The union of the color and the node_number in the struct screen_char.
[elinks.git] / src / terminal / tab.h
blob1ee1554ba6090c63f1defa7fbbe712e8593d77ea
1 #ifndef EL__TERMINAL_TAB_H
2 #define EL__TERMINAL_TAB_H
4 #include "terminal/terminal.h"
5 #include "terminal/window.h"
7 struct session;
8 struct uri;
10 struct window *
11 init_tab(struct terminal *term, void *data, window_handler_T handler);
13 int tabs_are_on_top(struct terminal *);
14 int number_of_tabs(struct terminal *);
15 int get_tab_number(struct window *);
16 int get_tab_number_by_xpos(struct terminal *term, int xpos);
17 struct window *get_tab_by_number(struct terminal *, int);
18 void switch_to_tab(struct terminal *, int, int);
19 void switch_current_tab(struct session *ses, int direction);
20 void close_tab(struct terminal *, struct session *);
21 void close_all_tabs_but_current(struct session *ses);
23 #define get_current_tab(term) get_tab_by_number((term), (term)->current_tab)
25 #define inactive_tab(win) \
26 ((win)->type != WINDOW_NORMAL && (win) != get_current_tab((win->term)))
28 void open_uri_in_new_tab(struct session *ses, struct uri *uri, int in_background, int based);
29 void delayed_open(void *);
30 void open_current_link_in_new_tab(struct session *ses, int in_background);
32 void move_current_tab(struct session *ses, int direction);
34 #define foreach_tab(tab, terminal) \
35 foreach (tab, terminal) if (tab->type == WINDOW_TAB)
37 #define foreachback_tab(tab, terminal) \
38 foreachback (tab, terminal) if (tab->type == WINDOW_TAB)
40 #endif