summaryrefslogtreecommitdiff
path: root/cbz/mucbz.h
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-02-12 16:39:06 +0100
committerRobin Watts <robin@ghostscript.com>2012-02-26 19:35:30 +0000
commitca578b08dc1243dc6cbb3235272d52d9e2336925 (patch)
tree504aef8a9a8c3c0e1561373d5c2057957d776944 /cbz/mucbz.h
parent4420da5546c89849f43016c946525141013610e9 (diff)
downloadmupdf-ca578b08dc1243dc6cbb3235272d52d9e2336925.tar.xz
Continued documentation improvements.
More changes still to come.
Diffstat (limited to 'cbz/mucbz.h')
-rw-r--r--cbz/mucbz.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/cbz/mucbz.h b/cbz/mucbz.h
index e18a7474..cdda3472 100644
--- a/cbz/mucbz.h
+++ b/cbz/mucbz.h
@@ -8,8 +8,40 @@
typedef struct cbz_document_s cbz_document;
typedef struct cbz_page_s cbz_page;
+/*
+ cbz_open_document: Open a document.
+
+ Open a document for reading so the library is able to locate
+ objects and pages inside the file.
+
+ The returned cbz_document should be used when calling most
+ other functions. Note that it wraps the context, so those
+ functions implicitly get access to the global state in
+ context.
+
+ filename: a path to a file as it would be given to open(2).
+*/
cbz_document *cbz_open_document(fz_context *ctx, char *filename);
+
+/*
+ cbz_open_document_with_stream: Opens a document.
+
+ Same as cbz_open_document, but takes a stream instead of a
+ filename to locate the document to open. Increments the
+ reference count of the stream. See fz_open_file,
+ fz_open_file_w or fz_open_fd for opening a stream, and
+ fz_close for closing an open stream.
+*/
cbz_document *cbz_open_document_with_stream(fz_stream *file);
+
+/*
+ cbz_close_document: Closes and frees an opened document.
+
+ The resource store in the context associated with cbz_document
+ is emptied.
+
+ Does not throw exceptions.
+*/
void cbz_close_document(cbz_document *doc);
int cbz_count_pages(cbz_document *doc);