diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-06-19 15:29:44 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-06-20 16:45:35 +0200 |
commit | 0a927854a10e1e6b9770a81e2e1d9f3093631757 (patch) | |
tree | 3d65d820d9fdba2d0d394d99c36290c851b78ca0 /platform/winrt/mupdfwinrt/mudocument.h | |
parent | 1ae8f19179c5f0f8c6352b3c7855465325d5449a (diff) | |
download | mupdf-0a927854a10e1e6b9770a81e2e1d9f3093631757.tar.xz |
Rearrange source files.
Diffstat (limited to 'platform/winrt/mupdfwinrt/mudocument.h')
-rw-r--r-- | platform/winrt/mupdfwinrt/mudocument.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/platform/winrt/mupdfwinrt/mudocument.h b/platform/winrt/mupdfwinrt/mudocument.h new file mode 100644 index 00000000..bb4de722 --- /dev/null +++ b/platform/winrt/mupdfwinrt/mudocument.h @@ -0,0 +1,50 @@ +#pragma once + +/* This file contains the interface between the muctx class, which + implements the mupdf calls and the WinRT objects enabling calling from + C#, C++, and JavaScript applications */ + +#include "muctx.h" +#include "Links.h" +#include "ppltasks.h" +#include "ContentItem.h" +#include <winnt.h> +#include <collection.h> + +using namespace Windows::Storage; +using namespace Platform; +using namespace Concurrency; +using namespace Platform::Collections; + +namespace mupdfwinrt +{ + public ref class mudocument sealed + { + private: + muctx mu_object; + std::mutex mutex_lock; + Platform::Collections::Vector<Links^>^ links; + Platform::Collections::Vector<Links^>^ textsearch; + Platform::Collections::Vector<ContentItem^>^ contents; + public: + mudocument(); + void CleanUp(); + Windows::Foundation::IAsyncOperation<int>^ OpenFileAsync(StorageFile^ file); + int GetNumPages(void); + Point GetPageSize(int page_num); + Windows::Foundation::IAsyncOperation<InMemoryRandomAccessStream^>^ + RenderPageAsync(int page_num, int width, int height, bool use_dlist); + Windows::Foundation::IAsyncOperationWithProgress<int, double>^ + SearchDocumentWithProgressAsync(String^ textToFind, int dir, int start_page); + String^ ComputeHTML(int page_num); + int ComputeTextSearch(String^ text, int page_num); + Links^ GetTextSearch(int k); + int TextSearchCount(void); + int ComputeContents(void); + ContentItem^ GetContent(int k); + int ComputeLinks(int page_num); + Links^ GetLink(int k); + bool RequiresPassword(); + bool ApplyPassword(String^ password); + }; +} |