diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2013-06-04 11:55:51 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-06-05 13:16:44 +0100 |
commit | 7934ac9e3da16cdfa3e6ed481acaa3bdbc6dbfed (patch) | |
tree | 1c0702d68024337b477baf2ed4d3aa7cf9dcc5da /winrt/mupdfwinrt/muctx.h | |
parent | 9ea054c75c09165cb9f17fe810a19d0ed55e6d68 (diff) | |
download | mupdf-7934ac9e3da16cdfa3e6ed481acaa3bdbc6dbfed.tar.xz |
Change in doc_document.c to account for oxps type. Also error catching when file fails to open.
Removal of null checks for object freeing in interface to mupdf.
Diffstat (limited to 'winrt/mupdfwinrt/muctx.h')
-rw-r--r-- | winrt/mupdfwinrt/muctx.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/winrt/mupdfwinrt/muctx.h b/winrt/mupdfwinrt/muctx.h index 2175884a..d35718d9 100644 --- a/winrt/mupdfwinrt/muctx.h +++ b/winrt/mupdfwinrt/muctx.h @@ -4,7 +4,6 @@ #include <functional> #include <vector> #include <windows.h> -#include <Winerror.h> #include <mutex> #include "utils.h" @@ -15,6 +14,13 @@ extern "C" { #include "mupdf.h" } +typedef enum { + S_ISOK = 0, + E_FAILURE = 1, + E_OUTOFMEM = 2, + E_NEEDPASSWORD +} status_t; + #define MAX_SEARCH 500 using namespace Platform; /* For String */ @@ -76,7 +82,6 @@ private: fz_document *mu_doc; fz_outline *mu_outline; fz_rect mu_hit_bbox[MAX_SEARCH]; - fz_stream *mu_stream; void FlattenOutline(fz_outline *outline, int level, sh_vector_content contents_vec); @@ -84,10 +89,10 @@ public: muctx(void); ~muctx(void); void CleanUp(void); - HRESULT InitializeStream(IRandomAccessStream^ readStream, char *ext); + status_t InitializeStream(IRandomAccessStream^ readStream, char *ext); int GetPageCount(); - HRESULT InitializeContext(); - HRESULT RenderPage(int page_num, int width, int height, unsigned char *bmp_data); + status_t InitializeContext(); + status_t RenderPage(int page_num, int width, int height, unsigned char *bmp_data); Point MeasurePage(int page_num); Point MeasurePage(fz_page *page); int GetLinks(int page_num, sh_vector_link links_vec); |