1 #ifndef EL__TERMINAL_TAB_H
2 #define EL__TERMINAL_TAB_H
4 #include "terminal/terminal.h"
5 #include "terminal/window.h"
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 delayed_open(void *);
29 void open_current_link_in_new_tab(struct session
*ses
, int in_background
);
31 void move_current_tab(struct session
*ses
, int direction
);
33 #define foreach_tab(tab, terminal) \
34 foreach (tab, terminal) if (tab->type == WINDOW_TAB)
36 #define foreachback_tab(tab, terminal) \
37 foreachback (tab, terminal) if (tab->type == WINDOW_TAB)