summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-04-17 00:40:43 +0100
committerRobin Watts <robin.watts@artifex.com>2012-04-17 09:25:03 +0100
commit4069e52998d2cb2b54e65e8a8b418868ffa73bee (patch)
tree423024feca20fdb07224ecb40c807dbb3fbd4644 /xps
parent00851c1b04215f2e5688836be57e4efdb198483b (diff)
downloadmupdf-4069e52998d2cb2b54e65e8a8b418868ffa73bee.tar.xz
Add Meta interface to fz_document.
Use this to reintroduce "Document Properties..." in mupdf viewer.
Diffstat (limited to 'xps')
-rw-r--r--xps/xps_zip.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c
index 02c302c5..ff43abf2 100644
--- a/xps/xps_zip.c
+++ b/xps/xps_zip.c
@@ -720,6 +720,22 @@ static void xps_free_page_shim(fz_document *doc, fz_page *page)
xps_free_page((xps_document*)doc, (xps_page*)page);
}
+static int xps_meta(fz_document *doc_, int key, void *ptr, int size)
+{
+ xps_document *doc = (xps_document *)doc_;
+
+ doc = doc;
+
+ switch(key)
+ {
+ case FZ_META_FORMAT_INFO:
+ sprintf((char *)ptr, "XPS");
+ return FZ_META_OK;
+ default:
+ return FZ_META_UNKNOWN_KEY;
+ }
+}
+
static void
xps_init_document(xps_document *doc)
{
@@ -733,4 +749,5 @@ xps_init_document(xps_document *doc)
doc->super.bound_page = xps_bound_page_shim;
doc->super.run_page = xps_run_page_shim;
doc->super.free_page = xps_free_page_shim;
+ doc->super.meta = xps_meta;
}