ELinks 0.18.0
tab.h File Reference
#include "terminal/terminal.h"
#include "terminal/window.h"
Include dependency graph for tab.h:
This graph shows which files directly or indirectly include this file:

Macros

#define get_current_tab(term)
#define inactive_tab(win)
#define foreach_tab(tab, terminal)
#define foreachback_tab(tab, terminal)

Functions

struct windowinit_tab (struct terminal *term, void *data, window_handler_T handler)
int tabs_are_on_top (struct terminal *)
 If the topmost window is a tab, return 1; else, return 0.
int number_of_tabs (struct terminal *)
 Number of tabs at the terminal (in term->windows)
int get_tab_number (struct window *)
 Number of tab.
int get_tab_number_by_xpos (struct terminal *term, int xpos)
 Returns number of the tab at xpos, or -1 if none.
struct windowget_tab_by_number (struct terminal *, int)
 Get tab of an according index.
void switch_to_tab (struct terminal *, int, int)
void switch_current_tab (struct session *ses, int direction)
void close_tab (struct terminal *, struct session *)
void close_all_tabs_but_current (struct session *ses)
void open_uri_in_new_tab (struct session *ses, struct uri *uri, int in_background, int based)
void delayed_open (void *)
void open_current_link_in_new_tab (struct session *ses, int in_background)
void move_current_tab (struct session *ses, int direction)

Macro Definition Documentation

◆ foreach_tab

#define foreach_tab ( tab,
terminal )
Value:
foreach (tab, terminal) if (tab->type == WINDOW_TAB)
This is one of the axis of ELinks' user interaction.
Definition terminal.h:70
@ WINDOW_TAB
Tab windows.
Definition window.h:25

◆ foreachback_tab

#define foreachback_tab ( tab,
terminal )
Value:
foreachback (tab, terminal) if (tab->type == WINDOW_TAB)
#define foreachback(e, l)
Definition lists.h:198

◆ get_current_tab

#define get_current_tab ( term)
Value:
get_tab_by_number((term), (term)->current_tab)
struct window * get_tab_by_number(struct terminal *term, int num)
Get tab of an according index.
Definition tab.c:110

◆ inactive_tab

#define inactive_tab ( win)
Value:
((win)->type != WINDOW_NORMAL && (win) != get_current_tab((win->term)))
#define get_current_tab(term)
Definition tab.h:27
@ WINDOW_NORMAL
Normal windows.
Definition window.h:19

Function Documentation

◆ close_all_tabs_but_current()

void close_all_tabs_but_current ( struct session * ses)

◆ close_tab()

void close_tab ( struct terminal * term,
struct session * ses )

◆ delayed_open()

void delayed_open ( void * data)

◆ get_tab_by_number()

struct window * get_tab_by_number ( struct terminal * term,
int num )

Get tab of an according index.

◆ get_tab_number()

int get_tab_number ( struct window * window)

Number of tab.

◆ get_tab_number_by_xpos()

int get_tab_number_by_xpos ( struct terminal * term,
int xpos )

Returns number of the tab at xpos, or -1 if none.

◆ init_tab()

struct window * init_tab ( struct terminal * term,
void * data,
window_handler_T handler )

◆ move_current_tab()

void move_current_tab ( struct session * ses,
int direction )

◆ number_of_tabs()

int number_of_tabs ( struct terminal * term)

Number of tabs at the terminal (in term->windows)

◆ open_current_link_in_new_tab()

void open_current_link_in_new_tab ( struct session * ses,
int in_background )

◆ open_uri_in_new_tab()

void open_uri_in_new_tab ( struct session * ses,
struct uri * uri,
int in_background,
int based )

◆ switch_current_tab()

void switch_current_tab ( struct session * ses,
int direction )

◆ switch_to_tab()

void switch_to_tab ( struct terminal * term,
int tab,
int tabs_count )

If tabs_count > 0, then it is taken as the result of a recent call to number_of_tabs() so it just uses this value.

◆ tabs_are_on_top()

int tabs_are_on_top ( struct terminal * term)

If the topmost window is a tab, return 1; else, return 0.