1 #ifndef EL__DOCUMENT_VIEW_H
2 #define EL__DOCUMENT_VIEW_H
4 #include "terminal/draw.h"
5 #include "util/lists.h"
17 struct document_view
{
18 LIST_HEAD(struct document_view
);
21 unsigned char **search_word
;
23 struct session
*session
;
24 struct document
*document
;
25 struct view_state
*vs
;
27 /* The elements of this array correspond to the points of the active
28 * link. Each element stores the colour and attributes
29 * that the corresponding point had before the link was selected.
30 * The last element is an exception: it is the template character,
31 * which holds the colour and attributes that the active link was
32 * given upon being selected. */
33 /* XXX: The above is guesswork; please confirm or correct. -- Miciah */
34 struct link_bg
*link_bg
;
36 int link_bg_n
; /* number of elements in link_bg,
37 not including the template */
38 struct box box
; /* pos and size of window */
39 int last_x
, last_y
; /* last pos of window */
44 #define get_current_link(doc_view) \
46 && (doc_view)->vs->current_link >= 0 \
47 && (doc_view)->vs->current_link < (doc_view)->document->nlinks) \
48 ? &(doc_view)->document->links[(doc_view)->vs->current_link] : NULL)