|
ELinks 0.19.1
|
#include <stdlib.h>#include <string.h>#include "elinks.h"#include "bfu/listmenu.h"#include "bfu/menu.h"#include "bfu/style.h"#include "dialogs/menu.h"#include "dialogs/status.h"#include "document/document.h"#include "document/forms.h"#include "document/html/iframes.h"#include "document/html/renderer.h"#include "document/options.h"#include "document/view.h"#include "intl/libintl.h"#include "main/object.h"#include "protocol/uri.h"#include "session/session.h"#include "session/task.h"#include "terminal/color.h"#include "terminal/draw.h"#include "terminal/kbd.h"#include "terminal/screen.h"#include "terminal/tab.h"#include "terminal/terminal.h"#include "util/box.h"#include "util/conv.h"#include "util/error.h"#include "util/memory.h"#include "util/string.h"#include "viewer/action.h"#include "viewer/text/form.h"#include "viewer/text/link.h"#include "viewer/text/search.h"#include "viewer/text/textarea.h"#include "viewer/text/view.h"#include "viewer/text/vs.h"
Macros | |
| #define | current_link_hover(dv) |
| #define | current_link_blur(dv) |
Functions | |
| int | current_link_evhook (struct document_view *doc_view, enum script_event_hook_type type) |
| void | set_link (struct document_view *doc_view) |
| static int | get_link_cursor_offset (struct document_view *doc_view, struct link *link) |
| static struct screen_char * | init_link_drawing (struct document_view *doc_view, struct link *link, int invert, int input) |
| Initialise a static template character with the colour and attributes appropriate for an active link and return that character. | |
| void | draw_current_link (struct session *ses, struct document_view *doc_view) |
| Give the current link the appropriate colour and attributes. | |
| static void | draw_link (struct terminal *term, struct document_view *doc_view, struct link *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. | |
| void | highlight_links_with_prefixes_that_start_with_n (struct terminal *term, struct document_view *doc_view, int n) |
| struct link * | get_first_link (struct document_view *doc_view) |
| struct link * | get_last_link (struct document_view *doc_view) |
| static int | link_in_view_x (struct document_view *doc_view, struct link *link) |
| static int | link_in_view_y (struct document_view *doc_view, struct link *link) |
| static int | link_in_view (struct document_view *doc_view, struct link *link) |
| int | current_link_is_visible (struct document_view *doc_view) |
| static void | get_visible_links_range (struct document_view *doc_view, int *first, int *last) |
| Look for the first and the last link currently visible in our viewport. | |
| static int | next_link_in_view_ (struct document_view *doc_view, int current, int direction, int(*fn)(struct document_view *, struct link *), void(*cntr)(struct document_view *, struct link *)) |
| 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) |
| 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). | |
| static int | get_link_x_intersect (struct link *link, int y, int min_x, int max_x) |
| Check whether there is any point between min_x and max_x at the line y in link link. | |
| static int | get_link_y_intersect (struct link *link, int x, int min_y, int max_y) |
| Check whether there is any point between min_y and max_y in the column x in link link. | |
| int | next_link_in_dir (struct document_view *doc_view, int dir_x, int dir_y) |
| void | set_pos_x (struct document_view *doc_view, struct link *link) |
| void | set_pos_y (struct document_view *doc_view, struct link *link) |
| static void | find_link (struct document_view *doc_view, int direction, int page_mode) |
| Focus the next link in the specified direction. | |
| 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) |
| struct uri * | get_link_uri (struct session *ses, struct document_view *doc_view, struct link *link) |
| static int | call_onsubmit_and_submit (struct session *ses, struct document_view *doc_view, struct el_form_control *fc, int do_reload) |
| struct link * | goto_link (struct session *ses, struct document_view *doc_view, struct link *link, int do_reload) |
| struct link * | goto_current_link (struct session *ses, struct document_view *doc_view, int do_reload) |
| static enum frame_event_status | activate_link (struct session *ses, struct document_view *doc_view, struct link *link, int do_reload) |
| enum frame_event_status | enter (struct session *ses, struct document_view *doc_view, int do_reload) |
| 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. | |
| 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 ;)). | |
| static int | compare (const void *a, const void *b) |
| static void | goto_link_number_do (struct session *ses, struct document_view *doc_view, int n) |
| This is common backend for goto_link_number() and try_document_key(). | |
| void | goto_link_number (struct session *ses, char *num) |
| void | goto_link_symbol (struct session *ses, char *sym) |
| 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. | |
| void | link_menu (struct terminal *term, void *xxx, void *ses_) |
| Open a contextual menu on a link, form or image element. | |
| 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) |
| #define current_link_blur | ( | dv | ) |
| #define current_link_hover | ( | dv | ) |
|
static |
|
static |
| 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.
|
static |
| int current_link_evhook | ( | struct document_view * | doc_view, |
| enum script_event_hook_type | type ) |
| int current_link_is_visible | ( | struct document_view * | doc_view | ) |
| void draw_current_link | ( | struct session * | ses, |
| struct document_view * | doc_view ) |
Give the current link the appropriate colour and attributes.
|
static |
| enum frame_event_status enter | ( | struct session * | ses, |
| struct document_view * | doc_view, | ||
| int | do_reload ) |
|
static |
Focus the next link in the specified direction.
direction == 1 -> DOWN; direction == -1 -> UP
| void find_link_down | ( | struct document_view * | doc_view | ) |
| void find_link_page_down | ( | struct document_view * | doc_view | ) |
| void find_link_page_up | ( | struct document_view * | doc_view | ) |
| void find_link_up | ( | struct document_view * | doc_view | ) |
| char * get_current_link_info | ( | struct session * | ses, |
| struct document_view * | doc_view ) |
| char * get_current_link_title | ( | struct document_view * | doc_view | ) |
Return current link's title.
| struct link * get_first_link | ( | struct document_view * | doc_view | ) |
| struct link * get_last_link | ( | struct document_view * | doc_view | ) |
| 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.
|
inlinestatic |
| struct uri * get_link_uri | ( | struct session * | ses, |
| struct document_view * | doc_view, | ||
| struct link * | link ) |
| 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).
|
static |
Check whether there is any point between min_x and max_x at the line y in link link.
|
static |
Check whether there is any point between min_y and max_y in the column x in link link.
|
static |
Look for the first and the last link currently visible in our viewport.
| struct link * goto_current_link | ( | struct session * | ses, |
| struct document_view * | doc_view, | ||
| int | do_reload ) |
| struct link * goto_link | ( | struct session * | ses, |
| struct document_view * | doc_view, | ||
| struct link * | link, | ||
| int | do_reload ) |
| void goto_link_number | ( | struct session * | ses, |
| char * | num ) |
|
static |
This is common backend for goto_link_number() and try_document_key().
| void goto_link_symbol | ( | struct session * | ses, |
| char * | sym ) |
| void highlight_links_with_prefixes_that_start_with_n | ( | struct terminal * | term, |
| struct document_view * | doc_view, | ||
| int | n ) |
|
inlinestatic |
Initialise a static template character with the colour and attributes appropriate for an active link and return that character.
| 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 ;)).
|
static |
|
static |
|
static |
| void link_menu | ( | struct terminal * | term, |
| void * | xxx, | ||
| void * | ses_ ) |
| int next_link_in_dir | ( | struct document_view * | doc_view, |
| int | dir_x, | ||
| int | dir_y ) |
| int next_link_in_view | ( | struct document_view * | doc_view, |
| int | current, | ||
| int | direction ) |
|
static |
| int next_link_in_view_y | ( | struct document_view * | doc_view, |
| int | current, | ||
| int | direction ) |
| void set_link | ( | 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 ) |
| 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.