summaryrefslogtreecommitdiff
path: root/fitz/fitz-internal.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-06-13 19:02:12 +0100
committerRobin Watts <robin.watts@artifex.com>2012-06-14 19:15:53 +0100
commit836d6a62162e51e7d7925773064c30ef500ded94 (patch)
tree87fc5e7d94b9ec1ba9538523f1f6c16c3cfa9707 /fitz/fitz-internal.h
parentf5d721764811484be4e98d7cddc5b83ae72e6277 (diff)
downloadmupdf-836d6a62162e51e7d7925773064c30ef500ded94.tar.xz
Add -j flag to mudraw; create simple mujstest scripts automatically.
We add a new fz_bound_annots function (and associated pdf_bound_annots function) that calls a given callback with the page rectangle of the annotations on a given page. This is marked as being a 'temporary' function, so we can remove it/change it in future if required. It seems likely that we'll want to have some sort of 'iterate over annotations' function eventually, and this does the job for now. Add a -j flag to mudraw that outputs a simple mujstest script. For each page with annotations, the script jumps to that page, then for each annotation on the page, it sets some text to be entered, and clicks the annotation. In the case of text fields, this will cause the text to be entered into that text field; in the case of buttons it will execute the button. At the end of each page with annotations, the script is told to snapshot the page. These test scripts are not designed to be full tests, but they do at least provide an easy way for us to generate scripts where every field in our test suite is interacted with.
Diffstat (limited to 'fitz/fitz-internal.h')
-rw-r--r--fitz/fitz-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h
index 61ccd2a0..0f413893 100644
--- a/fitz/fitz-internal.h
+++ b/fitz/fitz-internal.h
@@ -1112,6 +1112,7 @@ struct fz_document_s
int (*meta)(fz_document *doc, int key, void *ptr, int size);
fz_interactive *(*interact)(fz_document *doc);
void (*write)(fz_document *doc, char *filename, fz_write_options *opts);
+ void (*bound_annots)(fz_document *doc, fz_page *page, void (*callback)(void *arg, fz_rect *), void *arg);
};
#endif