summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/outline.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-06-17 22:02:22 +0200
committerTor Andersson <tor.andersson@artifex.com>2013-06-18 17:37:13 +0200
commit19126babc37ac8243de60b3ca388bb5102661274 (patch)
treeedcec3f87b5024b6deb6843ca757bbfda81fe44a /include/mupdf/fitz/outline.h
parentcfc58fef94e63dc5a42979e3a9bf806d104462c5 (diff)
downloadmupdf-19126babc37ac8243de60b3ca388bb5102661274.tar.xz
Split fitz.h into subheaders.
Diffstat (limited to 'include/mupdf/fitz/outline.h')
-rw-r--r--include/mupdf/fitz/outline.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/include/mupdf/fitz/outline.h b/include/mupdf/fitz/outline.h
new file mode 100644
index 00000000..2a5592fc
--- /dev/null
+++ b/include/mupdf/fitz/outline.h
@@ -0,0 +1,61 @@
+#ifndef MUPDF_FITZ_OUTLINE_H
+#define MUPDF_FITZ_OUTLINE_H
+
+/* Outline */
+
+/*
+ fz_outline is a tree of the outline of a document (also known
+ as table of contents).
+
+ title: Title of outline item using UTF-8 encoding. May be NULL
+ if the outline item has no text string.
+
+ dest: Destination in the document to be displayed when this
+ outline item is activated. May be FZ_LINK_NONE if the outline
+ item does not have a destination.
+
+ next: The next outline item at the same level as this outline
+ item. May be NULL if no more outline items exist at this level.
+
+ down: The outline items immediate children in the hierarchy.
+ May be NULL if no children exist.
+*/
+
+typedef struct fz_outline_s fz_outline;
+
+struct fz_outline_s
+{
+ char *title;
+ fz_link_dest dest;
+ fz_outline *next;
+ fz_outline *down;
+};
+
+/*
+ fz_print_outline_xml: Dump the given outlines as (pseudo) XML.
+
+ out: The file handle to output to.
+
+ outline: The outlines to output.
+*/
+void fz_print_outline_xml(fz_context *ctx, fz_output *out, fz_outline *outline);
+
+/*
+ fz_print_outline: Dump the given outlines to as text.
+
+ out: The file handle to output to.
+
+ outline: The outlines to output.
+*/
+void fz_print_outline(fz_context *ctx, fz_output *out, fz_outline *outline);
+
+/*
+ fz_free_outline: Free hierarchical outline.
+
+ Free an outline obtained from fz_load_outline.
+
+ Does not throw exceptions.
+*/
+void fz_free_outline(fz_context *ctx, fz_outline *outline);
+
+#endif