summaryrefslogtreecommitdiff
path: root/xps/muxps.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-02-01 15:06:55 +0000
committerRobin Watts <robin@ghostscript.com>2012-02-02 00:16:48 +0000
commit4ab5924753d32b5eaeb80138c6626057f61b516f (patch)
treed60def29f688c36ca474c5b06221d58ee82268db /xps/muxps.h
parent16c575d5b9fb0ce4488cac07d2b09ccbcaaf95c9 (diff)
downloadmupdf-4ab5924753d32b5eaeb80138c6626057f61b516f.tar.xz
Work on supporting links in xps documents.
Currently, this only works with local links. When running the page, check for NavigateUri entries; if found, and that page is not already marked as having resolved it's links, add a new link entry to doc->current_page links. When the page finishes running, mark the page as having resolved it's links. This avoids the links being generated multiple times. Update the mupdf viewer to use these links - but only AFTER the page has been run.
Diffstat (limited to 'xps/muxps.h')
-rw-r--r--xps/muxps.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/xps/muxps.h b/xps/muxps.h
index fe0e5de1..2f87edc6 100644
--- a/xps/muxps.h
+++ b/xps/muxps.h
@@ -89,6 +89,8 @@ struct xps_page_s
int width;
int height;
xml_element *root;
+ int links_resolved;
+ fz_link *links;
xps_page *next;
};
@@ -111,7 +113,7 @@ void xps_free_page(xps_document *doc, xps_page *page);
fz_outline *xps_load_outline(xps_document *doc);
int xps_find_link_target(xps_document *doc, char *target_uri);
-
+void xps_add_link(xps_document *doc, fz_rect area, char *base_uri, char *target_uri);
/*
* Images, fonts, and colorspaces.
*/
@@ -245,6 +247,9 @@ struct xps_document_s
/* Current device */
fz_cookie *cookie;
fz_device *dev;
+
+ /* Current page we are loading */
+ xps_page *current_page;
};
xps_document *xps_open_document(fz_context *ctx, char *filename);