1 #ifndef EL__DOCUMENT_VIEW_H
2 #define EL__DOCUMENT_VIEW_H
4 #include "terminal/draw.h"
5 #include "util/lists.h"
12 struct document_view
{
13 LIST_HEAD(struct document_view
);
16 unsigned char **search_word
;
18 struct session
*session
;
19 struct document
*document
;
20 struct view_state
*vs
;
22 struct box box
; /**< pos and size of window */
23 int last_x
, last_y
; /**< last pos of window */
28 #define get_old_current_link(doc_view) \
30 && (doc_view)->vs->old_current_link >= 0 \
31 && (doc_view)->vs->old_current_link < (doc_view)->document->nlinks) \
32 ? &(doc_view)->document->links[(doc_view)->vs->old_current_link] : NULL)
34 #define get_current_link(doc_view) \
36 && (doc_view)->vs->current_link >= 0 \
37 && (doc_view)->vs->current_link < (doc_view)->document->nlinks) \
38 ? &(doc_view)->document->links[(doc_view)->vs->current_link] : NULL)