summaryrefslogtreecommitdiff
path: root/ios/document.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-11-14 18:22:13 +0000
committerRobin Watts <robin.watts@artifex.com>2011-11-15 15:20:54 +0000
commit9c0a49060475b2dea1e4c2668bebd1d566113a7b (patch)
tree49e45a691cf105f4266d5c6b7242a4a3256c1200 /ios/document.h
parent60c0544742931da63db623ad7a79ba3758704cc1 (diff)
parentfd6def85f22b598d4c278e76138ab7dccbb84c36 (diff)
downloadmupdf-9c0a49060475b2dea1e4c2668bebd1d566113a7b.tar.xz
Merge branch 'master' into context
Mostly redoing the xps_context to xps_document change and adding contexts to newly written code. Conflicts: apps/pdfapp.c apps/pdfapp.h apps/x11_main.c apps/xpsdraw.c draw/draw_device.c draw/draw_scale.c fitz/base_object.c fitz/fitz.h pdf/mupdf.h pdf/pdf_interpret.c pdf/pdf_outline.c pdf/pdf_page.c xps/muxps.h xps/xps_doc.c xps/xps_xml.c
Diffstat (limited to 'ios/document.h')
-rw-r--r--ios/document.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/ios/document.h b/ios/document.h
new file mode 100644
index 00000000..1f59ccdd
--- /dev/null
+++ b/ios/document.h
@@ -0,0 +1,32 @@
+#ifndef _DOCUMENT_H_
+#define _DOCUMENT_H_
+
+#ifndef _FITZ_H_
+#error "fitz.h must be included before document.h"
+#endif
+
+#ifndef _MUPDF_H_
+#error "mupdf.h must be included before document.h"
+#endif
+
+#ifndef _MUXPS_H_
+#error "muxps.h must be included before document.h"
+#endif
+
+struct document
+{
+ pdf_xref *pdf;
+ xps_context *xps;
+ int number;
+ pdf_page *pdf_page;
+ xps_page *xps_page;
+};
+
+struct document *open_document(char *filename);
+fz_outline *load_outline(struct document *doc);
+int count_pages(struct document *doc);
+void measure_page(struct document *doc, int number, float *w, float *h);
+void draw_page(struct document *doc, int number, fz_device *dev, fz_matrix ctm);
+void close_document(struct document *doc);
+
+#endif