2 #ifndef EL__VIEWER_TEXT_LINK_H
3 #define EL__VIEWER_TEXT_LINK_H
5 #include "viewer/action.h"
16 void set_link(struct document_view
*doc_view
);
17 void clear_link(struct terminal
*term
, struct document_view
*doc_view
);
18 void draw_current_link(struct session
*ses
, struct document_view
*doc_view
);
20 void highlight_links_with_prefixes_that_start_with_n(struct terminal
*term
,
21 struct document_view
*doc_view
,
24 void link_menu(struct terminal
*term
, void *, void *ses
);
26 struct link
*get_first_link(struct document_view
*doc_view
);
27 struct link
*get_last_link(struct document_view
*doc_view
);
28 struct link
*get_link_at_coordinates(struct document_view
*doc_view
,
31 unsigned char *get_current_link_title(struct document_view
*doc_view
);
32 unsigned char *get_current_link_info(struct session
*ses
, struct document_view
*doc_view
);
34 void set_pos_x(struct document_view
*doc_view
, struct link
*link
);
35 void set_pos_y(struct document_view
*doc_view
, struct link
*link
);
37 void find_link_up(struct document_view
*doc_view
);
38 void find_link_page_up(struct document_view
*doc_view
);
39 void find_link_down(struct document_view
*doc_view
);
40 void find_link_page_down(struct document_view
*doc_view
);
42 int current_link_is_visible(struct document_view
*doc_view
);
43 int next_link_in_view(struct document_view
*doc_view
, int current
, int direction
);
44 int next_link_in_view_y(struct document_view
*doc_view
, int current
, int direction
);
45 int next_link_in_dir(struct document_view
*doc_view
, int dir_x
, int dir_y
);
47 void jump_to_link_number(struct session
*ses
, struct document_view
*doc_view
, int);
49 struct link
*goto_current_link(struct session
*ses
, struct document_view
*, int);
50 void goto_link_number(struct session
*ses
, unsigned char *num
);
51 void get_link_x_bounds(struct link
*link
, int y
, int *min_x
, int *max_x
);
54 /* Bruteforce compilation fixes */
55 enum frame_event_status
enter(struct session
*ses
, struct document_view
*doc_view
, int do_reload
);
56 enum frame_event_status
try_document_key(struct session
*ses
,
57 struct document_view
*doc_view
,
58 struct term_event
*ev
);
60 struct uri
*get_link_uri(struct session
*ses
, struct document_view
*doc_view
, struct link
*link
);