ELinks 0.18.0
link.h File Reference
#include "document/document.h"
#include "viewer/action.h"
Include dependency graph for link.h:
This graph shows which files directly or indirectly include this file:

Functions

int current_link_evhook (struct document_view *doc_view, enum script_event_hook_type type)
 
void set_link (struct document_view *doc_view)
 
void clear_link (struct terminal *term, struct document_view *doc_view)
 Restore the colours and attributes that the active link had before it was selected.
 
void draw_current_link (struct session *ses, struct document_view *doc_view)
 Give the current link the appropriate colour and attributes.
 
void highlight_links_with_prefixes_that_start_with_n (struct terminal *term, struct document_view *doc_view, int n)
 
void link_menu (struct terminal *term, void *, void *ses)
 Open a contextual menu on a link, form or image element.
 
struct linkget_first_link (struct document_view *doc_view)
 
struct linkget_last_link (struct document_view *doc_view)
 
struct linkget_link_at_coordinates (struct document_view *doc_view, int x, int y)
 Get the link at the coordinates x and y, or NULL if none.
 
char * get_current_link_title (struct document_view *doc_view)
 Return current link's title.
 
char * get_current_link_info (struct session *ses, struct document_view *doc_view)
 
void set_pos_x (struct document_view *doc_view, struct link *link)
 
void set_pos_y (struct document_view *doc_view, struct link *link)
 
void find_link_up (struct document_view *doc_view)
 
void find_link_page_up (struct document_view *doc_view)
 
void find_link_down (struct document_view *doc_view)
 
void find_link_page_down (struct document_view *doc_view)
 
int current_link_is_visible (struct document_view *doc_view)
 
int next_link_in_view (struct document_view *doc_view, int current, int direction)
 
int next_link_in_view_y (struct document_view *doc_view, int current, int direction)
 
int next_link_in_dir (struct document_view *doc_view, int dir_x, int dir_y)
 
void jump_to_link_number (struct session *ses, struct document_view *doc_view, int)
 This is backend of the backend goto_link_number_do() below ;)).
 
struct linkgoto_current_link (struct session *ses, struct document_view *, int)
 
struct linkgoto_link (struct session *ses, struct document_view *, struct link *, int)
 
void goto_link_number (struct session *ses, char *num)
 
void goto_link_symbol (struct session *ses, char *sym)
 
void get_link_x_bounds (struct link *link, int y, int *min_x, int *max_x)
 Get the bounding columns of link at line y (or all lines if y == -1).
 
enum frame_event_status enter (struct session *ses, struct document_view *doc_view, int do_reload)
 
enum frame_event_status try_document_key (struct session *ses, struct document_view *doc_view, struct term_event *ev)
 See if this document is interested in the key user pressed.
 
struct uriget_link_uri (struct session *ses, struct document_view *doc_view, struct link *link)
 

Function Documentation

◆ clear_link()

void clear_link ( struct terminal * term,
struct document_view * doc_view )

Restore the colours and attributes that the active link had before it was selected.

◆ current_link_evhook()

int current_link_evhook ( struct document_view * doc_view,
enum script_event_hook_type type )

◆ current_link_is_visible()

int current_link_is_visible ( struct document_view * doc_view)

◆ draw_current_link()

void draw_current_link ( struct session * ses,
struct document_view * doc_view )

Give the current link the appropriate colour and attributes.

◆ enter()

enum frame_event_status enter ( struct session * ses,
struct document_view * doc_view,
int do_reload )

◆ find_link_down()

void find_link_down ( struct document_view * doc_view)

◆ find_link_page_down()

void find_link_page_down ( struct document_view * doc_view)

◆ find_link_page_up()

void find_link_page_up ( struct document_view * doc_view)

◆ find_link_up()

void find_link_up ( struct document_view * doc_view)

◆ get_current_link_info()

char * get_current_link_info ( struct session * ses,
struct document_view * doc_view )
Todo
TODO: Provide info about script event hooks too. –pasky

◆ get_current_link_title()

char * get_current_link_title ( struct document_view * doc_view)

Return current link's title.

◆ get_first_link()

struct link * get_first_link ( struct document_view * doc_view)

◆ get_last_link()

struct link * get_last_link ( struct document_view * doc_view)

◆ get_link_at_coordinates()

struct link * get_link_at_coordinates ( struct document_view * doc_view,
int x,
int y )

Get the link at the coordinates x and y, or NULL if none.

The coordinates are relative to the document view; not to the terminal, nor to the document. So (0, 0) means whatever part of the document has been scrolled to the top left corner of the document view.

◆ get_link_uri()

struct uri * get_link_uri ( struct session * ses,
struct document_view * doc_view,
struct link * link )

◆ get_link_x_bounds()

void get_link_x_bounds ( struct link * link,
int y,
int * min_x,
int * max_x )

Get the bounding columns of link at line y (or all lines if y == -1).

◆ goto_current_link()

struct link * goto_current_link ( struct session * ses,
struct document_view * doc_view,
int do_reload )

◆ goto_link()

struct link * goto_link ( struct session * ses,
struct document_view * doc_view,
struct link * link,
int do_reload )

◆ goto_link_number()

void goto_link_number ( struct session * ses,
char * num )

◆ goto_link_symbol()

void goto_link_symbol ( struct session * ses,
char * sym )

◆ highlight_links_with_prefixes_that_start_with_n()

void highlight_links_with_prefixes_that_start_with_n ( struct terminal * term,
struct document_view * doc_view,
int n )

◆ jump_to_link_number()

void jump_to_link_number ( struct session * ses,
struct document_view * doc_view,
int n )

This is backend of the backend goto_link_number_do() below ;)).

◆ link_menu()

void link_menu ( struct terminal * term,
void * xxx,
void * ses_ )

Open a contextual menu on a link, form or image element.

Todo
TODO: This should be completely configurable.
Todo
TODO: Make it possible to trigger any script event hooks associated to the link. –pasky

◆ next_link_in_dir()

int next_link_in_dir ( struct document_view * doc_view,
int dir_x,
int dir_y )

◆ next_link_in_view()

int next_link_in_view ( struct document_view * doc_view,
int current,
int direction )

◆ next_link_in_view_y()

int next_link_in_view_y ( struct document_view * doc_view,
int current,
int direction )

◆ set_link()

void set_link ( struct document_view * doc_view)

◆ set_pos_x()

void set_pos_x ( struct document_view * doc_view,
struct link * link )

◆ set_pos_y()

void set_pos_y ( struct document_view * doc_view,
struct link * link )

◆ try_document_key()

enum frame_event_status try_document_key ( struct session * ses,
struct document_view * doc_view,
struct term_event * ev )

See if this document is interested in the key user pressed.