1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00
elinks/src/ecmascript/ecmascript-c.h

50 lines
1.5 KiB
C
Raw Normal View History

#ifndef EL__ECMASCRIPT_ECMASCRIPT_C_H
#define EL__ECMASCRIPT_ECMASCRIPT_C_H
#include "document/document.h"
2023-11-27 18:14:39 +00:00
#include "ecmascript/libdom/dom.h"
2023-11-25 13:30:05 +00:00
#include "main/module.h"
#ifdef __cplusplus
extern "C" {
#endif
struct document;
struct document_options;
struct document_view;
2023-11-27 17:34:15 +00:00
struct ecmascript_interpreter;
2023-11-28 14:41:48 +00:00
struct form_state;
struct form_view;
2023-11-25 13:13:10 +00:00
struct session;
struct string;
2023-11-27 18:14:39 +00:00
struct term_event;
2023-11-25 16:06:11 +00:00
struct uri;
struct view_state;
2023-11-25 13:13:10 +00:00
int ecmascript_get_interpreter_count(void);
2023-11-27 17:34:15 +00:00
void ecmascript_put_interpreter(struct ecmascript_interpreter *interpreter);
2023-11-25 13:13:10 +00:00
void toggle_ecmascript(struct session *ses);
2023-11-25 16:06:11 +00:00
/* Takes line with the syntax javascript:<ecmascript code>. Activated when user
* follows a link with this synstax. */
void ecmascript_protocol_handler(struct session *ses, struct uri *uri);
void check_for_snippets(struct view_state *vs, struct document_options *options, struct document *document);
void kill_ecmascript_timeouts(struct document *document);
2023-11-25 16:06:11 +00:00
2023-11-27 18:14:39 +00:00
void check_events_for_element(struct ecmascript_interpreter *interpreter, dom_node *element, struct term_event *ev);
void ecmascript_reset_state(struct view_state *vs);
int ecmascript_current_link_evhook(struct document_view *doc_view, enum script_event_hook_type type);
int ecmascript_eval_boolback(struct ecmascript_interpreter *interpreter, struct string *code);
2023-11-27 18:14:39 +00:00
2023-11-28 14:41:48 +00:00
void ecmascript_detach_form_view(struct form_view *fv);
void ecmascript_detach_form_state(struct form_state *fs);
void ecmascript_moved_form_state(struct form_state *fs);
2023-11-25 13:30:05 +00:00
extern struct module ecmascript_module;
#ifdef __cplusplus
}
#endif
#endif