2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
#ifndef EL__VIEWER_TEXT_VS_H
|
|
|
|
#define EL__VIEWER_TEXT_VS_H
|
|
|
|
|
|
|
|
#include "util/lists.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
/* Crossdeps are evil. */
|
|
|
|
struct document_view;
|
|
|
|
struct form_state;
|
|
|
|
struct session;
|
|
|
|
struct uri;
|
|
|
|
|
|
|
|
struct view_state {
|
2011-11-13 01:14:01 -05:00
|
|
|
#ifdef CONFIG_SCRIPTING_SPIDERMONKEY
|
|
|
|
struct JSObject *jsobject; /* Instance of view_state_class */
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
struct document_view *doc_view;
|
|
|
|
struct uri *uri;
|
|
|
|
|
2007-07-26 12:04:35 -04:00
|
|
|
LIST_OF(struct form_view) forms;
|
2005-09-15 09:58:31 -04:00
|
|
|
struct form_state *form_info;
|
|
|
|
int form_info_len;
|
|
|
|
|
2007-08-28 02:52:37 -04:00
|
|
|
/** Horizontal scrolling. If @c x is e.g. 2, then the
|
|
|
|
* leftmost two columns of the document have been scrolled out
|
|
|
|
* of sight. @c x should never be negative. */
|
|
|
|
int x;
|
|
|
|
|
|
|
|
/** Vertical scrolling. If @c y is e.g. 1, then the first
|
|
|
|
* line of the document has been scrolled out of sight. @c y
|
|
|
|
* should never be negative. */
|
|
|
|
int y;
|
|
|
|
|
2007-08-29 02:57:18 -04:00
|
|
|
/** The index of the focused link in the document.links array,
|
|
|
|
* or -1 of none. */
|
2005-09-15 09:58:31 -04:00
|
|
|
int current_link;
|
2006-05-27 21:08:46 -04:00
|
|
|
int old_current_link;
|
2018-04-14 15:49:52 -04:00
|
|
|
int current_search_number;
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
int plain;
|
|
|
|
unsigned int wrap:1;
|
|
|
|
unsigned int did_fragment:1;
|
|
|
|
|
|
|
|
#ifdef CONFIG_ECMASCRIPT
|
2007-07-27 07:13:27 -04:00
|
|
|
/** If set, we reset the interpreter state the next time we are going
|
|
|
|
* to render document attached to this view state. This means a real
|
2005-09-15 09:58:31 -04:00
|
|
|
* document (not just struct document_view, which randomly appears and
|
|
|
|
* disappears during gradual rendering) is getting replaced. So set this
|
|
|
|
* always when you replace the view_state URI, but also when reloading
|
|
|
|
* the document. You also cannot reset the document right away because
|
|
|
|
* it might take some time before the first rerendering is done and
|
|
|
|
* until then the old document is still hanging there. */
|
|
|
|
unsigned int ecmascript_fragile:1;
|
|
|
|
struct ecmascript_interpreter *ecmascript;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
void init_vs(struct view_state *, struct uri *uri, int);
|
|
|
|
void destroy_vs(struct view_state *, int blast_ecmascript);
|
|
|
|
|
|
|
|
void copy_vs(struct view_state *, struct view_state *);
|
|
|
|
void check_vs(struct document_view *);
|
|
|
|
|
|
|
|
void next_frame(struct session *, int);
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|