diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-11-10 01:52:40 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-11-10 01:52:40 +0100 |
commit | 97d00440c043b712a2d16134e3b52850c7b36d47 (patch) | |
tree | e7b838f3b7c714037bb238b0c4d17ab4aaa3e0ed /xps/muxps.h | |
parent | c445538b312a45435df87086eed2e19b68ed5bc1 (diff) | |
download | mupdf-97d00440c043b712a2d16134e3b52850c7b36d47.tar.xz |
Add XPS outline parsing and move outline data struct to fz_outline.
Diffstat (limited to 'xps/muxps.h')
-rw-r--r-- | xps/muxps.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xps/muxps.h b/xps/muxps.h index 28603aea..172a8535 100644 --- a/xps/muxps.h +++ b/xps/muxps.h @@ -15,6 +15,8 @@ typedef struct xps_context_s xps_context; #define REL_START_PART \ "http://schemas.microsoft.com/xps/2005/06/fixedrepresentation" +#define REL_DOC_STRUCTURE \ + "http://schemas.microsoft.com/xps/2005/06/documentstructure" #define REL_REQUIRED_RESOURCE \ "http://schemas.microsoft.com/xps/2005/06/required-resource" #define REL_REQUIRED_RESOURCE_RECURSIVE \ @@ -70,22 +72,32 @@ void xps_free_part(xps_context *ctx, xps_part *part); typedef struct xps_document_s xps_document; typedef struct xps_page_s xps_page; +typedef struct xps_target_s xps_target; struct xps_document_s { char *name; + char *outline; xps_document *next; }; struct xps_page_s { char *name; + int number; int width; int height; xml_element *root; xps_page *next; }; +struct xps_target_s +{ + char *name; + int page; + xps_target *next; +}; + int xps_read_page_list(xps_context *ctx); void xps_debug_page_list(xps_context *ctx); void xps_free_page_list(xps_context *ctx); @@ -94,6 +106,10 @@ int xps_count_pages(xps_context *ctx); int xps_load_page(xps_page **page, xps_context *ctx, int number); void xps_free_page(xps_context *ctx, xps_page *page); +fz_outline *xps_load_outline(xps_context *ctx); + +int xps_find_link_target(xps_context *ctx, char *target_uri); + /* * Images, fonts, and colorspaces. */ @@ -206,6 +222,9 @@ struct xps_context_s xps_document *last_fixdoc; /* last fixed document */ xps_page *first_page; /* first page of document */ xps_page *last_page; /* last page of document */ + int page_count; + + xps_target *target; /* link targets */ char *base_uri; /* base uri for parsing XML and resolving relative paths */ char *part_uri; /* part uri for parsing metadata relations */ |