summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-03-20 16:55:55 +0100
committerRobin Watts <robin.watts@artifex.com>2014-03-25 16:44:44 +0000
commit80292f4511278d6ec3c7b3c0cc8d860f1d9bb8c5 (patch)
tree3e4366e31fa24cca79617164408cefb12a28c42c /include
parent95361b7f10880776f0db3030030842d94ba341a9 (diff)
downloadmupdf-80292f4511278d6ec3c7b3c0cc8d860f1d9bb8c5.tar.xz
Break dependencies on pdf-form.c and pdf-js.c
Split functions out of pdf-form.c that shouldn't be there, and make javascript initialization explicit.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/context.h6
-rw-r--r--include/mupdf/pdf/document.h1
-rw-r--r--include/mupdf/pdf/field.h1
-rw-r--r--include/mupdf/pdf/javascript.h8
4 files changed, 6 insertions, 10 deletions
diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h
index c6adbb3f..17eaf704 100644
--- a/include/mupdf/fitz/context.h
+++ b/include/mupdf/fitz/context.h
@@ -400,12 +400,6 @@ char *fz_strdup_no_throw(fz_context *ctx, const char *s);
*/
int fz_gen_id(fz_context *ctx);
-/*
- fz_javascript_supported: test whether a version of mupdf with
- a javascript engine is in use.
-*/
-int fz_javascript_supported(void);
-
struct fz_warn_context_s
{
char message[256];
diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h
index 8c71d88b..0edfff7b 100644
--- a/include/mupdf/pdf/document.h
+++ b/include/mupdf/pdf/document.h
@@ -273,6 +273,7 @@ struct pdf_document_s
pdf_obj *focus_obj;
pdf_js *js;
+ void (*drop_js)(pdf_js *js);
int recalculating;
int dirty;
pdf_unsaved_sig *unsaved_sigs;
diff --git a/include/mupdf/pdf/field.h b/include/mupdf/pdf/field.h
index 246ddc89..966a261a 100644
--- a/include/mupdf/pdf/field.h
+++ b/include/mupdf/pdf/field.h
@@ -18,6 +18,7 @@ enum
Ff_RadioInUnison = 1 << (26-1)
};
+char *pdf_get_string_or_stream(pdf_document *doc, pdf_obj *obj);
pdf_obj *pdf_get_inheritable(pdf_document *doc, pdf_obj *obj, char *key);
int pdf_get_field_flags(pdf_document *doc, pdf_obj *obj);
int pdf_field_type(pdf_document *doc, pdf_obj *field);
diff --git a/include/mupdf/pdf/javascript.h b/include/mupdf/pdf/javascript.h
index 647d74a1..ba8af4d6 100644
--- a/include/mupdf/pdf/javascript.h
+++ b/include/mupdf/pdf/javascript.h
@@ -8,10 +8,10 @@ typedef struct pdf_js_event_s
int rc;
} pdf_js_event;
-int pdf_js_supported(void);
-pdf_js *pdf_new_js(pdf_document *doc);
-void pdf_drop_js(pdf_js *js);
-void pdf_js_load_document_level(pdf_js *js);
+void pdf_enable_js(pdf_document *doc);
+void pdf_disable_js(pdf_document *doc);
+int pdf_js_supported(pdf_document *doc);
+
void pdf_js_setup_event(pdf_js *js, pdf_js_event *e);
pdf_js_event *pdf_js_get_event(pdf_js *js);
void pdf_js_execute(pdf_js *js, char *code);