2 #ifndef EL__VIEWER_TEXT_VS_H
3 #define EL__VIEWER_TEXT_VS_H
5 #include "util/lists.h"
7 /* Crossdeps are evil. */
14 struct document_view
*doc_view
;
17 LIST_OF(struct form_view
) forms
;
18 struct form_state
*form_info
;
21 /** Horizontal scrolling. If @c x is e.g. 2, then the
22 * leftmost two columns of the document have been scrolled out
23 * of sight. @c x should never be negative. */
26 /** Vertical scrolling. If @c y is e.g. 1, then the first
27 * line of the document has been scrolled out of sight. @c y
28 * should never be negative. */
31 /** The index of the focused link in the document.links array,
38 unsigned int did_fragment
:1;
40 #ifdef CONFIG_ECMASCRIPT
41 /** If set, we reset the interpreter state the next time we are going
42 * to render document attached to this view state. This means a real
43 * document (not just struct document_view, which randomly appears and
44 * disappears during gradual rendering) is getting replaced. So set this
45 * always when you replace the view_state URI, but also when reloading
46 * the document. You also cannot reset the document right away because
47 * it might take some time before the first rerendering is done and
48 * until then the old document is still hanging there. */
49 unsigned int ecmascript_fragile
:1;
50 struct ecmascript_interpreter
*ecmascript
;
54 void init_vs(struct view_state
*, struct uri
*uri
, int);
55 void destroy_vs(struct view_state
*, int blast_ecmascript
);
57 void copy_vs(struct view_state
*, struct view_state
*);
58 void check_vs(struct document_view
*);
60 void next_frame(struct session
*, int);