diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-06-13 19:02:12 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-06-14 19:15:53 +0100 |
commit | 836d6a62162e51e7d7925773064c30ef500ded94 (patch) | |
tree | 87fc5e7d94b9ec1ba9538523f1f6c16c3cfa9707 /fitz/fitz.h | |
parent | f5d721764811484be4e98d7cddc5b83ae72e6277 (diff) | |
download | mupdf-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.h')
-rw-r--r-- | fitz/fitz.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h index 60cddf9a..669ab6e4 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -2161,6 +2161,15 @@ fz_link *fz_load_links(fz_document *doc, fz_page *page); fz_rect fz_bound_page(fz_document *doc, fz_page *page); /* + fz_bound_annots: Bound the annotations on a page. + + (Temporary function - do not rely on this remaining in future) + + Does not throw exceptions (unless the callback does). +*/ +void fz_bound_annots(fz_document *doc, fz_page *page, void(*callback)(void *arg, fz_rect *), void *arg); + +/* fz_run_page: Run a page through a device. page: Page obtained from fz_load_page. |