Remove empty lines in start of header files
[elinks.git] / src / terminal / tab.h
blob2fa38bd569ae9c727cf811fc23031907257b3cb8
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 number_of_tabs(struct terminal *);
14 int get_tab_number(struct window *);
15 int get_tab_number_by_xpos(struct terminal *term, int xpos);
16 struct window *get_tab_by_number(struct terminal *, int);
17 void switch_to_tab(struct terminal *, int, int);
18 void switch_current_tab(struct session *ses, int direction);
19 void close_tab(struct terminal *, struct session *);
20 void close_all_tabs_but_current(struct session *ses);
22 #define get_current_tab(term) get_tab_by_number((term), (term)->current_tab)
24 #define inactive_tab(win) \
25 ((win)->type != WINDOW_NORMAL && (win) != get_current_tab((win->term)))
27 void open_uri_in_new_tab(struct session *ses, struct uri *uri, int in_background, int based);
28 void open_current_link_in_new_tab(struct session *ses, int in_background);
30 void move_current_tab(struct session *ses, int direction);
32 #define foreach_tab(tab, terminal) \
33 foreach (tab, terminal) if (tab->type == WINDOW_TAB)
35 #define foreachback_tab(tab, terminal) \
36 foreachback (tab, terminal) if (tab->type == WINDOW_TAB)
38 #endif