diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-02-12 16:39:06 +0100 |
---|---|---|
committer | Robin Watts <robin@ghostscript.com> | 2012-02-26 19:35:30 +0000 |
commit | ca578b08dc1243dc6cbb3235272d52d9e2336925 (patch) | |
tree | 504aef8a9a8c3c0e1561373d5c2057957d776944 /xps | |
parent | 4420da5546c89849f43016c946525141013610e9 (diff) | |
download | mupdf-ca578b08dc1243dc6cbb3235272d52d9e2336925.tar.xz |
Continued documentation improvements.
More changes still to come.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/muxps.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/xps/muxps.h b/xps/muxps.h index 6037a64e..c90d92ba 100644 --- a/xps/muxps.h +++ b/xps/muxps.h @@ -256,8 +256,40 @@ struct xps_document_s xps_page *current_page; }; +/* + xps_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 xps_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). +*/ xps_document *xps_open_document(fz_context *ctx, char *filename); + +/* + xps_open_document_with_stream: Opens a document. + + Same as xps_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. +*/ xps_document *xps_open_document_with_stream(fz_stream *file); + +/* + xps_close_document: Closes and frees an opened document. + + The resource store in the context associated with xps_document + is emptied. + + Does not throw exceptions. +*/ void xps_close_document(xps_document *doc); /* |