From 7ea99e3a8951e265d1437a77dcfee069de0edf76 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Tue, 9 Sep 2014 16:31:31 -0700 Subject: Rename of winrt to windows due to presence on gsview in this folder. The contents of this folder will contain both winrt and gsview projects which are shared in a common visual studio 2013 solution. --- platform/winrt/README.txt | 39 - platform/winrt/generate.bat | 39 - platform/winrt/generated.vcxproj | 160 - platform/winrt/generated.vcxproj.filters | 60 - platform/winrt/gsview/About.xaml | 96 - platform/winrt/gsview/About.xaml.cs | 255 - platform/winrt/gsview/App.config | 6 - platform/winrt/gsview/App.xaml | 7 - platform/winrt/gsview/App.xaml.cs | 16 - platform/winrt/gsview/ContentEntry.cs | 29 - platform/winrt/gsview/ContentItem.cs | 42 - platform/winrt/gsview/Convert.xaml | 120 - platform/winrt/gsview/Convert.xaml.cs | 214 - platform/winrt/gsview/DocPage.cs | 281 -- platform/winrt/gsview/Info.xaml | 11 - platform/winrt/gsview/Info.xaml.cs | 31 - platform/winrt/gsview/Install32/Install32.vdproj | 1225 ----- platform/winrt/gsview/Install64/Install64.vdproj | 1238 ----- platform/winrt/gsview/Links.cs | 31 - platform/winrt/gsview/MainWindow.xaml | 794 ---- platform/winrt/gsview/MainWindow.xaml.cs | 4906 -------------------- platform/winrt/gsview/OutputIntent.xaml | 50 - platform/winrt/gsview/OutputIntent.xaml.cs | 105 - platform/winrt/gsview/PageExtractSave.xaml | 59 - platform/winrt/gsview/PageExtractSave.xaml.cs | 213 - platform/winrt/gsview/Password.xaml | 15 - platform/winrt/gsview/Password.xaml.cs | 35 - platform/winrt/gsview/Properties/AssemblyInfo.cs | 55 - .../winrt/gsview/Properties/Resources.Designer.cs | 153 - platform/winrt/gsview/Properties/Resources.resx | 148 - .../winrt/gsview/Properties/Settings.Designer.cs | 26 - platform/winrt/gsview/Properties/Settings.settings | 7 - platform/winrt/gsview/Properties/pdfa_def.ps | 40 - platform/winrt/gsview/Properties/pdfx_def.ps | 48 - platform/winrt/gsview/README.txt | 8 - platform/winrt/gsview/RectList.cs | 99 - platform/winrt/gsview/Resources/ActualSize48.png | Bin 4830 -> 0 bytes platform/winrt/gsview/Resources/Close.ico | Bin 29926 -> 0 bytes .../winrt/gsview/Resources/ContScrollFill48.png | Bin 4269 -> 0 bytes platform/winrt/gsview/Resources/ExpandFill48.png | Bin 4753 -> 0 bytes platform/winrt/gsview/Resources/FloppyDisk.ico | Bin 304054 -> 0 bytes platform/winrt/gsview/Resources/Left.ico | Bin 29926 -> 0 bytes platform/winrt/gsview/Resources/Message.png | Bin 232 -> 0 bytes platform/winrt/gsview/Resources/OpenFile.png | Bin 3157 -> 0 bytes platform/winrt/gsview/Resources/Right.ico | Bin 29926 -> 0 bytes platform/winrt/gsview/Resources/banner.png | Bin 12172 -> 0 bytes platform/winrt/gsview/Resources/contents.ico | Bin 4286 -> 0 bytes platform/winrt/gsview/Resources/copy.ico | Bin 37611 -> 0 bytes platform/winrt/gsview/Resources/folder_open.ico | Bin 53411 -> 0 bytes platform/winrt/gsview/Resources/gsview_app.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/hyperlink.png | Bin 3531 -> 0 bytes platform/winrt/gsview/Resources/info.png | Bin 4639 -> 0 bytes platform/winrt/gsview/Resources/pageCBZ.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pageEPS.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pageJPG.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pageOXPS.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pagePDF.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pagePNG.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pagePS.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/pageXPS.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/Resources/printer.ico | Bin 55326 -> 0 bytes platform/winrt/gsview/Resources/saveHS.png | Bin 595 -> 0 bytes platform/winrt/gsview/Resources/search.ico | Bin 67646 -> 0 bytes platform/winrt/gsview/Resources/search.png | Bin 3491 -> 0 bytes platform/winrt/gsview/Resources/thumbnail.ico | Bin 1150 -> 0 bytes platform/winrt/gsview/Resources/zoom_in.ico | Bin 67646 -> 0 bytes platform/winrt/gsview/Resources/zoom_out.ico | Bin 67646 -> 0 bytes platform/winrt/gsview/Selection.xaml | 49 - platform/winrt/gsview/Selection.xaml.cs | 235 - .../gsview/Strings/en-US/Messages.Designer.cs | 63 - platform/winrt/gsview/Strings/en-US/Messages.resx | 101 - platform/winrt/gsview/TextBlock.cs | 121 - platform/winrt/gsview/TextCharacter.cs | 79 - platform/winrt/gsview/TextLine.cs | 121 - platform/winrt/gsview/ghostsharp.cs | 1165 ----- platform/winrt/gsview/gsIO.cs | 32 - platform/winrt/gsview/gsOutput.xaml | 51 - platform/winrt/gsview/gsOutput.xaml.cs | 60 - platform/winrt/gsview/gsprint.cs | 167 - platform/winrt/gsview/gsprintbg.cs | 261 -- platform/winrt/gsview/gsview.csproj | 281 -- .../winrt/gsview/gsview.visualelementsmanifest.xml | 7 - platform/winrt/gsview/gsview_app.ico | Bin 370070 -> 0 bytes platform/winrt/gsview/mudocument.cs | 1747 ------- platform/winrt/libmupdf-nov8_winRT.vcxproj | 299 -- platform/winrt/libmupdf-nov8_winRT.vcxproj.filters | 6 - platform/winrt/libmupdf/libmupdf.vcxproj | 360 -- platform/winrt/libmupdf/libmupdf.vcxproj.filters | 639 --- platform/winrt/libmupdf_winRT.vcxproj | 511 -- platform/winrt/libmupdf_winRT.vcxproj.filters | 642 --- platform/winrt/libthirdparty/libthirdparty.vcxproj | 418 -- .../libthirdparty/libthirdparty.vcxproj.filters | 825 ---- platform/winrt/libthirdparty_winRT.vcxproj | 571 --- platform/winrt/libthirdparty_winRT.vcxproj.filters | 825 ---- platform/winrt/mupdf.sln | 762 --- platform/winrt/mupdf_cpp/App.xaml | 20 - platform/winrt/mupdf_cpp/App.xaml.cpp | 131 - platform/winrt/mupdf_cpp/App.xaml.h | 24 - platform/winrt/mupdf_cpp/Assets/Logo.Scale-100.png | Bin 14183 -> 0 bytes platform/winrt/mupdf_cpp/Assets/Logo.Scale-140.png | Bin 19150 -> 0 bytes platform/winrt/mupdf_cpp/Assets/Logo.Scale-180.png | Bin 24211 -> 0 bytes platform/winrt/mupdf_cpp/Assets/Logo.Scale-80.png | Bin 11656 -> 0 bytes .../winrt/mupdf_cpp/Assets/StoreLogo.scale-100.png | Bin 5816 -> 0 bytes .../winrt/mupdf_cpp/Assets/StoreLogo.scale-140.png | Bin 7512 -> 0 bytes .../winrt/mupdf_cpp/Assets/StoreLogo.scale-180.png | Bin 9262 -> 0 bytes .../winrt/mupdf_cpp/Assets/WideLogo.scale-100.png | Bin 30014 -> 0 bytes .../winrt/mupdf_cpp/Assets/WideLogo.scale-140.png | Bin 51342 -> 0 bytes .../winrt/mupdf_cpp/Assets/WideLogo.scale-180.png | Bin 68929 -> 0 bytes .../winrt/mupdf_cpp/Assets/WideLogo.scale-80.png | Bin 22486 -> 0 bytes platform/winrt/mupdf_cpp/Assets/mupdf_smallogo.png | Bin 4299 -> 0 bytes platform/winrt/mupdf_cpp/Assets/mupdf_splash.png | Bin 28390 -> 0 bytes .../winrt/mupdf_cpp/Common/StandardStyles.xaml | 1889 -------- platform/winrt/mupdf_cpp/DocumentPage.cpp | 15 - platform/winrt/mupdf_cpp/DocumentPage.h | 231 - platform/winrt/mupdf_cpp/MainPage.xaml | 299 -- platform/winrt/mupdf_cpp/MainPage.xaml.cpp | 2394 ---------- platform/winrt/mupdf_cpp/MainPage.xaml.h | 319 -- .../winrt/mupdf_cpp/Package.StoreAssociation.xml | 375 -- platform/winrt/mupdf_cpp/Package.appxmanifest | 41 - platform/winrt/mupdf_cpp/PrintPage.cpp | 165 - platform/winrt/mupdf_cpp/PrintPage.h | 57 - platform/winrt/mupdf_cpp/RectList.cpp | 9 - platform/winrt/mupdf_cpp/RectList.h | 153 - platform/winrt/mupdf_cpp/mupdf_cpp.rc | Bin 2664 -> 0 bytes platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj | 280 -- platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj.filters | 75 - platform/winrt/mupdf_cpp/pch.cpp | 6 - platform/winrt/mupdf_cpp/pch.h | 18 - platform/winrt/mupdfnet/mupdfnet.cpp | 471 -- platform/winrt/mupdfnet/mupdfnet.h | 77 - platform/winrt/mupdfnet/mupdfnet.vcxproj | 221 - platform/winrt/mupdfnet/mupdfnet.vcxproj.filters | 42 - platform/winrt/mupdfwinrt/Cache.cpp | 120 - platform/winrt/mupdfwinrt/Cache.h | 38 - platform/winrt/mupdfwinrt/ContentItem.cpp | 11 - platform/winrt/mupdfwinrt/ContentItem.h | 58 - platform/winrt/mupdfwinrt/Links.cpp | 12 - platform/winrt/mupdfwinrt/Links.h | 88 - platform/winrt/mupdfwinrt/muctx.cpp | 895 ---- platform/winrt/mupdfwinrt/muctx.h | 123 - platform/winrt/mupdfwinrt/mudocument.cpp | 470 -- platform/winrt/mupdfwinrt/mudocument.h | 55 - platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj | 249 - .../winrt/mupdfwinrt/mupdfwinrt.vcxproj.filters | 27 - platform/winrt/mupdfwinrt/pch.cpp | 6 - platform/winrt/mupdfwinrt/pch.h | 6 - platform/winrt/mupdfwinrt/status.h | 19 - platform/winrt/mupdfwinrt/utils.cpp | 28 - platform/winrt/mupdfwinrt/utils.h | 7 - 149 files changed, 30583 deletions(-) delete mode 100644 platform/winrt/README.txt delete mode 100644 platform/winrt/generate.bat delete mode 100644 platform/winrt/generated.vcxproj delete mode 100644 platform/winrt/generated.vcxproj.filters delete mode 100644 platform/winrt/gsview/About.xaml delete mode 100644 platform/winrt/gsview/About.xaml.cs delete mode 100644 platform/winrt/gsview/App.config delete mode 100644 platform/winrt/gsview/App.xaml delete mode 100644 platform/winrt/gsview/App.xaml.cs delete mode 100644 platform/winrt/gsview/ContentEntry.cs delete mode 100644 platform/winrt/gsview/ContentItem.cs delete mode 100644 platform/winrt/gsview/Convert.xaml delete mode 100644 platform/winrt/gsview/Convert.xaml.cs delete mode 100644 platform/winrt/gsview/DocPage.cs delete mode 100644 platform/winrt/gsview/Info.xaml delete mode 100644 platform/winrt/gsview/Info.xaml.cs delete mode 100644 platform/winrt/gsview/Install32/Install32.vdproj delete mode 100644 platform/winrt/gsview/Install64/Install64.vdproj delete mode 100644 platform/winrt/gsview/Links.cs delete mode 100644 platform/winrt/gsview/MainWindow.xaml delete mode 100644 platform/winrt/gsview/MainWindow.xaml.cs delete mode 100644 platform/winrt/gsview/OutputIntent.xaml delete mode 100644 platform/winrt/gsview/OutputIntent.xaml.cs delete mode 100644 platform/winrt/gsview/PageExtractSave.xaml delete mode 100644 platform/winrt/gsview/PageExtractSave.xaml.cs delete mode 100644 platform/winrt/gsview/Password.xaml delete mode 100644 platform/winrt/gsview/Password.xaml.cs delete mode 100644 platform/winrt/gsview/Properties/AssemblyInfo.cs delete mode 100644 platform/winrt/gsview/Properties/Resources.Designer.cs delete mode 100644 platform/winrt/gsview/Properties/Resources.resx delete mode 100644 platform/winrt/gsview/Properties/Settings.Designer.cs delete mode 100644 platform/winrt/gsview/Properties/Settings.settings delete mode 100644 platform/winrt/gsview/Properties/pdfa_def.ps delete mode 100644 platform/winrt/gsview/Properties/pdfx_def.ps delete mode 100644 platform/winrt/gsview/README.txt delete mode 100644 platform/winrt/gsview/RectList.cs delete mode 100644 platform/winrt/gsview/Resources/ActualSize48.png delete mode 100644 platform/winrt/gsview/Resources/Close.ico delete mode 100644 platform/winrt/gsview/Resources/ContScrollFill48.png delete mode 100644 platform/winrt/gsview/Resources/ExpandFill48.png delete mode 100644 platform/winrt/gsview/Resources/FloppyDisk.ico delete mode 100644 platform/winrt/gsview/Resources/Left.ico delete mode 100644 platform/winrt/gsview/Resources/Message.png delete mode 100644 platform/winrt/gsview/Resources/OpenFile.png delete mode 100644 platform/winrt/gsview/Resources/Right.ico delete mode 100644 platform/winrt/gsview/Resources/banner.png delete mode 100644 platform/winrt/gsview/Resources/contents.ico delete mode 100644 platform/winrt/gsview/Resources/copy.ico delete mode 100644 platform/winrt/gsview/Resources/folder_open.ico delete mode 100644 platform/winrt/gsview/Resources/gsview_app.ico delete mode 100644 platform/winrt/gsview/Resources/hyperlink.png delete mode 100644 platform/winrt/gsview/Resources/info.png delete mode 100644 platform/winrt/gsview/Resources/pageCBZ.ico delete mode 100644 platform/winrt/gsview/Resources/pageEPS.ico delete mode 100644 platform/winrt/gsview/Resources/pageJPG.ico delete mode 100644 platform/winrt/gsview/Resources/pageOXPS.ico delete mode 100644 platform/winrt/gsview/Resources/pagePDF.ico delete mode 100644 platform/winrt/gsview/Resources/pagePNG.ico delete mode 100644 platform/winrt/gsview/Resources/pagePS.ico delete mode 100644 platform/winrt/gsview/Resources/pageXPS.ico delete mode 100644 platform/winrt/gsview/Resources/printer.ico delete mode 100644 platform/winrt/gsview/Resources/saveHS.png delete mode 100644 platform/winrt/gsview/Resources/search.ico delete mode 100644 platform/winrt/gsview/Resources/search.png delete mode 100644 platform/winrt/gsview/Resources/thumbnail.ico delete mode 100644 platform/winrt/gsview/Resources/zoom_in.ico delete mode 100644 platform/winrt/gsview/Resources/zoom_out.ico delete mode 100644 platform/winrt/gsview/Selection.xaml delete mode 100644 platform/winrt/gsview/Selection.xaml.cs delete mode 100644 platform/winrt/gsview/Strings/en-US/Messages.Designer.cs delete mode 100644 platform/winrt/gsview/Strings/en-US/Messages.resx delete mode 100644 platform/winrt/gsview/TextBlock.cs delete mode 100644 platform/winrt/gsview/TextCharacter.cs delete mode 100644 platform/winrt/gsview/TextLine.cs delete mode 100644 platform/winrt/gsview/ghostsharp.cs delete mode 100644 platform/winrt/gsview/gsIO.cs delete mode 100644 platform/winrt/gsview/gsOutput.xaml delete mode 100644 platform/winrt/gsview/gsOutput.xaml.cs delete mode 100644 platform/winrt/gsview/gsprint.cs delete mode 100644 platform/winrt/gsview/gsprintbg.cs delete mode 100644 platform/winrt/gsview/gsview.csproj delete mode 100644 platform/winrt/gsview/gsview.visualelementsmanifest.xml delete mode 100644 platform/winrt/gsview/gsview_app.ico delete mode 100644 platform/winrt/gsview/mudocument.cs delete mode 100644 platform/winrt/libmupdf-nov8_winRT.vcxproj delete mode 100644 platform/winrt/libmupdf-nov8_winRT.vcxproj.filters delete mode 100644 platform/winrt/libmupdf/libmupdf.vcxproj delete mode 100644 platform/winrt/libmupdf/libmupdf.vcxproj.filters delete mode 100644 platform/winrt/libmupdf_winRT.vcxproj delete mode 100644 platform/winrt/libmupdf_winRT.vcxproj.filters delete mode 100644 platform/winrt/libthirdparty/libthirdparty.vcxproj delete mode 100644 platform/winrt/libthirdparty/libthirdparty.vcxproj.filters delete mode 100644 platform/winrt/libthirdparty_winRT.vcxproj delete mode 100644 platform/winrt/libthirdparty_winRT.vcxproj.filters delete mode 100644 platform/winrt/mupdf.sln delete mode 100644 platform/winrt/mupdf_cpp/App.xaml delete mode 100644 platform/winrt/mupdf_cpp/App.xaml.cpp delete mode 100644 platform/winrt/mupdf_cpp/App.xaml.h delete mode 100644 platform/winrt/mupdf_cpp/Assets/Logo.Scale-100.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/Logo.Scale-140.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/Logo.Scale-180.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/Logo.Scale-80.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-100.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-140.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-180.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/WideLogo.scale-100.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/WideLogo.scale-140.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/WideLogo.scale-180.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/WideLogo.scale-80.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/mupdf_smallogo.png delete mode 100644 platform/winrt/mupdf_cpp/Assets/mupdf_splash.png delete mode 100644 platform/winrt/mupdf_cpp/Common/StandardStyles.xaml delete mode 100644 platform/winrt/mupdf_cpp/DocumentPage.cpp delete mode 100644 platform/winrt/mupdf_cpp/DocumentPage.h delete mode 100644 platform/winrt/mupdf_cpp/MainPage.xaml delete mode 100644 platform/winrt/mupdf_cpp/MainPage.xaml.cpp delete mode 100644 platform/winrt/mupdf_cpp/MainPage.xaml.h delete mode 100644 platform/winrt/mupdf_cpp/Package.StoreAssociation.xml delete mode 100644 platform/winrt/mupdf_cpp/Package.appxmanifest delete mode 100644 platform/winrt/mupdf_cpp/PrintPage.cpp delete mode 100644 platform/winrt/mupdf_cpp/PrintPage.h delete mode 100644 platform/winrt/mupdf_cpp/RectList.cpp delete mode 100644 platform/winrt/mupdf_cpp/RectList.h delete mode 100644 platform/winrt/mupdf_cpp/mupdf_cpp.rc delete mode 100644 platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj delete mode 100644 platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj.filters delete mode 100644 platform/winrt/mupdf_cpp/pch.cpp delete mode 100644 platform/winrt/mupdf_cpp/pch.h delete mode 100644 platform/winrt/mupdfnet/mupdfnet.cpp delete mode 100644 platform/winrt/mupdfnet/mupdfnet.h delete mode 100644 platform/winrt/mupdfnet/mupdfnet.vcxproj delete mode 100644 platform/winrt/mupdfnet/mupdfnet.vcxproj.filters delete mode 100644 platform/winrt/mupdfwinrt/Cache.cpp delete mode 100644 platform/winrt/mupdfwinrt/Cache.h delete mode 100644 platform/winrt/mupdfwinrt/ContentItem.cpp delete mode 100644 platform/winrt/mupdfwinrt/ContentItem.h delete mode 100644 platform/winrt/mupdfwinrt/Links.cpp delete mode 100644 platform/winrt/mupdfwinrt/Links.h delete mode 100644 platform/winrt/mupdfwinrt/muctx.cpp delete mode 100644 platform/winrt/mupdfwinrt/muctx.h delete mode 100644 platform/winrt/mupdfwinrt/mudocument.cpp delete mode 100644 platform/winrt/mupdfwinrt/mudocument.h delete mode 100644 platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj delete mode 100644 platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj.filters delete mode 100644 platform/winrt/mupdfwinrt/pch.cpp delete mode 100644 platform/winrt/mupdfwinrt/pch.h delete mode 100644 platform/winrt/mupdfwinrt/status.h delete mode 100644 platform/winrt/mupdfwinrt/utils.cpp delete mode 100644 platform/winrt/mupdfwinrt/utils.h (limited to 'platform/winrt') diff --git a/platform/winrt/README.txt b/platform/winrt/README.txt deleted file mode 100644 index 4beaefbf..00000000 --- a/platform/winrt/README.txt +++ /dev/null @@ -1,39 +0,0 @@ -This MSVC project needs the thirdparty sources to be in place. - -mupdf_cpp: - -This is the c++ viewer code, which creates and handles the UI. - -mupdfwinrt: - -This defines the WinRT interface to mupdf. -There are two primary classes, mudocument and muctx. -The viewer code should create a -mudocument type and make use of the methods in -this winRT class. The mupdocument class is a winRT -class and the methods should be callable from -C++, C#, Javascript etc. - -The muctx class interfaces to the mupdf API calls -and pretty much uses standard c++ methods with -the exception of the Windows types String and Point. - -mupdfwinrt lib is linked statically to the viewer -code, but this could be set up as a DLL if desired. - -The libraries generated, libmupdf_winRT, libmupdf-nov8_winRT -and libthridparty_winRT are essentially the same as those -in the win32 project, however they are needed here for -building with VS 2012 ARM target. - -Current Issues: - -Space/Tab needs to be reworked in files - -State needs to be saved during suspension - -Still needs additional error checking - -Needs progress bar during text search - -Help info needs to be populated diff --git a/platform/winrt/generate.bat b/platform/winrt/generate.bat deleted file mode 100644 index 934dec4b..00000000 --- a/platform/winrt/generate.bat +++ /dev/null @@ -1,39 +0,0 @@ -@echo off - -if not exist scripts/fontdump.c cd ../.. -if not exist scripts/fontdump.c goto usage -if not exist generated mkdir generated - -cl /nologo -Iinclude scripts/fontdump.c setargv.obj -cl /nologo -Iinclude scripts/cmapdump.c setargv.obj -cl /nologo -Iinclude scripts/cquote.c setargv.obj -cl /nologo -Iinclude scripts/bin2hex.c setargv.obj - -if not exist fontdump.exe goto usage -if not exist cmapdump.exe goto usage -if not exist cquote.exe goto usage -if not exist bin2hex.exe goto usage - -if not exist generated/gen_font_base14.h fontdump.exe generated/gen_font_base14.h resources/fonts/urw/*.cff -if not exist generated/gen_font_droid.h fontdump.exe generated/gen_font_droid.h resources/fonts/droid/DroidSans.ttf resources/fonts/droid/DroidSansMono.ttf -if not exist generated/gen_font_cjk.h fontdump.exe generated/gen_font_cjk.h resources/fonts/droid/DroidSansFallback.ttc -if not exist generated/gen_font_cjk_full.h fontdump.exe generated/gen_font_cjk_full.h resources/fonts/droid/DroidSansFallbackFull.ttc - -if not exist generated/gen_cmap_cns.h cmapdump.exe generated/gen_cmap_cns.h resources\cmaps\cns\* -if not exist generated/gen_cmap_gb.h cmapdump.exe generated/gen_cmap_gb.h resources\cmaps\gb\* -if not exist generated/gen_cmap_japan.h cmapdump.exe generated/gen_cmap_japan.h resources\cmaps\japan\* -if not exist generated/gen_cmap_korea.h cmapdump.exe generated/gen_cmap_korea.h resources\cmaps\korea\* - -if not exist generated/gen_adobe_ca.h bin2hex.exe generated/gen_adobe_ca.h resources/certs/AdobeCA.p7c -if not exist generated/gen_js_util.h cquote.exe generated/gen_js_util.h source/pdf/js/pdf-util.js - -del cmapdump.obj fontdump.obj cquote.obj bin2hex.obj cmapdump.exe fontdump.exe cquote.exe bin2hex.exe - -goto fin - -:usage -echo ERROR: Run this script in the mupdf directory. -echo ERROR: Run this script in a Visual Studio command prompt. -pause - -:fin diff --git a/platform/winrt/generated.vcxproj b/platform/winrt/generated.vcxproj deleted file mode 100644 index 77127696..00000000 --- a/platform/winrt/generated.vcxproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Memento - ARM - - - Memento - Win32 - - - Release - ARM - - - Release - Win32 - - - - {A5053AA7-02E5-4903-B596-04F17AEB1526} - MakeFileProj - - - - Makefile - v110 - - - Makefile - v110 - - - Makefile - v110 - - - Makefile - v110 - - - Makefile - v110 - - - Makefile - v110 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.51106.1 - - - $(Configuration)\ - $(Configuration)\ - generate.bat - del /q ..\..\generated && generate.bat - del /q ..\..\generated - - - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - - - generate.bat - del /q ..\generated && generate.bat - del /q ..\generated - - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - - - $(Configuration)\ - $(Configuration)\ - generate.bat - del /q ..\..\generated && generate.bat - del /q ..\..\generated - - - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - - - generate.bat - del /q ..\generated && generate.bat - del /q ..\generated - generated\cmap_cns.h - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - - - $(Configuration)\ - $(Configuration)\ - generate.bat - del /q ..\..\generated && generate.bat - del /q ..\..\generated - - - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - - - generate.bat - del /q ..\generated && generate.bat - del /q ..\generated - generated\cmap_cns.h - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform/winrt/generated.vcxproj.filters b/platform/winrt/generated.vcxproj.filters deleted file mode 100644 index 94e3a8e0..00000000 --- a/platform/winrt/generated.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {336f64c0-6502-4d6d-91bd-4b52ff0e5be6} - - - {d381092b-b798-4bb4-851b-9d85f2072427} - - - - - scripts - - - scripts - - - scripts - - - scripts - - - - - generated - - - generated - - - generated - - - generated - - - generated - - - generated - - - generated - - - generated - - - generated - - - generated - - - - - - \ No newline at end of file diff --git a/platform/winrt/gsview/About.xaml b/platform/winrt/gsview/About.xaml deleted file mode 100644 index 13b3b142..00000000 --- a/platform/winrt/gsview/About.xaml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - More Info - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/gsview/Convert.xaml.cs b/platform/winrt/gsview/Convert.xaml.cs deleted file mode 100644 index c2c3ec65..00000000 --- a/platform/winrt/gsview/Convert.xaml.cs +++ /dev/null @@ -1,214 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Collections.ObjectModel; -using System.Text.RegularExpressions; - -namespace gsview -{ - public class Device : INotifyPropertyChanged - { - public String DeviceName - { - get; - internal set; - } - - public gsDevice_t DeviceType - { - get; - internal set; - } - - public bool SupportsMultiPage - { - get; - internal set; - } - - public bool MuPDFDevice - { - get; - internal set; - } - - public event PropertyChangedEventHandler PropertyChanged; - - public void PageRefresh() - { - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("DeviceName")); - } - } - - public Device() - { - this.DeviceName = ""; - } - }; - - public class SelectPage : INotifyPropertyChanged - { - public int Page - { - get; - internal set; - } - - public int PageString - { - get; - internal set; - } - - public event PropertyChangedEventHandler PropertyChanged; - - public void PageRefresh() - { - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("Page")); - PropertyChanged(this, new PropertyChangedEventArgs("PageString")); - } - } - }; - - /// - /// Interaction logic for Convert.xaml - /// - public partial class Convert : Window - { - List GSDevices; - List ConvertPages; - - /* Callback to Main */ - internal delegate void ConvertCallBackMain(object gsObject); - internal event ConvertCallBackMain ConvertUpdateMain; - - public Convert(int num_pages) - { - InitializeComponent(); - GSDevices = new List(); - ConvertPages = new List(); - SetDeviceList(); - SetPageList(num_pages); - xaml_DeviceList.ItemsSource = GSDevices; - xaml_PageList.ItemsSource = ConvertPages; - } - - public void SetDeviceList() - { - foreach (gsDevice_t device in Enum.GetValues(typeof(gsDevice_t))) - { - Device device_t = new Device(); - device_t.DeviceName = Enum.GetName(typeof(gsDevice_t), device); - device_t.DeviceType = device; - if (device > gsDevice_t.psdrgb) - device_t.SupportsMultiPage = true; - else - device_t.SupportsMultiPage = false; - if (device < gsDevice_t.bmp16) - device_t.MuPDFDevice = true; - else - device_t.MuPDFDevice = false; - GSDevices.Add(device_t); - } - } - - public void SetPageList(int num_pages) - { - for (int k = 1; k < num_pages + 1; k++ ) - { - SelectPage Spage = new SelectPage(); - Spage.Page = k; - Spage.PageString = k; - ConvertPages.Add(Spage); - } - } - - private void ConvertClick(object sender, RoutedEventArgs e) - { - ConvertUpdateMain(this); - } - - private void ConvertCancel(object sender, RoutedEventArgs e) - { - this.Close(); - } - - private void HelpConvert(object sender, RoutedEventArgs e) - { - - } - - private void AllPages(object sender, RoutedEventArgs e) - { - xaml_PageList.SelectAll(); - } - - private void EvenPages(object sender, RoutedEventArgs e) - { - /* First check if any are selected */ - var item = xaml_PageList.SelectedItem; - - /* If none are selected then get all the evens. otherwise just get - * all the evens of the pages that have been selected */ - if (item == null) - { - /* Turn on the evens */ - for (int kk = 1; kk < ConvertPages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = true; - } - else - { - /* Turn off any odds */ - for (int kk = 0; kk < ConvertPages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = false; - } - } - - private void OddPages(object sender, RoutedEventArgs e) - { - /* First check if any are selected */ - var item = xaml_PageList.SelectedItem; - - /* If none are selected then get all the odds. otherwise just get - all the odds of the pages that have been selected */ - if (item == null) - { - /* Turn on the odds */ - for (int kk = 0; kk < ConvertPages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = true; - } - else - { - /* Turn off any evens */ - for (int kk = 1; kk < ConvertPages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = false; - } - } - - /* Allow only numbers */ - private void PreviewInput(object sender, TextCompositionEventArgs e) - { - e.Handled = !IsTextAllowed(e.Text); - } - - private static bool IsTextAllowed(string text) - { - Regex regex = new Regex("[^0-9]+"); - return !regex.IsMatch(text); - } - } -} diff --git a/platform/winrt/gsview/DocPage.cs b/platform/winrt/gsview/DocPage.cs deleted file mode 100644 index 267d99e8..00000000 --- a/platform/winrt/gsview/DocPage.cs +++ /dev/null @@ -1,281 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.ComponentModel; -using System.Windows.Media.Imaging; -using System.Collections.ObjectModel; -using System.Windows.Media; - -namespace gsview -{ - public enum Annotate_t - { - UNKNOWN, - COMPUTING, - NO_ANNOTATE, - HAS_ANNOTATE, - ANNOTATE_VISIBLE, - ANNOTATE_HIDDEN - } - - public class DocPage : INotifyPropertyChanged - { - private LinesText m_lines; - private BlocksText m_blocks; - private int height; - private int width; - private int nativeheight; - private int nativewidth; - private double zoom; - private Annotate_t annotate; - private BitmapSource bitmap; - private IList textbox; - private List linkbox; - private Page_Content_t content; - private String pagename; - private int pagenum; - private double sely; - private double selx; - private double selheight; - private double selwidth; - private String selcolor; - private double sel_anchorx; - private double sel_anchory; - - public double SelAnchorX - { - get { return sel_anchorx; } - set { sel_anchorx = value; } - } - - public double SelAnchorY - { - get { return sel_anchory; } - set { sel_anchory = value; } - } - - public double SelY - { - get { return sely; } - set - { - sely = value; - OnPropertyChanged("SelY"); - } - } - - public double SelX - { - get { return selx; } - set - { - selx = value; - OnPropertyChanged("SelX"); - } - } - - public double SelHeight - { - get { return selheight; } - set - { - selheight = value; - OnPropertyChanged("SelHeight"); - } - } - - public double SelWidth - { - get { return selwidth; } - set - { - selwidth = value; - OnPropertyChanged("SelWidth"); - } - } - - public String SelColor - { - get { return selcolor; } - set - { - selcolor = value; - OnPropertyChanged("SelColor"); - } - } - - public int Height - { - get { return height; } - set - { - height = value; - OnPropertyChanged("Height"); - } - } - - public int Width - { - get { return width; } - set - { - width = value; - OnPropertyChanged("Width"); - } - } - - public int NativeHeight - { - get { return nativewidth; } - set { nativewidth = value; } - } - - public int NativeWidth - { - get { return nativeheight; } - set { nativeheight = value; } - } - - public Annotate_t Annotate - { - get { return annotate; } - set { annotate = value; } - } - - public double Zoom - { - get { return zoom; } - set { zoom = value; } - } - - public BitmapSource BitMap - { - get { return bitmap; } - set - { - bitmap = value; - OnPropertyChanged("BitMap"); - } - } - - public IList TextBox - { - get { return textbox; } - set - { - textbox = value; - OnPropertyChanged("TextBox"); - } - } - - public List LinkBox - { - get { return linkbox; } - set - { - linkbox = value; - OnPropertyChanged("LinkBox"); - } - } - - public BlocksText TextBlocks - { - get { return m_blocks; } - set - { - m_blocks = value; - OnPropertyChanged("TextBlocks"); - } - } - - public LinesText SelectedLines - { - get { return m_lines; } - set - { - m_lines = value; - OnPropertyChanged("SelectedLines"); - } - } - - public Page_Content_t Content - { - get { return content; } - set { content = value; } - } - - public String PageName - { - get { return pagename; } - set { pagename = value; } - } - - public int PageNum - { - get { return pagenum; } - set { pagenum = value; } - } - - public AA_t AA - { - get; - set; - } - - public event PropertyChangedEventHandler PropertyChanged; - - // Create the OnPropertyChanged method to raise the event - protected void OnPropertyChanged(string name) - { - PropertyChangedEventHandler handler = PropertyChanged; - if (handler != null) - { - handler(this, new PropertyChangedEventArgs(name)); - } - } - - public DocPage() - { - this.Height = 0; - this.Width = 0; - this.NativeHeight = 0; - this.NativeWidth = 0; - this.Zoom = 0; - this.BitMap = null; - this.TextBox = null; - this.LinkBox = null; - this.Content = Page_Content_t.NOTSET; - this.PageNum = -1; - this.PageName = ""; - this.TextBlocks = null; - this.AA = AA_t.HIGH; - } - - public DocPage(int Height, int Width, double Zoom, BitmapSource BitMap, - List TextBox, List LinkBox, - Page_Content_t Content, int PageNum, BlocksText TextBlocks, - AA_t AA) - { - this.Height = Height; - this.Width = Width; - this.Zoom = Zoom; - this.BitMap = BitMap; - this.TextBox = TextBox; - this.LinkBox = LinkBox; - this.Content = Content; - this.PageNum = PageNum; - this.PageName = ("Page " + (PageNum + 1)); - this.TextBlocks = TextBlocks; - this.AA = AA; - } - }; - public class Pages : ObservableCollection - { - public Pages() - : base() - { - } - } -} diff --git a/platform/winrt/gsview/Info.xaml b/platform/winrt/gsview/Info.xaml deleted file mode 100644 index 4033d2ee..00000000 --- a/platform/winrt/gsview/Info.xaml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/platform/winrt/gsview/Info.xaml.cs b/platform/winrt/gsview/Info.xaml.cs deleted file mode 100644 index 8a544aa8..00000000 --- a/platform/winrt/gsview/Info.xaml.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace gsview -{ - /// - /// Interaction logic for Info.xaml - /// - public partial class Info : Window - { - public Info() - { - InitializeComponent(); - } - - private void OKClose(object sender, RoutedEventArgs e) - { - this.Close(); - } - } -} diff --git a/platform/winrt/gsview/Install32/Install32.vdproj b/platform/winrt/gsview/Install32/Install32.vdproj deleted file mode 100644 index 4fecfe14..00000000 --- a/platform/winrt/gsview/Install32/Install32.vdproj +++ /dev/null @@ -1,1225 +0,0 @@ -"DeployProject" -{ -"VSVersion" = "3:800" -"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" -"IsWebType" = "8:FALSE" -"ProjectName" = "8:Install32" -"LanguageId" = "3:1033" -"CodePage" = "3:1252" -"UILanguageId" = "3:1033" -"SccProjectName" = "8:" -"SccLocalPath" = "8:" -"SccAuxPath" = "8:" -"SccProvider" = "8:" - "Hierarchy" - { - "Entry" - { - "MsmKey" = "8:_016DC0AD4FFB4399B8519ACA84400E23" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_14D6D6CD543648468701A0FE8D5A2463" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_1F1881EE52A84F49A62D42DE7E4D9D24" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_200E66532F6140579FA9390D6F7CC178" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_2684CEAF38794D53AF9D906A7F8D677C" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_389C02C6991141428A41BC2459A55E76" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4826B6F3283A4770935083729B0777B2" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4879181DB5BD4512A8A1790BC22435A0" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_791D64A55F0847788638D3FCDD1802DD" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_87036B53E422457DBCA496540B818802" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_A62B07FE876C4ACBBE7DEF7A219A570E" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B2090A11BD04495DACDA72D4E5D72B7E" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_4879181DB5BD4512A8A1790BC22435A0" - "MsmSig" = "8:_UNDEFINED" - } - } - "Configurations" - { - "Debug" - { - "DisplayName" = "8:Debug" - "IsDebugOnly" = "11:TRUE" - "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:Debug\\Install32.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - } - } - "Release" - { - "DisplayName" = "8:Release" - "IsDebugOnly" = "11:FALSE" - "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:Release\\Install32.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.5" - { - "Name" = "8:Microsoft .NET Framework 4.5 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.5" - } - } - } - } - } - "Deployable" - { - "CustomAction" - { - } - "DefaultFeature" - { - "Name" = "8:DefaultFeature" - "Title" = "8:" - "Description" = "8:" - } - "ExternalPersistence" - { - "LaunchCondition" - { - "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_3D4E37C6DF874A34821259A8B423B24C" - { - "Name" = "8:.NET Framework" - "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:.NETFramework,Version=v4.5" - "AllowLaterVersions" = "11:FALSE" - "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=395269" - } - } - } - "File" - { - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_016DC0AD4FFB4399B8519ACA84400E23" - { - "SourcePath" = "8:..\\Resources\\pagePNG.ico" - "TargetName" = "8:pagePNG.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_14D6D6CD543648468701A0FE8D5A2463" - { - "SourcePath" = "8:..\\Resources\\pageCBZ.ico" - "TargetName" = "8:pageCBZ.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1F1881EE52A84F49A62D42DE7E4D9D24" - { - "SourcePath" = "8:..\\Resources\\pageEPS.ico" - "TargetName" = "8:pageEPS.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_200E66532F6140579FA9390D6F7CC178" - { - "SourcePath" = "8:..\\Resources\\pagePDF.ico" - "TargetName" = "8:pagePDF.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2684CEAF38794D53AF9D906A7F8D677C" - { - "SourcePath" = "8:..\\Resources\\pagePS.ico" - "TargetName" = "8:pagePS.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_389C02C6991141428A41BC2459A55E76" - { - "SourcePath" = "8:..\\Resources\\pageOXPS.ico" - "TargetName" = "8:pageOXPS.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4826B6F3283A4770935083729B0777B2" - { - "SourcePath" = "8:..\\Resources\\pageJPG.ico" - "TargetName" = "8:pageJPG.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4879181DB5BD4512A8A1790BC22435A0" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:gsview, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - } - "SourcePath" = "8:..\\bin\\Release\\gsview.exe" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_F115E751BD3842299C96BA6F8A5B0F40" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_791D64A55F0847788638D3FCDD1802DD" - { - "SourcePath" = "8:..\\Resources\\pageXPS.ico" - "TargetName" = "8:pageXPS.ico" - "Tag" = "8:" - "Folder" = "8:_F28BDA152FBB403EAF109B8E144140A8" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_87036B53E422457DBCA496540B818802" - { - "SourcePath" = "8:..\\bin\\Release\\mupdfnet32.dll" - "TargetName" = "8:mupdfnet32.dll" - "Tag" = "8:" - "Folder" = "8:_F115E751BD3842299C96BA6F8A5B0F40" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A62B07FE876C4ACBBE7DEF7A219A570E" - { - "SourcePath" = "8:..\\gsview.visualelementsmanifest.xml" - "TargetName" = "8:gsview.visualelementsmanifest.xml" - "Tag" = "8:" - "Folder" = "8:_F115E751BD3842299C96BA6F8A5B0F40" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B2090A11BD04495DACDA72D4E5D72B7E" - { - "SourcePath" = "8:..\\gslib\\gsdll32.dll" - "TargetName" = "8:gsdll32.dll" - "Tag" = "8:" - "Folder" = "8:_F115E751BD3842299C96BA6F8A5B0F40" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - } - "FileType" - { - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_12B01738B600492AA1C8D89AD0821413" - { - "Name" = "8:CDisplay ZIP Archived Comic Book file" - "Description" = "8:CDisplay ZIP Archived Comic Book file" - "Extensions" = "8:cbz" - "MIME" = "8:" - "Icon" = "8:_14D6D6CD543648468701A0FE8D5A2463" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_33B319EC439B40E38BD09902607AFE0B" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_13D929725BF0460F823C23414FB2F0A1" - { - "Name" = "8:Open XPS Document" - "Description" = "8:Open XPS Document" - "Extensions" = "8:oxps" - "MIME" = "8:" - "Icon" = "8:_389C02C6991141428A41BC2459A55E76" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_02319B3587ED4701B20BE6C84D578514" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_65F612197D8D450C8AC251D615131D21" - { - "Name" = "8:PostScript File" - "Description" = "8:PostScript File" - "Extensions" = "8:ps" - "MIME" = "8:" - "Icon" = "8:_2684CEAF38794D53AF9D906A7F8D677C" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_1CC8050B2F6146E6A1F7C71C12ACB66E" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_69F979C4C92C4C348E8001B157A92FED" - { - "Name" = "8:EPS File" - "Description" = "8:EPS File" - "Extensions" = "8:eps" - "MIME" = "8:" - "Icon" = "8:_1F1881EE52A84F49A62D42DE7E4D9D24" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_EA00D9AD05ED40BE82A6F8CF37AA21EE" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_A5691CEB907F4D66A3FE718B4FF65E8D" - { - "Name" = "8:PNG image" - "Description" = "8:PNG image" - "Extensions" = "8:png" - "MIME" = "8:" - "Icon" = "8:_016DC0AD4FFB4399B8519ACA84400E23" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_95A3859E50134298ACEA0E1EACA47513" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_CD91C7FED2C94607AC5CFB7F6571A963" - { - "Name" = "8:XPS Document" - "Description" = "8:XPS Document" - "Extensions" = "8:xps" - "MIME" = "8:" - "Icon" = "8:_791D64A55F0847788638D3FCDD1802DD" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_C39CD59228F345E48878777D30252120" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_EA8DCA7319A3441EA0A8F07F20C7EC71" - { - "Name" = "8:JPEG image" - "Description" = "8:JPEG image" - "Extensions" = "8:jpeg" - "MIME" = "8:" - "Icon" = "8:_4826B6F3283A4770935083729B0777B2" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_90799BABA05F49D6AB9D093411DD157E" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_EA91006930CC4A349642A7F0AD319AA4" - { - "Name" = "8:PDF" - "Description" = "8:PDF" - "Extensions" = "8:pdf" - "MIME" = "8:" - "Icon" = "8:_200E66532F6140579FA9390D6F7CC178" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_4879181DB5BD4512A8A1790BC22435A0" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_D9041E3AC16C43E4AF1822F9103B24D6" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - } - "Folder" - { - "{1525181F-901A-416C-8A58-119130FE478E}:_05287FF94E284ACF9E55AD5BF0AF82E6" - { - "Name" = "8:#1919" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:ProgramMenuFolder" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_8ADA7142ADE14DFFA878A5107FE5C304" - { - "Name" = "8:Artifex Software" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_AF85737E4DAA4E318495768F54D7F0AF" - "Folders" - { - } - } - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_74B5607A82364A9E8F63FA435CF2C5FA" - { - "Name" = "8:#1916" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:DesktopFolder" - "Folders" - { - } - } - "{3C67513D-01DD-4637-8A68-80971EB9504F}:_F115E751BD3842299C96BA6F8A5B0F40" - { - "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" - "Name" = "8:#1925" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:TARGETDIR" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_F28BDA152FBB403EAF109B8E144140A8" - { - "Name" = "8:Resources" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_76594C33BABA488DBC160B0B115E0F1B" - "Folders" - { - } - } - } - } - } - "LaunchCondition" - { - } - "Locator" - { - } - "MsiBootstrapper" - { - "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" - } - "Product" - { - "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:GSview 6.0" - "ProductCode" = "8:{BB8C85F6-5B3C-4163-9B55-6B07E747E947}" - "PackageCode" = "8:{85959242-0814-4BFE-8891-EE46ADB397D6}" - "UpgradeCode" = "8:{00F5E049-7C22-449F-9879-A4D6A7634B7E}" - "AspNetVersion" = "8:4.0.30319.0" - "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:TRUE" - "DetectNewerInstalledVersion" = "11:TRUE" - "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:6.0.0" - "Manufacturer" = "8:Artifex Software" - "ARPHELPTELEPHONE" = "8:" - "ARPHELPLINK" = "8:http://www.artifex.com" - "Title" = "8:Install GSview 6.0 x86" - "Subject" = "8:" - "ARPCONTACT" = "8:Artifex Software" - "Keywords" = "8:" - "ARPCOMMENTS" = "8:Install GSview 6.0 for x86" - "ARPURLINFOABOUT" = "8:http://www.artifex.com" - "ARPPRODUCTICON" = "8:" - "ARPIconIndex" = "3:0" - "SearchPath" = "8:" - "UseSystemSearchPath" = "11:TRUE" - "TargetPlatform" = "3:0" - "PreBuildEvent" = "8:" - "PostBuildEvent" = "8:" - "RunPostBuildEvent" = "3:0" - } - "Registry" - { - "HKLM" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_233AE572F5BA48D1A577D7F88DE5C94E" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_75350EE0EC77414B82CAB14EAF87F8AA" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCU" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_18E520707B824ADE8636026ABE055101" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_07D3F609B0F0416CB43A58C33358E4B5" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCR" - { - "Keys" - { - } - } - "HKU" - { - "Keys" - { - } - } - "HKPU" - { - "Keys" - { - } - } - } - "Sequences" - { - } - "Shortcut" - { - "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_027434B1EED34DEF86F7CF3635B5FD30" - { - "Name" = "8:GSView 6.0" - "Arguments" = "8:" - "Description" = "8:" - "ShowCmd" = "3:1" - "IconIndex" = "3:32512" - "Transitive" = "11:FALSE" - "Target" = "8:_4879181DB5BD4512A8A1790BC22435A0" - "Folder" = "8:_8ADA7142ADE14DFFA878A5107FE5C304" - "WorkingFolder" = "8:_F115E751BD3842299C96BA6F8A5B0F40" - "Icon" = "8:_4879181DB5BD4512A8A1790BC22435A0" - "Feature" = "8:" - } - } - "UserInterface" - { - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_1F01AD235CE94923AAD616EC2F3B2101" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdUserInterface.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_332E71C0C4E14EB9950570071C650B0B" - { - "Name" = "8:#1902" - "Sequence" = "3:2" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_20E5387842C44457BF0F53E5E053BADA" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_50F65640B6CC47C882EDDB10C3EA355C" - { - "Name" = "8:#1902" - "Sequence" = "3:1" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_C0FA7EB2C0E949D99D49ED30340AD678" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "UpdateText" - { - "Name" = "8:UpdateText" - "DisplayName" = "8:#1058" - "Description" = "8:#1158" - "Type" = "3:15" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1258" - "DefaultValue" = "8:#1258" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_8B3DB474F8184537ABFC9E001FAD6796" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdBasicDialogs.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_90A48D00803D4600A3A0587F503DF240" - { - "Name" = "8:#1901" - "Sequence" = "3:1" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_AC19A30ACDE24F4C9F6FC61008980022" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_BF426D392BBE410FB49E79B38576061E" - { - "Name" = "8:#1901" - "Sequence" = "3:2" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_672D3C120E06497894B6A7787DB2AD1D" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_ECDD7A4101B249C88A997FF923CC7009" - { - "Name" = "8:#1900" - "Sequence" = "3:1" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_51BA1897377D4A5D98ACE0E2EB251293" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_AC4CC79CCC9E47D59B61182471DE1D40" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F1DD6CBB2F29447BB67A41DC327C2254" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "InstallAllUsersVisible" - { - "Name" = "8:InstallAllUsersVisible" - "DisplayName" = "8:#1059" - "Description" = "8:#1159" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_F2A4ABF584D248E7812843F3F6D91F91" - { - "Name" = "8:#1900" - "Sequence" = "3:2" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_2A85F1F786AB43EF820FA580E2689977" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E63962ADBAE3438ABDEFC6290FFF9B71" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_FD25300108814F51958E9811E0EF375D" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - } - "MergeModule" - { - } - "ProjectOutput" - { - } - } -} diff --git a/platform/winrt/gsview/Install64/Install64.vdproj b/platform/winrt/gsview/Install64/Install64.vdproj deleted file mode 100644 index 1d660c05..00000000 --- a/platform/winrt/gsview/Install64/Install64.vdproj +++ /dev/null @@ -1,1238 +0,0 @@ -"DeployProject" -{ -"VSVersion" = "3:800" -"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" -"IsWebType" = "8:FALSE" -"ProjectName" = "8:Install64" -"LanguageId" = "3:1033" -"CodePage" = "3:1252" -"UILanguageId" = "3:1033" -"SccProjectName" = "8:" -"SccLocalPath" = "8:" -"SccAuxPath" = "8:" -"SccProvider" = "8:" - "Hierarchy" - { - "Entry" - { - "MsmKey" = "8:_0BD3A92E2F2F40A3B601C2CF21584C48" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_157FB597E59745DFAD45AE54F232D39D" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_1BF4736955034DCEBB4B7C53AEFECA2A" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_28423EA654C8488A8F59859D947164F4" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_372F38F3347F4E0491FA521F236BA54C" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_44A71C9401B94929A3DF6828309FE684" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_6724F24524E24AA1907957AF0812BD09" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_9F16FF3C56C249B58F3F64B821ABBF97" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_AB1B21BC24164EF4929937FE8C3ED270" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_BC8D174211B84DE6968562ECF0A0443B" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_C11D0300BF42444AA9362921375DF910" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_D300E715CB524AF1AE46CE9EB3ED67C8" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_44A71C9401B94929A3DF6828309FE684" - "MsmSig" = "8:_UNDEFINED" - } - } - "Configurations" - { - "Debug" - { - "DisplayName" = "8:Debug" - "IsDebugOnly" = "11:TRUE" - "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:Debug\\Install64.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.5" - { - "Name" = "8:Microsoft .NET Framework 4.5 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.5" - } - } - } - } - "Release" - { - "DisplayName" = "8:Release" - "IsDebugOnly" = "11:FALSE" - "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:Release\\Install64.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.5" - { - "Name" = "8:Microsoft .NET Framework 4.5 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.5" - } - } - } - } - } - "Deployable" - { - "CustomAction" - { - } - "DefaultFeature" - { - "Name" = "8:DefaultFeature" - "Title" = "8:" - "Description" = "8:" - } - "ExternalPersistence" - { - "LaunchCondition" - { - "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_D0F5C30769F1419B8C1834A6F984A56F" - { - "Name" = "8:.NET Framework" - "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:.NETFramework,Version=v4.5" - "AllowLaterVersions" = "11:FALSE" - "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=395269" - } - } - } - "File" - { - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_0BD3A92E2F2F40A3B601C2CF21584C48" - { - "SourcePath" = "8:..\\Resources\\pageEPS.ico" - "TargetName" = "8:pageEPS.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_157FB597E59745DFAD45AE54F232D39D" - { - "SourcePath" = "8:..\\Resources\\pageXPS.ico" - "TargetName" = "8:pageXPS.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1BF4736955034DCEBB4B7C53AEFECA2A" - { - "SourcePath" = "8:..\\gslib\\gsdll64.dll" - "TargetName" = "8:gsdll64.dll" - "Tag" = "8:" - "Folder" = "8:_CDB2B40979C34EBAA8A815DA144BF441" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_28423EA654C8488A8F59859D947164F4" - { - "SourcePath" = "8:..\\Resources\\pageOXPS.ico" - "TargetName" = "8:pageOXPS.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_372F38F3347F4E0491FA521F236BA54C" - { - "SourcePath" = "8:..\\bin\\Release\\mupdfnet64.dll" - "TargetName" = "8:mupdfnet64.dll" - "Tag" = "8:" - "Folder" = "8:_CDB2B40979C34EBAA8A815DA144BF441" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_44A71C9401B94929A3DF6828309FE684" - { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:gsview, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_44A71C9401B94929A3DF6828309FE684" - { - "Name" = "8:gsview.exe" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:..\\bin\\Release\\gsview.exe" - "TargetName" = "8:" - "Tag" = "8:" - "Folder" = "8:_CDB2B40979C34EBAA8A815DA144BF441" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6724F24524E24AA1907957AF0812BD09" - { - "SourcePath" = "8:..\\Resources\\pagePS.ico" - "TargetName" = "8:pagePS.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9F16FF3C56C249B58F3F64B821ABBF97" - { - "SourcePath" = "8:..\\Resources\\pageCBZ.ico" - "TargetName" = "8:pageCBZ.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_AB1B21BC24164EF4929937FE8C3ED270" - { - "SourcePath" = "8:..\\Resources\\pagePDF.ico" - "TargetName" = "8:pagePDF.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BC8D174211B84DE6968562ECF0A0443B" - { - "SourcePath" = "8:..\\gsview.visualelementsmanifest.xml" - "TargetName" = "8:gsview.visualelementsmanifest.xml" - "Tag" = "8:" - "Folder" = "8:_CDB2B40979C34EBAA8A815DA144BF441" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C11D0300BF42444AA9362921375DF910" - { - "SourcePath" = "8:..\\Resources\\pagePNG.ico" - "TargetName" = "8:pagePNG.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D300E715CB524AF1AE46CE9EB3ED67C8" - { - "SourcePath" = "8:..\\Resources\\pageJPG.ico" - "TargetName" = "8:pageJPG.ico" - "Tag" = "8:" - "Folder" = "8:_52FA2F218E56408DA37ABFD7E103994C" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - } - "FileType" - { - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_11428E8F96C54BA3900AF3407233AAC0" - { - "Name" = "8:PostScript File" - "Description" = "8:PostScript File" - "Extensions" = "8:ps" - "MIME" = "8:" - "Icon" = "8:_6724F24524E24AA1907957AF0812BD09" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_8E3935BB44F543D5B0E48ACB12FF306D" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_5C233C0E4937479FB108F39E16FABDE6" - { - "Name" = "8:CDisplay ZIP Archived Comic Book file" - "Description" = "8:CDisplay ZIP Archived Comic Book file" - "Extensions" = "8:cbz" - "MIME" = "8:" - "Icon" = "8:_9F16FF3C56C249B58F3F64B821ABBF97" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_8D3603F262824461A9EA284DBB30D575" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_61007590E6A24BA1A769A064AC2AC094" - { - "Name" = "8:JPEG image" - "Description" = "8:JPEG image" - "Extensions" = "8:jpeg" - "MIME" = "8:" - "Icon" = "8:_D300E715CB524AF1AE46CE9EB3ED67C8" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_0E6BD260F46C4A89891F1D0A7029A6EF" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_962DBD1C82974C33960B863AB9E1FC9F" - { - "Name" = "8:Open XPS Document" - "Description" = "8:Open XPS Document" - "Extensions" = "8:oxps" - "MIME" = "8:" - "Icon" = "8:_28423EA654C8488A8F59859D947164F4" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_6B19B65AF043423897A64F9129571FE9" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_A59FDC99A2564A0089516522926CE6C3" - { - "Name" = "8:PNG image" - "Description" = "8:PNG image" - "Extensions" = "8:png" - "MIME" = "8:" - "Icon" = "8:_C11D0300BF42444AA9362921375DF910" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_948A77318E904662886D34BDC0BCFE0E" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_A8D59D004BB94148B529FD692DDC5460" - { - "Name" = "8:XPS Document" - "Description" = "8:XPS Document" - "Extensions" = "8:xps" - "MIME" = "8:" - "Icon" = "8:_157FB597E59745DFAD45AE54F232D39D" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_A9ABA43924574B7A992B78537E7F2FB7" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_A8EDD49D509A4974B971BF4FBD093455" - { - "Name" = "8:PDF" - "Description" = "8:PDF" - "Extensions" = "8:pdf" - "MIME" = "8:" - "Icon" = "8:_AB1B21BC24164EF4929937FE8C3ED270" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_9396BB7A2A2841B0890D2DB6A6360F4E" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_AA94DC1A560A4224A9410A3EAAB34D77" - { - "Name" = "8:EPS File" - "Description" = "8:EPS File" - "Extensions" = "8:eps" - "MIME" = "8:" - "Icon" = "8:_0BD3A92E2F2F40A3B601C2CF21584C48" - "IconIndex" = "3:0" - "Command" - { - "Command" = "8:_44A71C9401B94929A3DF6828309FE684" - } - "Verbs" - { - "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_BAFA7BE3B6AF4D9283D623A69D266E9B" - { - "Command" = "8:&Open" - "Verb" = "8:open" - "Arguments" = "8:\"%1\"" - "Order" = "3:0" - } - } - } - } - "Folder" - { - "{1525181F-901A-416C-8A58-119130FE478E}:_A2CF2A9B6D384F768C297CC789FBB997" - { - "Name" = "8:#1916" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:DesktopFolder" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_BE3A2AB1B2C04D7AB9F691ADFDCA6EE1" - { - "Name" = "8:#1919" - "AlwaysCreate" = "11:TRUE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:ProgramMenuFolder" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_EAE10184B82B40399A965598BE4C92BC" - { - "Name" = "8:Artifex Software" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_6289816925F64FEEA99AF2712A31DF22" - "Folders" - { - } - } - } - } - "{3C67513D-01DD-4637-8A68-80971EB9504F}:_CDB2B40979C34EBAA8A815DA144BF441" - { - "DefaultLocation" = "8:[ProgramFiles64Folder][Manufacturer]\\[ProductName]" - "Name" = "8:#1925" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:TARGETDIR" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_52FA2F218E56408DA37ABFD7E103994C" - { - "Name" = "8:Resources" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_0E795A41F6474AC8ACB9997020B3421A" - "Folders" - { - } - } - } - } - } - "LaunchCondition" - { - } - "Locator" - { - } - "MsiBootstrapper" - { - "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" - } - "Product" - { - "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:GSview 6.0" - "ProductCode" = "8:{A22596C0-BCF4-46F9-9CF2-1C66E8588C30}" - "PackageCode" = "8:{8B802149-336B-4DEB-A58A-ABDF1941600D}" - "UpgradeCode" = "8:{B494B7A2-738F-4F9D-87F4-31830A16FB76}" - "AspNetVersion" = "8:4.0.30319.0" - "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:TRUE" - "DetectNewerInstalledVersion" = "11:TRUE" - "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:6.0.0" - "Manufacturer" = "8:Artifex Software" - "ARPHELPTELEPHONE" = "8:" - "ARPHELPLINK" = "8:http://www.artifex.com" - "Title" = "8:Install GSview 6.0 x64" - "Subject" = "8:" - "ARPCONTACT" = "8:Artifex Software" - "Keywords" = "8:" - "ARPCOMMENTS" = "8:Install GSview 6.0 for x64" - "ARPURLINFOABOUT" = "8:http://www.artifex.com" - "ARPPRODUCTICON" = "8:_44A71C9401B94929A3DF6828309FE684" - "ARPIconIndex" = "3:32512" - "SearchPath" = "8:" - "UseSystemSearchPath" = "11:TRUE" - "TargetPlatform" = "3:1" - "PreBuildEvent" = "8:" - "PostBuildEvent" = "8:" - "RunPostBuildEvent" = "3:0" - } - "Registry" - { - "HKLM" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_1E605C0AD6C1431799974106D953AE68" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_22F6F34C883A4B46B3D926048627ECB6" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCU" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_C1C61CD1AF1A4D718391EC0C924CCEDC" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_78C4B8465B114416A32C1313FA510012" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCR" - { - "Keys" - { - } - } - "HKU" - { - "Keys" - { - } - } - "HKPU" - { - "Keys" - { - } - } - } - "Sequences" - { - } - "Shortcut" - { - "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_DD3E47DAFCAA48ED9A8A02F3B29E888E" - { - "Name" = "8:GSView 6.0" - "Arguments" = "8:" - "Description" = "8:" - "ShowCmd" = "3:1" - "IconIndex" = "3:32512" - "Transitive" = "11:FALSE" - "Target" = "8:_44A71C9401B94929A3DF6828309FE684" - "Folder" = "8:_EAE10184B82B40399A965598BE4C92BC" - "WorkingFolder" = "8:_CDB2B40979C34EBAA8A815DA144BF441" - "Icon" = "8:_44A71C9401B94929A3DF6828309FE684" - "Feature" = "8:" - } - } - "UserInterface" - { - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_84D62A451A39423FB4CBFBF0B05992AE" - { - "Name" = "8:#1901" - "Sequence" = "3:2" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_91A9D42868164E8A8F4197F300F1B9D8" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_8A4A575119DD460AA6774C08CB4BA465" - { - "Name" = "8:#1901" - "Sequence" = "3:1" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_44BF62E80B0E4B2DA3C75D4B8B3D11EB" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_914CB62F95114045827D6FD18322AE3C" - { - "Name" = "8:#1900" - "Sequence" = "3:2" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_1A397F336F944DEAB35C08D6CEA5FE2A" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5A2C0AE1AE7D4D17B87F0474E7424544" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_FFE13B0235424B189193B4E4F400CB78" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_BC4637BE7ED7492A9359C01A9E29ACDC" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdBasicDialogs.wim" - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_C0B167A59DF14DA9A4170111D28C6057" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdUserInterface.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_C71BEB46A03841F0A26B15DC40628CE8" - { - "Name" = "8:#1902" - "Sequence" = "3:2" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E843264C683A45A5B80393D60A1EA3EB" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_DD9DE969B7A74DAC8E617049CE2C3AC1" - { - "Name" = "8:#1900" - "Sequence" = "3:1" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A7B7CDCFC5904E1D9128AA5B88FE3583" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "InstallAllUsersVisible" - { - "Name" = "8:InstallAllUsersVisible" - "DisplayName" = "8:#1059" - "Description" = "8:#1159" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BC68E9D5B9714365AD5E43D2BD52B953" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_D4358EB6E55E497193888CAFBDD4F2C9" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:0" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_F3C1167A3B7748BCB1C893E82BBED76A" - { - "Name" = "8:#1902" - "Sequence" = "3:1" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9313CCEC27A04A03B8010FCEC3B1BEC1" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "UpdateText" - { - "Name" = "8:UpdateText" - "DisplayName" = "8:#1058" - "Description" = "8:#1158" - "Type" = "3:15" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1258" - "DefaultValue" = "8:#1258" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - } - "MergeModule" - { - } - "ProjectOutput" - { - } - } -} diff --git a/platform/winrt/gsview/Links.cs b/platform/winrt/gsview/Links.cs deleted file mode 100644 index ef902381..00000000 --- a/platform/winrt/gsview/Links.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.Drawing; - -namespace gsview -{ - public enum link_t - { - LINK_GOTO = 0, - LINK_URI, - TEXTBOX, /* Do double duty with this class */ - NOT_SET, - }; - - class Links - { - link_t type; - Uri uri; - int page_num; - - public Links() - { - uri = new Uri(""); - page_num = -1; - type = link_t.NOT_SET; - } - } -} diff --git a/platform/winrt/gsview/MainWindow.xaml b/platform/winrt/gsview/MainWindow.xaml deleted file mode 100644 index 10d126bb..00000000 --- a/platform/winrt/gsview/MainWindow.xaml +++ /dev/null @@ -1,794 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - - - - 12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Search: - - - - - - - - - - - - - Zoom: - - - - - - - - - - - - Creating Thumbs - - - - - - - - - - - - Searching - - - - - - - - - - - - Printing - - - - - - - - - - - - Printing - - - - - - - - - - - - - MuPDF Converting Document - - - - - - - - - - - - Distilling - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/gsview/MainWindow.xaml.cs b/platform/winrt/gsview/MainWindow.xaml.cs deleted file mode 100644 index 6e6ee855..00000000 --- a/platform/winrt/gsview/MainWindow.xaml.cs +++ /dev/null @@ -1,4906 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Forms; -using System.ComponentModel; -using System.IO; -using System.Windows.Xps.Packaging; -using System.Printing; -using System.Windows.Markup; -using System.Runtime.InteropServices; -using Microsoft.Win32; /* For registry */ - -public enum AA_t -{ - HIGH = 8, - MEDHIGH = 6, - MED = 4, - LOW = 2, - NONE = 0 -} - -enum PDFType_t -{ - PDFX, - PDFA -} - -enum AppBar_t -{ - TEXT_SEARCH, - STANDARD -} - -enum NotifyType_t -{ - MESS_STATUS, - MESS_ERROR -}; - -enum RenderingStatus_t -{ - REN_AVAILABLE, - REN_THUMBS, - REN_UPDATE_THUMB_CANVAS, - REN_PAGE /* Used to ignore value when source based setting */ -}; - -public enum status_t -{ - S_ISOK, - E_FAILURE, - E_OUTOFMEM, - E_NEEDPASSWORD -}; - -public enum textout_t -{ - HTML = 0, - XML, - TEXT -} - -enum zoom_t -{ - NO_ZOOM, - ZOOM_IN, - ZOOM_OUT -} - -enum view_t -{ - VIEW_WEB, - VIEW_CONTENT, - VIEW_PAGE, - VIEW_PASSWORD, - VIEW_TEXTSEARCH -}; - -public enum Page_Content_t -{ - FULL_RESOLUTION = 0, - THUMBNAIL, - OLD_RESOLUTION, - NOTSET -}; - -/* Put all the PDF types first to make the switch statment shorter - Save_Type_t.PDF is the test */ -public enum Save_Type_t -{ - PDF13, - LINEAR_PDF, - PDFA1_RGB, - PDFA1_CMYK, - PDFA2_RGB, - PDFA2_CMYK, - PDFX3_GRAY, - PDFX3_CMYK, - PDF, - PCLXL, - XPS, - SVG, - TEXT, - HTML, - XML -} - -public enum Extract_Type_t -{ - PDF, - EPS, - PS, - SVG -} - -/* C# has no defines.... */ -static class Constants -{ - public const int SCROLL_STEPSIZE = 48; - public const int INIT_LOOK_AHEAD = 2; /* A + count on the pages to pre-render */ - public const int THUMB_PREADD = 10; - public const double MIN_SCALE = 0.5; - public const double SCALE_THUMB = 0.05; - public const int BLANK_WIDTH = 17; - public const int BLANK_HEIGHT = 22; - public const double ZOOM_STEP = 0.25; - public const int ZOOM_MAX = 4; - public const double ZOOM_MIN = 0.25; - public const int KEY_PLUS = 0xbb; - public const int KEY_MINUS = 0xbd; - public const int ZOOM_IN = 0; - public const int ZOOM_OUT = 1; - public const double SCREEN_SCALE = 1; - public const int HEADER_SIZE = 54; - public const int SEARCH_FORWARD = 1; - public const int SEARCH_BACKWARD = -1; - public const int TEXT_NOT_FOUND = -1; - public const int DEFAULT_GS_RES = 300; - public const int DISPATCH_TIME = 50; - public const int SCROLL_STEP = 10; - public const int SCROLL_EDGE_BUFFER = 90; - public const int VERT_SCROLL_STEP = 48; - public const int PAGE_MARGIN = 1; -} - -public static class DocumentTypes -{ - public const string PDF = "Portable Document Format"; - public const string PS = "PostScript"; - public const string XPS = "XPS"; - public const string EPS = "Encapsulated PostScript"; - public const string CBZ = "Comic Book Archive"; - public const string PNG = "Portable Network Graphics Image"; - public const string JPG = "Joint Photographic Experts Group Image"; - public const string UNKNOWN = "Unknown"; -} - -namespace gsview -{ - /// - /// Interaction logic for MainWindow.xaml - /// - /// - - public struct pageprogress_t - { - public Byte[] bitmap; - public BlocksText charlist; - public int pagenum; - public Point size; - public Annotate_t annot; - } - - public struct ContextMenu_t - { - public int page_num; - public Point mouse_position; - } - - public struct thumb_t - { - public int page_num; - public Byte[] bitmap; - public Point size; - } - - public struct searchResults_t - { - public String needle; - public bool done; - public int page_found; - public List rectangles; - public int num_rects; - } - - public struct textSelectInfo_t - { - public int pagenum; - public bool first_line_full; - public bool last_line_full; - } - - public static class ScrollBarExtensions - { - public static double GetThumbCenter(this System.Windows.Controls.Primitives.ScrollBar s) - { - double thumbLength = GetThumbLength(s); - double trackLength = s.Maximum - s.Minimum; - - return thumbLength / 2 + s.Minimum + (s.Value - s.Minimum) * - (trackLength - thumbLength) / trackLength; - } - - public static void SetThumbCenter(this System.Windows.Controls.Primitives.ScrollBar s, double thumbCenter) - { - double thumbLength = GetThumbLength(s); - double trackLength = s.Maximum - s.Minimum; - - if (thumbCenter >= s.Maximum - thumbLength / 2) - { - s.Value = s.Maximum; - } - else if (thumbCenter <= s.Minimum + thumbLength / 2) - { - s.Value = s.Minimum; - } - else if (thumbLength >= trackLength) - { - s.Value = s.Minimum; - } - else - { - s.Value = (int)(s.Minimum + trackLength * - ((thumbCenter - s.Minimum - thumbLength / 2) - / (trackLength - thumbLength))); - } - } - - public static double GetThumbLength(this System.Windows.Controls.Primitives.ScrollBar s) - { - double trackLength = s.Maximum - s.Minimum; - return trackLength * s.ViewportSize / - (trackLength + s.ViewportSize); - } - - public static void SetThumbLength(this System.Windows.Controls.Primitives.ScrollBar s, double thumbLength) - { - double trackLength = s.Maximum - s.Minimum; - - if (thumbLength < 0) - { - s.ViewportSize = 0; - } - else if (thumbLength < trackLength) - { - s.ViewportSize = trackLength * thumbLength / (trackLength - thumbLength); - } - else - { - s.ViewportSize = double.MaxValue; - } - } - } - - public partial class MainWindow : Window - { - mudocument mu_doc = null; - public Pages m_docPages; - List m_textSelect; - List m_thumbnails; - List> m_page_link_list = null; - IList m_text_list; - public List m_lineptrs = null; - public List m_textptrs = null; - List m_textset = null; - private bool m_file_open; - private int m_currpage; - private int m_searchpage; - private int m_num_pages; - private bool m_init_done; - private bool m_links_on; - String m_textsearchcolor = "#4072AC25"; - String m_textselectcolor = "#402572AC"; - String m_regionselect = "#00FFFFFF"; - String m_blockcolor = "#00FFFFFF"; - //String m_regionselect = "#FFFF0000"; /* Debug */ - String m_linkcolor = "#40AC7225"; - private bool m_have_thumbs; - double m_doczoom; - ghostsharp m_ghostscript; - String m_currfile; - String m_origfile; - private gsprint m_ghostprint = null; - bool m_isXPS; - gsOutput m_gsoutput; - Convert m_convertwin; - PageExtractSave m_extractwin; - Password m_password = null; - String m_currpassword = null; - BackgroundWorker m_thumbworker = null; - BackgroundWorker m_textsearch = null; - BackgroundWorker m_linksearch = null; - BackgroundWorker m_openfile = null; - BackgroundWorker m_initrender = null; - BackgroundWorker m_copytext = null; - String m_document_type; - Info m_infowindow; - OutputIntent m_outputintents; - Selection m_selection; - String m_prevsearch = null; - bool m_clipboardset; - bool m_doscroll; - bool m_intxtselect; - bool m_textselected; - System.Windows.Threading.DispatcherTimer m_dispatcherTimer = null; - double m_lastY; - double m_maxY; - bool m_ignorescrollchange; - double m_totalpageheight; - AA_t m_AA; - bool m_regstartup; - int m_initpage; - bool m_selectall; - bool m_showannot; - bool m_ScrolledChanged; - - public MainWindow() - { - InitializeComponent(); - this.Closing += new System.ComponentModel.CancelEventHandler(Window_Closing); - m_file_open = false; - m_regstartup = true; - m_showannot = true; - - /* Allocations and set up */ - try - { - m_docPages = new Pages(); - m_thumbnails = new List(); - m_lineptrs = new List(); - m_textptrs = new List(); - m_textset = new List(); - m_ghostscript = new ghostsharp(); - m_ghostscript.gsUpdateMain += new ghostsharp.gsCallBackMain(gsProgress); - m_gsoutput = new gsOutput(); - m_gsoutput.Activate(); - m_outputintents = new OutputIntent(); - m_outputintents.Activate(); - m_ghostscript.gsIOUpdateMain += new ghostsharp.gsIOCallBackMain(gsIO); - m_ghostscript.gsDLLProblemMain += new ghostsharp.gsDLLProblem(gsDLL); - m_convertwin = null; - m_extractwin = null; - m_selection = null; - xaml_ZoomSlider.AddHandler(MouseLeftButtonUpEvent, new MouseButtonEventHandler(ZoomReleased), true); - xaml_PageList.AddHandler(Grid.DragOverEvent, new System.Windows.DragEventHandler(Grid_DragOver), true); - xaml_PageList.AddHandler(Grid.DropEvent, new System.Windows.DragEventHandler(Grid_Drop), true); - DimSelections(); - status_t result = CleanUp(); - - string[] arguments = Environment.GetCommandLineArgs(); - if (arguments.Length > 1) - { - string filePath = arguments[1]; - ProcessFile(filePath); - } - else - { - if (m_regstartup) - InitFromRegistry(); - } - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed at initialization\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - - private void Grid_DragOver(object sender, System.Windows.DragEventArgs e) - { - if (e.Data.GetDataPresent(System.Windows.DataFormats.FileDrop)) - { - e.Effects = System.Windows.DragDropEffects.All; - } - else - { - e.Effects = System.Windows.DragDropEffects.None; - } - e.Handled = false; - } - - private void Grid_Drop(object sender, System.Windows.DragEventArgs e) - { - if (e.Data.GetDataPresent(System.Windows.DataFormats.FileDrop)) - { - string[] docPath = (string[]) e.Data.GetData(System.Windows.DataFormats.FileDrop); - ProcessFile(String.Join("",docPath)); - } - } - - void CloseExtraWindows(bool shutdown) - { - if (m_selection != null) - m_selection.Close(); - if (m_convertwin != null) - m_convertwin.Close(); - if (m_extractwin != null) - m_extractwin.Close(); - if (m_infowindow != null) - m_infowindow.Close(); - if (shutdown) - { - if (m_gsoutput != null) - m_gsoutput.RealWindowClosing(); - if (m_outputintents != null) - m_outputintents.RealWindowClosing(); - } - else - { - if (m_gsoutput != null) - m_gsoutput.Hide(); - if (m_outputintents != null) - m_outputintents.Hide(); - } - } - - void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) - { - CloseExtraWindows(true); - } - - /* Stuff not enabled when source is XPS */ - void EnabletoPDF() - { - xaml_savepdf.IsEnabled = true; - xaml_linearize_pdf.IsEnabled = true; - xaml_saveas.IsEnabled = true; - xaml_Extract.IsEnabled = true; - xaml_conversions.IsEnabled = true; - xaml_extractselection.IsEnabled = true; - } - - void DisabletoPDF() - { - xaml_savepdf.IsEnabled = false; - xaml_linearize_pdf.IsEnabled = false; - xaml_saveas.IsEnabled = false; - xaml_Extract.IsEnabled = false; - xaml_conversions.IsEnabled = false; - xaml_extractselection.IsEnabled = false; - } - - private void DimSelections() - { - xaml_currPage.Text = ""; - xaml_TotalPages.Text = "/ 0"; - xaml_Zoomsize.Text = "100"; - xaml_BackPage.Opacity = 0.5; - xaml_Contents.Opacity = 0.5; - xaml_currPage.Opacity = 0.5; - xaml_currPage.IsEnabled = false; - xaml_ForwardPage.Opacity = 0.5; - xaml_Links.Opacity = 0.5; - xaml_Print.Opacity = 0.5; - xaml_SavePDF.Opacity = 0.5; - xaml_Search.Opacity = 0.5; - xaml_Thumbs.Opacity = 0.5; - xaml_TotalPages.Opacity = 0.5; - xaml_zoomIn.Opacity = 0.5; - xaml_zoomOut.Opacity = 0.5; - xaml_Zoomsize.Opacity = 0.5; - xaml_ExpandFill.Opacity = 0.5; - xaml_ContScrollFill.Opacity = 0.5; - xaml_ActualSize.Opacity = 0.5; - xaml_Zoomsize.IsEnabled = false; - xaml_ZoomSlider.Opacity = 0.5; - xaml_ZoomSlider.IsEnabled = false; - xaml_saveas.IsEnabled = false; - xaml_closefile.IsEnabled = false; - xaml_showinfo.IsEnabled = false; - xaml_extractselection.IsEnabled = false; - xaml_conversions.IsEnabled = false; - xaml_gsmessage.IsEnabled = false; - xaml_print.IsEnabled = false; - xaml_view.IsEnabled = false; - xaml_edit.IsEnabled = false; - } - - private status_t CleanUp() - { - m_init_done = false; - this.Cursor = System.Windows.Input.Cursors.Arrow; - /* Collapse this stuff since it is going to be released */ - xaml_ThumbGrid.Visibility = System.Windows.Visibility.Collapsed; - xaml_ContentGrid.Visibility = System.Windows.Visibility.Collapsed; - xaml_VerticalScroll.Visibility = System.Windows.Visibility.Collapsed; - - /* Clear out everything */ - if (m_docPages != null && m_docPages.Count > 0) - m_docPages.Clear(); - if (m_textSelect != null) - m_textSelect.Clear(); - if (m_textset != null) - m_textset.Clear(); - if (m_lineptrs != null && m_lineptrs.Count > 0) - m_lineptrs.Clear(); - if (m_thumbnails != null && m_thumbnails.Count > 0) - m_thumbnails.Clear(); - if (m_textptrs != null && m_textptrs.Count > 0) - m_textptrs.Clear(); - if (m_page_link_list != null && m_page_link_list.Count > 0) - { - m_page_link_list.Clear(); - m_page_link_list = null; - } - if (m_text_list != null && m_text_list.Count > 0) - { - m_text_list.Clear(); - m_text_list = null; - } - if (mu_doc != null) - mu_doc.CleanUp(); - try - { - mu_doc = new mudocument(); - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during clean up\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - mu_doc.mupdfDLLProblemMain += new mudocument.mupdfDLLProblem(muDLL); - status_t result = mu_doc.Initialize(); - mu_doc.mupdfUpdateMain += new mudocument.mupdfCallBackMain(mupdfUpdate); - - if (result != status_t.S_ISOK) - { - Console.WriteLine("Library allocation failed during clean up\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Library allocation failed!"); - return result; - } - - m_have_thumbs = false; - m_file_open = false; - m_num_pages = -1; - m_links_on = false; - m_doczoom = 1.0; - m_isXPS = false; - //xaml_CancelThumb.IsEnabled = true; - m_currpage = 0; - m_ignorescrollchange = false; - m_document_type = DocumentTypes.UNKNOWN; - EnabletoPDF(); - m_clipboardset = false; - m_doscroll = false; - m_intxtselect = false; - m_textselected = false; - m_currpassword = null; - CloseExtraWindows(false); - ResetScroll(); - m_totalpageheight = 0; - m_AA = GetAA(); - m_origfile = null; - m_initpage = 0; - xaml_Zoomsize.Text = "100"; - m_selectall = false; - return result; - } - - /* Initialize from registry */ - private void InitFromRegistry() - { - RegistryKey key = Registry.CurrentUser.CreateSubKey("Software"); - RegistryKey keyA = key.CreateSubKey("Artifex Software"); - RegistryKey keygs = keyA.CreateSubKey("GSview 6.0"); - String filepath = null; - Int32 page; - AA_t aa = AA_t.HIGH; - - try - { - filepath = (String)keygs.GetValue("File", null); - aa = (AA_t)keygs.GetValue("AA"); - page = (Int32)keygs.GetValue("Page"); - } - catch - { - return; - } - keygs.Close(); - keyA.Close(); - key.Close(); - - SetAA(aa); - m_AA = aa; - - if (filepath != null && File.Exists(filepath)) - { - m_initpage = page; - ProcessFile(filepath); - } - else - m_initpage = 0; - } - - private void SetRegistry() - { - if (m_currfile == null) - return; - - RegistryKey key = Registry.CurrentUser.CreateSubKey("Software"); - RegistryKey keyA = key.CreateSubKey("Artifex Software"); - RegistryKey keygs = keyA.CreateSubKey("GSview 6.0"); - - if (m_origfile != null && (m_document_type == DocumentTypes.PS || - m_document_type == DocumentTypes.EPS)) - { - keygs.SetValue("File", m_origfile, RegistryValueKind.String); - } - else - { - keygs.SetValue("File", m_currfile, RegistryValueKind.String); - } - keygs.SetValue("Page", m_currpage, RegistryValueKind.DWord); - Int32 aa_int = (Int32)m_AA; - keygs.SetValue("AA", aa_int, RegistryValueKind.DWord); - keygs.Close(); - keyA.Close(); - key.Close(); - } - - private void AppClosing(object sender, CancelEventArgs e) - { - if (m_init_done) - SetRegistry(); - } - - private void ShowMessage(NotifyType_t type, String Message) - { - if (type == NotifyType_t.MESS_ERROR) - { - System.Windows.Forms.MessageBox.Show(Message, "Error", - MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - else - { - System.Windows.Forms.MessageBox.Show(Message, "Notice", - MessageBoxButtons.OK); - } - } - - private void CloseCommand(object sender, ExecutedRoutedEventArgs e) - { - if (m_init_done) - CloseDoc(); - } - - private void CloseDoc() - { - CleanUp(); - } - - /* Set the page with the new raster information */ - private void UpdatePage(int page_num, Byte[] bitmap, Point ras_size, - Page_Content_t content, double zoom_in, AA_t AA) - { - DocPage doc_page = this.m_docPages[page_num]; - - doc_page.Width = (int)ras_size.X; - doc_page.Height = (int)ras_size.Y; - - doc_page.Content = content; - doc_page.Zoom = zoom_in; - - int stride = doc_page.Width * 4; - doc_page.BitMap = BitmapSource.Create(doc_page.Width, doc_page.Height, - 72, 72, PixelFormats.Pbgra32, BitmapPalettes.Halftone256, bitmap, stride); - doc_page.PageNum = page_num; - doc_page.AA = AA; - - if (content == Page_Content_t.THUMBNAIL) - { - doc_page.Width = (int)(ras_size.X / Constants.SCALE_THUMB); - doc_page.Height = (int)(ras_size.Y / Constants.SCALE_THUMB); - } - } - - private void OpenFileCommand(object sender, ExecutedRoutedEventArgs e) - { - OpenFile(sender, e); - } - - private void OpenFile(object sender, RoutedEventArgs e) - { - if (m_password != null && m_password.IsActive) - m_password.Close(); - - if (m_infowindow != null && m_infowindow.IsActive) - m_infowindow.Close(); - - /* Check if gs is currently busy. If it is then don't allow a new - * file to be opened. They can cancel gs with the cancel button if - * they want */ - if (m_ghostscript.GetStatus() != gsStatus.GS_READY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy. Cancel to open new file."); - return; - } - - if (m_ghostprint != null && m_ghostprint.IsBusy()) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Let printing complete"); - return; - } - - System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog(); - dlg.Filter = "Document Files(*.ps;*.eps;*.pdf;*.xps;*.oxps;*.cbz;*.png;*.jpg;*.jpeg)|*.ps;*.eps;*.pdf;*.xps;*.oxps;*.cbz;*.png;*.jpg;*.jpeg|All files (*.*)|*.*"; - dlg.FilterIndex = 1; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - ProcessFile(dlg.FileName); - } - - private void ProcessFile(String FileName) - { - if (m_file_open) - { - CloseDoc(); - } - /* If we have a ps or eps file then launch the distiller first - * and then we will get a temp pdf file which will be opened by - * mupdf */ - string extension = System.IO.Path.GetExtension(FileName); - /* We are doing this based on the extension but like should do - * it based upon the content */ - switch (extension.ToUpper()) - { - case ".PS": - m_document_type = DocumentTypes.PS; - break; - case ".EPS": - m_document_type = DocumentTypes.EPS; - break; - case ".XPS": - case ".OXPS": - m_document_type = DocumentTypes.XPS; - break; - case ".PDF": - m_document_type = DocumentTypes.PDF; - break; - case ".CBZ": - m_document_type = DocumentTypes.CBZ; - break; - case ".PNG": - m_document_type = DocumentTypes.PNG; - break; - case ".JPG": - m_document_type = DocumentTypes.JPG; - break; - case ".JPEG": - m_document_type = DocumentTypes.JPG; - break; - default: - { - ShowMessage(NotifyType_t.MESS_STATUS, "Unknown File Type"); - return; - } - } - if (extension.ToUpper() == ".PS" || extension.ToUpper() == ".EPS") - { - xaml_DistillProgress.Value = 0; - if (m_ghostscript.DistillPS(FileName, Constants.DEFAULT_GS_RES) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS currently busy"); - return; - } - xaml_DistillName.Text = "Distilling"; - xaml_CancelDistill.Visibility = System.Windows.Visibility.Visible; - xaml_DistillName.FontWeight = FontWeights.Bold; - xaml_DistillGrid.Visibility = System.Windows.Visibility.Visible; - return; - } - /* Set if this is already xps for printing */ - if (extension.ToUpper() == ".XPS" || extension.ToUpper() == ".OXPS") - m_isXPS = true; - OpenFile2(FileName); - } - - private void OpenFile2(String File) - { - m_currfile = File; - xaml_OpenProgressGrid.Visibility = System.Windows.Visibility.Visible; - xaml_openfilestatus.Text = "Opening File"; - /* The file open can take a fair amount of time. So that we can show - * an indeterminate progress bar while opening, go ahead an do this - * on a separate thread */ - OpenFileBG(); - } - - private void OpenWork(object sender, DoWorkEventArgs e) - { - BackgroundWorker worker = sender as BackgroundWorker; - - status_t code = mu_doc.OpenFile(m_currfile); - worker.ReportProgress(100, code); - } - - private void OpenProgress(object sender, ProgressChangedEventArgs e) - { - status_t result = (status_t)(e.UserState); - - if (result == status_t.S_ISOK) - { - /* Check if we need a password */ - if (mu_doc.RequiresPassword()) - { - xaml_OpenProgressGrid.Visibility = System.Windows.Visibility.Collapsed; - GetPassword(); - } - else - StartViewer(); - } - else - { - m_currfile = null; - } - } - - private void OpenFileBG() - { - try - { - m_openfile = new BackgroundWorker(); - m_openfile.WorkerReportsProgress = true; - m_openfile.WorkerSupportsCancellation = false; - m_openfile.DoWork += new DoWorkEventHandler(OpenWork); - m_openfile.ProgressChanged += new ProgressChangedEventHandler(OpenProgress); - m_openfile.RunWorkerAsync(); - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during opening\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - - private void SetPageAnnot(int page_num, Annotate_t render_result) - { - if (m_docPages[page_num].Annotate == Annotate_t.UNKNOWN || - m_docPages[page_num].Annotate == Annotate_t.COMPUTING) - { - if (render_result == Annotate_t.NO_ANNOTATE) - m_docPages[page_num].Annotate = Annotate_t.NO_ANNOTATE; - else - { - if (m_showannot) - m_docPages[page_num].Annotate = Annotate_t.ANNOTATE_VISIBLE; - else - m_docPages[page_num].Annotate = Annotate_t.ANNOTATE_HIDDEN; - } - } - else - { - if (m_docPages[page_num].Annotate != Annotate_t.NO_ANNOTATE) - { - if (m_showannot) - m_docPages[page_num].Annotate = Annotate_t.ANNOTATE_VISIBLE; - else - m_docPages[page_num].Annotate = Annotate_t.ANNOTATE_HIDDEN; - } - } - } - - private void InitialRenderWork(object sender, DoWorkEventArgs e) - { - BackgroundWorker worker = sender as BackgroundWorker; - int look_ahead = Math.Min(m_num_pages, Constants.INIT_LOOK_AHEAD); - - /* Do the first few full res pages */ - for (int k = 0; k < look_ahead; k++) - { - if (m_num_pages > k) - { - Point ras_size; - double scale_factor = 1.0; - Byte[] bitmap; - BlocksText charlist; - status_t code; - Annotate_t annot; - - if (ComputePageSize(k, scale_factor, out ras_size) == status_t.S_ISOK) - { - try - { - bitmap = new byte[(int)ras_size.X * (int)ras_size.Y * 4]; - - /* Synchronous call on our background thread */ - code = (status_t)mu_doc.RenderPage(k, bitmap, (int)ras_size.X, - (int)ras_size.Y, scale_factor, false, true, - !(m_textset[k]), out charlist, m_showannot, out annot); - } - catch (OutOfMemoryException em) - { - Console.WriteLine("Memory allocation failed init page " + k + em.Message + "\n"); - break; - } - /* create new page if we rendered ok. set ui value with - * progress call back, pass page number, charlist and bitmap */ - if (code == status_t.S_ISOK) - { - pageprogress_t page_prog = new pageprogress_t(); - page_prog.bitmap = bitmap; - page_prog.charlist = charlist; - page_prog.pagenum = k; - page_prog.size = ras_size; - page_prog.annot = annot; - worker.ReportProgress(100, page_prog); - } - } - } - } - } - - private void InitialRenderProgressChanged(object sender, ProgressChangedEventArgs e) - { - pageprogress_t result = (pageprogress_t)(e.UserState); - int k = result.pagenum; - - m_textset[k] = true; - m_textptrs[k] = result.charlist; - m_docPages[k].TextBlocks = result.charlist; - UpdatePage(k, result.bitmap, result.size, Page_Content_t.FULL_RESOLUTION, 1.0, m_AA); - m_docPages[k].NativeHeight = (int) result.size.Y; - m_docPages[k].NativeWidth = (int)result.size.X; - SetPageAnnot(k, result.annot); - } - - private void InitialRenderCompleted(object sender, RunWorkerCompletedEventArgs e) - { - m_init_done = true; - m_currpage = 0; - RenderThumbs(); - m_file_open = true; - xaml_BackPage.Opacity = 1; - xaml_Contents.Opacity = 1; - xaml_currPage.Opacity = 1; - xaml_ForwardPage.Opacity = 1; - xaml_Links.Opacity = 1; - xaml_Print.Opacity = 1; - xaml_SavePDF.Opacity = 1; - xaml_Search.Opacity = 1; - xaml_Thumbs.Opacity = 1; - xaml_TotalPages.Opacity = 1; - xaml_zoomIn.Opacity = 1; - xaml_zoomOut.Opacity = 1; - xaml_Zoomsize.Opacity = 1; - xaml_ExpandFill.Opacity = 1; - xaml_ContScrollFill.Opacity = 1; - xaml_ActualSize.Opacity = 1; - xaml_Zoomsize.IsEnabled = true; - xaml_currPage.IsEnabled = true; - xaml_TotalPages.Text = "/ " + m_num_pages.ToString(); - xaml_currPage.Text = "1"; - xaml_ZoomSlider.Opacity = 1.0; - xaml_ZoomSlider.IsEnabled = true; - xaml_closefile.IsEnabled = true; - xaml_saveas.IsEnabled = true; - xaml_showinfo.IsEnabled = true; - xaml_extractselection.IsEnabled = true; - xaml_conversions.IsEnabled = true; - xaml_gsmessage.IsEnabled = true; - xaml_print.IsEnabled = true; - xaml_view.IsEnabled = true; - xaml_edit.IsEnabled = true; - if (m_isXPS) - DisabletoPDF(); - xaml_OpenProgressGrid.Visibility = System.Windows.Visibility.Collapsed; - xaml_VerticalScroll.Visibility = System.Windows.Visibility.Visible; - xaml_VerticalScroll.Value = 0; - } - - private void InitialRenderBG() - { - int look_ahead = Math.Min(Constants.INIT_LOOK_AHEAD, m_num_pages); - m_currpage = 0; - m_thumbnails.Capacity = m_num_pages; - - for (int k = 0; k < Constants.INIT_LOOK_AHEAD; k++) - { - m_docPages.Add(InitDocPage()); - m_docPages[k].PageNum = k; - m_textptrs.Add(new BlocksText()); - m_lineptrs.Add(new LinesText()); - m_textset.Add(false); - } - var dummy = InitDocPage(); - for (int k = Constants.INIT_LOOK_AHEAD; k < m_num_pages; k++) - { - m_docPages.Add(dummy); - m_textptrs.Add(new BlocksText()); - m_lineptrs.Add(new LinesText()); - m_textset.Add(false); - } - - xaml_PageList.ItemsSource = m_docPages; - - try - { - m_initrender = new BackgroundWorker(); - m_initrender.WorkerReportsProgress = true; - m_initrender.WorkerSupportsCancellation = false; - m_initrender.DoWork += new DoWorkEventHandler(InitialRenderWork); - m_initrender.RunWorkerCompleted += new RunWorkerCompletedEventHandler(InitialRenderCompleted); - m_initrender.ProgressChanged += new ProgressChangedEventHandler(InitialRenderProgressChanged); - m_initrender.RunWorkerAsync(); - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during initial render\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - private void StartViewer() - { - m_num_pages = mu_doc.GetPageCount(); - - if (m_num_pages == 0) - { - xaml_OpenProgressGrid.Visibility = System.Windows.Visibility.Collapsed; - CleanUp(); - ShowMessage(NotifyType_t.MESS_ERROR, m_currfile + " is corrupted"); - } - else - { - xaml_openfilestatus.Text = "Initial Page Rendering"; - xaml_openfilestatus.UpdateLayout(); - InitialRenderBG(); - } - } - - private status_t ComputePageSize(int page_num, double scale_factor, - out Point render_size) - { - Point renpageSize = new Point(); - - status_t code = (status_t)mu_doc.GetPageSize(page_num, out render_size); - if (code != status_t.S_ISOK) - return code; - - renpageSize.X = (render_size.X * scale_factor); - renpageSize.Y = (render_size.Y * scale_factor); - - render_size = renpageSize; - - return status_t.S_ISOK; - } - - private DocPage InitDocPage() - { - DocPage doc_page = new DocPage(); - - doc_page.BitMap = null; - doc_page.Height = Constants.BLANK_HEIGHT; - doc_page.Width = Constants.BLANK_WIDTH; - doc_page.NativeHeight = Constants.BLANK_HEIGHT; - doc_page.NativeWidth = Constants.BLANK_WIDTH; - doc_page.Content = Page_Content_t.NOTSET; - doc_page.TextBox = null; - doc_page.LinkBox = null; - doc_page.SelHeight = 0; - doc_page.SelWidth = 0; - doc_page.SelX = 0; - doc_page.SelY = 0; - return doc_page; - } - - #region Navigation - private void OnBackPageClick(object sender, RoutedEventArgs e) - { - if (m_currpage == 0 || !m_init_done) return; - m_ignorescrollchange = true; - RenderRange(m_currpage - 1, true, zoom_t.NO_ZOOM, 0); - } - - private void OnForwardPageClick(object sender, RoutedEventArgs e) - { - if (m_currpage == m_num_pages - 1 || !m_init_done) return; - m_ignorescrollchange = true; - RenderRange(m_currpage + 1, true, zoom_t.NO_ZOOM, 0); - } - - private void PageEnterClicked(object sender, System.Windows.Input.KeyEventArgs e) - { - if (e.Key == Key.Return) - { - e.Handled = true; - var desired_page = xaml_currPage.Text; - try - { - int page = System.Convert.ToInt32(desired_page); - if (page > 0 && page < (m_num_pages + 1)) - { - m_ignorescrollchange = true; - RenderRange(page - 1, true, zoom_t.NO_ZOOM, 0); - } - } - catch (FormatException e1) - { - Console.WriteLine("String is not a sequence of digits."); - } - catch (OverflowException e2) - { - Console.WriteLine("The number cannot fit in an Int32."); - } - } - } - - private void OnKeyDownHandler(object sender, System.Windows.Input.KeyEventArgs e) - { - switch (e.Key) - { - case Key.Left: - case Key.PageUp: - if (m_currpage == 0 || !m_init_done) - return; - m_ignorescrollchange = true; - RenderRange(m_currpage - 1, true, zoom_t.NO_ZOOM, 0); - e.Handled = true; - break; - - case Key.Right: - case Key.PageDown: - if (m_currpage == m_num_pages - 1 || !m_init_done) - return; - m_ignorescrollchange = true; - RenderRange(m_currpage + 1, true, zoom_t.NO_ZOOM, 0); - e.Handled = true; - break; - - case Key.Up: - if (!m_init_done) - return; - e.Handled = true; - OffsetScroll(-Constants.VERT_SCROLL_STEP * m_doczoom); - break; - - case Key.Down: - if (!m_init_done) - return; - e.Handled = true; - OffsetScroll(Constants.VERT_SCROLL_STEP * m_doczoom); - break; - } - } - #endregion Navigation - - private void CancelLoadClick(object sender, RoutedEventArgs e) - { - /* Cancel during thumbnail loading. Deactivate the button - * and cancel the thumbnail rendering */ - if (m_thumbworker != null) - m_thumbworker.CancelAsync(); - //xaml_CancelThumb.IsEnabled = false; - } - - private void ToggleThumbs(object sender, RoutedEventArgs e) - { - if (m_have_thumbs) - { - if (xaml_ThumbGrid.Visibility == System.Windows.Visibility.Collapsed) - { - xaml_ThumbGrid.Visibility = System.Windows.Visibility.Visible; - } - else - { - xaml_ThumbGrid.Visibility = System.Windows.Visibility.Collapsed; - } - } - } - - private void ToggleContents(object sender, RoutedEventArgs e) - { - if (xaml_ContentGrid.Visibility == System.Windows.Visibility.Visible) - { - xaml_ContentGrid.Visibility = System.Windows.Visibility.Collapsed; - return; - } - - if (m_num_pages < 0) - return; - - if (xaml_ContentList.Items.IsEmpty) - { - int size_content = mu_doc.ComputeContents(); - if (size_content == 0) - return; - xaml_ContentList.ItemsSource = mu_doc.contents; - } - xaml_ContentGrid.Visibility = System.Windows.Visibility.Visible; - } - - private void ThumbSelected(object sender, MouseButtonEventArgs e) - { - var item = ((FrameworkElement)e.OriginalSource).DataContext as DocPage; - - if (item != null) - { - if (item.PageNum < 0) - return; - RenderRange(item.PageNum, true, zoom_t.NO_ZOOM, 0); - } - } - - private void ContentSelected(object sender, MouseButtonEventArgs e) - { - var item = ((FrameworkElement)e.OriginalSource).DataContext as ContentItem; - if (item != null && item.Page < m_num_pages) - { - int page = m_docPages[item.Page].PageNum; - if (page >= 0 && page < m_num_pages) - RenderRange(page, true, zoom_t.NO_ZOOM, 0); - } - } - - /* We need to avoid rendering due to size changes */ - private void ListViewScrollChanged(object sender, ScrollChangedEventArgs e) - { - /* This makes sure we dont call render range a second time due to - * page advances */ - int first_item = -1; - int second_item = -1; - //Console.WriteLine("***************************************/n"); - //Console.WriteLine("VerticalChange = " + e.VerticalChange + "/n"); - //Console.WriteLine("ExtentHeightChange = " + e.ExtentHeightChange + "/n"); - //Console.WriteLine("ExtentWidthChange = " + e.ExtentWidthChange + "/n"); - //Console.WriteLine("HorizontalChange = " + e.HorizontalChange + "/n"); - //Console.WriteLine("ViewportHeightChange = " + e.ViewportHeightChange + "/n"); - //Console.WriteLine("ViewportWidthChange = " + e.ViewportWidthChange + "/n"); - //Console.WriteLine("ExtentHeight = " + e.ExtentHeight + "/n"); - //Console.WriteLine("ViewportHeight = " + e.ViewportHeight + "/n"); - //Console.WriteLine("VerticalOffset = " + e.VerticalOffset + "/n"); - //Console.WriteLine("***************************************/n"); - if (m_ignorescrollchange == true) - { - m_ignorescrollchange = false; - return; - } - if (!m_init_done) - return; - if (e.VerticalChange == 0) - return; - if (m_num_pages == 1) - return; - - /* From current page go forward and backward checking if pages are - * visible */ - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - { - double bottom = this.ActualHeight; - /* first going forward */ - for (int kk = m_currpage + 1; kk < m_num_pages; kk++) - { - UIElement uiElement = (UIElement)xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk); - double y_top = uiElement.TranslatePoint(new System.Windows.Point(0, 0), xaml_PageList).Y; - double y_bottom = uiElement.TranslatePoint(new System.Windows.Point(0, m_docPages[kk].Height), xaml_PageList).Y; - /* Test if this and all further pages are outside window */ - if (y_top > bottom) - break; - /* Test if page is not even yet in window */ - if (y_bottom > 0) - { - if (!(m_dispatcherTimer != null && m_dispatcherTimer.IsEnabled == true)) - { - /* In this case grab the first one that we find */ - if (second_item == -1) - second_item = kk; - } - } - } - - /* and now going backward */ - for (int kk = m_currpage; kk > -1; kk--) - { - UIElement uiElement = (UIElement)xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk); - double y_top = uiElement.TranslatePoint(new System.Windows.Point(0, 0), xaml_PageList).Y; - double y_bottom = uiElement.TranslatePoint(new System.Windows.Point(0, m_docPages[kk].Height), xaml_PageList).Y; - /* Test if this and all further pages are outside window */ - if (y_bottom < 0) - break; - if (y_top < bottom) - if (!(m_dispatcherTimer != null && m_dispatcherTimer.IsEnabled == true)) - first_item = kk; - } - e.Handled = true; - if (first_item != -1) - second_item = first_item; - /* Finish */ - if (m_ScrolledChanged) - { - m_ScrolledChanged = false; - } - else - { - /* We have to update the vertical scroll position */ - double perc = (e.VerticalOffset) / (e.ExtentHeight - e.ViewportHeight); - xaml_VerticalScroll.Value = perc * xaml_VerticalScroll.Maximum; - } - if (second_item < 0) - second_item = 0; - RenderRange(second_item, false, zoom_t.NO_ZOOM, 0); - } - } - - /* ScrollIntoView will not scroll to top on its own. If item is already - * in view it just sits there */ - private void ScrollPageToTop(int k, double offset, bool from_scroller) - { - if (m_num_pages == 1) - return; - /* Get access to the scrollviewer */ - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - { - UIElement uiElement = (UIElement) xaml_PageList.ItemContainerGenerator.ContainerFromIndex(k); - double y = uiElement.TranslatePoint(new System.Windows.Point(0, offset), xaml_PageList).Y; - double curr_value = viewer.VerticalOffset; - viewer.ScrollToVerticalOffset(curr_value + y); - - if (!from_scroller) - { - double perc = (double) k / (double) ( m_num_pages - 1); - xaml_VerticalScroll.Value = perc * xaml_VerticalScroll.Maximum; - } - } - } - - /* Scroll to offset */ - private void OffsetScroll(double offset) - { - if (m_num_pages == 1) - return; - /* Get access to the scrollviewer */ - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - { - double curr_value = viewer.VerticalOffset; - AdjustScrollPercent(offset / viewer.ScrollableHeight); - viewer.ScrollToVerticalOffset(curr_value + offset); - } - } - - /* Scroll to offset */ - private void OffsetScrollPercent(double percent) - { - /* Get access to the scrollviewer */ - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - { - double curr_value = viewer.VerticalOffset; - if (curr_value < 0 || curr_value > viewer.MaxHeight) - return; - var extentheight = viewer.ExtentHeight - viewer.ViewportHeight; - - var pos = extentheight * percent; - viewer.ScrollToVerticalOffset(pos); - } - } - - /* Render +/- the look ahead from where we are if blank page is present */ - async private void RenderRange(int new_page, bool scrollto, zoom_t newzoom, double zoom_offset) - { - /* Need to figure out what pages are going to be visible */ - double bottom = this.ActualHeight; - bool done = false; - int final_page = new_page; - double count = -zoom_offset; - int offset = -1; - bool scrollbottom = false; - - if (newzoom != zoom_t.NO_ZOOM) - offset = 0; - - if (m_thumbnails.Count < m_num_pages) - final_page = final_page + 1; - else - { - while (!done && final_page >= 0 && final_page < m_num_pages) - { - count = count + m_thumbnails[final_page].NativeHeight * m_doczoom; - final_page = final_page + 1; - if (final_page == m_num_pages || count > bottom) - done = true; - } - /* We have zoomed out to a point where the offset will not stay - * in its current spot. Figure out where we need to be */ - final_page = final_page - 1; - if (newzoom == zoom_t.ZOOM_OUT && count < bottom) - { - int curr_page = new_page - 1; - while (true) - { - if (curr_page < 0) - break; - count = count + m_thumbnails[curr_page].NativeHeight * m_doczoom; - if (count > bottom) - break; - curr_page = curr_page - 1; - } - new_page = curr_page; - if (new_page < 0) - new_page = 0; - scrollbottom = true; - } - } - - for (int k = new_page + offset; k <= final_page + 1; k++) - { - if (k >= 0 && k < m_num_pages) - { - /* Check if page is already rendered */ - var doc = m_docPages[k]; - if (doc.Content != Page_Content_t.FULL_RESOLUTION || - doc.Zoom != m_doczoom || m_AA != doc.AA || - (doc.Annotate == Annotate_t.UNKNOWN && m_showannot) || - (doc.Annotate == Annotate_t.ANNOTATE_VISIBLE && !m_showannot) || - (doc.Annotate == Annotate_t.ANNOTATE_HIDDEN && m_showannot)) - { - Point ras_size; - double scale_factor = m_doczoom; - /* To avoid multiple page renderings on top of one - * another with scroll changes mark this as being - * full resolution */ - m_docPages[k].Content = Page_Content_t.FULL_RESOLUTION; - /* Avoid launching another thread just because we don't - * know the annotation condition for this page */ - m_docPages[k].Annotate = Annotate_t.COMPUTING; - if (ComputePageSize(k, scale_factor, out ras_size) == status_t.S_ISOK) - { - try - { - Byte[] bitmap = new byte[(int)ras_size.X * (int)ras_size.Y * 4]; - BlocksText charlist = null; - Annotate_t annot = Annotate_t.UNKNOWN; - m_docPages[k].NativeWidth = (int)(ras_size.X / scale_factor); - m_docPages[k].NativeHeight = (int)(ras_size.Y / scale_factor); - - Task ren_task = - new Task(() => mu_doc.RenderPage(k, bitmap, - (int)ras_size.X, (int)ras_size.Y, scale_factor, - false, true, !(m_textset[k]), out charlist, m_showannot, - out annot)); - ren_task.Start(); - await ren_task.ContinueWith((antecedent) => - { - status_t code = (status_t)ren_task.Result; - if (code == status_t.S_ISOK) - { - SetPageAnnot(k, annot); - if (m_docPages[k].TextBox != null) - ScaleTextBox(k); - if (m_links_on && m_page_link_list != null) - { - m_docPages[k].LinkBox = m_page_link_list[k]; - if (m_docPages[k].LinkBox != null) - ScaleLinkBox(k); - } - else - { - m_docPages[k].LinkBox = null; - } - if (!(m_textset[k]) && charlist != null) - { - m_textptrs[k] = charlist; - if (scale_factor != 1.0) - ScaleTextBlocks(k, scale_factor); - m_docPages[k].TextBlocks = m_textptrs[k]; - m_textset[k] = true; - if (m_selectall) - { - int num_blocks = m_docPages[k].TextBlocks.Count; - for (int jj = 0; jj < num_blocks; jj++) - { - m_docPages[k].TextBlocks[jj].Color = m_textselectcolor; - } - } - } - else - { - /* We had to rerender due to scale */ - if (m_textptrs[k] != null) - { - ScaleTextBlocks(k, scale_factor); - m_docPages[k].TextBlocks = m_textptrs[k]; - } - if (m_lineptrs[k] != null) - { - ScaleTextLines(k, scale_factor); - m_docPages[k].SelectedLines = m_lineptrs[k]; - } - } - /* This needs to be handled here to reduce - * flashing effects */ - if (newzoom != zoom_t.NO_ZOOM && k == new_page) - { - m_ignorescrollchange = true; - UpdatePageSizes(); - xaml_VerticalScroll.Maximum = m_totalpageheight * m_doczoom + 4 * m_num_pages; - if (!scrollbottom) - ScrollPageToTop(new_page, zoom_offset, false); - } - UpdatePage(k, bitmap, ras_size, - Page_Content_t.FULL_RESOLUTION, m_doczoom, m_AA); - if (k == new_page && scrollto && new_page != m_currpage) - { - m_doscroll = true; - ScrollPageToTop(k, 0, false); - } - } - }, TaskScheduler.FromCurrentSynchronizationContext()); - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed page " + k + "\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - } - else - { - /* We did not have to render the page but we may need to - * scroll to it */ - if (k == new_page && scrollto && new_page != m_currpage) - { - m_ignorescrollchange = true; - ScrollPageToTop(k, 0, false); - } - } - } - } - /* Release old range and set new page */ - //ReleasePages(m_currpage, new_page - 1, final_page + 1); - m_currpage = new_page; - xaml_currPage.Text = (m_currpage + 1).ToString(); - } - - /* Avoids the next page jumping into view when touched by mouse. See xaml code */ - private void AvoidScrollIntoView(object sender, RequestBringIntoViewEventArgs e) - { - if (!m_doscroll) - e.Handled = true; - else - m_doscroll = false; - } - - private void ReleasePages(int old_page, int new_page, int final_page) - { - if (old_page == new_page) return; - /* To keep from having memory issue reset the page back to - the thumb if we are done rendering the thumbnails */ - for (int k = 0; k < m_num_pages; k++) - { - if (k < new_page || k > final_page) - { - if (k >= 0 && k < m_num_pages) - { - SetThumb(k); - } - } - } - } - - /* Return this page from a full res image to the thumb image */ - private void SetThumb(int page_num) - { - /* See what is there now */ - var doc_page = m_docPages[page_num]; - if (doc_page.Content == Page_Content_t.THUMBNAIL && - doc_page.Zoom == m_doczoom) return; - - if (m_thumbnails.Count > page_num) - { - doc_page.Content = Page_Content_t.THUMBNAIL; - doc_page.Zoom = m_doczoom; - - doc_page.BitMap = m_thumbnails[page_num].BitMap; - doc_page.Width = (int)(m_doczoom * doc_page.BitMap.PixelWidth / Constants.SCALE_THUMB); - doc_page.Height = (int)(m_doczoom * doc_page.BitMap.PixelHeight / Constants.SCALE_THUMB); - doc_page.PageNum = page_num; - doc_page.LinkBox = null; - doc_page.TextBox = null; - /* No need to refresh unless it just occurs during other stuff - * we just want to make sure we can release the bitmaps */ - //doc_page.PageRefresh(); - } - } - - private void gsDLL(object gsObject, String mess) - { - ShowMessage(NotifyType_t.MESS_STATUS, mess); - } - - /* Catastrophic */ - private void muDLL(object gsObject, String mess) - { - ShowMessage(NotifyType_t.MESS_ERROR, mess); - /* Disable even the ability to open a file */ - xaml_open.Opacity = 0.5; - xaml_open.IsEnabled = false; - xaml_file.Opacity = 0.5; - xaml_file.IsEnabled = false; - /* And to drag - drop or registry start up */ - xaml_PageList.RemoveHandler(Grid.DragOverEvent, new System.Windows.DragEventHandler(Grid_DragOver)); - xaml_PageList.RemoveHandler(Grid.DropEvent, new System.Windows.DragEventHandler(Grid_Drop)); - m_regstartup = false; - } - - private void gsIO(object gsObject, String mess, int len) - { - m_gsoutput.Update(mess, len); - } - - private void mupdfUpdate(object muObject, muPDFEventArgs asyncInformation) - { - if (asyncInformation.Completed) - { - xaml_MuPDFProgress.Value = 100; - xaml_MuPDFGrid.Visibility = System.Windows.Visibility.Collapsed; - if (asyncInformation.Params.result == GS_Result_t.gsFAILED) - { - ShowMessage(NotifyType_t.MESS_STATUS, "MuPDF failed to convert document"); - } - MuPDFResult(asyncInformation.Params); - } - else - { - this.xaml_MuPDFProgress.Value = asyncInformation.Progress; - } - } - - /* MuPDF Result*/ - public void MuPDFResult(ConvertParams_t gs_result) - { - if (gs_result.result == GS_Result_t.gsCANCELLED) - { - xaml_MuPDFGrid.Visibility = System.Windows.Visibility.Collapsed; - return; - } - if (gs_result.result == GS_Result_t.gsFAILED) - { - xaml_MuPDFGrid.Visibility = System.Windows.Visibility.Collapsed; - ShowMessage(NotifyType_t.MESS_STATUS, "MuPDF Failed Conversion"); - return; - } - ShowMessage(NotifyType_t.MESS_STATUS, "MuPDF Completed Conversion"); - } - - private void gsProgress(object gsObject, gsEventArgs asyncInformation) - { - if (asyncInformation.Completed) - { - xaml_DistillProgress.Value = 100; - xaml_DistillGrid.Visibility = System.Windows.Visibility.Collapsed; - if (asyncInformation.Params.result == GS_Result_t.gsFAILED) - { - switch (asyncInformation.Params.task) - { - case GS_Task_t.CREATE_XPS: - ShowMessage(NotifyType_t.MESS_STATUS, "Ghostscript failed to create XPS"); - break; - - case GS_Task_t.PS_DISTILL: - ShowMessage(NotifyType_t.MESS_STATUS, "Ghostscript failed to distill PS"); - break; - - case GS_Task_t.SAVE_RESULT: - ShowMessage(NotifyType_t.MESS_STATUS, "Ghostscript failed to convert document"); - break; - } - return; - } - GSResult(asyncInformation.Params); - } - else - { - this.xaml_DistillProgress.Value = asyncInformation.Progress; - } - } - - /* GS Result*/ - public void GSResult(gsParams_t gs_result) - { - if (gs_result.result == GS_Result_t.gsCANCELLED) - { - xaml_DistillGrid.Visibility = System.Windows.Visibility.Collapsed; - return; - } - if (gs_result.result == GS_Result_t.gsFAILED) - { - xaml_DistillGrid.Visibility = System.Windows.Visibility.Collapsed; - ShowMessage(NotifyType_t.MESS_STATUS, "GS Failed Conversion"); - return; - } - switch (gs_result.task) - { - case GS_Task_t.CREATE_XPS: - xaml_DistillGrid.Visibility = System.Windows.Visibility.Collapsed; - PrintXPS(gs_result.outputfile); - break; - - case GS_Task_t.PS_DISTILL: - xaml_DistillGrid.Visibility = System.Windows.Visibility.Collapsed; - m_origfile = gs_result.inputfile; - OpenFile2(gs_result.outputfile); - break; - - case GS_Task_t.SAVE_RESULT: - ShowMessage(NotifyType_t.MESS_STATUS, "GS Completed Conversion"); - break; - } - } - - private void PrintCommand(object sender, ExecutedRoutedEventArgs e) - { - Print(sender, e); - } - - /* Printing is achieved using xpswrite device in ghostscript and - * pushing that file through the XPS print queue */ - private void Print(object sender, RoutedEventArgs e) - { - if (!m_file_open) - return; - - /* If file is already xps then gs need not do this */ - if (!m_isXPS) - { - xaml_DistillProgress.Value = 0; - if (m_ghostscript.CreateXPS(m_currfile, Constants.DEFAULT_GS_RES, m_num_pages) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS currently busy"); - return; - } - else - { - /* Right now this is not possible to cancel due to the way - * that gs is run for xpswrite from pdf */ - xaml_CancelDistill.Visibility = System.Windows.Visibility.Collapsed; - xaml_DistillName.Text = "Convert to XPS"; - xaml_DistillName.FontWeight = FontWeights.Bold; - xaml_DistillGrid.Visibility = System.Windows.Visibility.Visible; - } - } - else - PrintXPS(m_currfile); - } - - private void PrintXPS(String file) - { - gsprint ghostprint = new gsprint(); - System.Windows.Controls.PrintDialog pDialog = ghostprint.GetPrintDialog(); - - if (pDialog == null) - return; - /* We have to create the XPS document on a different thread */ - XpsDocument xpsDocument = new XpsDocument(file, FileAccess.Read); - FixedDocumentSequence fixedDocSeq = xpsDocument.GetFixedDocumentSequence(); - PrintQueue printQueue = pDialog.PrintQueue; - - m_ghostprint = ghostprint; - xaml_PrintGrid.Visibility = System.Windows.Visibility.Visible; - - xaml_PrintProgress.Value = 0; - - ghostprint.Print(printQueue, fixedDocSeq); - } - - private void PrintProgress(object printHelper, gsPrintEventArgs Information) - { - if (Information.Status != PrintStatus_t.PRINT_BUSY) - { - xaml_PrintProgress.Value = 100; - xaml_PrintGrid.Visibility = System.Windows.Visibility.Collapsed; - } - else - { - xaml_PrintProgress.Value = - 100.0 * (double)Information.Page / (double)m_num_pages; - } - } - - private void CancelMuPDFClick(object sender, RoutedEventArgs e) - { - xaml_CancelMuPDF.IsEnabled = false; - mu_doc.Cancel(); - } - - private void CancelDistillClick(object sender, RoutedEventArgs e) - { - xaml_CancelDistill.IsEnabled = false; - if (m_ghostscript != null) - m_ghostscript.Cancel(); - } - - private void CancelPrintClick(object sender, RoutedEventArgs e) - { - m_ghostprint.CancelAsync(); - } - - private void ShowGSMessage(object sender, RoutedEventArgs e) - { - m_gsoutput.Show(); - } - - private void ConvertClick(object sender, RoutedEventArgs e) - { - if (m_ghostscript.GetStatus() != gsStatus.GS_READY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy"); - return; - } - - if (m_convertwin == null || !m_convertwin.IsActive) - { - m_convertwin = new Convert(m_num_pages); - m_convertwin.ConvertUpdateMain += new Convert.ConvertCallBackMain(ConvertReturn); - m_convertwin.Activate(); - m_convertwin.Show(); - } - } - - private void ConvertReturn(object sender) - { - Device device = (Device)m_convertwin.xaml_DeviceList.SelectedItem; - if (device == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "No Device Selected"); - return; - } - - if (m_ghostscript.GetStatus() != gsStatus.GS_READY && - !device.MuPDFDevice) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy"); - return; - } - - System.Collections.IList pages = m_convertwin.xaml_PageList.SelectedItems; - System.Collections.IList pages_selected = null; - String options = m_convertwin.xaml_options.Text; - int resolution = 72; - bool multi_page_needed = false; - int first_page = -1; - int last_page = -1; - - if (pages.Count == 0) - { - ShowMessage(NotifyType_t.MESS_STATUS, "No Pages Selected"); - return; - } - - /* Get a filename */ - System.Windows.Forms.SaveFileDialog dlg = new System.Windows.Forms.SaveFileDialog(); - dlg.Filter = "All files (*.*)|*.*"; - dlg.FilterIndex = 1; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - if (device.MuPDFDevice) - { - /* Allow only one of these as a time */ - pages_selected = pages; - var val = m_convertwin.xaml_resolution.Text; - if (val.Length > 0) - { - bool isok = true; - int num = resolution; - try - { - num = System.Convert.ToInt32(val); - } - catch (FormatException e) - { - isok = false; - Console.WriteLine("Input string is not a sequence of digits."); - } - catch (OverflowException e) - { - isok = false; - Console.WriteLine("The number cannot fit in an Int32."); - } - if (isok && num > 0) - resolution = num; - } - - if (mu_doc.ConvertSave(device.DeviceType, dlg.FileName, - pages.Count, pages_selected, resolution) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "MuPDF conversion busy"); - return; - } - xaml_CancelMuPDF.Visibility = System.Windows.Visibility.Visible; - xaml_MuPDFGrid.Visibility = System.Windows.Visibility.Visible; - } - else - { - if (!device.SupportsMultiPage && m_num_pages > 1) - multi_page_needed = true; - - if (pages.Count != m_num_pages) - { - /* We may need to go through page by page. Determine if - * selection of pages is continuous. This is done by - * looking at the first one in the list and the last one - * in the list and checking the length */ - SelectPage lastpage = (SelectPage)pages[pages.Count - 1]; - SelectPage firstpage = (SelectPage)pages[0]; - int temp = lastpage.Page - firstpage.Page + 1; - if (temp == pages.Count) - { - /* Pages are contiguous. Add first and last page - * as command line option */ - options = options + " -dFirstPage=" + firstpage.Page + " -dLastPage=" + lastpage.Page; - first_page = firstpage.Page; - last_page = lastpage.Page; - } - else - { - /* Pages are not continguous. We will do this page - * by page.*/ - pages_selected = pages; - multi_page_needed = true; /* need to put in separate outputs */ - } - } - xaml_DistillProgress.Value = 0; - if (m_ghostscript.Convert(m_currfile, options, - device.DeviceName, dlg.FileName, pages.Count, resolution, - multi_page_needed, pages_selected, first_page, last_page, - null, null) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy"); - return; - } - xaml_DistillName.Text = "GS Converting Document"; - xaml_CancelDistill.Visibility = System.Windows.Visibility.Collapsed; - xaml_DistillName.FontWeight = FontWeights.Bold; - xaml_DistillGrid.Visibility = System.Windows.Visibility.Visible; - } - m_convertwin.Close(); - } - return; - } - - private void ExtractPages(object sender, RoutedEventArgs e) - { - if (!m_init_done || m_isXPS) - return; - - if (m_extractwin == null || !m_extractwin.IsActive) - { - m_extractwin = new PageExtractSave(m_num_pages); - m_extractwin.ExtractMain += new PageExtractSave.ExtractCallBackMain(ExtractReturn); - m_extractwin.Activate(); - m_extractwin.Show(); - } - } - - private void ExtractReturn(object sender) - { - if (m_extractwin.xaml_PageList.SelectedItems.Count == 0) - { - ShowMessage(NotifyType_t.MESS_STATUS, "No Pages Selected"); - return; - } - - /* Go through the actual list not the selected items list. The - * selected items list contains them in the order that the were - * selected not the order graphically shown */ - List pages = new List(m_extractwin.xaml_PageList.SelectedItems.Count); - - for (int kk = 0; kk < m_extractwin.xaml_PageList.Items.Count; kk++) - { - var item = (m_extractwin.xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk)) as System.Windows.Controls.ListViewItem; - if (item.IsSelected == true) - { - pages.Add((SelectPage) m_extractwin.Pages[kk]); - } - } - - /* Get a filename */ - System.Windows.Forms.SaveFileDialog dlg = new System.Windows.Forms.SaveFileDialog(); - dlg.Filter = "All files (*.pdf)|*.pdf"; - dlg.FilterIndex = 1; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - mu_doc.PDFExtract(m_currfile, dlg.FileName, m_currpassword, m_currpassword != null, - false, pages.Count, pages); - m_extractwin.Close(); - } - return; - } - - private void GetPassword() - { - if (m_password == null) - { - m_password = new Password(); - m_password.PassUpdateMain += new Password.PassCallBackMain(PasswordReturn); - m_password.Activate(); - m_password.Show(); - } - } - - private void PasswordReturn(object sender) - { - if (mu_doc.ApplyPassword(m_password.xaml_Password.Password)) - { - m_currpassword = m_password.xaml_Password.Password; - m_password.Close(); - m_password = null; - xaml_OpenProgressGrid.Visibility = System.Windows.Visibility.Visible; - xaml_openfilestatus.Text = "Opening File"; - StartViewer(); - } - else - { - xaml_OpenProgressGrid.Visibility = System.Windows.Visibility.Collapsed; - ShowMessage(NotifyType_t.MESS_STATUS, "Password Incorrect"); - } - } - - private void ShowInfo(object sender, RoutedEventArgs e) - { - String Message; - - if (m_file_open) - { - String filename; - - if (m_origfile != null && (m_document_type == DocumentTypes.PS || - m_document_type == DocumentTypes.EPS)) - filename = m_origfile; - else - filename = m_currfile; - - Message = - " File: " + filename + "\n" + - "Document Type: " + m_document_type + "\n" + - " Pages: " + m_num_pages + "\n" + - " Current Page: " + (m_currpage + 1) + "\n"; - if (m_infowindow == null || !(m_infowindow.IsActive)) - m_infowindow = new Info(); - m_infowindow.xaml_TextInfo.Text = Message; - m_infowindow.FontFamily = new FontFamily("Courier New"); - m_infowindow.Show(); - } - } - - #region Zoom Control - - /* Find out where the current page is */ - private double ComputeOffsetZoomOut(double old_zoom) - { - double y = 0; - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - { - /* Look at the offset and where it falls relative to the top of our current page */ - UIElement uiElement = (UIElement)xaml_PageList.ItemContainerGenerator.ContainerFromIndex(m_currpage); - y = viewer.TranslatePoint(new System.Windows.Point(0, 0), uiElement).Y; - } - return y * m_doczoom / old_zoom; - } - - private double ComputeOffsetZoomIn(double old_zoom, out int new_page) - { - double y = 0; - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - new_page = m_currpage; - if (viewer != null) - { - /* Look at the offset and where it falls relative to the top of our current page */ - UIElement uiElement = (UIElement)xaml_PageList.ItemContainerGenerator.ContainerFromIndex(m_currpage); - y = viewer.TranslatePoint(new System.Windows.Point(0, 0), uiElement).Y; - - /* If we are zoomed out, we can be on a page that is not on the top boundry. See if we can find one - * that is */ - if (y < 0) - { - new_page = m_currpage - 1; - while (true) - { - if (new_page < 0) - { - new_page = 0; - return 0; - } - uiElement = (UIElement)xaml_PageList.ItemContainerGenerator.ContainerFromIndex(new_page); - y = viewer.TranslatePoint(new System.Windows.Point(0, 0), uiElement).Y; - if (y >= 0) - { - return y * m_doczoom / old_zoom; - } - new_page = new_page - 1; - } - } - } - return y * m_doczoom / old_zoom; - } - - private void ZoomOut(object sender, RoutedEventArgs e) - { - if (!m_init_done || m_doczoom <= Constants.ZOOM_MIN) - return; - double old_zoom = m_doczoom; - m_doczoom = m_doczoom - Constants.ZOOM_STEP; - if (m_doczoom < Constants.ZOOM_MIN) - m_doczoom = Constants.ZOOM_MIN; - xaml_ZoomSlider.Value = m_doczoom * 100.0; - double offset = ComputeOffsetZoomOut(old_zoom); - RenderRange(m_currpage, false, zoom_t.ZOOM_OUT, offset); - } - - private void ZoomIn(object sender, RoutedEventArgs e) - { - if (!m_init_done || m_doczoom >= Constants.ZOOM_MAX) - return; - double old_zoom = m_doczoom; - m_doczoom = m_doczoom + Constants.ZOOM_STEP; - if (m_doczoom > Constants.ZOOM_MAX) - m_doczoom = Constants.ZOOM_MAX; - xaml_ZoomSlider.Value = m_doczoom * 100.0; - int newpage; - double offset = ComputeOffsetZoomIn(old_zoom, out newpage); - RenderRange(newpage, false, zoom_t.ZOOM_IN, offset); - } - - private void ActualSize(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - double old_zoom = m_doczoom; - m_doczoom = 1.0; - xaml_ZoomSlider.Value = m_doczoom * 100.0; - if (old_zoom < 1.0) - { - int new_page; - double offset = ComputeOffsetZoomIn(old_zoom, out new_page); - RenderRange(new_page, false, zoom_t.ZOOM_IN, offset); - } - else if (old_zoom > 1.0) - { - double offset = ComputeOffsetZoomOut(old_zoom); - RenderRange(m_currpage, false, zoom_t.ZOOM_OUT, offset); - } - } - - private void ContScrollFill(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - /* Scale our pages based upon the size of scrollviewer */ - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer == null) - return; - double width = viewer.ViewportWidth; - double page_width = m_thumbnails[m_currpage].NativeWidth; - double scale = width / page_width; - if (scale < Constants.ZOOM_MIN) - scale = Constants.ZOOM_MIN; - if (scale > Constants.ZOOM_MAX) - scale = Constants.ZOOM_MAX; - if (m_doczoom == scale) - return; - double old_zoom = m_doczoom; - m_doczoom = scale; - xaml_ZoomSlider.Value = m_doczoom * 100.0; - if (old_zoom > m_doczoom) - RenderRange(m_currpage, true, zoom_t.ZOOM_OUT, 0); - else - RenderRange(m_currpage, true, zoom_t.ZOOM_IN, 0); - } - - private void ExpandFill(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - /* Scale our pages based upon the size of scrollviewer */ - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer == null) - return; - double height = viewer.ViewportHeight; - double width = viewer.ViewportWidth; - double page_height = m_thumbnails[m_currpage].NativeHeight; - double page_width = m_thumbnails[m_currpage].NativeWidth; - double height_scale = height / page_height; - double width_scale = width / page_width; - double scale = Math.Min(height_scale, width_scale); - if (scale < Constants.ZOOM_MIN) - scale = Constants.ZOOM_MIN; - if (scale > Constants.ZOOM_MAX) - scale = Constants.ZOOM_MAX; - if (m_doczoom == scale) - return; - double old_zoom = m_doczoom; - m_doczoom = scale; - xaml_ZoomSlider.Value = m_doczoom * 100.0; - if (old_zoom > m_doczoom) - RenderRange(m_currpage, true, zoom_t.ZOOM_OUT, 0); - else - RenderRange(m_currpage, true, zoom_t.ZOOM_IN, 0); - } - - private void ShowFooter(object sender, RoutedEventArgs e) - { - xaml_FooterControl.Visibility = System.Windows.Visibility.Visible; - } - - private void HideFooter(object sender, RoutedEventArgs e) - { - xaml_FooterControl.Visibility = System.Windows.Visibility.Collapsed; - } - - private void ZoomReleased(object sender, MouseButtonEventArgs e) - { - if (m_init_done) - { - double zoom = xaml_ZoomSlider.Value / 100.0; - if (zoom > Constants.ZOOM_MAX) - zoom = Constants.ZOOM_MAX; - if (zoom < Constants.ZOOM_MIN) - zoom = Constants.ZOOM_MIN; - double old_zoom = zoom; - m_doczoom = zoom; - if (old_zoom > m_doczoom) - { - double offset = ComputeOffsetZoomOut(old_zoom); - RenderRange(m_currpage, false, zoom_t.ZOOM_OUT, offset); - } - else - { - int new_page; - double offset = ComputeOffsetZoomIn(old_zoom, out new_page); - RenderRange(new_page, false, zoom_t.ZOOM_IN, offset); - } - } - } - - /* If the zoom is not equalto 1 then set the zoom to 1 and scoll to this page */ - private void PageDoubleClick(object sender, MouseButtonEventArgs e) - { - return; /* Disable this for now */ - if (m_doczoom != 1.0) - { - double old_zoom = m_doczoom; - m_doczoom = 1.0; - xaml_Zoomsize.Text = "100"; - var item = ((FrameworkElement)e.OriginalSource).DataContext as DocPage; - if (item != null) - { - if (old_zoom > m_doczoom) - { - double offset = ComputeOffsetZoomOut(old_zoom); - RenderRange(m_currpage, false, zoom_t.ZOOM_OUT, offset); - } - else - { - int new_page; - double offset = ComputeOffsetZoomIn(old_zoom, out new_page); - RenderRange(new_page, false, zoom_t.ZOOM_IN, offset); - } - } - } - } - - private void ZoomEnterClicked(object sender, System.Windows.Input.KeyEventArgs e) - { - if (e.Key == Key.Return) - { - e.Handled = true; - var desired_zoom = xaml_Zoomsize.Text; - try - { - double zoom = (double)System.Convert.ToInt32(desired_zoom) / 100.0; - if (zoom > Constants.ZOOM_MAX) - zoom = Constants.ZOOM_MAX; - if (zoom < Constants.ZOOM_MIN) - zoom = Constants.ZOOM_MIN; - double old_zoom = m_doczoom; - m_doczoom = zoom; - if (old_zoom > m_doczoom) - { - double offset = ComputeOffsetZoomOut(old_zoom); - RenderRange(m_currpage, false, zoom_t.ZOOM_OUT, offset); - } - else - { - int new_page; - double offset = ComputeOffsetZoomIn(old_zoom, out new_page); - RenderRange(new_page, false, zoom_t.ZOOM_IN, offset); - } - } - catch (FormatException e1) - { - Console.WriteLine("String is not a sequence of digits."); - } - catch (OverflowException e2) - { - Console.WriteLine("The number cannot fit in an Int32."); - } - } - } - - /* Rescale the pages based upon the zoom value and the native size */ - private void UpdatePageSizes() - { - SetThumbwidth(); - for (int k = 0; k > m_num_pages; k++) - { - var thumbpage = m_thumbnails[k]; - var page = m_docPages[k]; - - if (page.Zoom == m_doczoom) - continue; - int scale_zoom = (int)Math.Round((double)page.Height / (double)thumbpage.NativeHeight); - if (scale_zoom != m_doczoom) - { - page.Height = (int)Math.Round(thumbpage.NativeHeight * m_doczoom); - page.Width = (int)Math.Round(thumbpage.NativeWidth * m_doczoom); - } - } - } - #endregion Zoom Control - - #region Thumb Rendering - void SetThumbInit(int page_num, Byte[] bitmap, Point ras_size, double zoom_in) - { - /* Three jobs. Store the thumb and possibly update the full page. Also - add to collection of pages. Set up page geometry info (scale of - 100 percent ) */ - - DocPage doc_page = new DocPage(); - m_thumbnails.Add(doc_page); - - doc_page.Width = (int)ras_size.X; - - doc_page.Height = (int)ras_size.Y; - doc_page.NativeWidth = (int)(ras_size.X / Constants.SCALE_THUMB); - doc_page.NativeHeight = (int)(ras_size.Y / Constants.SCALE_THUMB); - m_totalpageheight = m_totalpageheight + doc_page.NativeHeight; - - doc_page.Content = Page_Content_t.THUMBNAIL; - doc_page.Zoom = zoom_in; - int stride = doc_page.Width * 4; - doc_page.BitMap = BitmapSource.Create(doc_page.Width, doc_page.Height, - 72, 72, PixelFormats.Pbgra32, BitmapPalettes.Halftone256, bitmap, stride); - doc_page.PageNum = page_num; - - /* Lets see if we need to set the main page */ - var doc = m_docPages[page_num]; - switch (doc.Content) - { - case Page_Content_t.FULL_RESOLUTION: - case Page_Content_t.THUMBNAIL: - return; - - case Page_Content_t.NOTSET: - doc_page = InitDocPage(); - doc_page.Content = Page_Content_t.THUMBNAIL; - doc_page.Zoom = zoom_in; - doc_page.BitMap = m_thumbnails[page_num].BitMap; - doc_page.Width = (int)(ras_size.X / Constants.SCALE_THUMB); - doc_page.Height = (int)(ras_size.Y / Constants.SCALE_THUMB); - doc_page.PageNum = page_num; - this.m_docPages[page_num] = doc_page; - break; - - case Page_Content_t.OLD_RESOLUTION: - return; - } - } - - private void ThumbsWork(object sender, DoWorkEventArgs e) - { - Point ras_size; - status_t code; - double scale_factor = Constants.SCALE_THUMB; - BackgroundWorker worker = sender as BackgroundWorker; - - Byte[] bitmap; - - for (int k = 0; k < m_num_pages; k++) - { - if (ComputePageSize(k, scale_factor, out ras_size) == status_t.S_ISOK) - { - try - { - bitmap = new byte[(int)ras_size.X * (int)ras_size.Y * 4]; - BlocksText charlist; - Annotate_t annot; - /* Synchronous call on our background thread */ - code = (status_t)mu_doc.RenderPage(k, bitmap, (int)ras_size.X, - (int)ras_size.Y, scale_factor, false, false, false, - out charlist, false, out annot); - } - catch (OutOfMemoryException em) - { - Console.WriteLine("Memory allocation failed thumb page " + k + em.Message + "\n"); - break; - } - /* Use thumb if we rendered ok */ - if (code == status_t.S_ISOK) - { - double percent = 100 * (double)(k + 1) / (double)m_num_pages; - thumb_t curr_thumb = new thumb_t(); - curr_thumb.page_num = k; - curr_thumb.bitmap = bitmap; - curr_thumb.size = ras_size; - worker.ReportProgress((int)percent, curr_thumb); - } - } - if (worker.CancellationPending == true) - { - e.Cancel = true; - break; - } - } - } - - private void ThumbsCompleted(object sender, RunWorkerCompletedEventArgs e) - { - xaml_ProgressGrid.Visibility = System.Windows.Visibility.Collapsed; - xaml_ThumbProgress.Value = 0; - xaml_ThumbList.ItemsSource = m_thumbnails; - m_have_thumbs = true; - m_thumbworker = null; - //xaml_CancelThumb.IsEnabled = true; - xaml_ThumbList.Items.Refresh(); - xaml_VerticalScroll.Minimum = 0; - xaml_VerticalScroll.Maximum = m_totalpageheight + 4 * m_num_pages; - //thumbSize = (viewportSize/(maximum–minimum+viewportSize))×trackLength - SetThumbwidth(); - //ScrollBarExtensions.SetThumbLength(xaml_VerticalScroll, 1); - } - - private void ThumbsProgressChanged(object sender, ProgressChangedEventArgs e) - { - thumb_t thumb = (thumb_t)(e.UserState); - - xaml_ThumbProgress.Value = e.ProgressPercentage; - SetThumbInit(thumb.page_num, thumb.bitmap, thumb.size, 1.0); - } - - private void RenderThumbs() - { - /* Create background task for rendering the thumbnails. Allow - this to be cancelled if we open a new doc while we are in loop - rendering. Put the UI updates in the progress changed which will - run on the main thread */ - try - { - m_thumbworker = new BackgroundWorker(); - m_thumbworker.WorkerReportsProgress = true; - m_thumbworker.WorkerSupportsCancellation = true; - m_thumbworker.DoWork += new DoWorkEventHandler(ThumbsWork); - m_thumbworker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(ThumbsCompleted); - m_thumbworker.ProgressChanged += new ProgressChangedEventHandler(ThumbsProgressChanged); - xaml_ProgressGrid.Visibility = System.Windows.Visibility.Visible; - m_thumbworker.RunWorkerAsync(); - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during thumb rendering\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - #endregion Thumb Rendering - - #region Copy Paste - /* Copy the current page as a bmp to the clipboard this is done at the - * current resolution */ - private void CopyPage(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - var curr_page = m_docPages[m_currpage]; - System.Windows.Clipboard.SetImage(curr_page.BitMap); - m_clipboardset = true; - } - - /* Paste the page to various types supported by the windows encoder class */ - private void PastePage(object sender, RoutedEventArgs e) - { - var menu = (System.Windows.Controls.MenuItem)sender; - - String tag = (String)menu.Tag; - - if (!m_clipboardset || !System.Windows.Clipboard.ContainsImage() || - !m_init_done) - return; - var bitmap = System.Windows.Clipboard.GetImage(); - - BitmapEncoder encoder; - System.Windows.Forms.SaveFileDialog dlg = new System.Windows.Forms.SaveFileDialog(); - dlg.FilterIndex = 1; - - switch (tag) - { - case "PNG": - dlg.Filter = "PNG Files(*.png)|*.png"; - encoder = new PngBitmapEncoder(); - - break; - case "JPG": - dlg.Filter = "JPEG Files(*.jpg)|*.jpg"; - encoder = new JpegBitmapEncoder(); - break; - - case "WDP": - dlg.Filter = "HDP Files(*.wdp)|*.wdp"; - encoder = new WmpBitmapEncoder(); - break; - - case "TIF": - dlg.Filter = "TIFF Files(*.tif)|*.tif"; - encoder = new TiffBitmapEncoder(); - break; - - case "BMP": - dlg.Filter = "BMP Files(*.bmp)|*.bmp"; - encoder = new BmpBitmapEncoder(); - break; - - case "GIF": - dlg.Filter = "GIF Files(*.gif)|*.gif"; - encoder = new GifBitmapEncoder(); - break; - - default: - return; - } - - encoder.Frames.Add(BitmapFrame.Create(bitmap)); - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - using (var stream = dlg.OpenFile()) - encoder.Save(stream); - } - } - #endregion Copy Paste - - #region SaveAs - String CreatePDFXA(Save_Type_t type) - { - Byte[] Resource; - String Profile; - - switch (type) - { - case Save_Type_t.PDFA1_CMYK: - case Save_Type_t.PDFA2_CMYK: - Resource = Properties.Resources.PDFA_def; - Profile = m_outputintents.cmyk_icc; - break; - - case Save_Type_t.PDFA1_RGB: - case Save_Type_t.PDFA2_RGB: - Resource = Properties.Resources.PDFA_def; - Profile = m_outputintents.rgb_icc; - break; - - case Save_Type_t.PDFX3_CMYK: - Resource = Properties.Resources.PDFX_def; - Profile = m_outputintents.cmyk_icc; - break; - - case Save_Type_t.PDFX3_GRAY: - Resource = Properties.Resources.PDFX_def; - Profile = m_outputintents.gray_icc; - break; - - default: - return null; - } - - String Profile_new = Profile.Replace("\\", "/"); - String result = System.Text.Encoding.UTF8.GetString(Resource); - String pdfx_cust = result.Replace("ICCPROFILE", Profile_new); - var out_file = System.IO.Path.GetTempFileName(); - System.IO.File.WriteAllText(out_file, pdfx_cust); - return out_file; - } - - private void SaveFile(Save_Type_t type) - { - if (!m_file_open) - return; - - System.Windows.Forms.SaveFileDialog dlg = new System.Windows.Forms.SaveFileDialog(); - dlg.FilterIndex = 1; - - /* PDF output types */ - if (type <= Save_Type_t.PDF) - { - dlg.Filter = "PDF Files(*.pdf)|*.pdf"; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - String options = null; - bool use_gs = true; - String init_file = CreatePDFXA(type); - - switch (type) - { - case Save_Type_t.PDF: - /* All done. No need to use gs or mupdf */ - System.IO.File.Copy(m_currfile, dlg.FileName, true); - use_gs = false; - break; - case Save_Type_t.LINEAR_PDF: - mu_doc.PDFExtract(m_currfile, dlg.FileName, m_currpassword, - m_currpassword != null, true, -1, null); - use_gs = false; - break; - case Save_Type_t.PDF13: - options = "-dCompatibilityLevel=1.3"; - break; - case Save_Type_t.PDFA1_CMYK: - options = "-dPDFA=1 -dNOOUTERSAVE -dPDFACompatibilityPolicy=1 -sProcessColorModel=DeviceCMYK -dColorConversionStrategy=/CMYK -sOutputICCProfile=" + m_outputintents.cmyk_icc; - break; - case Save_Type_t.PDFA1_RGB: - options = "-dPDFA=1 -dNOOUTERSAVE -dPDFACompatibilityPolicy=1 -sProcessColorModel=DeviceRGB -dColorConversionStrategy=/RGB -sOutputICCProfile=" + m_outputintents.rgb_icc; - break; - case Save_Type_t.PDFA2_CMYK: - options = "-dPDFA=2 -dNOOUTERSAVE -dPDFACompatibilityPolicy=1 -sProcessColorModel=DeviceCMYK -dColorConversionStrategy=/CMYK -sOutputICCProfile=" + m_outputintents.cmyk_icc; - break; - case Save_Type_t.PDFA2_RGB: - options = "-dPDFA=2 -dNOOUTERSAVE -dPDFACompatibilityPolicy=1 -sProcessColorModel=DeviceRGB -dColorConversionStrategy=/RGB -sOutputICCProfile=" + m_outputintents.rgb_icc; - break; - case Save_Type_t.PDFX3_CMYK: - options = "-dPDFX -dNOOUTERSAVE -dPDFACompatibilityPolicy=1 -sProcessColorModel=DeviceCMYK -dColorConversionStrategy=/CMYK -sOutputICCProfile=" + m_outputintents.cmyk_icc; - break; - case Save_Type_t.PDFX3_GRAY: - options = "-dPDFX -dNOOUTERSAVE -dPDFACompatibilityPolicy=1 -sProcessColorModel=DeviceGray -dColorConversionStrategy=/Gray -sOutputICCProfile=" + m_outputintents.cmyk_icc; - break; - - } - if (use_gs) - { - xaml_DistillProgress.Value = 0; - if (m_ghostscript.Convert(m_currfile, options, - Enum.GetName(typeof(gsDevice_t), gsDevice_t.pdfwrite), - dlg.FileName, m_num_pages, 300, false, null, -1, -1, - init_file, null) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy"); - return; - } - xaml_DistillName.Text = "Creating PDF"; - xaml_CancelDistill.Visibility = System.Windows.Visibility.Collapsed; - xaml_DistillName.FontWeight = FontWeights.Bold; - xaml_DistillGrid.Visibility = System.Windows.Visibility.Visible; - } - } - } - else - { - /* Non PDF output */ - gsDevice_t Device = gsDevice_t.xpswrite; - bool use_mupdf = true; - String Message = ""; - textout_t textout = textout_t.HTML; - switch (type) - { - case Save_Type_t.HTML: - dlg.Filter = "HTML (*.html)|*.html"; - Message = "HTML content written"; - break; - case Save_Type_t.XML: - dlg.Filter = "XML (*.xml)|*.xml"; - Message = "XML content written"; - textout = textout_t.XML; - break; - case Save_Type_t.TEXT: - dlg.Filter = "Text (*.txt)|*.txt"; - Message = "Text content written"; - textout = textout_t.TEXT; - break; - case Save_Type_t.PCLXL: - use_mupdf = false; - dlg.Filter = "PCL-XL (*.bin)|*.bin"; - Device = gsDevice_t.pxlcolor; - break; - case Save_Type_t.XPS: - use_mupdf = false; - dlg.Filter = "XPS Files(*.xps)|*.xps"; - break; - } - if (!use_mupdf) - { - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - if (m_ghostscript.Convert(m_currfile, "", - Enum.GetName(typeof(gsDevice_t), Device), - dlg.FileName, 1, 300, false, null, -1, -1, - null, null) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy"); - return; - } - } - } - else - { - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - /* Write out first non null page then append the rest */ - int curr_page = 0; - bool done = false; - - while (!done) - { - String output = null; - output = mu_doc.GetText(curr_page, textout); - if (output == null) - { - curr_page = curr_page + 1; - if (curr_page == m_num_pages) - { - ShowMessage(NotifyType_t.MESS_STATUS, "No text found in file"); - return; - } - } - else - { - System.IO.File.WriteAllText(dlg.FileName, output); - done = true; - } - } - curr_page = curr_page + 1; - - if (curr_page == m_num_pages) - { - ShowMessage(NotifyType_t.MESS_STATUS, Message); - return; - } - done = false; - while (!done) - { - String output = null; - output = mu_doc.GetText(curr_page, textout); - if (output != null) - { - System.IO.File.AppendAllText(dlg.FileName, output); - } - curr_page = curr_page + 1; - if (curr_page == m_num_pages) - { - ShowMessage(NotifyType_t.MESS_STATUS, Message); - return; - } - } - } - } - } - } - - private void SaveSVG(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.SVG); - } - - private void SavePDF(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.PDF); - } - - private void SaveText(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.TEXT); - } - - private void SaveXML(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.XML); - } - - private void SaveHTML(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.HTML); - } - - private void Linearize(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.LINEAR_PDF); - } - - private void SavePDF13(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.PDF13); - } - - private void SavePDFX3_Gray(object sender, RoutedEventArgs e) - { - if (m_outputintents.gray_icc == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Set Gray Output Intent ICC Profile"); - return; - } - SaveFile(Save_Type_t.PDFX3_GRAY); - } - - private void SavePDFX3_CMYK(object sender, RoutedEventArgs e) - { - if (m_outputintents.cmyk_icc == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Set CMYK Output Intent ICC Profile"); - return; - } - SaveFile(Save_Type_t.PDFX3_CMYK); - } - - private void SavePDFA1_RGB(object sender, RoutedEventArgs e) - { - if (m_outputintents.rgb_icc == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Set RGB Output Intent ICC Profile"); - return; - } - SaveFile(Save_Type_t.PDFA1_RGB); - } - - private void SavePDFA1_CMYK(object sender, RoutedEventArgs e) - { - if (m_outputintents.cmyk_icc == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Set CMYK Output Intent ICC Profile"); - return; - } - SaveFile(Save_Type_t.PDFA1_CMYK); - } - - private void SavePDFA2_RGB(object sender, RoutedEventArgs e) - { - if (m_outputintents.rgb_icc == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Set RGB Output Intent ICC Profile"); - return; - } - SaveFile(Save_Type_t.PDFA2_RGB); - } - - private void SavePDFA2_CMYK(object sender, RoutedEventArgs e) - { - if (m_outputintents.cmyk_icc == null) - { - ShowMessage(NotifyType_t.MESS_STATUS, "Set CMYK Output Intent ICC Profile"); - return; - } - SaveFile(Save_Type_t.PDFA2_CMYK); - } - - private void SavePCLXL(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.PCLXL); - } - private void SaveXPS(object sender, RoutedEventArgs e) - { - SaveFile(Save_Type_t.XPS); - } - #endregion SaveAs - - #region Extract - private void Extract(Extract_Type_t type) - { - if (m_selection != null || !m_init_done) - return; - - m_selection = new Selection(m_currpage + 1, m_doczoom, type); - m_selection.UpdateMain += new Selection.CallBackMain(SelectionMade); - m_selection.Show(); - m_selection.xaml_Image.Source = m_docPages[m_currpage].BitMap; - m_selection.xaml_Image.Height = m_docPages[m_currpage].Height; - m_selection.xaml_Image.Width = m_docPages[m_currpage].Width; - } - - async private void SelectionZoom(int page_num, double zoom) - { - Point ras_size; - if (ComputePageSize(page_num, zoom, out ras_size) == status_t.S_ISOK) - { - try - { - Byte[] bitmap = new byte[(int)ras_size.X * (int)ras_size.Y * 4]; - BlocksText charlist; - Annotate_t annot; - - Task ren_task = - new Task(() => mu_doc.RenderPage(page_num, bitmap, - (int)ras_size.X, (int)ras_size.Y, zoom, false, true, - false, out charlist, true, out annot)); - ren_task.Start(); - await ren_task.ContinueWith((antecedent) => - { - status_t code = (status_t)ren_task.Result; - if (code == status_t.S_ISOK) - { - if (m_selection != null) - { - int stride = (int)ras_size.X * 4; - m_selection.xaml_Image.Source = BitmapSource.Create((int)ras_size.X, (int)ras_size.Y, 72, 72, PixelFormats.Pbgra32, BitmapPalettes.Halftone256, bitmap, stride); - m_selection.xaml_Image.Height = (int)ras_size.Y; - m_selection.xaml_Image.Width = (int)ras_size.X; - m_selection.UpdateRect(); - m_selection.m_curr_state = SelectStatus_t.OK; - } - } - }, TaskScheduler.FromCurrentSynchronizationContext()); - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed page " + page_num + "\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - } - - private void SelectionMade(object gsObject, SelectEventArgs results) - { - switch (results.State) - { - case SelectStatus_t.CANCEL: - case SelectStatus_t.CLOSE: - m_selection = null; - return; - case SelectStatus_t.SELECT: - /* Get the information we need */ - double zoom = results.ZoomFactor; - Point start = results.TopLeft; - Point size = results.Size; - int page = results.PageNum; - gsDevice_t Device = gsDevice_t.pdfwrite; - - start.X = start.X / zoom; - start.Y = start.Y / zoom; - size.X = size.X / zoom; - size.Y = size.Y / zoom; - - /* Do the actual extraction */ - String options; - System.Windows.Forms.SaveFileDialog dlg = new System.Windows.Forms.SaveFileDialog(); - dlg.FilterIndex = 1; - - /* Get us set up to do a fixed size */ - options = "-dFirstPage=" + page + " -dLastPage=" + page + - " -dDEVICEWIDTHPOINTS=" + size.X + " -dDEVICEHEIGHTPOINTS=" + - size.Y + " -dFIXEDMEDIA"; - - /* Set up the translation */ - String init_string = "<> setpagedevice"; - - switch (results.Type) - { - case Extract_Type_t.PDF: - dlg.Filter = "PDF Files(*.pdf)|*.pdf"; - break; - case Extract_Type_t.EPS: - dlg.Filter = "EPS Files(*.eps)|*.eps"; - Device = gsDevice_t.eps2write; - break; - case Extract_Type_t.PS: - dlg.Filter = "PostScript Files(*.ps)|*.ps"; - Device = gsDevice_t.ps2write; - break; - case Extract_Type_t.SVG: - dlg.Filter = "SVG Files(*.svg)|*.svg"; - break; - } - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - if (m_ghostscript.Convert(m_currfile, options, - Enum.GetName(typeof(gsDevice_t), Device), - dlg.FileName, 1, 300, false, null, page, page, - null, init_string) == gsStatus.GS_BUSY) - { - ShowMessage(NotifyType_t.MESS_STATUS, "GS busy"); - return; - } - } - m_selection.Close(); - break; - case SelectStatus_t.ZOOMIN: - /* Render new page at this resolution and hand it off */ - SelectionZoom(results.PageNum - 1, results.ZoomFactor); - break; - case SelectStatus_t.ZOOMOUT: - /* Render new page at this resolution and hand it off */ - SelectionZoom(results.PageNum - 1, results.ZoomFactor); - break; - } - } - - private void ExtractPDF(object sender, RoutedEventArgs e) - { - Extract(Extract_Type_t.PDF); - } - private void ExtractEPS(object sender, RoutedEventArgs e) - { - Extract(Extract_Type_t.EPS); - } - private void ExtractPS(object sender, RoutedEventArgs e) - { - Extract(Extract_Type_t.PS); - } - private void OutputIntents(object sender, RoutedEventArgs e) - { - m_outputintents.Show(); - } - #endregion Extract - - #region Search - /* Search related code */ - private void Search(object sender, RoutedEventArgs e) - { - if (!m_init_done || (m_textsearch != null && m_textsearch.IsBusy)) - return; - - m_textsearch = null; /* Start out fresh */ - if (xaml_SearchControl.Visibility == System.Windows.Visibility.Collapsed) - xaml_SearchControl.Visibility = System.Windows.Visibility.Visible; - else - { - xaml_SearchControl.Visibility = System.Windows.Visibility.Collapsed; - xaml_SearchGrid.Visibility = System.Windows.Visibility.Collapsed; - ClearTextSearch(); - } - } - - private void OnSearchBackClick(object sender, RoutedEventArgs e) - { - String textToFind = xaml_SearchText.Text; - TextSearchSetUp(-1, textToFind); - } - - private void OnSearchForwardClick(object sender, RoutedEventArgs e) - { - String textToFind = xaml_SearchText.Text; - TextSearchSetUp(1, textToFind); - } - - /* The thread that is actually doing the search work */ - void SearchWork(object sender, DoWorkEventArgs e) - { - BackgroundWorker worker = sender as BackgroundWorker; - List genericlist = e.Argument as List; - int direction = (int)genericlist[0]; - String needle = (String)genericlist[1]; - /* To make sure we get the next page or current page during search */ - int in_search = (int)genericlist[2]; - m_searchpage = m_currpage + direction * in_search; - searchResults_t results = new searchResults_t(); - - /* Break if we find something, get to the end (or start of doc) - * or if we have a cancel occur */ - while (true) - { - int box_count = mu_doc.TextSearchPage(m_searchpage, needle); - int percent; - - if (direction == 1) - percent = (int)(100.0 * ((double)m_searchpage + 1) / (double)m_num_pages); - else - percent = 100 - (int)(100.0 * ((double)m_searchpage) / (double)m_num_pages); - - if (box_count > 0) - { - /* This page has something lets go ahead and extract and - * signal to the UI thread and end this thread */ - results.done = false; - results.num_rects = box_count; - results.page_found = m_searchpage; - results.rectangles = new List(); - - for (int kk = 0; kk < box_count; kk++) - { - Point top_left; - Size size; - mu_doc.GetTextSearchItem(kk, out top_left, out size); - var rect = new Rect(top_left, size); - results.rectangles.Add(rect); - } - /* Reset global smart pointer once we have everything */ - mu_doc.ReleaseTextSearch(); - worker.ReportProgress(percent, results); - break; - } - else - { - /* This page has nothing. Lets go ahead and just update - * the progress bar */ - worker.ReportProgress(percent, null); - if (percent >= 100) - { - results.done = true; - results.needle = needle; - break; - } - m_searchpage = m_searchpage + direction; - } - if (worker.CancellationPending == true) - { - e.Cancel = true; - break; - } - } - e.Result = results; - } - - private void SearchProgressChanged(object sender, ProgressChangedEventArgs e) - { - if (e.UserState == null) - { - /* Nothing found */ - xaml_SearchProgress.Value = e.ProgressPercentage; - } - else - { - m_text_list = new List(); - /* found something go to page and show results */ - searchResults_t results = (searchResults_t)e.UserState; - xaml_SearchProgress.Value = e.ProgressPercentage; - m_currpage = results.page_found; - /* Add in the rectangles */ - for (int kk = 0; kk < results.num_rects; kk++) - { - var rect_item = new RectList(); - rect_item.Scale = m_doczoom; - rect_item.Color = m_textsearchcolor; - rect_item.Height = results.rectangles[kk].Height * m_doczoom; - rect_item.Width = results.rectangles[kk].Width * m_doczoom; - rect_item.X = results.rectangles[kk].X * m_doczoom; - rect_item.Y = results.rectangles[kk].Y * m_doczoom; - rect_item.Index = kk.ToString(); - m_text_list.Add(rect_item); - } - m_docPages[results.page_found].TextBox = m_text_list; - m_doscroll = true; - xaml_PageList.ScrollIntoView(m_docPages[results.page_found]); - } - } - - private void SearchCompleted(object sender, RunWorkerCompletedEventArgs e) - { - if (e.Cancelled == true) - { - xaml_SearchGrid.Visibility = System.Windows.Visibility.Collapsed; - m_textsearch = null; - } - else - { - searchResults_t results = (searchResults_t)e.Result; - if (results.done == true) - { - xaml_SearchGrid.Visibility = System.Windows.Visibility.Collapsed; - m_textsearch = null; - ShowMessage(NotifyType_t.MESS_STATUS, "End of document search for \"" + results.needle + "\""); - } - } - } - - private void CancelSearchClick(object sender, RoutedEventArgs e) - { - if (m_textsearch != null && m_textsearch.IsBusy) - m_textsearch.CancelAsync(); - xaml_SearchGrid.Visibility = System.Windows.Visibility.Collapsed; - m_textsearch = null; - ClearTextSearch(); - } - - private void ClearTextSearch() - { - for (int kk = 0; kk < m_num_pages; kk++) - { - var temp = m_docPages[kk].TextBox; - if (temp != null) - { - m_docPages[kk].TextBox = null; - } - } - } - - private void ScaleTextBox(int pagenum) - { - var temp = m_docPages[pagenum].TextBox; - for (int kk = 0; kk < temp.Count; kk++) - { - var rect_item = temp[kk]; - double factor = m_doczoom / temp[kk].Scale; - - temp[kk].Height = temp[kk].Height * factor; - temp[kk].Width = temp[kk].Width * factor; - temp[kk].X = temp[kk].X * factor; - temp[kk].Y = temp[kk].Y * factor; - - temp[kk].Scale = m_doczoom; - temp[kk].PageRefresh(); - } - m_docPages[pagenum].TextBox = temp; - } - - private void TextSearchSetUp(int direction, String needle) - { - /* Create background task for performing text search. */ - try - { - int in_text_search = 0; - - if (m_textsearch != null && m_textsearch.IsBusy) - return; - - if (m_textsearch != null) - { - in_text_search = 1; - m_textsearch = null; - } - if (m_prevsearch != null && needle != m_prevsearch) - { - in_text_search = 0; - ClearTextSearch(); - } - - if (m_textsearch == null) - { - m_prevsearch = needle; - m_textsearch = new BackgroundWorker(); - m_textsearch.WorkerReportsProgress = true; - m_textsearch.WorkerSupportsCancellation = true; - var arguments = new List(); - arguments.Add(direction); - arguments.Add(needle); - arguments.Add(in_text_search); - m_textsearch.DoWork += new DoWorkEventHandler(SearchWork); - m_textsearch.RunWorkerCompleted += new RunWorkerCompletedEventHandler(SearchCompleted); - m_textsearch.ProgressChanged += new ProgressChangedEventHandler(SearchProgressChanged); - xaml_SearchGrid.Visibility = System.Windows.Visibility.Visible; - m_textsearch.RunWorkerAsync(arguments); - } - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during text search\n"); - ShowMessage(NotifyType_t.MESS_ERROR, "Out of memory: " + e.Message); - } - } - #endregion Search - - #region Link - private void LinksToggle(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - - m_links_on = !m_links_on; - - if (m_page_link_list == null) - { - if (m_linksearch != null && m_linksearch.IsBusy) - return; - - m_page_link_list = new List>(); - m_linksearch = new BackgroundWorker(); - m_linksearch.WorkerReportsProgress = false; - m_linksearch.WorkerSupportsCancellation = true; - m_linksearch.DoWork += new DoWorkEventHandler(LinkWork); - m_linksearch.RunWorkerCompleted += new RunWorkerCompletedEventHandler(LinkCompleted); - m_linksearch.RunWorkerAsync(); - } - else - { - if (m_links_on) - LinksOn(); - else - LinksOff(); - } - } - - private void LinkWork(object sender, DoWorkEventArgs e) - { - BackgroundWorker worker = sender as BackgroundWorker; - - for (int k = 0; k < m_num_pages; k++) - { - int box_count = mu_doc.GetLinksPage(k); - List links = new List(); - if (box_count > 0) - { - for (int j = 0; j < box_count; j++) - { - Point top_left; - Size size; - String uri; - int type; - int topage; - - mu_doc.GetLinkItem(j, out top_left, out size, out uri, - out topage, out type); - var rectlist = new RectList(); - rectlist.Height = size.Height * m_doczoom; - rectlist.Width = size.Width * m_doczoom; - rectlist.X = top_left.X * m_doczoom; - rectlist.Y = top_left.Y * m_doczoom; - rectlist.Color = m_linkcolor; - rectlist.Index = k.ToString() + "." + j.ToString(); - rectlist.PageNum = topage; - rectlist.Scale = m_doczoom; - if (uri != null) - rectlist.Urilink = new Uri(uri); - rectlist.Type = (Link_t)type; - links.Add(rectlist); - } - } - mu_doc.ReleaseLink(); - m_page_link_list.Add(links); - - if (worker.CancellationPending == true) - { - e.Cancel = true; - break; - } - } - } - - private void LinkCompleted(object sender, RunWorkerCompletedEventArgs e) - { - LinksOn(); - } - - private void ScaleLinkBox(int pagenum) - { - var temp = m_docPages[pagenum].LinkBox; - for (int kk = 0; kk < temp.Count; kk++) - { - var rect_item = temp[kk]; - double factor = m_doczoom / temp[kk].Scale; - - temp[kk].Height = temp[kk].Height * factor; - temp[kk].Width = temp[kk].Width * factor; - temp[kk].X = temp[kk].X * factor; - temp[kk].Y = temp[kk].Y * factor; - - temp[kk].Scale = m_doczoom; - temp[kk].PageRefresh(); - } - m_docPages[pagenum].LinkBox = temp; - } - /* Merge these */ - private void ScaleTextLines(int pagenum, double scale_factor) - { - var temp = m_lineptrs[pagenum]; - for (int kk = 0; kk < temp.Count; kk++) - { - var rect_item = temp[kk]; - double factor = scale_factor / temp[kk].Scale; - - temp[kk].Height = temp[kk].Height * factor; - temp[kk].Width = temp[kk].Width * factor; - temp[kk].X = temp[kk].X * factor; - temp[kk].Y = temp[kk].Y * factor; - - temp[kk].Scale = scale_factor; - } - m_lineptrs[pagenum] = temp; - } - - private void ScaleTextBlocks(int pagenum, double scale_factor) - { - var temp = m_textptrs[pagenum]; - for (int kk = 0; kk < temp.Count; kk++) - { - var rect_item = temp[kk]; - double factor = scale_factor / temp[kk].Scale; - - temp[kk].Height = temp[kk].Height * factor; - temp[kk].Width = temp[kk].Width * factor; - temp[kk].X = temp[kk].X * factor; - temp[kk].Y = temp[kk].Y * factor; - - temp[kk].Scale = scale_factor; - } - m_textptrs[pagenum] = temp; - } - - private int GetVisibleRange() - { - /* Need to figure out what pages are going to be visible */ - double bottom = this.ActualHeight; - bool done = false; - int final_page = m_currpage; - double count = 0; - - while (!done) - { - count = count + m_thumbnails[final_page].NativeHeight * m_doczoom; - final_page = final_page + 1; - if (final_page == m_num_pages || count > bottom) - done = true; - } - return final_page; - } - - /* Only visible pages */ - private void LinksOff() - { - int final_page = GetVisibleRange(); - for (int kk = m_currpage - 1; kk <= final_page + 1; kk++) - { - var temp = m_docPages[kk].LinkBox; - if (temp != null) - { - m_docPages[kk].LinkBox = null; - } - } - } - - /* Only visible pages */ - private void LinksOn() - { - int final_page = GetVisibleRange(); - for (int kk = m_currpage - 1; kk <= final_page + 1; kk++) - { - if (!(kk < 0 || kk > m_num_pages - 1)) - { - var temp = m_docPages[kk].LinkBox; - if (temp == null) - { - m_docPages[kk].LinkBox = m_page_link_list[kk]; - } - } - } - } - - private void LinkClick(object sender, MouseButtonEventArgs e) - { - var item = (Rectangle)sender; - - if (item == null) - return; - - String tag = (String)item.Tag; - int page = 0; - int index = 0; - - if (tag == null || tag.Length < 3 || !(tag.Contains('.'))) - return; - - String[] parts = tag.Split('.'); - try - { - page = System.Convert.ToInt32(parts[0]); - index = System.Convert.ToInt32(parts[1]); - - } - catch (FormatException e1) - { - Console.WriteLine("String is not a sequence of digits."); - } - catch (OverflowException e2) - { - Console.WriteLine("The number cannot fit in an Int32."); - } - - if (index >= 0 && index < m_num_pages && page >= 0 && page < m_num_pages) - { - var link_list = m_page_link_list[page]; - var link = link_list[index]; - - if (link.Type == Link_t.LINK_GOTO) - { - if (m_currpage != link.PageNum && link.PageNum >= 0 && - link.PageNum < m_num_pages) - RenderRange(link.PageNum, true, zoom_t.NO_ZOOM, 0); - } - else if (link.Type == Link_t.LINK_URI) - System.Diagnostics.Process.Start(link.Urilink.AbsoluteUri); - } - } - #endregion Link - - #region TextSelection - - /* Change cursor if we are over text block */ - private void ExitTextBlock(object sender, System.Windows.Input.MouseEventArgs e) - { - this.Cursor = System.Windows.Input.Cursors.Arrow; - } - - private void EnterTextBlock(object sender, System.Windows.Input.MouseEventArgs e) - { - this.Cursor = System.Windows.Input.Cursors.IBeam; - } - - private void ClearSelections() - { - for (int kk = 0; kk < m_textSelect.Count; kk++) - { - m_lineptrs[m_textSelect[kk].pagenum].Clear(); - if (m_docPages[m_textSelect[kk].pagenum].SelectedLines != null) - m_docPages[m_textSelect[kk].pagenum].SelectedLines.Clear(); - } - m_textSelect.Clear(); - m_textselected = false; - m_selectall = false; - SetSelectAll(m_blockcolor); - } - - private void InitTextSelection(DocPage page) - { - if (m_textSelect != null) - ClearSelections(); - else - m_textSelect = new List(); - - m_intxtselect = true; - - textSelectInfo_t selinfo = new textSelectInfo_t(); - selinfo.pagenum = page.PageNum; - selinfo.first_line_full = false; - selinfo.last_line_full = false; - m_textSelect.Add(selinfo); - } - - private void PageMouseDown(object sender, MouseButtonEventArgs e) - { - if (this.Cursor != System.Windows.Input.Cursors.IBeam) - return; - - var page = ((FrameworkElement)e.Source).DataContext as DocPage; - Canvas can = ((FrameworkElement)e.Source).Parent as Canvas; - if (page == null || can == null) - return; - - InitTextSelection(page); - var posit = e.GetPosition(can); - - page.SelX = posit.X; - page.SelY = posit.Y; - page.SelAnchorX = posit.X; - page.SelAnchorY = posit.Y; - page.SelColor = m_regionselect; - - /* Create new holder for lines highlighted */ - m_lineptrs[page.PageNum] = new LinesText(); - } - - private void PageMouseMove(object sender, System.Windows.Input.MouseEventArgs e) - { - if (e.LeftButton == MouseButtonState.Released || m_intxtselect == false) - return; - - var page = ((FrameworkElement)e.Source).DataContext as DocPage; - Canvas can = ((FrameworkElement)e.Source).Parent as Canvas; - if (page == null || can == null) - return; - if (page.PageNum < 0) - return; - /* Store the location of our most recent page in case we exit window */ - var pos = e.GetPosition(can); - m_lastY = pos.Y; - m_maxY = can.Height; - /* Don't allow the listview to maintain control of the mouse, we need - * to detect if we leave the window */ - /* Make sure page is rendered */ - if (page.Content != Page_Content_t.FULL_RESOLUTION || - page.Zoom != m_doczoom) - { - RenderRange(page.PageNum, false, zoom_t.NO_ZOOM, 0); - } - - UpdateSelection(pos, page); - } - - /* Resize selection rect */ - private void UpdateSelection(System.Windows.Point pos, DocPage page) - { - bool new_page = true; - TextLine start_line, end_line; - double x = 0, y, w = 0, h; - bool found_first = false; - bool above_anchor = true; - bool first_line_full = false; - bool last_line_full = false; - - for (int kk = 0; kk < m_textSelect.Count; kk++) - if (m_textSelect[kk].pagenum == page.PageNum) - new_page = false; - - /* See if we have gone back to a previous page */ - if (!new_page && page.PageNum != m_textSelect[m_textSelect.Count - 1].pagenum) - { - DocPage curr_page = m_docPages[m_textSelect[m_textSelect.Count - 1].pagenum]; - curr_page.SelHeight = 0; - curr_page.SelWidth = 0; - m_textSelect.RemoveAt(m_textSelect.Count - 1); - m_lineptrs[curr_page.PageNum].Clear(); - curr_page.SelectedLines.Clear(); - } - if (new_page) - { - /* New page */ - page.SelX = pos.X; - page.SelY = pos.Y; - page.SelAnchorX = m_docPages[m_textSelect[m_textSelect.Count - 1].pagenum].SelAnchorX; - if (m_textSelect[m_textSelect.Count - 1].pagenum > page.PageNum) - { - page.SelAnchorY = page.Height; - } - else - { - page.SelAnchorY = 0; - } - page.SelColor = m_regionselect; - textSelectInfo_t info = new textSelectInfo_t(); - info.pagenum = page.PageNum; - info.first_line_full = false; - info.last_line_full = false; - m_textSelect.Add(info); - /* Create new holder for lines highlighted */ - m_lineptrs[page.PageNum] = new LinesText(); - } - - if (page.TextBlocks == null || page.TextBlocks.Count == 0) - return; - - /* Width changes translate across the pages */ - for (int jj = 0; jj < m_textSelect.Count; jj++) - { - DocPage curr_page = m_docPages[m_textSelect[jj].pagenum]; - x = Math.Min(pos.X, curr_page.SelAnchorX); - w = Math.Max(pos.X, curr_page.SelAnchorX) - x; - curr_page.SelX = x; - curr_page.SelWidth = w; - } - /* Height is just the current page */ - y = Math.Min(pos.Y, page.SelAnchorY); - h = Math.Max(pos.Y, page.SelAnchorY) - y; - - /* Determine if we are going up or down */ - if (pos.Y > page.SelAnchorY) - above_anchor = false; - page.SelY = y; - page.SelHeight = h; - - /* Clear out what we currently have */ - m_lineptrs[page.PageNum].Clear(); - - /* Stuff already selected above us */ - if (m_textSelect.Count > 1) - found_first = true; - /* Moving backwards through pages */ - if (m_textSelect.Count > 1 && m_textSelect[m_textSelect.Count - 2].pagenum > page.PageNum) - found_first = false; - - for (int jj = 0; jj < page.TextBlocks.Count; jj++) - { - /* Text blocks are already scaled. Lines are not */ - var intersect_blk = page.TextBlocks[jj].CheckIntersection(x, y, w, h); - var lines = page.TextBlocks[jj].TextLines; - - if (intersect_blk == Intersection_t.FULL) - { - /* Just add all the lines for this block */ - for (int kk = 0; kk < lines.Count; kk++) - m_lineptrs[page.PageNum].Add(lines[kk]); - if (jj == 0) - { - first_line_full = true; - found_first = true; - } - if (jj == page.TextBlocks.Count - 1) - last_line_full = true; - } - else if (intersect_blk != Intersection_t.NONE) - { - /* Now go through the lines */ - for (int kk = 0; kk < lines.Count; kk++) - { - double scale = m_doczoom / lines[kk].Scale; - //var intersect_line = lines[kk].CheckIntersection(x * scale, y * scale, w * scale, h * scale); - var intersect_line = lines[kk].CheckIntersection(x / scale , y / scale , w / scale , h / scale); - if (intersect_line == Intersection_t.FULL) - { - m_lineptrs[page.PageNum].Add(lines[kk]); - found_first = true; - if (jj == 0 && kk == 0) - first_line_full = true; - if (jj == page.TextBlocks.Count - 1 && - kk == lines.Count - 1) - last_line_full = true; - - } - else if (intersect_line == Intersection_t.PARTIAL) - { - double val; - var lett = lines[kk].TextCharacters; - - /* Now go through the width. */ - if (found_first) - { - if (above_anchor) - val = page.SelAnchorX; - else - val = pos.X; - - /* our second partial line */ - if (val > lines[kk].X * scale + lines[kk].Width * scale) - m_lineptrs[page.PageNum].Add(lines[kk]); - else - { - /* Use either anchor point or mouse pos */ - end_line = new TextLine(); - end_line.TextCharacters = new List(); - end_line.Height = 0; - end_line.Scale = m_doczoom; - for (int mm = 0; mm < lett.Count; mm++) - { - double letscale = m_doczoom / lett[mm].Scale; - if (lett[mm].X * letscale < val) - { - /* Can set to special color for debug */ - end_line.Color = m_textselectcolor; - /* special color for debug */ - //end_line.Color = "#4000FF00"; - end_line.Height = lines[kk].Height * scale; - end_line.Width = lett[mm].X * letscale + lett[mm].Width * letscale - lines[kk].X * scale; - end_line.Y = lines[kk].Y * scale; - end_line.X = lines[kk].X * scale; - end_line.TextCharacters.Add(lett[mm]); - } - else - break; - } - if (end_line.Height != 0) - m_lineptrs[page.PageNum].Add(end_line); - } - } - else - { - if (!above_anchor) - val = page.SelAnchorX; - else - val = pos.X; - - /* our first partial line */ - found_first = true; - if (val < lines[kk].X * scale) - m_lineptrs[page.PageNum].Add(lines[kk]); - else - { - start_line = new TextLine(); - start_line.TextCharacters = new List(); - start_line.Height = 0; - start_line.Scale = m_doczoom; - /* Use either anchor point or mouse pos */ - bool highlight_done = false; - for (int mm = 0; mm < lett.Count; mm++) - { - double letscale = m_doczoom / lett[mm].Scale; - if (lett[mm].X * letscale + lett[mm].Width * letscale >= val) - { - /* In this case, we are done with the - * highlight section as it only - * depends upon the first character - * we encounter and the line end. - * But we must continue to add in - * the selected characters */ - if (!highlight_done) - { - start_line.Color = m_textselectcolor; - /* special color for debug */ - /* start_line.Color = "#40FF0000"; */ - start_line.Height = lines[kk].Height * scale; - start_line.Width = lines[kk].X * scale + lines[kk].Width * scale - lett[mm].X * letscale; - start_line.X = lett[mm].X * letscale; - start_line.Y = lines[kk].Y * scale; - highlight_done = true; - } - start_line.TextCharacters.Add(lett[mm]); - } - } - if (start_line.Height > 0) - m_lineptrs[page.PageNum].Add(start_line); - } - } - } - } - } - } - var txtsel = m_textSelect[m_textSelect.Count - 1]; - txtsel.first_line_full = first_line_full; - txtsel.last_line_full = last_line_full; - m_textSelect[m_textSelect.Count - 1] = txtsel; - - /* Adjust for scale before assigning */ - var temp = m_lineptrs[page.PageNum]; - for (int kk = 0; kk < temp.Count; kk++) - { - var rect_item = temp[kk]; - double factor = m_doczoom / rect_item.Scale; - - temp[kk].Height = temp[kk].Height * factor; - temp[kk].Width = temp[kk].Width * factor; - temp[kk].X = temp[kk].X * factor; - temp[kk].Y = temp[kk].Y * factor; - - temp[kk].Scale = m_doczoom; - } - page.SelectedLines = m_lineptrs[page.PageNum]; - } - - /* A fix for handling column cases TODO FIXME */ - private void UpdateSelectionCol(System.Windows.Point pos, DocPage page) - { - bool new_page = true; - TextLine start_line, end_line; - double x = 0, y, w = 0, h; - bool found_first = false; - bool above_anchor = true; - bool first_line_full = false; - bool last_line_full = false; - - for (int kk = 0; kk < m_textSelect.Count; kk++) - if (m_textSelect[kk].pagenum == page.PageNum) - new_page = false; - - /* See if we have gone back to a previous page */ - if (!new_page && page.PageNum != m_textSelect[m_textSelect.Count - 1].pagenum) - { - DocPage curr_page = m_docPages[m_textSelect[m_textSelect.Count - 1].pagenum]; - curr_page.SelHeight = 0; - curr_page.SelWidth = 0; - m_textSelect.RemoveAt(m_textSelect.Count - 1); - m_lineptrs[curr_page.PageNum].Clear(); - curr_page.SelectedLines.Clear(); - } - if (new_page) - { - /* New page */ - page.SelX = pos.X; - page.SelY = pos.Y; - page.SelAnchorX = m_docPages[m_textSelect[m_textSelect.Count - 1].pagenum].SelAnchorX; - if (m_textSelect[m_textSelect.Count - 1].pagenum > page.PageNum) - { - page.SelAnchorY = page.Height; - } - else - { - page.SelAnchorY = 0; - } - page.SelColor = m_regionselect; - textSelectInfo_t info = new textSelectInfo_t(); - info.pagenum = page.PageNum; - info.first_line_full = false; - info.last_line_full = false; - m_textSelect.Add(info); - /* Create new holder for lines highlighted */ - m_lineptrs[page.PageNum] = new LinesText(); - } - - if (page.TextBlocks == null || page.TextBlocks.Count == 0) - return; - - /* Width changes translate across the pages */ - for (int jj = 0; jj < m_textSelect.Count; jj++) - { - DocPage curr_page = m_docPages[m_textSelect[jj].pagenum]; - x = Math.Min(pos.X, curr_page.SelAnchorX); - w = Math.Max(pos.X, curr_page.SelAnchorX) - x; - curr_page.SelX = x; - curr_page.SelWidth = w; - } - /* Height is just the current page */ - y = Math.Min(pos.Y, page.SelAnchorY); - h = Math.Max(pos.Y, page.SelAnchorY) - y; - - /* Determine if we are going up or down */ - if (pos.Y > page.SelAnchorY) - above_anchor = false; - page.SelY = y; - page.SelHeight = h; - - /* Clear out what we currently have */ - m_lineptrs[page.PageNum].Clear(); - - /* Stuff already selected above us */ - if (m_textSelect.Count > 1) - found_first = true; - /* Moving backwards through pages */ - if (m_textSelect.Count > 1 && m_textSelect[m_textSelect.Count - 2].pagenum > page.PageNum) - found_first = false; - - /* To properly handle the multiple columns we have to find the last - * line and make sure that all blocks between our first and last - * line are included. To do this we do an initial step through the - * blocks looking at our intersections */ - int first_block = -1; - int last_block = -1; - for (int jj = 0; jj < page.TextBlocks.Count; jj++ ) - { - var intersect_blk = page.TextBlocks[jj].CheckIntersection(x, y, w, h); - if (intersect_blk == Intersection_t.NONE && first_block != -1) - { - last_block = jj; /* NB: this is just past last block */ - break; - } - else if (intersect_blk != Intersection_t.NONE && first_block == -1) - first_block = jj; /* NB: this is the first block */ - } - if (first_block == -1) - return; - if (last_block == -1) - { - /* Only 1 block */ - last_block = first_block + 1; - } - - for (int jj = first_block; jj < last_block; jj++) - { - /* Text blocks are already scaled. Lines are not */ - var intersect_blk = page.TextBlocks[jj].CheckIntersection(x, y, w, h); - var lines = page.TextBlocks[jj].TextLines; - - if (jj == first_block || jj == last_block - 1) - { - /* Partial cases */ - if (intersect_blk == Intersection_t.FULL) - { - for (int kk = 0; kk < lines.Count; kk++) - m_lineptrs[page.PageNum].Add(lines[kk]); - if (jj == first_block) - { - first_line_full = true; - found_first = true; - } - if (jj == last_block - 1) - { - last_line_full = true; - } - } - else if (intersect_blk == Intersection_t.PARTIAL) - { - for (int kk = 0; kk < lines.Count; kk++) - { - double scale = m_doczoom / lines[kk].Scale; - var intersect_line = lines[kk].CheckIntersection(x * scale, y * scale, w * scale, h * scale); - if (intersect_line == Intersection_t.FULL) - { - m_lineptrs[page.PageNum].Add(lines[kk]); - found_first = true; - if (jj == 0 && kk == 0) - first_line_full = true; - if (jj == page.TextBlocks.Count - 1 && - kk == lines.Count - 1) - last_line_full = true; - - } - else if (intersect_line == Intersection_t.PARTIAL) - { - double val; - var lett = lines[kk].TextCharacters; - - /* Now go through the width. */ - if (found_first) - { - if (above_anchor) - val = page.SelAnchorX; - else - val = pos.X; - - /* our second partial line */ - if (val > lines[kk].X * scale + lines[kk].Width * scale) - m_lineptrs[page.PageNum].Add(lines[kk]); - else - { - /* Use either anchor point or mouse pos */ - end_line = new TextLine(); - end_line.TextCharacters = new List(); - end_line.Height = 0; - end_line.Scale = m_doczoom; - for (int mm = 0; mm < lett.Count; mm++) - { - double letscale = m_doczoom / lett[mm].Scale; - if (lett[mm].X * letscale < val) - { - /* Can set to special color for debug */ - end_line.Color = m_textselectcolor; - /* special color for debug */ - //end_line.Color = "#4000FF00"; - end_line.Height = lines[kk].Height * scale; - end_line.Width = lett[mm].X * letscale + lett[mm].Width * letscale - lines[kk].X * scale; - end_line.Y = lines[kk].Y * scale; - end_line.X = lines[kk].X * scale; - end_line.TextCharacters.Add(lett[mm]); - } - else - break; - } - if (end_line.Height != 0) - m_lineptrs[page.PageNum].Add(end_line); - } - } - else - { - if (!above_anchor) - val = page.SelAnchorX; - else - val = pos.X; - - /* our first partial line */ - found_first = true; - if (val < lines[kk].X * scale) - m_lineptrs[page.PageNum].Add(lines[kk]); - else - { - start_line = new TextLine(); - start_line.TextCharacters = new List(); - start_line.Height = 0; - start_line.Scale = m_doczoom; - /* Use either anchor point or mouse pos */ - for (int mm = 0; mm < lett.Count; mm++) - { - double letscale = m_doczoom / lett[mm].Scale; - if (lett[mm].X * letscale + lett[mm].Width * letscale >= val) - { - start_line.Color = m_textselectcolor; - /* special color for debug */ - //start_line.Color = "#40FF0000"; - start_line.Height = lines[kk].Height * scale; - start_line.Width = lines[kk].X * scale + lines[kk].Width * scale - lett[mm].X * letscale; - start_line.X = lett[mm].X * letscale; - start_line.Y = lines[kk].Y * scale; - start_line.TextCharacters.Add(lett[mm]); - break; - } - } - if (start_line.Height > 0) - m_lineptrs[page.PageNum].Add(start_line); - } - } - } - } - } - } - else - { - /* Add all the lines for the blocks between the first and last */ - for (int kk = 0; kk < lines.Count; kk++) - m_lineptrs[page.PageNum].Add(lines[kk]); - } - } - - var txtsel = m_textSelect[m_textSelect.Count - 1]; - txtsel.first_line_full = first_line_full; - txtsel.last_line_full = last_line_full; - m_textSelect[m_textSelect.Count - 1] = txtsel; - - /* Adjust for scale before assigning */ - var temp = m_lineptrs[page.PageNum]; - for (int kk = 0; kk < temp.Count; kk++) - { - var rect_item = temp[kk]; - double factor = m_doczoom / rect_item.Scale; - - temp[kk].Height = temp[kk].Height * factor; - temp[kk].Width = temp[kk].Width * factor; - temp[kk].X = temp[kk].X * factor; - temp[kk].Y = temp[kk].Y * factor; - - temp[kk].Scale = m_doczoom; - } - page.SelectedLines = m_lineptrs[page.PageNum]; - } - - private void CheckIfSelected() - { - m_textselected = false; - - if (m_selectall) - { - SetSelectAll(m_blockcolor); - m_selectall = false; - } - /* Check if anything was selected */ - for (int kk = 0; kk < m_lineptrs.Count; kk++) - { - if (m_lineptrs[kk].Count > 0) - { - m_textselected = true; - break; - } - } - } - - /* Rect should be removed */ - private void PageLeftClickUp(object sender, MouseButtonEventArgs e) - { - m_intxtselect = false; - CheckIfSelected(); - } - - private void StepScroll(int stepsize) - { - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - { - var scrollpos = viewer.VerticalOffset; - viewer.ScrollToVerticalOffset(scrollpos + stepsize); - } - } - - private void ResetScroll() - { - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer != null) - viewer.ScrollToVerticalOffset(0); - } - - /* Recursive call to find the scroll viewer */ - private ScrollViewer FindScrollViewer(DependencyObject d) - { - if (d is ScrollViewer) - return d as ScrollViewer; - - for (int i = 0; i < VisualTreeHelper.GetChildrenCount(d); i++) - { - var sw = FindScrollViewer(VisualTreeHelper.GetChild(d, i)); - if (sw != null) return sw; - } - return null; - } - - /* Only worry about cases where we are moving and left button is down */ - private void ListPreviewMouseMove(object sender, System.Windows.Input.MouseEventArgs e) - { - var relPoint = e.GetPosition(xaml_PageList); - var absPoint = this.PointToScreen(relPoint); - /* Console.Write("abs Y position = " + absPoint.Y + "\n"); - Console.Write("rel Y position = " + relPoint.Y + "\n"); - Console.Write("Height is = " + (this.Top + this.Height) + "\n"); */ - - if (xaml_PageList.IsMouseCaptured == true) - { - if (!m_intxtselect) - { - xaml_PageList.ReleaseMouseCapture(); - e.Handled = true; - return; - } - - if (relPoint.Y < Constants.SCROLL_EDGE_BUFFER || - absPoint.Y > (this.Top + this.Height - Constants.SCROLL_EDGE_BUFFER)) - { - if (m_dispatcherTimer == null) - { - m_dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); - m_dispatcherTimer.Tick += new EventHandler(dispatcherTimerTick); - m_dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, Constants.DISPATCH_TIME); - } - if (m_dispatcherTimer.IsEnabled == false) - m_dispatcherTimer.Start(); - e.Handled = true; - } - - /* This is not desirable, but the scrollviewer behaves badly - * when it has captured the mouse and we move beyond the - * range. So we wont allow it */ - if (relPoint.Y < 0 || - absPoint.Y > (this.Top + this.Height) - Constants.SCROLL_EDGE_BUFFER / 2.0) - { - xaml_PageList.ReleaseMouseCapture(); - e.Handled = true; - if (m_dispatcherTimer != null && m_dispatcherTimer.IsEnabled == true) - m_dispatcherTimer.Stop(); - return; - } - } - } - - private void ListPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - if (m_dispatcherTimer != null && m_dispatcherTimer.IsEnabled) - { - m_dispatcherTimer.Stop(); - } - } - - private void ListMouseLeave(object sender, System.Windows.Input.MouseEventArgs e) - { - if (m_dispatcherTimer != null && m_dispatcherTimer.IsEnabled) - { - m_dispatcherTimer.Stop(); - } - if (xaml_PageList.IsMouseCaptured == true) - xaml_PageList.ReleaseMouseCapture(); - } - - /* Get mouse position, update selection accordingly */ - private void dispatcherTimerTick(object sender, EventArgs e) - { - var position = this.PointToScreen(Mouse.GetPosition(xaml_PageList)); - /* Console.Write("Y position = " + position.Y + "\n"); - Console.Write("Top position = " + this.Top + "\n"); - Console.Write("Bottom position = " + (this.Top + this.Height) + "\n"); */ - DocPage page; - int page_num; - - if (!xaml_PageList.IsMouseCaptured) - { - //Console.Write("Lost capture\n"); - return; - } - /*else - { - Console.Write("Have capture\n"); - } */ - /* Get our most recent page */ - var pageinfo = m_textSelect[m_textSelect.Count - 1]; - page_num = pageinfo.pagenum; - - /* Scrolling up */ - if (position.Y > this.Top + this.Height - Constants.SCROLL_EDGE_BUFFER) - { - /* See if we have the last line for this page */ - if (pageinfo.last_line_full) - { - page_num = page_num + 1; - m_lastY = 0; - if (page_num >= m_num_pages) - return; - } - page = m_docPages[page_num]; - StepScroll(Constants.SCROLL_STEP); - /* Set position for proper selection update */ - m_lastY = m_lastY + Constants.SCROLL_STEP; - if (m_lastY > m_maxY) - m_lastY = m_maxY; - position.Y = m_lastY; - UpdateSelection(position, page); - } - else if (position.Y < this.Top + Constants.SCROLL_EDGE_BUFFER) - { - /* See if we have the first line for this page */ - if (pageinfo.first_line_full) - { - if (page_num <= 0) - return; - page_num = page_num - 1; - m_lastY = m_docPages[page_num].Height; - } - page = m_docPages[page_num]; - StepScroll(-Constants.SCROLL_STEP); - /* Set position for proper selection update */ - m_lastY = m_lastY - Constants.SCROLL_STEP; - if (m_lastY < 0) - m_lastY = 0; - position.Y = m_lastY; - UpdateSelection(position, page); - } - } - - private void ListPreviewLeftButtonUp(object sender, MouseButtonEventArgs e) - { - if (m_dispatcherTimer != null && m_dispatcherTimer.IsEnabled) - { - m_dispatcherTimer.Stop(); - } - } - - private void ShowContextMenu(object sender, MouseButtonEventArgs e) - { - if (this.Cursor != System.Windows.Input.Cursors.IBeam) - return; - - var contextmenu = new System.Windows.Controls.ContextMenu(); - Canvas can = ((FrameworkElement)e.Source).Parent as Canvas; - var page = ((FrameworkElement)e.Source).DataContext as DocPage; - if (can == null || page == null) - return; - - var posit = e.GetPosition(can); - ContextMenu_t info = new ContextMenu_t(); - info.mouse_position = posit; - info.page_num = page.PageNum; - can.ContextMenu = contextmenu; - - if (m_textselected || m_selectall) - { - var m1 = new System.Windows.Controls.MenuItem(); - m1.Header = "Copy"; - - /* amazing what I have to do here to get the icon out of the - * resources into something that wpf can use */ - var iconres = Properties.Resources.copy; - var bitmap = iconres.ToBitmap(); - using (MemoryStream memory = new MemoryStream()) - { - bitmap.Save(memory, System.Drawing.Imaging.ImageFormat.Png); - memory.Position = 0; - BitmapImage bitmapImage = new BitmapImage(); - bitmapImage.BeginInit(); - bitmapImage.StreamSource = memory; - bitmapImage.CacheOption = BitmapCacheOption.OnLoad; - bitmapImage.EndInit(); - Image iconImage = new Image(); - iconImage.Source = bitmapImage; - m1.Icon = iconImage; - m1.Click += cntxMenuCopy; - contextmenu.Items.Add(m1); - } - - var m6 = new System.Windows.Controls.MenuItem(); - m6.Header = "Deselect All"; - m6.Click += cntxMenuDeselectAll; - contextmenu.Items.Add(m6); - - /* Below to be enabled when we add annotations */ - /* - var ma1 = new System.Windows.Controls.MenuItem(); - ma1.Header = "Highlight"; - ma1.Click += cntxMenuHighlight; - contextmenu.Items.Add(ma1); - - var ma2 = new System.Windows.Controls.MenuItem(); - ma2.Header = "Underline"; - ma2.Click += cntxMenuUnderline; - contextmenu.Items.Add(ma2); - - var ma3 = new System.Windows.Controls.MenuItem(); - ma3.Header = "Strikeout"; - ma3.Click += cntxMenuStrike; - contextmenu.Items.Add(ma3);*/ - - } - var m2 = new System.Windows.Controls.MenuItem(); - m2.Header = "Select Line"; - m2.Click += cntxMenuSelectLine; - m2.Tag = info; - contextmenu.Items.Add(m2); - - var m3 = new System.Windows.Controls.MenuItem(); - m3.Header = "Select Block"; - m3.Click += cntxMenuSelectBlock; - m3.Tag = info; - contextmenu.Items.Add(m3); - - var m4 = new System.Windows.Controls.MenuItem(); - m4.Header = "Select Page"; - m4.Click += cntxMenuSelectPage; - m4.Tag = info; - contextmenu.Items.Add(m4); - - var m5 = new System.Windows.Controls.MenuItem(); - m5.Header = "Select All"; - m5.Click += cntxMenuSelectAll; - contextmenu.Items.Add(m5); - } - - private void CopyTextDone(object sender, RunWorkerCompletedEventArgs e) - { - String result = (String) e.Result; - xaml_CopyTextProgress.Visibility = System.Windows.Visibility.Collapsed; - xaml_CopyTextProgress.Value = 0; - - try - { - System.Windows.Clipboard.SetText(result); - } - catch - { - return; - } - } - - private void CopyTextWork(object sender, DoWorkEventArgs e) - { - String output = null; - String fullstring = null; - BackgroundWorker worker = sender as BackgroundWorker; - - for (int k = 0; k < m_num_pages; k++) - { - output = mu_doc.GetText(k, textout_t.TEXT); - if (output != null) - fullstring = fullstring + output; - - double percent = 100 * (double)(k + 1) / (double)m_num_pages; - worker.ReportProgress((int)percent, output); - - if (worker.CancellationPending == true) - { - e.Cancel = true; - break; - } - } - e.Result = fullstring; - } - - private void CopyTextProgress(object sender, ProgressChangedEventArgs e) - { - String output = (String)(e.UserState); - xaml_CopyTextProgress.Value = e.ProgressPercentage; - } - - private void cntxMenuCopy(object sender, RoutedEventArgs e) - { - if (m_selectall) - { - /* Start a thread to go through and copy the pages to the - * clipboard */ - m_copytext = new BackgroundWorker(); - m_copytext.WorkerReportsProgress = true; - m_copytext.WorkerSupportsCancellation = true; - m_copytext.DoWork += new DoWorkEventHandler(CopyTextWork); - m_copytext.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CopyTextDone); - m_copytext.ProgressChanged += new ProgressChangedEventHandler(CopyTextProgress); - xaml_CopyTextProgress.Visibility = System.Windows.Visibility.Visible; - m_copytext.RunWorkerAsync(); - return; - } - - /* Go through and get each line of text */ - String result = null; - - for (int kk = 0; kk < m_textSelect.Count; kk++) - { - var lines = m_lineptrs[m_textSelect[kk].pagenum]; - for (int jj = 0; jj < lines.Count; jj++) - { - var text = lines[jj].TextCharacters; - for (int mm = 0; mm < text.Count; mm++) - { - result += text[mm].character; - } - result += "\r\n"; - } - } - System.Windows.Clipboard.SetText(result); - } - - private void cntxMenuSelectLine(object sender, RoutedEventArgs e) - { - var mi = sender as System.Windows.Controls.MenuItem; - ContextMenu_t info = (ContextMenu_t)mi.Tag; - var page = m_docPages[info.page_num]; - - InitTextSelection(page); - - page.SelX = 0; - page.SelY = info.mouse_position.Y - 1; - page.SelAnchorX = 0; - page.SelAnchorY = info.mouse_position.Y - 1; - page.SelColor = m_regionselect; - - /* Create new holder for lines highlighted */ - m_lineptrs[page.PageNum] = new LinesText(); - - Point pos = new Point(); - pos.X = page.Width; - pos.Y += info.mouse_position.Y + 1; - - UpdateSelection(pos, page); - CheckIfSelected(); - } - - /* This one requires its own special handling TODO FIXME */ - private void cntxMenuSelectBlock(object sender, RoutedEventArgs e) - { - var mi = sender as System.Windows.Controls.MenuItem; - ContextMenu_t info = (ContextMenu_t)mi.Tag; - var page = m_docPages[info.page_num]; - bool found = false; - int jj; - - InitTextSelection(page); - - /* Find the block that we are in */ - for (jj = 0; jj < page.TextBlocks.Count; jj++) - { - var intersect_blk = page.TextBlocks[jj].CheckIntersection(info.mouse_position.X, info.mouse_position.Y, 1, 1); - if (intersect_blk != Intersection_t.NONE) - { - found = true; - break; - } - } - if (found) - { - page.SelX = page.TextBlocks[jj].X; - page.SelY = page.TextBlocks[jj].Y; - page.SelAnchorX = page.TextBlocks[jj].X; - page.SelAnchorY = page.TextBlocks[jj].Y; - page.SelColor = m_regionselect; - - /* Create new holder for lines highlighted */ - m_lineptrs[page.PageNum] = new LinesText(); - - Point pos = new Point(); - pos.X = page.TextBlocks[jj].X + page.TextBlocks[jj].Width; - pos.Y = page.TextBlocks[jj].Y + page.TextBlocks[jj].Height; - - UpdateSelection(pos, page); - CheckIfSelected(); - } - else - m_textselected = false; - } - - private void SelectFullPage(int page_num) - { - var page = m_docPages[page_num]; - - InitTextSelection(page); - - page.SelX = 0; - page.SelY = 0; - page.SelAnchorX = 0; - page.SelAnchorY = 0; - page.SelColor = m_regionselect; - - /* Create new holder for lines highlighted */ - m_lineptrs[page.PageNum] = new LinesText(); - - Point pos = new Point(); - pos.X = page.Width; - pos.Y = page.Height; - - UpdateSelection(pos, page); - } - - private void cntxMenuSelectPage(object sender, RoutedEventArgs e) - { - var mi = sender as System.Windows.Controls.MenuItem; - ContextMenu_t info = (ContextMenu_t)mi.Tag; - - SelectFullPage(info.page_num); - CheckIfSelected(); - } - - private void cntxMenuSelectAll(object sender, RoutedEventArgs e) - { - var mi = sender as System.Windows.Controls.MenuItem; - if (m_textSelect != null) - ClearSelections(); - else - m_textSelect = new List(); - - m_selectall = true; - SetSelectAll(m_textselectcolor); - } - - private void SetSelectAll(String color) - { - if (!m_init_done) - return; - - for (int kk = 0; kk < m_num_pages; kk++) - { - if (m_docPages[kk] != null && m_docPages[kk].TextBlocks != null) - { - int num_blocks = m_docPages[kk].TextBlocks.Count; - for (int jj = 0; jj < num_blocks; jj++) - m_docPages[kk].TextBlocks[jj].Color = color; - } - } - } - - private void cntxMenuDeselectAll(object sender, RoutedEventArgs e) - { - ClearSelections(); - } - - private void SelectAllCommand(object sender, ExecutedRoutedEventArgs e) - { - if (m_init_done) - cntxMenuSelectAll(sender, e); - } - - private void CopyCommand(object sender, ExecutedRoutedEventArgs e) - { - if (m_init_done) - cntxMenuCopy(sender, e); - } - - private void CancelCopyText(object sender, RoutedEventArgs e) - { - if (m_copytext != null && m_copytext.IsBusy) - m_copytext.CancelAsync(); - } - - /* To add with annotation support */ - /* - private void cntxMenuHighlight(object sender, RoutedEventArgs e) - { - - } - - private void cntxMenuUnderline(object sender, RoutedEventArgs e) - { - - } - - private void cntxMenuStrike(object sender, RoutedEventArgs e) - { - - } - */ - #endregion TextSelection - - private void OnAboutClick(object sender, RoutedEventArgs e) - { - String muversion; - About about = new About(this); - var desc_static = about.Description; - String desc; - - /* Get our gs and mupdf version numbers to add to the description */ - mu_doc.GetVersion(out muversion); - if (muversion == null) - desc = desc_static + "\nMuPDF DLL: Not Found"; - else - { - if (mu_doc.is64bit) - { - desc = desc_static + "\nUsing MuPDF Version " + muversion + " 64 bit\n"; - } - else - { - desc = desc_static + "\nUsing MuPDF Version " + muversion + " 32 bit\n"; - } - } - String gs_vers = m_ghostscript.GetVersion(); - if (gs_vers == null) - desc = desc + "\nGhostscript DLL: Not Found"; - else - if (mu_doc.is64bit) - { - desc = desc + "\nGhostscript DLL: " + gs_vers + " 64 bit\n"; - } - else - { - desc = desc + "\nGhostscript DLL: " + gs_vers + " 64 bit\n"; - } - about.description.Text = desc; - about.ShowDialog(); - } - - private void HelpCommand(object sender, ExecutedRoutedEventArgs e) - { - OnHelpClick(sender, e); - } - - private void OnHelpClick(object sender, RoutedEventArgs e) - { - - } - - private void CloseFile(object sender, RoutedEventArgs e) - { - CleanUp(); - DimSelections(); - } - - private double GetTotalHeightZoom() - { - return m_totalpageheight * m_doczoom + (m_num_pages - 1) * Constants.PAGE_MARGIN; - } - - private double GetTotalHeightNoZoom() - { - return m_totalpageheight + (m_num_pages - 1) * Constants.PAGE_MARGIN; - } - - private double GetViewPortSize() - { - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - return viewer.ViewportHeight; - } - - private void SetThumbwidth() - { - double percent = GetViewPortSize() / GetTotalHeightZoom(); - double range = xaml_VerticalScroll.Maximum - xaml_VerticalScroll.Minimum; - xaml_VerticalScroll.SetThumbLength(percent * range); - } - - private void AdjustScrollPercent(double percent) - { - double curr_value = xaml_VerticalScroll.Value; - double range = xaml_VerticalScroll.Maximum; - double step = range * percent; - - xaml_VerticalScroll.Value = curr_value + step; - } - - /* Due to the scroll bar on the scroll viewer being wonky on its updating during zooming - * we have to do this ourselves */ - private void VerticalScroll(object sender, System.Windows.Controls.Primitives.ScrollEventArgs e) - { - var mi = sender as System.Windows.Controls.Primitives.ScrollBar; - ScrollViewer viewer = FindScrollViewer(xaml_PageList); - if (viewer == null || mi == null) - return; - - m_ScrolledChanged = true; - - if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.ThumbTrack) - { - OffsetScrollPercent(mi.Value / mi.Maximum); - e.Handled = true; - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.First) - { - mi.Value = 0; - viewer.ScrollToTop(); - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.Last) - { - mi.Value = mi.Maximum; - viewer.ScrollToBottom(); - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.SmallDecrement) - { - OffsetScroll(-Constants.VERT_SCROLL_STEP * m_doczoom); - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.SmallIncrement) - { - OffsetScroll(Constants.VERT_SCROLL_STEP * m_doczoom); - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.LargeDecrement) - { - if (m_currpage == 0) - { - mi.Value = 0; - viewer.ScrollToTop(); - } - else - OnBackPageClick(null, null); - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.LargeIncrement) - { - if (m_currpage == m_num_pages - 1) - { - mi.Value = mi.Maximum; - viewer.ScrollToBottom(); - } - else - OnForwardPageClick(null, null); - } - else if (e.ScrollEventType == System.Windows.Controls.Primitives.ScrollEventType.ThumbPosition) - { - OffsetScrollPercent(e.NewValue / mi.Maximum); - } - } - - private void OnAAChecked(object sender, RoutedEventArgs e) - { - var control = sender as System.Windows.Controls.Control; - string Name = control.Name; - - /* It would be nice to uncheck all and then recheck the one - * that we want to avoid the repeated code below, but that puts - * us in a infinite recursion with the call from the xaml Checked - * call */ - - switch (Name) - { - case "xaml_AA_High": - m_AA = AA_t.HIGH; - if (xaml_AA_MedHigh != null) - xaml_AA_MedHigh.IsChecked = false; - if (xaml_AA_Med != null) - xaml_AA_Med.IsChecked = false; - if (xaml_AA_Low != null) - xaml_AA_Low.IsChecked = false; - if (xaml_AA_None != null) - xaml_AA_None.IsChecked = false; - break; - case "xaml_AA_MedHigh": - m_AA = AA_t.MEDHIGH; - if (xaml_AA_High != null) - xaml_AA_High.IsChecked = false; - if (xaml_AA_Med != null) - xaml_AA_Med.IsChecked = false; - if (xaml_AA_Low != null) - xaml_AA_Low.IsChecked = false; - if (xaml_AA_None != null) - xaml_AA_None.IsChecked = false; - break; - case "xaml_AA_Med": - m_AA = AA_t.MED; - if (xaml_AA_High != null) - xaml_AA_High.IsChecked = false; - if (xaml_AA_MedHigh != null) - xaml_AA_MedHigh.IsChecked = false; - if (xaml_AA_Low != null) - xaml_AA_Low.IsChecked = false; - if (xaml_AA_None != null) - xaml_AA_None.IsChecked = false; - break; - case "xaml_AA_Low": - m_AA = AA_t.LOW; - if (xaml_AA_High != null) - xaml_AA_High.IsChecked = false; - if (xaml_AA_MedHigh != null) - xaml_AA_MedHigh.IsChecked = false; - if (xaml_AA_Med != null) - xaml_AA_Med.IsChecked = false; - if (xaml_AA_None != null) - xaml_AA_None.IsChecked = false; - break; - case "xaml_AA_None": - m_AA = AA_t.NONE; - if (xaml_AA_High != null) - xaml_AA_High.IsChecked = false; - if (xaml_AA_MedHigh != null) - xaml_AA_MedHigh.IsChecked = false; - if (xaml_AA_Med != null) - xaml_AA_Med.IsChecked = false; - if (xaml_AA_Low != null) - xaml_AA_Low.IsChecked = false; - break; - } - if (mu_doc != null) - mu_doc.SetAA(m_AA); - if (m_init_done) - RenderRange(m_currpage, false, zoom_t.NO_ZOOM, 0); - } - - private AA_t GetAA() - { - if (xaml_AA_High.IsChecked) - return AA_t.HIGH; - else if (xaml_AA_MedHigh.IsChecked) - return AA_t.MEDHIGH; - else if (xaml_AA_Med.IsChecked) - return AA_t.MED; - else if (xaml_AA_Low.IsChecked) - return AA_t.LOW; - else - return AA_t.NONE; - } - - private void SetAA(AA_t aa) - { - xaml_AA_High.IsChecked = false; - xaml_AA_MedHigh.IsChecked = false; - xaml_AA_Med.IsChecked = false; - xaml_AA_Low.IsChecked = false; - xaml_AA_None.IsChecked = false; - - switch (aa) - { - case AA_t.HIGH: - xaml_AA_High.IsChecked = true; - break; - case AA_t.MEDHIGH: - xaml_AA_MedHigh.IsChecked = true; - break; - case AA_t.MED: - xaml_AA_High.IsChecked = true; - break; - case AA_t.LOW: - xaml_AA_High.IsChecked = true; - break; - case AA_t.NONE: - xaml_AA_High.IsChecked = true; - break; - } - } - - private void AnnotationOn(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - m_showannot = true; - RenderRange(m_currpage, false, zoom_t.NO_ZOOM, 0); - } - - private void AnnotationOff(object sender, RoutedEventArgs e) - { - if (!m_init_done) - return; - m_showannot = false; - RenderRange(m_currpage, false, zoom_t.NO_ZOOM, 0); - } - } -} \ No newline at end of file diff --git a/platform/winrt/gsview/OutputIntent.xaml b/platform/winrt/gsview/OutputIntent.xaml deleted file mode 100644 index fdfb7e3c..00000000 --- a/platform/winrt/gsview/OutputIntent.xaml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/gsview/OutputIntent.xaml.cs b/platform/winrt/gsview/OutputIntent.xaml.cs deleted file mode 100644 index eb11f0f6..00000000 --- a/platform/winrt/gsview/OutputIntent.xaml.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Windows.Forms; - -namespace gsview -{ - public enum OutputIntent_t - { - GRAY, - RGB, - CMYK - } - - /// - /// Interaction logic for OutputIntent.xaml - /// - public partial class OutputIntent : Window - { - public String gray_icc; - public String rgb_icc; - public String cmyk_icc; - - public OutputIntent() - { - InitializeComponent(); - this.Closing += new System.ComponentModel.CancelEventHandler(FakeWindowClosing); - gray_icc = null; - rgb_icc = null; - cmyk_icc = null; - } - - void FakeWindowClosing(object sender, System.ComponentModel.CancelEventArgs e) - { - e.Cancel = true; - this.Hide(); - } - - public void RealWindowClosing() - { - this.Closing -= new System.ComponentModel.CancelEventHandler(FakeWindowClosing); - this.Close(); - } - - /* No error checking in here yet for making sure the profiles are of - * the right type and are valid */ - private void SelectGray(object sender, RoutedEventArgs e) - { - SetIntent(OutputIntent_t.GRAY); - } - - private void SelectRGB(object sender, RoutedEventArgs e) - { - SetIntent(OutputIntent_t.RGB); - } - - private void SelectCMYK(object sender, RoutedEventArgs e) - { - SetIntent(OutputIntent_t.CMYK); - } - - private void SetIntent(OutputIntent_t intent) - { - OpenFileDialog dlg = new OpenFileDialog(); - dlg.Filter = "ICC Profile Files(*.icc;*.icm)|*.icc;*.icm"; - dlg.FilterIndex = 1; - if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - switch(intent) - { - case OutputIntent_t.GRAY: - gray_icc = dlg.FileName; - this.xaml_gray.Text = gray_icc; - this.xaml_gray.BorderBrush = new SolidColorBrush(Colors.Green); - break; - case OutputIntent_t.RGB: - rgb_icc = dlg.FileName; - this.xaml_rgb.Text = rgb_icc; - this.xaml_rgb.BorderBrush = new SolidColorBrush(Colors.Green); - break; - case OutputIntent_t.CMYK: - cmyk_icc = dlg.FileName; - this.xaml_cmyk.Text = cmyk_icc; - this.xaml_cmyk.BorderBrush = new SolidColorBrush(Colors.Green); - break; - } - } - } - - private void ClickOK(object sender, RoutedEventArgs e) - { - this.Hide(); - } - } -} diff --git a/platform/winrt/gsview/PageExtractSave.xaml b/platform/winrt/gsview/PageExtractSave.xaml deleted file mode 100644 index 36f30324..00000000 --- a/platform/winrt/gsview/PageExtractSave.xaml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - Pages: - - - - - - - - - - - - - - - - - - - - - - - - - - - - Use drag/drop to rearrange. Right click to delete from list. - Only selected pages extracted. - - - diff --git a/platform/winrt/gsview/PageExtractSave.xaml.cs b/platform/winrt/gsview/PageExtractSave.xaml.cs deleted file mode 100644 index e3985d17..00000000 --- a/platform/winrt/gsview/PageExtractSave.xaml.cs +++ /dev/null @@ -1,213 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Collections.ObjectModel; - -namespace gsview -{ - public partial class PageExtractSave : Window - { - public List Pages; - SelectPage selectedpage = null; - int dropafterposition; - bool putattop = false; - - /* Callback to Main */ - internal delegate void ExtractCallBackMain(object gsObject); - internal event ExtractCallBackMain ExtractMain; - - public PageExtractSave(int num_pages) - { - InitializeComponent(); - Pages = new List(); - SetPageList(num_pages); - xaml_PageList.ItemsSource = Pages; - } - - private void AllPages(object sender, RoutedEventArgs e) - { - xaml_PageList.SelectAll(); - } - - public void SetPageList(int num_pages) - { - for (int k = 1; k < num_pages + 1; k++) - { - SelectPage Spage = new SelectPage(); - Spage.Page = k; - Spage.PageString = k; - Pages.Add(Spage); - } - } - - private void EvenPages(object sender, RoutedEventArgs e) - { - /* First check if any are selected */ - var item = xaml_PageList.SelectedItem; - - /* If none are selected then get all the evens. otherwise just get - * all the evens of the pages that have been selected */ - if (item == null) - { - /* Turn on the evens */ - for (int kk = 1; kk < Pages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = true; - } - else - { - /* Turn off any odds */ - for (int kk = 0; kk < Pages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = false; - } - } - - private void OddPages(object sender, RoutedEventArgs e) - { - /* First check if any are selected */ - var item = xaml_PageList.SelectedItem; - - /* If none are selected then get all the odds. otherwise just get - all the odds of the pages that have been selected */ - if (item == null) - { - /* Turn on the odds */ - for (int kk = 0; kk < Pages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = true; - } - else - { - /* Turn off any evens */ - for (int kk = 1; kk < Pages.Count; kk = kk + 2) - (xaml_PageList.ItemContainerGenerator.ContainerFromIndex(kk) as ListViewItem).IsSelected = false; - } - } - - private void ExtractPages(object sender, RoutedEventArgs e) - { - ExtractMain(this); - } - - private void ExtractLeftButtonDown(object sender, MouseButtonEventArgs e) - { - int index = GetCurrentIndex(); - if (index > -1 && index < Pages.Count) - selectedpage = Pages[index]; - } - - private void ExtractLeftButtonUp(object sender, MouseButtonEventArgs e) - { - /* Check if we have something selected */ - if (selectedpage == null) - { - Cursor = Cursors.Arrow; - return; - } - - Point posit = e.GetPosition(xaml_PageList); - dropafterposition = GetCurrentIndex(); - putattop = false; - - if (dropafterposition < 0) - { - /* Check if we are above or below */ - if (posit.Y < 0) - putattop = true; - else - dropafterposition = xaml_PageList.Items.Count - 1; - } - Cursor = Cursors.Arrow; - MoveItem(); - selectedpage = null; - } - - private void MoveItem() - { - if (putattop) - { - Pages.Remove(selectedpage); - Pages.Insert(0, selectedpage); - } - else - { - Pages.Remove(selectedpage); - Pages.Insert(dropafterposition, selectedpage); - } - xaml_PageList.Items.Refresh(); - } - - private void ExtractMouseMove(object sender, MouseEventArgs e) - { - if (Mouse.LeftButton == MouseButtonState.Pressed) - Cursor = Cursors.Hand; - } - - private void ExtractMouseLeave(object sender, MouseEventArgs e) - { - Cursor = Cursors.Arrow; - } - - private void RightButtonDown(object sender, MouseButtonEventArgs e) - { - var contextmenu = new System.Windows.Controls.ContextMenu(); - this.ContextMenu = contextmenu; - - var m1 = new System.Windows.Controls.MenuItem(); - m1.Header = "Delete"; - m1.Click += cntxDeleteItem; - contextmenu.Items.Add(m1); - } - - /* Delete all selected items */ - private void cntxDeleteItem(object sender, RoutedEventArgs e) - { - /* Go backwards */ - var temp = xaml_PageList.SelectedItems; - int max = temp.Count; ; - for (int i = 0; i < max; i++) - { - var item = temp[i]; - Pages.Remove((SelectPage)item); - } - xaml_PageList.Items.Refresh(); - } - - int GetCurrentIndex() - { - int index = -1; - for (int i = 0; i < this.xaml_PageList.Items.Count; ++i) - { - ListViewItem item = GetListViewItem(i); - if (item.IsMouseOver) - { - index = i; - break; - } - } - return index; - } - - ListViewItem GetListViewItem(int index) - { - if (this.xaml_PageList.ItemContainerGenerator.Status != - System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated) - return null; - return this.xaml_PageList.ItemContainerGenerator.ContainerFromIndex(index) as ListViewItem; - } - - private void Reverse(object sender, RoutedEventArgs e) - { - Pages.Reverse(); - xaml_PageList.Items.Refresh(); - } - } -} diff --git a/platform/winrt/gsview/Password.xaml b/platform/winrt/gsview/Password.xaml deleted file mode 100644 index 8692244f..00000000 --- a/platform/winrt/gsview/Password.xaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/platform/winrt/gsview/Password.xaml.cs b/platform/winrt/gsview/Password.xaml.cs deleted file mode 100644 index 5c45200e..00000000 --- a/platform/winrt/gsview/Password.xaml.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace gsview -{ - /// - /// Interaction logic for Password.xaml - /// - public partial class Password : Window - { - /* Callback to Main */ - internal delegate void PassCallBackMain(object gsObject); - internal event PassCallBackMain PassUpdateMain; - - public Password() - { - InitializeComponent(); - } - - private void PasswordCheck(object sender, RoutedEventArgs e) - { - PassUpdateMain(this); - } - } -} diff --git a/platform/winrt/gsview/Properties/AssemblyInfo.cs b/platform/winrt/gsview/Properties/AssemblyInfo.cs deleted file mode 100644 index 8bd14cda..00000000 --- a/platform/winrt/gsview/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("GSview")] -[assembly: AssemblyDescription("GSview is a PDF, XPS, PS, and CBZ document viewer. It makes use of the MuPDF and Ghostscript rendering libraries to provide a number of features including conversion to other file formats. GSview was created and is maintained by Artifex Software Incorporated.\n")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Artifex Software Incorporated")] -[assembly: AssemblyProduct("GSview")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] diff --git a/platform/winrt/gsview/Properties/Resources.Designer.cs b/platform/winrt/gsview/Properties/Resources.Designer.cs deleted file mode 100644 index 4fdb3c91..00000000 --- a/platform/winrt/gsview/Properties/Resources.Designer.cs +++ /dev/null @@ -1,153 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34014 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace gsview.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("gsview.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). - /// - public static System.Drawing.Icon Close { - get { - object obj = ResourceManager.GetObject("Close", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). - /// - public static System.Drawing.Icon copy { - get { - object obj = ResourceManager.GetObject("copy", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap info { - get { - object obj = ResourceManager.GetObject("info", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap Message { - get { - object obj = ResourceManager.GetObject("Message", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap OpenFile { - get { - object obj = ResourceManager.GetObject("OpenFile", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - public static byte[] PDFA_def { - get { - object obj = ResourceManager.GetObject("PDFA_def", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - public static byte[] PDFX_def { - get { - object obj = ResourceManager.GetObject("PDFX_def", resourceCulture); - return ((byte[])(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). - /// - public static System.Drawing.Icon printer { - get { - object obj = ResourceManager.GetObject("printer", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap saveHS { - get { - object obj = ResourceManager.GetObject("saveHS", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/platform/winrt/gsview/Properties/Resources.resx b/platform/winrt/gsview/Properties/Resources.resx deleted file mode 100644 index b87e9f79..00000000 --- a/platform/winrt/gsview/Properties/Resources.resx +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\resources\close.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\message.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\openfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\printer.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\savehs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - pdfa_def.ps;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pdfx_def.ps;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\Resources\copy.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/platform/winrt/gsview/Properties/Settings.Designer.cs b/platform/winrt/gsview/Properties/Settings.Designer.cs deleted file mode 100644 index aec7d913..00000000 --- a/platform/winrt/gsview/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34014 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace gsview.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/platform/winrt/gsview/Properties/Settings.settings b/platform/winrt/gsview/Properties/Settings.settings deleted file mode 100644 index 033d7a5e..00000000 --- a/platform/winrt/gsview/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/platform/winrt/gsview/Properties/pdfa_def.ps b/platform/winrt/gsview/Properties/pdfa_def.ps deleted file mode 100644 index 5d242d56..00000000 --- a/platform/winrt/gsview/Properties/pdfa_def.ps +++ /dev/null @@ -1,40 +0,0 @@ -%! -% This is a sample prefix file for creating a PDF/A document. -% Feel free to modify entries marked with "Customize". -% This assumes an ICC profile to reside in the file (ICCPROFILE), -% unless the user modifies the corresponding line below. - -% Define entries in the document Info dictionary : -/ICCProfile (ICCPROFILE) % Customize -def - -[ /Title (TITLE) % Customize - /DOCINFO pdfmark - -% Define an ICC profile : - -[/_objdef {icc_PDFA} /type /stream /OBJ pdfmark -[{icc_PDFA} -<< - /N currentpagedevice /ProcessColorModel known { - currentpagedevice /ProcessColorModel get dup /DeviceGray eq - {pop 1} { - /DeviceRGB eq - {3}{4} ifelse - } ifelse - } { - (ERROR, unable to determine ProcessColorModel) == flush - } ifelse ->> /PUT pdfmark -[{icc_PDFA} ICCProfile (r) file /PUT pdfmark - -% Define the output intent dictionary : - -[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark -[{OutputIntent_PDFA} << - /Type /OutputIntent % Must be so (the standard requires). - /S /GTS_PDFA1 % Must be so (the standard requires). - /DestOutputProfile {icc_PDFA} % Must be so (see above). - /OutputConditionIdentifier (ICC Profile) % A string describing output intent ->> /PUT pdfmark -[{Catalog} <> /PUT pdfmark diff --git a/platform/winrt/gsview/Properties/pdfx_def.ps b/platform/winrt/gsview/Properties/pdfx_def.ps deleted file mode 100644 index a2bd0108..00000000 --- a/platform/winrt/gsview/Properties/pdfx_def.ps +++ /dev/null @@ -1,48 +0,0 @@ -%! -% This is a sample prefix file for creating a PDF/X-3 document. -% Feel free to modify entries marked with "Customize". - -% This assumes an ICC profile to reside in the file (ICCPROFILE), -% unless the user modifies the corresponding line below. - -systemdict /ProcessColorModel known { - systemdict /ProcessColorModel get dup /DeviceGray ne exch /DeviceCMYK ne and -} { - true -} ifelse -{ (ERROR: ProcessColorModel must be /DeviceGray or DeviceCMYK.)= - /ProcessColorModel cvx /rangecheck signalerror -} if - -% Define entries to the document Info dictionary : - -/ICCProfile (ICCPROFILE) def % Customize or remove. - -[ /GTS_PDFXVersion (PDF/X-3:2002) % Must be so (the standard requires). - /Title (TITLE) % Customize. - /Trapped /False % Must be so (Ghostscript doesn't provide other). - /DOCINFO pdfmark - -% Define an ICC profile : - -currentdict /ICCProfile known { - [/_objdef {icc_PDFX} /type /stream /OBJ pdfmark - [{icc_PDFX} <> /PUT pdfmark - [{icc_PDFX} ICCProfile (r) file /PUT pdfmark -} if - -% Define the output intent dictionary : - -[/_objdef {OutputIntent_PDFX} /type /dict /OBJ pdfmark -[{OutputIntent_PDFX} << - /Type /OutputIntent % Must be so (the standard requires). - /S /GTS_PDFX % Must be so (the standard requires). - /OutputCondition (Created using ghostscript) % Customize - /Info (Through gsview) % Customize - /OutputConditionIdentifier (ICC Profile) % Customize - /RegistryName (http://www.color.org) % Must be so (the standard requires). - currentdict /ICCProfile known { - /DestOutputProfile {icc_PDFX} % Must be so (see above). - } if ->> /PUT pdfmark -[{Catalog} <> /PUT pdfmark diff --git a/platform/winrt/gsview/README.txt b/platform/winrt/gsview/README.txt deleted file mode 100644 index 35593bce..00000000 --- a/platform/winrt/gsview/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -Note building the projects in this solution requires VS 2013 -To build the installer projects you will need the extension: - -Microsoft Visual Studio Installer Projects - -located at - -http://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d \ No newline at end of file diff --git a/platform/winrt/gsview/RectList.cs b/platform/winrt/gsview/RectList.cs deleted file mode 100644 index ecbc013a..00000000 --- a/platform/winrt/gsview/RectList.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; - -namespace gsview -{ - public enum Link_t - { - LINK_GOTO, - LINK_URI, - TEXTBOX, - NOT_SET - }; - - public class RectList : INotifyPropertyChanged - { - public String Character - { - get; - set; - } - - public String Index - { - get; - set; - } - - public String Color - { - get; - set; - } - - public double Height - { - get; - set; - } - - public double Width - { - get; - set; - } - - public double X - { - get; - set; - } - - public double Y - { - get; - set; - } - - public double Scale - { - get; - set; - } - - public Link_t Type - { - get; - set; - } - - public int PageNum - { - get; - set; - } - - public Uri Urilink - { - get; - set; - } - - public event PropertyChangedEventHandler PropertyChanged; - - public void PageRefresh() - { - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("X")); - PropertyChanged(this, new PropertyChangedEventArgs("Height")); - PropertyChanged(this, new PropertyChangedEventArgs("Width")); - PropertyChanged(this, new PropertyChangedEventArgs("Y")); - PropertyChanged(this, new PropertyChangedEventArgs("Color")); - } - } - } -} diff --git a/platform/winrt/gsview/Resources/ActualSize48.png b/platform/winrt/gsview/Resources/ActualSize48.png deleted file mode 100644 index 4c6e990f..00000000 Binary files a/platform/winrt/gsview/Resources/ActualSize48.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/Close.ico b/platform/winrt/gsview/Resources/Close.ico deleted file mode 100644 index 131dcf0c..00000000 Binary files a/platform/winrt/gsview/Resources/Close.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/ContScrollFill48.png b/platform/winrt/gsview/Resources/ContScrollFill48.png deleted file mode 100644 index 2ebf672f..00000000 Binary files a/platform/winrt/gsview/Resources/ContScrollFill48.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/ExpandFill48.png b/platform/winrt/gsview/Resources/ExpandFill48.png deleted file mode 100644 index 9df8e512..00000000 Binary files a/platform/winrt/gsview/Resources/ExpandFill48.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/FloppyDisk.ico b/platform/winrt/gsview/Resources/FloppyDisk.ico deleted file mode 100644 index c50273e2..00000000 Binary files a/platform/winrt/gsview/Resources/FloppyDisk.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/Left.ico b/platform/winrt/gsview/Resources/Left.ico deleted file mode 100644 index b2507e31..00000000 Binary files a/platform/winrt/gsview/Resources/Left.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/Message.png b/platform/winrt/gsview/Resources/Message.png deleted file mode 100644 index 7746354e..00000000 Binary files a/platform/winrt/gsview/Resources/Message.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/OpenFile.png b/platform/winrt/gsview/Resources/OpenFile.png deleted file mode 100644 index 99262d52..00000000 Binary files a/platform/winrt/gsview/Resources/OpenFile.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/Right.ico b/platform/winrt/gsview/Resources/Right.ico deleted file mode 100644 index c2f9238f..00000000 Binary files a/platform/winrt/gsview/Resources/Right.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/banner.png b/platform/winrt/gsview/Resources/banner.png deleted file mode 100644 index 60ec5ea0..00000000 Binary files a/platform/winrt/gsview/Resources/banner.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/contents.ico b/platform/winrt/gsview/Resources/contents.ico deleted file mode 100644 index 97a12dd8..00000000 Binary files a/platform/winrt/gsview/Resources/contents.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/copy.ico b/platform/winrt/gsview/Resources/copy.ico deleted file mode 100644 index 7c8600f9..00000000 Binary files a/platform/winrt/gsview/Resources/copy.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/folder_open.ico b/platform/winrt/gsview/Resources/folder_open.ico deleted file mode 100644 index ef6ac424..00000000 Binary files a/platform/winrt/gsview/Resources/folder_open.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/gsview_app.ico b/platform/winrt/gsview/Resources/gsview_app.ico deleted file mode 100644 index 29c5ca50..00000000 Binary files a/platform/winrt/gsview/Resources/gsview_app.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/hyperlink.png b/platform/winrt/gsview/Resources/hyperlink.png deleted file mode 100644 index 6ea0d798..00000000 Binary files a/platform/winrt/gsview/Resources/hyperlink.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/info.png b/platform/winrt/gsview/Resources/info.png deleted file mode 100644 index 172d23c3..00000000 Binary files a/platform/winrt/gsview/Resources/info.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pageCBZ.ico b/platform/winrt/gsview/Resources/pageCBZ.ico deleted file mode 100644 index 42a0f829..00000000 Binary files a/platform/winrt/gsview/Resources/pageCBZ.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pageEPS.ico b/platform/winrt/gsview/Resources/pageEPS.ico deleted file mode 100644 index 3acc64d3..00000000 Binary files a/platform/winrt/gsview/Resources/pageEPS.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pageJPG.ico b/platform/winrt/gsview/Resources/pageJPG.ico deleted file mode 100644 index d1b6b885..00000000 Binary files a/platform/winrt/gsview/Resources/pageJPG.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pageOXPS.ico b/platform/winrt/gsview/Resources/pageOXPS.ico deleted file mode 100644 index 8a79ffa9..00000000 Binary files a/platform/winrt/gsview/Resources/pageOXPS.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pagePDF.ico b/platform/winrt/gsview/Resources/pagePDF.ico deleted file mode 100644 index 74423969..00000000 Binary files a/platform/winrt/gsview/Resources/pagePDF.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pagePNG.ico b/platform/winrt/gsview/Resources/pagePNG.ico deleted file mode 100644 index dad4bb15..00000000 Binary files a/platform/winrt/gsview/Resources/pagePNG.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pagePS.ico b/platform/winrt/gsview/Resources/pagePS.ico deleted file mode 100644 index 2ddcfe05..00000000 Binary files a/platform/winrt/gsview/Resources/pagePS.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/pageXPS.ico b/platform/winrt/gsview/Resources/pageXPS.ico deleted file mode 100644 index e30ec2a7..00000000 Binary files a/platform/winrt/gsview/Resources/pageXPS.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/printer.ico b/platform/winrt/gsview/Resources/printer.ico deleted file mode 100644 index c03d9853..00000000 Binary files a/platform/winrt/gsview/Resources/printer.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/saveHS.png b/platform/winrt/gsview/Resources/saveHS.png deleted file mode 100644 index 5ca4d106..00000000 Binary files a/platform/winrt/gsview/Resources/saveHS.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/search.ico b/platform/winrt/gsview/Resources/search.ico deleted file mode 100644 index 2841a637..00000000 Binary files a/platform/winrt/gsview/Resources/search.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/search.png b/platform/winrt/gsview/Resources/search.png deleted file mode 100644 index 9bbb2255..00000000 Binary files a/platform/winrt/gsview/Resources/search.png and /dev/null differ diff --git a/platform/winrt/gsview/Resources/thumbnail.ico b/platform/winrt/gsview/Resources/thumbnail.ico deleted file mode 100644 index 71d38e97..00000000 Binary files a/platform/winrt/gsview/Resources/thumbnail.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/zoom_in.ico b/platform/winrt/gsview/Resources/zoom_in.ico deleted file mode 100644 index b0ca2ead..00000000 Binary files a/platform/winrt/gsview/Resources/zoom_in.ico and /dev/null differ diff --git a/platform/winrt/gsview/Resources/zoom_out.ico b/platform/winrt/gsview/Resources/zoom_out.ico deleted file mode 100644 index a31d6c8b..00000000 Binary files a/platform/winrt/gsview/Resources/zoom_out.ico and /dev/null differ diff --git a/platform/winrt/gsview/Selection.xaml b/platform/winrt/gsview/Selection.xaml deleted file mode 100644 index af67b2d5..00000000 --- a/platform/winrt/gsview/Selection.xaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/gsview/Selection.xaml.cs b/platform/winrt/gsview/Selection.xaml.cs deleted file mode 100644 index 1fe76fd1..00000000 --- a/platform/winrt/gsview/Selection.xaml.cs +++ /dev/null @@ -1,235 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace gsview -{ - /// - /// Interaction logic for Selection.xaml - /// - /// - - public enum SelectStatus_t - { - OK, - CANCEL, - SELECT, - CLOSE, - ZOOMIN, - ZOOMOUT - } - - public class SelectEventArgs : EventArgs - { - Point m_topleft, m_size; - double m_zoomFactor; - SelectStatus_t m_state; - int m_page_num; - Extract_Type_t m_type; - - public Point TopLeft - { - get { return m_topleft; } - } - - public Point Size - { - get { return m_size; } - } - - public double ZoomFactor - { - get { return m_zoomFactor; } - } - - public int PageNum - { - get { return m_page_num; } - } - - public SelectStatus_t State - { - get { return m_state; } - } - - public Extract_Type_t Type - { - get { return m_type; } - } - - public SelectEventArgs(Point start, Point size, double zoom, - SelectStatus_t state, int page, Extract_Type_t type) - { - m_topleft = start; - m_size = size; - m_zoomFactor = zoom; - m_state = state; - m_page_num = page; - m_type = type; - } - } - - public partial class Selection : Window - { - private Point m_startPoint, m_topleft; - private Point m_size; - public SelectStatus_t m_curr_state; - double m_zoom; - double m_old_zoom; - int m_page_num; - private Rectangle m_rect; - Extract_Type_t m_type; - internal delegate void CallBackMain(object gsObject, SelectEventArgs info); - internal event CallBackMain UpdateMain; - - public Selection(int page, double init_zoom, Extract_Type_t type) - { - InitializeComponent(); - this.Closing += new System.ComponentModel.CancelEventHandler(WindowClosing); - m_page_num = page; - m_zoom = init_zoom; - m_curr_state = SelectStatus_t.OK; - m_type = type; - m_rect = null; - } - - void WindowClosing(object sender, System.ComponentModel.CancelEventArgs e) - { - var result = new SelectEventArgs(m_topleft, m_size, m_zoom, - SelectStatus_t.CANCEL, m_page_num, m_type); - UpdateMain(this, result); - } - - private void ClickOK(object sender, RoutedEventArgs e) - { - if (m_curr_state != SelectStatus_t.OK) - return; - if (m_rect == null) - Close(); - else - { - m_size.X = m_rect.Width; - m_size.Y = m_rect.Height; - m_topleft.Y = xaml_Image.Height - m_topleft.Y - m_size.Y; - var result = new SelectEventArgs(m_topleft, m_size, m_zoom, - SelectStatus_t.SELECT, m_page_num, m_type); - UpdateMain(this, result); - } - } - - private void ClickExit(object sender, RoutedEventArgs e) - { - var result = new SelectEventArgs(m_topleft, m_size, m_zoom, - SelectStatus_t.CANCEL, m_page_num, m_type); - UpdateMain(this, result); - Close(); - } - - private void ClickClear(object sender, RoutedEventArgs e) - { - if (m_rect != null) - { - xaml_Canvas.Children.Remove(m_rect); - m_rect = null; - } - } - - private void ZoomIn(object sender, RoutedEventArgs e) - { - if (m_curr_state != SelectStatus_t.OK || m_zoom >= Constants.ZOOM_MAX) - return; - m_old_zoom = m_zoom; - m_zoom = m_zoom + Constants.ZOOM_STEP; - if (m_zoom > Constants.ZOOM_MAX) - { - m_zoom = Constants.ZOOM_MAX; - return; - } - m_curr_state = SelectStatus_t.ZOOMIN; - var result = new SelectEventArgs(m_startPoint, m_size, m_zoom, - SelectStatus_t.ZOOMIN, m_page_num, m_type); - UpdateMain(this, result); - } - - private void ZoomOut(object sender, RoutedEventArgs e) - { - if (m_curr_state != SelectStatus_t.OK || m_zoom <= Constants.ZOOM_MIN) - return; - m_old_zoom = m_zoom; - m_zoom = m_zoom - Constants.ZOOM_STEP; - if (m_zoom < Constants.ZOOM_MIN) - { - m_zoom = Constants.ZOOM_MIN; - return; - } - m_curr_state = SelectStatus_t.ZOOMOUT; - var result = new SelectEventArgs(m_startPoint, m_size, m_zoom, - SelectStatus_t.ZOOMOUT, m_page_num, m_type); - UpdateMain(this, result); - } - - /* Called when we have had a zoom change */ - public void UpdateRect() - { - if (m_rect != null) - { - double left = Canvas.GetLeft(m_rect); - double top = Canvas.GetTop(m_rect); - Canvas.SetLeft(m_rect, left * m_zoom / m_old_zoom); - Canvas.SetTop(m_rect, top * m_zoom / m_old_zoom); - m_rect.Width = m_rect.Width * m_zoom / m_old_zoom; - m_rect.Height = m_rect.Height * m_zoom / m_old_zoom; - } - } - - private void Canvas_MouseDown(object sender, MouseButtonEventArgs e) - { - if (m_rect != null) - { - xaml_Canvas.Children.Remove(m_rect); - } - - m_startPoint = e.GetPosition(xaml_Canvas); - - m_rect = new Rectangle - { - Stroke = Brushes.Red, - StrokeThickness = 2 - }; - Canvas.SetLeft(m_rect, m_startPoint.X); - Canvas.SetTop(m_rect, m_startPoint.X); - xaml_Canvas.Children.Add(m_rect); - } - - private void Canvas_MouseMove(object sender, MouseEventArgs e) - { - if (e.LeftButton == MouseButtonState.Released || m_rect == null) - return; - - var pos = e.GetPosition(xaml_Canvas); - - var x = Math.Min(pos.X, m_startPoint.X); - var y = Math.Min(pos.Y, m_startPoint.Y); - - var w = Math.Max(pos.X, m_startPoint.X) - x; - var h = Math.Max(pos.Y, m_startPoint.Y) - y; - - m_rect.Width = w; - m_rect.Height = h; - - m_topleft.X = x; - m_topleft.Y = y; - Canvas.SetLeft(m_rect, x); - Canvas.SetTop(m_rect, y); - } - } -} diff --git a/platform/winrt/gsview/Strings/en-US/Messages.Designer.cs b/platform/winrt/gsview/Strings/en-US/Messages.Designer.cs deleted file mode 100644 index 1c34b901..00000000 --- a/platform/winrt/gsview/Strings/en-US/Messages.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34014 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace gsview.Strings.en_US { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Messages { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Messages() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("gsview.Strings.en_US.Messages", typeof(Messages).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/platform/winrt/gsview/Strings/en-US/Messages.resx b/platform/winrt/gsview/Strings/en-US/Messages.resx deleted file mode 100644 index 4fdb1b6a..00000000 --- a/platform/winrt/gsview/Strings/en-US/Messages.resx +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/platform/winrt/gsview/TextBlock.cs b/platform/winrt/gsview/TextBlock.cs deleted file mode 100644 index 55d3e744..00000000 --- a/platform/winrt/gsview/TextBlock.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; -using System.Collections.ObjectModel; - -namespace gsview -{ - public class TextBlock : INotifyPropertyChanged - { - double height; - double width; - double x; - double y; - double scale; - String color; - int page_number; - - public List TextLines; - - /* Determine intersection case of block with selection rectangle */ - public Intersection_t CheckIntersection(double rect_x, double rect_y, double rect_w, double rect_h) - { - if (rect_h == 0 || rect_y > y + height || rect_y + rect_h < y || - rect_x + rect_w < x || rect_x > x + width) - return Intersection_t.NONE; - - if (rect_y < y && y + height < rect_y + rect_h) - return Intersection_t.FULL; - - return Intersection_t.PARTIAL; - } - - public double Height - { - get { return height; } - set - { - height = value; - OnPropertyChanged("Height"); - } - } - - public double Width - { - get { return width; } - set - { - width = value; - OnPropertyChanged("Width"); - } - } - - public double X - { - get { return x; } - set - { - x = value; - OnPropertyChanged("X"); - } - } - - public double Y - { - get { return y; } - set - { - y = value; - OnPropertyChanged("Y"); - } - } - public double Scale - { - get { return scale; } - set { scale = value;} - } - - public int PageNumber - { - get { return page_number; } - set { page_number = value; } - } - - public String Color - { - get { return color; } - set - { - color = value; - OnPropertyChanged("Color"); - } - } - - public int GetNumberLines() - { - return TextLines.Count; - } - - public event PropertyChangedEventHandler PropertyChanged; - - // Create the OnPropertyChanged method to raise the event - protected void OnPropertyChanged(string name) - { - PropertyChangedEventHandler handler = PropertyChanged; - if (handler != null) - { - handler(this, new PropertyChangedEventArgs(name)); - } - } - } - - public class BlocksText : ObservableCollection - { - public BlocksText() - : base() - { - } - } -} diff --git a/platform/winrt/gsview/TextCharacter.cs b/platform/winrt/gsview/TextCharacter.cs deleted file mode 100644 index b69cfbff..00000000 --- a/platform/winrt/gsview/TextCharacter.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.ComponentModel; - -namespace gsview -{ - public class TextCharacter - { - public String character; - - public double Height - { - get; - set; - } - - public double Width - { - get; - set; - } - - public double X - { - get; - set; - } - - public double Y - { - get; - set; - } - - public double Scale - { - get; - set; - } - - public String Color - { - get; - set; - } - - /* Here we only worry about intersection in the x direction TODO */ - public Intersection_t CheckIntersection(double rect_x, double rect_y, double rect_w, double rect_h) - { - if (rect_w == 0 || rect_x > X + Width || rect_x + rect_w < X) - return Intersection_t.NONE; - - if (rect_x <= X && X + Width <= rect_x + rect_w) - return Intersection_t.FULL; - - return Intersection_t.PARTIAL; - } - - - //public event PropertyChangedEventHandler PropertyChanged; - - /* - public void CharRefresh() - { - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("X")); - PropertyChanged(this, new PropertyChangedEventArgs("Height")); - PropertyChanged(this, new PropertyChangedEventArgs("Width")); - PropertyChanged(this, new PropertyChangedEventArgs("Y")); - PropertyChanged(this, new PropertyChangedEventArgs("Color")); - } - } - * */ - } -} diff --git a/platform/winrt/gsview/TextLine.cs b/platform/winrt/gsview/TextLine.cs deleted file mode 100644 index c37f604b..00000000 --- a/platform/winrt/gsview/TextLine.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.ComponentModel; -using System.Collections.ObjectModel; - -namespace gsview -{ - public enum Intersection_t - { - NONE, - PARTIAL, - FULL - }; - - public class TextLine : INotifyPropertyChanged - { - public List TextCharacters; - double height; - double width; - double x; - double y; - double scale; - String color; - int page_number; - - /* Determine intersection case of line with selection rectangle */ - public Intersection_t CheckIntersection(double rect_x, double rect_y, double rect_w, double rect_h) - { - if (rect_h == 0 || rect_y > y + height || rect_y + rect_h < y) - return Intersection_t.NONE; - - if (rect_y <= y && y + height <= rect_y + rect_h) - return Intersection_t.FULL; - - return Intersection_t.PARTIAL; - } - - public double Height - { - get { return height; } - set - { - height = value; - OnPropertyChanged("Height"); - } - } - - public double Width - { - get { return width; } - set - { - width = value; - OnPropertyChanged("Width"); - } - } - - public double X - { - get { return x; } - set - { - x = value; - OnPropertyChanged("X"); - } - } - - public double Y - { - get { return y; } - set - { - y = value; - OnPropertyChanged("Y"); - } - } - public double Scale - { - get { return scale; } - set { scale = value;} - } - - public int PageNumber - { - get { return page_number; } - set { page_number = value; } - } - - public String Color - { - get { return color; } - set - { - color = value; - //OnPropertyChanged("Color"); - } - } - public event PropertyChangedEventHandler PropertyChanged; - - // Create the OnPropertyChanged method to raise the event - protected void OnPropertyChanged(string name) - { - PropertyChangedEventHandler handler = PropertyChanged; - if (handler != null) - { - handler(this, new PropertyChangedEventArgs(name)); - } - } - } - - public class LinesText : ObservableCollection - { - public LinesText() - : base() - { - } - } -} diff --git a/platform/winrt/gsview/ghostsharp.cs b/platform/winrt/gsview/ghostsharp.cs deleted file mode 100644 index 168ce476..00000000 --- a/platform/winrt/gsview/ghostsharp.cs +++ /dev/null @@ -1,1165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -//using System.Threading.Tasks; -using System.Runtime.InteropServices; -using System.IO; -using System.Security; -using System.ComponentModel; - -namespace gsview -{ - /* Warning. This list is in a particular order. The devices before - * psdrgb do not support multiple pages. Those including psdrgb do - * support multiple pages. This is used in the conversion process. - * Also note that mupdf devices go at the beginning of the list */ - public enum gsDevice_t - { - svg, - pnm, - pclbitmap, - pwg, - bmp16, /* Add mupdf devices before this one */ - bmp16m, - bmp256, - bmp32b, - bmpgray, - bmpmono, - eps2write, - jpeg, - jpegcmyk, - jpeggray, - pamcmyk32, - pamcmyk4, - pbm, - pgm, - png16, - png16m, - png256, - pngalpha, - pnggray, - pngmono, - psdcmyk, - psdrgb, /* Add single page gs devices before this device */ - pdfwrite, - ps2write, - pxlcolor, - pxlmono, - tiff12nc, - tiff24nc, - tiff32nc, - tiff64nc, - tiffcrle, - tiffg3, - tiffg32d, - tiffg4, - tiffgray, - tifflzw, - tiffpack, - tiffsep, - txtwrite, - xpswrite - }; - - public enum GS_Task_t - { - PS_DISTILL, - CREATE_XPS, - SAVE_RESULT - } - - public enum GS_Result_t - { - gsOK, - gsFAILED, - gsCANCELLED - } - - /* Parameters */ - public struct gsParams_t - { - public String init_string; - public String init_file; - public int resolution; - public gsDevice_t device; - public String devicename; - public String outputfile; - public String inputfile; - public GS_Task_t task; - public GS_Result_t result; - public int num_pages; - public String options; - public bool need_multi_page; - public System.Collections.IList pages; - public int firstpage; - public int lastpage; - public int currpage; /* valid only when pages != null */ - }; - - public class gsEventArgs : EventArgs - { - private bool m_completed; - private int m_progress; - private gsParams_t m_param; - - public bool Completed - { - get { return m_completed; } - } - - public gsParams_t Params - { - get { return m_param; } - } - - public int Progress - { - get { return m_progress; } - } - - public gsEventArgs(bool completed, int progress, gsParams_t param) - { - m_completed = completed; - m_progress = progress; - m_param = param; - } - } - - /* from gs */ - public struct gsapi_revision_t - { - public IntPtr product; - public IntPtr copyright; - public int revision; - public int revisiondate; - } - - public enum gsEncoding { - GS_ARG_ENCODING_LOCAL = 0, - GS_ARG_ENCODING_UTF8 = 1, - GS_ARG_ENCODING_UTF16LE = 2 - }; - - public enum gsStatus - { - GS_READY, - GS_BUSY, - GS_ERROR - }; - - static class gsConstants - { - public const int E_QUIT = -101; - public const int GS_READ_BUFFER = 32768; - } - - [SuppressUnmanagedCodeSecurity] - class ghostsharp - { - /* Callback proto for stdio */ - public delegate int gsStdIOHandler(IntPtr caller_handle, IntPtr buffer, - int len); - - #region DLLInterface - /* Ghostscript API */ - [DllImport("gsdll64.dll", EntryPoint = "gsapi_revision", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_revision64(ref gsapi_revision_t vers, int size); - - [DllImport("gsdll64.dll", EntryPoint="gsapi_new_instance", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_new_instance64(out IntPtr pinstance, - IntPtr caller_handle); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_delete_instance", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_delete_instance64(IntPtr instance); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_init_with_args", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_init_with_args64(IntPtr instance, int argc, - IntPtr argv); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_exit", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_exit64(IntPtr instance); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_set_arg_encoding", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_set_arg_encoding64(IntPtr instance, - int encoding); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_set_stdio", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_set_stdio64(IntPtr instance, - gsStdIOHandler stdin, gsStdIOHandler stdout, gsStdIOHandler stderr); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_run_string_begin", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_run_string_begin64(IntPtr instance, - int usererr, ref int exitcode); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_run_string_continue", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_run_string_continue64(IntPtr instance, - IntPtr command, int count, int usererr, ref int exitcode); - - [DllImport("gsdll64.dll", EntryPoint = "gsapi_run_string_end", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_run_string_end64(IntPtr instance, - int usererr, ref int exitcode); - - /* 32 Bit DLL */ - [DllImport("gsdll32.dll", EntryPoint = "gsapi_revision", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_revision32(ref gsapi_revision_t vers, int size); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_new_instance", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_new_instance32(out IntPtr pinstance, - IntPtr caller_handle); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_delete_instance", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_delete_instance32(IntPtr instance); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_init_with_args", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_init_with_args32(IntPtr instance, int argc, - IntPtr argv); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_exit", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_exit32(IntPtr instance); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_set_arg_encoding", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_set_arg_encoding32(IntPtr instance, - int encoding); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_set_stdio", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern int gsapi_set_stdio32(IntPtr instance, - gsStdIOHandler stdin, gsStdIOHandler stdout, gsStdIOHandler stderr); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_run_string_begin", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_run_string_begin32(IntPtr instance, - int usererr, ref int exitcode); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_run_string_continue", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_run_string_continue32(IntPtr instance, - IntPtr command, int count, int usererr, ref int exitcode); - - [DllImport("gsdll32.dll", EntryPoint = "gsapi_run_string_end", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - private static extern void gsapi_run_string_end32(IntPtr instance, - int usererr, ref int exitcode); - #endregion DLLInterface - - #region DLLErrorCatch - /* In case the DLL is not found we need to wrap the methods up with - * a try/catch. Also select 32 or 64 bit DLL at this time. This - * C# code is compiled as ANYCPU type */ - private int tc_gsapi_revision(ref gsapi_revision_t vers, int size) - { - int code = 0; - try - { - if (is64bit) - code = gsapi_revision64(ref vers, size); - else - code = gsapi_revision32(ref vers, size); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return code; - } - - private int tc_gsapi_new_instance(out IntPtr pinstance, IntPtr caller_handle) - { - int code = 0; - pinstance = IntPtr.Zero; - try - { - if (is64bit) - code = gsapi_new_instance64(out pinstance, caller_handle); - else - code = gsapi_new_instance32(out pinstance, caller_handle); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return code; - } - - private int tc_gsapi_delete_instance(IntPtr instance) - { - try - { - if (is64bit) - gsapi_delete_instance64(instance); - else - gsapi_delete_instance32(instance); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return 0; - } - - private int tc_gsapi_init_with_args(IntPtr instance, int argc, IntPtr argv) - { - int code; - - try - { - if (is64bit) - code = gsapi_init_with_args64(instance, argc, argv); - else - code = gsapi_init_with_args32(instance, argc, argv); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - catch(System.Reflection.TargetInvocationException ee) - { - String output = "TargetInvocationException"; - gsDLLProblemMain(this, output); - return -1; - } - - return code; - } - - private int tc_gsapi_exit(IntPtr instance) - { - int code; - try - { - if (is64bit) - code = gsapi_exit64(instance); - else - code = gsapi_exit32(instance); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return code; - } - - private int tc_gsapi_set_arg_encoding(IntPtr instance, int encoding) - { - int code; - try - { - if (is64bit) - code = gsapi_set_arg_encoding64(instance, encoding); - else - code = gsapi_set_arg_encoding32(instance, encoding); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return code; - } - - private int tc_gsapi_set_stdio(IntPtr instance, gsStdIOHandler stdin, - gsStdIOHandler stdout, gsStdIOHandler stderr) - { - int code; - try - { - if (is64bit) - code = gsapi_set_stdio64(instance, stdin, stdout, stderr); - else - code = gsapi_set_stdio32(instance, stdin, stdout, stderr); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return code; - } - - private int tc_gsapi_run_string_begin(IntPtr instance, int usererr, - ref int exitcode) - { - try - { - if (is64bit) - gsapi_run_string_begin64(instance, usererr, ref exitcode); - else - gsapi_run_string_begin32(instance, usererr, ref exitcode); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return 0; - } - - private int tc_gsapi_run_string_continue(IntPtr instance, IntPtr command, - int count, int usererr, ref int exitcode) - { - try - { - if (is64bit) - gsapi_run_string_continue64(instance, command, count, usererr, - ref exitcode); - else - gsapi_run_string_continue32(instance, command, count, usererr, - ref exitcode); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return 0; - } - - private int tc_gsapi_run_string_end(IntPtr instance, int usererr, - ref int exitcode) - { - try - { - if (is64bit) - gsapi_run_string_end64(instance, usererr, ref exitcode); - else - gsapi_run_string_end32(instance, usererr, ref exitcode); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String output = "DllNotFoundException: Ghostscript DLL not found"; - gsDLLProblemMain(this, output); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String output = "BadImageFormatException: Incorrect Ghostscript DLL"; - gsDLLProblemMain(this, output); - return -1; - } - return 0; - } - #endregion DLLErrorCatch - - private int StdInCallback(IntPtr handle, IntPtr pointer, int count) - { - String output = Marshal.PtrToStringAnsi(pointer); - return count; - } - - private int StdOutCallback(IntPtr handle, IntPtr pointer, int count) - { - String output = Marshal.PtrToStringAnsi(pointer); - gsIOUpdateMain(this, output, count); - if (m_params.task != GS_Task_t.PS_DISTILL) - { - /* See if we have a page number */ - if (count >= 7 && output.Substring(0, 4) == "Page") - { - String page = output.Substring(5, count - 6); - int numVal; - try - { - double perc = 0.0; - numVal = System.Convert.ToInt32(page); - if (m_params.firstpage == -1 && m_params.lastpage == -1 && - m_params.pages == null) - { - /* Doing full document */ - perc = 100.0 * (double)numVal / (double)m_params.num_pages; - } - else - { - if (m_params.pages != null) - { - perc = 100.0 * ((double)numVal - m_params.currpage) / (double)m_params.num_pages; - m_params.currpage = m_params.currpage + 1; - } - else - { - /* continugous set of pages */ - perc = 100.0 * ((double)numVal - m_params.firstpage + 1) / (double)m_params.num_pages; - } - } - m_worker.ReportProgress((int)perc); - } - catch (FormatException e) - { - Console.WriteLine("XPSPrint Error: Input string is not a sequence of digits."); - } - catch (OverflowException e) - { - Console.WriteLine("XPSPrint Error: The number cannot fit in an Int32."); - } - - } - } - return count; - } - - private int StdErrCallback(IntPtr handle, IntPtr pointer, int count) - { - String output = Marshal.PtrToStringAnsi(pointer); - gsIOUpdateMain(this, output, count); - return count; - } - - IntPtr gsInstance; - BackgroundWorker m_worker; - bool is64bit; - gsParams_t m_params; - /* Callbacks to Main */ - internal delegate void gsDLLProblem(object gsObject, String mess); - internal event gsDLLProblem gsDLLProblemMain; - internal delegate void gsIOCallBackMain(object gsObject, String mess, int len); - internal event gsIOCallBackMain gsIOUpdateMain; - internal delegate void gsCallBackMain(object gsObject, gsEventArgs info); - internal event gsCallBackMain gsUpdateMain; - /* These need to be declared as members, to keep a reference and avoid GC - * You do not pin delegates */ - gsStdIOHandler RaiseStdInCallback; - gsStdIOHandler RaiseStdOutCallback; - gsStdIOHandler RaiseStdErrCallback; - - public ghostsharp() - { - /* Determine now if we are 64 or 32 bit */ - is64bit = Environment.Is64BitOperatingSystem && - Environment.Is64BitProcess; - m_worker = null; - gsInstance = IntPtr.Zero; - - /* Go ahead and do the assignment here */ - RaiseStdInCallback = StdInCallback; - RaiseStdOutCallback = StdOutCallback; - RaiseStdErrCallback = StdErrCallback; - } - - private List GetOptions(String options) - { - List optionlist = new List(); - - if (options != "") - { - string[] words = options.Split(' '); - for (int k = 0; k < words.Length; k++) - { - if (words[k].Length > 0) - { - optionlist.Add(words[k]); - } - } - } - return optionlist; - } - - /* A standard command line approach to using gs API */ - private void gsWork1(object sender, DoWorkEventArgs e) - { - gsParams_t gsparams = (gsParams_t) e.Argument; - String out_file = gsparams.outputfile; - String in_file = gsparams.inputfile; - int num_params = 8; /* base number */ - int rend_count = 1; - String options; - int count; - List optionlist; - - optionlist = GetOptions(gsparams.options); - num_params = num_params + optionlist.Count; - if (gsparams.pages != null) - { - rend_count = gsparams.pages.Count; - num_params = num_params + 2; - } - if (gsparams.init_file != null) - num_params = num_params + 1; - if (gsparams.init_string != null) - num_params = num_params + 2; - - var argParam = new GCHandle[num_params]; - var argPtrs = new IntPtr[num_params]; - String[] strParams = new String[num_params]; - List CharacterArray = new List(num_params); - GCHandle argPtrsStable; - - /* New instance */ - int code = tc_gsapi_new_instance(out gsInstance, IntPtr.Zero); - if (code < 0) - { - gsparams.result = GS_Result_t.gsFAILED; - e.Result = gsparams; - return; - } - - code = tc_gsapi_set_stdio(gsInstance, RaiseStdInCallback, - RaiseStdOutCallback, RaiseStdErrCallback); - code = tc_gsapi_set_arg_encoding(gsInstance, (int)gsEncoding.GS_ARG_ENCODING_UTF8); - - if (code == 0) - { - for (int jj = 0; jj < rend_count; jj++) - { - strParams[0] = "gs"; /* This does not matter */ - strParams[1] = "-dNOPAUSE"; - strParams[2] = "-dBATCH"; - if (gsparams.devicename != null) - { - strParams[3] = "-sDEVICE=" + gsparams.devicename; - } - else - { - strParams[3] = "-sDEVICE=" + Enum.GetName(typeof(gsDevice_t), gsparams.device); - } - strParams[4] = "-r" + gsparams.resolution; - /* Create temp file if file not specified */ - if (out_file == null) - { - out_file = Path.GetTempFileName(); - gsparams.outputfile = out_file; - } - count = 5; - /* Add in the options */ - for (int kk = 0; kk < optionlist.Count; kk++) - { - strParams[count] = optionlist[kk]; - count++; - } - /* We have discontinuous page selection */ - if (gsparams.pages != null) - { - String firstpage, lastpage; - options = gsparams.options; - SelectPage curr_page = (SelectPage)(gsparams.pages[jj]); - firstpage = "-dFirstPage=" + curr_page.Page; - lastpage = "-dLastPage=" + curr_page.Page; - strParams[count] = firstpage; - count++; - strParams[count] = lastpage; - count++; - /* Look for file extension. */ - string extension = System.IO.Path.GetExtension(out_file); - int len = extension.Length; - String new_out_file = out_file.Substring(0, out_file.Length - len); - strParams[count] = "-o" + new_out_file + "_page" + curr_page.Page + extension; - } - else - { - if (gsparams.need_multi_page) - { - /* Look for file extension. */ - string extension = System.IO.Path.GetExtension(out_file); - int len = extension.Length; - String new_out_file = out_file.Substring(0, out_file.Length - len); - strParams[count] = "-o" + new_out_file + "_page%d" + extension; - } - else - strParams[count] = "-o" + out_file; - } - if (gsparams.init_string != null) - { - count++; - strParams[count] = "-c"; - count++; - strParams[count] = gsparams.init_string; - } - count++; - strParams[count] = "-f"; - if (gsparams.init_file != null) - { - count++; - strParams[count] = gsparams.init_file; - } - count++; - strParams[count] = in_file; - - /* Now convert our Strings to char* and get pinned handles to these. - * This keeps the c# GC from moving stuff around on us */ - for (int k = 0; k < num_params; k++) - { - CharacterArray.Add(System.Text.Encoding.UTF8.GetBytes(strParams[k].ToCharArray())); - argParam[k] = GCHandle.Alloc(CharacterArray[k], GCHandleType.Pinned); - argPtrs[k] = argParam[k].AddrOfPinnedObject(); - } - /* Also stick the array of pointers into memory that will not be GCd */ - argPtrsStable = GCHandle.Alloc(argPtrs, GCHandleType.Pinned); - - code = tc_gsapi_init_with_args(gsInstance, num_params, argPtrsStable.AddrOfPinnedObject()); - /* All the pinned items need to be freed so the GC can do its job */ - for (int k = 0; k < num_params; k++) - { - argParam[k].Free(); - } - argPtrsStable.Free(); - /* Free the character array list in case we have multiple runs */ - CharacterArray.Clear(); - - if (code < 0) - break; - } - } - - int code1 = tc_gsapi_exit(gsInstance); - if ((code == 0) || (code == gsConstants.E_QUIT)) - code = code1; - - tc_gsapi_delete_instance(gsInstance); - if ((code == 0) || (code == gsConstants.E_QUIT)) - { - gsparams.result = GS_Result_t.gsOK; - e.Result = gsparams; - return; - } - - gsparams.result = GS_Result_t.gsFAILED; - e.Result = gsparams; - return; - } - - /* Feeding gs piecemeal so that we can have some progress callback */ - /* Used only for PS Distill */ - private void gsWork2(object sender, DoWorkEventArgs e) - { - gsParams_t Params = (gsParams_t)e.Argument; - String out_file = Params.outputfile; - String in_file = Params.inputfile; - int num_params = 6; - if (Params.options.Length > 0) - num_params = num_params + 1; - - int exitcode = 0; - var argParam = new GCHandle[num_params]; - var argPtrs = new IntPtr[num_params]; - var Feed = new GCHandle(); - var FeedPtr = new IntPtr(); - String[] strParams = new String[num_params]; - List CharacterArray = new List(num_params); - GCHandle argPtrsStable; - Byte[] Buffer = new Byte[gsConstants.GS_READ_BUFFER]; - BackgroundWorker worker = sender as BackgroundWorker; - - /* Open the file */ - var fs = new FileStream(in_file, FileMode.Open); - var len = (int) fs.Length; - /* New instance */ - int code = tc_gsapi_new_instance(out gsInstance, IntPtr.Zero); - if (code < 0) - { - Params.result = GS_Result_t.gsFAILED; - e.Result = Params; - return; - } - - code = tc_gsapi_set_stdio(gsInstance, RaiseStdInCallback, - RaiseStdOutCallback, RaiseStdErrCallback); - code = tc_gsapi_set_arg_encoding(gsInstance, (int)gsEncoding.GS_ARG_ENCODING_UTF8); - - if (code == 0) - { - strParams[0] = "gs"; /* This does not matter */ - strParams[1] = "-dNOPAUSE"; - strParams[2] = "-dBATCH"; - if (Params.devicename != null) - { - strParams[3] = "-sDEVICE=" + Params.devicename; - } - else - { - strParams[3] = "-sDEVICE=" + Enum.GetName(typeof(gsDevice_t), Params.device); - } - strParams[4] = "-r" + Params.resolution; - /* Create temp file if file not specified */ - if (out_file == null) - { - out_file = Path.GetTempFileName(); - Params.outputfile = out_file; - } - if (Params.options.Length > 0) - { - strParams[5] = Params.options; - strParams[6] = "-o" + out_file; - } else - strParams[5] = "-o" + out_file; - - /* Now convert our Strings to char* and get pinned handles to these. - * This keeps the c# GC from moving stuff around on us */ - for (int k = 0; k < num_params; k++) - { - CharacterArray.Add(System.Text.Encoding.UTF8.GetBytes(strParams[k].ToCharArray())); - argParam[k] = GCHandle.Alloc(CharacterArray[k], GCHandleType.Pinned); - argPtrs[k] = argParam[k].AddrOfPinnedObject(); - } - /* Also stick the array of pointers into memory that will not be GCd */ - argPtrsStable = GCHandle.Alloc(argPtrs, GCHandleType.Pinned); - - code = tc_gsapi_init_with_args(gsInstance, num_params, argPtrsStable.AddrOfPinnedObject()); - - /* First pin the data buffer */ - Feed = GCHandle.Alloc(Buffer, GCHandleType.Pinned); - FeedPtr = Feed.AddrOfPinnedObject(); - - /* Now start feeding the input piece meal and do a call back - * with our progress */ - if (code == 0) - { - int count; - double perc; - int total = 0; - - tc_gsapi_run_string_begin(gsInstance, 0, ref exitcode); - while ((count = fs.Read(Buffer, 0, gsConstants.GS_READ_BUFFER)) > 0) - { - tc_gsapi_run_string_continue(gsInstance, FeedPtr, count, 0, ref exitcode); - if (exitcode < 0) - { - code = exitcode; - break; - } - total = total + count; - perc = 100.0 * (double) total / (double) len; - worker.ReportProgress((int)perc); - if (worker.CancellationPending == true) - { - e.Cancel = true; - break; - } - } - tc_gsapi_run_string_end(gsInstance, 0, ref exitcode); - if (code == 0) - code = exitcode; - } - - /* All the pinned items need to be freed so the GC can do its job */ - for (int k = 0; k < num_params; k++) - { - argParam[k].Free(); - } - argPtrsStable.Free(); - Feed.Free(); - } - - int code1 = tc_gsapi_exit(gsInstance); - if ((code == 0) || (code == gsConstants.E_QUIT)) - code = code1; - - tc_gsapi_delete_instance(gsInstance); - if ((code == 0) || (code == gsConstants.E_QUIT)) - { - Params.result = GS_Result_t.gsOK; - e.Result = Params; - return; - } - Params.result = GS_Result_t.gsFAILED; - e.Result = Params; - return; - } - - /* Callback */ - private void gsCompleted(object sender, RunWorkerCompletedEventArgs e) - { - gsParams_t Value; - gsEventArgs info; - gsParams_t Params; - - try - { - Params = (gsParams_t)e.Result; - } - catch(System.Reflection.TargetInvocationException ee) - { - /* Something went VERY wrong with GS */ - /* Following is to help debug these issues */ - /* var inner = ee.InnerException; - var message = ee.Message; - var inner_message = inner.Message; - String bound = "\n************\n"; - gsIOUpdateMain(this, bound, bound.Length); - gsIOUpdateMain(this, message, message.Length); - gsIOUpdateMain(this, bound, bound.Length); - gsIOUpdateMain(this, inner_message, inner_message.Length); - gsIOUpdateMain(this, bound, bound.Length); - var temp = inner.Source; - gsIOUpdateMain(this, bound, bound.Length); - gsIOUpdateMain(this, temp, temp.Length); - var method = inner.TargetSite; - gsIOUpdateMain(this, bound, bound.Length); - var method_name = method.Name; - gsIOUpdateMain(this, method_name, method_name.Length); - var stack = inner.StackTrace; - gsIOUpdateMain(this, bound, bound.Length); - gsIOUpdateMain(this, stack, stack.Length); */ - String output = "Ghostscript DLL Invalid Access."; - gsDLLProblemMain(this, output); - return; - } - - if (Params.task == GS_Task_t.PS_DISTILL) - m_worker.DoWork -= new DoWorkEventHandler(gsWork2); - else - m_worker.DoWork -= new DoWorkEventHandler(gsWork1); - - if (e.Cancelled) - { - Value = new gsParams_t(); - Value.result = GS_Result_t.gsCANCELLED; - info = new gsEventArgs(true, 100, Value); - } - else - { - Value = (gsParams_t)e.Result; - info = new gsEventArgs(true, 100, Value); - } - gsUpdateMain(this, info); - } - - private void gsProgressChanged(object sender, ProgressChangedEventArgs e) - { - /* Callback with progress */ - gsParams_t Value = new gsParams_t(); - gsEventArgs info = new gsEventArgs(false, e.ProgressPercentage, Value); - gsUpdateMain(this, info); - } - - public gsStatus DistillPS(String fileName, int resolution) - { - gsParams_t gsparams = new gsParams_t(); ; - - gsparams.init_file = null; - gsparams.init_string = null; - gsparams.device = gsDevice_t.pdfwrite; - gsparams.devicename = null; - gsparams.outputfile = null; - gsparams.resolution = resolution; - gsparams.inputfile = fileName; - gsparams.num_pages = -1; - gsparams.task = GS_Task_t.PS_DISTILL; - gsparams.options = ""; - gsparams.need_multi_page = false; - gsparams.pages = null; - gsparams.firstpage = -1; - gsparams.lastpage = -1; - gsparams.currpage = -1; - return RunGhostscript(gsparams); - } - - public gsStatus CreateXPS(String fileName, int resolution, int num_pages) - { - gsParams_t gsparams = new gsParams_t(); - - gsparams.init_file = null; - gsparams.init_string = null; - gsparams.device = gsDevice_t.xpswrite; - gsparams.outputfile = null; - gsparams.resolution = resolution; - gsparams.inputfile = fileName; - gsparams.task = GS_Task_t.CREATE_XPS; - gsparams.num_pages = num_pages; - gsparams.options = "-dNOCACHE"; - gsparams.need_multi_page = false; - gsparams.pages = null; - gsparams.firstpage = -1; - gsparams.lastpage = -1; - gsparams.currpage = -1; - return RunGhostscript(gsparams); - } - - public gsStatus Convert(String fileName, String options, String device, - String outputFile, int num_pages, int resolution, - bool multi_page_needed, System.Collections.IList pages, - int firstpage, int lastpage, String init_file, String init_string) - { - gsParams_t gsparams = new gsParams_t(); - - gsparams.init_file = init_file; - gsparams.init_string = init_string; - gsparams.devicename = device; - gsparams.outputfile = outputFile; - gsparams.inputfile = fileName; - gsparams.task = GS_Task_t.SAVE_RESULT; - gsparams.num_pages = num_pages; - gsparams.options = options; - gsparams.resolution = resolution; - gsparams.need_multi_page = multi_page_needed; - gsparams.pages = pages; - gsparams.firstpage = firstpage; - gsparams.lastpage = lastpage; - gsparams.currpage = 1; - return RunGhostscript(gsparams); - } - - public gsStatus GetStatus() - { - if (m_worker != null && m_worker.IsBusy) - return gsStatus.GS_BUSY; - else - return gsStatus.GS_READY; - } - - public String GetVersion() - { - gsapi_revision_t vers; - vers.copyright = IntPtr.Zero; - vers.product = IntPtr.Zero; - vers.revision = 0; - vers.revisiondate = 0; - int size = System.Runtime.InteropServices.Marshal.SizeOf(vers); - - if (tc_gsapi_revision(ref vers, size) == 0) - { - String product = Marshal.PtrToStringAnsi(vers.product); - String output; - int major = vers.revision / 100; - int minor = vers.revision - major * 100; - String versnum = major + "." + minor; - output = product + " " + versnum; - return output; - } - else - return null; - } - - private gsStatus RunGhostscript(gsParams_t Params) - { - try - { - if (m_worker != null && m_worker.IsBusy) - { - m_worker.CancelAsync(); - return gsStatus.GS_BUSY; - } - if (m_worker == null) - { - m_worker = new BackgroundWorker(); - m_worker.WorkerReportsProgress = true; - m_worker.WorkerSupportsCancellation = true; - m_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(gsCompleted); - m_worker.ProgressChanged += new ProgressChangedEventHandler(gsProgressChanged); - } - - if (Params.task == GS_Task_t.PS_DISTILL) - m_worker.DoWork += new DoWorkEventHandler(gsWork2); - else - m_worker.DoWork += new DoWorkEventHandler(gsWork1); - - m_params = Params; - m_worker.RunWorkerAsync(Params); - return gsStatus.GS_READY; - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during gs rendering\n"); - return gsStatus.GS_ERROR; - } - } - - public void Cancel() - { - m_worker.CancelAsync(); - } - } -} diff --git a/platform/winrt/gsview/gsIO.cs b/platform/winrt/gsview/gsIO.cs deleted file mode 100644 index 82e47be6..00000000 --- a/platform/winrt/gsview/gsIO.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; - -namespace gsview -{ - class gsIO : INotifyPropertyChanged - { - public String gsIOString - { - get; - set; - } - - public event PropertyChangedEventHandler PropertyChanged; - - public void PageRefresh() - { - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("gsIOString")); - } - } - - public gsIO() - { - this.gsIOString = ""; - } - } -} diff --git a/platform/winrt/gsview/gsOutput.xaml b/platform/winrt/gsview/gsOutput.xaml deleted file mode 100644 index 0c69461c..00000000 --- a/platform/winrt/gsview/gsOutput.xaml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/gsview/gsOutput.xaml.cs b/platform/winrt/gsview/gsOutput.xaml.cs deleted file mode 100644 index c2aa9375..00000000 --- a/platform/winrt/gsview/gsOutput.xaml.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace gsview -{ - /// - /// Interaction logic for gsOutput.xaml - /// - public partial class gsOutput : Window - { - gsIO m_gsIO; - public gsOutput() - { - InitializeComponent(); - this.Closing += new System.ComponentModel.CancelEventHandler(FakeWindowClosing); - m_gsIO = new gsIO(); - xaml_gsText.DataContext = m_gsIO; - } - - void FakeWindowClosing(object sender, System.ComponentModel.CancelEventArgs e) - { - e.Cancel = true; - this.Hide(); - } - - private void HideWindow(object sender, RoutedEventArgs e) - { - this.Hide(); - } - - public void RealWindowClosing() - { - this.Closing -= new System.ComponentModel.CancelEventHandler(FakeWindowClosing); - this.Close(); - } - - public void Update(String newstring, int len) - { - m_gsIO.gsIOString += newstring.Substring(0, len); - m_gsIO.PageRefresh(); - } - - private void ClearContents(object sender, RoutedEventArgs e) - { - m_gsIO.gsIOString = null; - m_gsIO.PageRefresh(); - } - } -} diff --git a/platform/winrt/gsview/gsprint.cs b/platform/winrt/gsview/gsprint.cs deleted file mode 100644 index 27976bc0..00000000 --- a/platform/winrt/gsview/gsprint.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.IO.Packaging; -using System.Printing; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Documents.Serialization; -using System.Windows.Media; -using System.Windows.Xps; -using System.Windows.Xps.Packaging; -using System.Windows.Xps.Serialization; - -namespace gsview -{ - public enum PrintStatus_t - { - PRINT_READY, - PRINT_BUSY, - PRINT_ERROR, - PRINT_CANCELLED - }; - - /* Class for handling async print progress callback */ - public class gsPrintEventArgs : EventArgs - { - private PrintStatus_t m_status; - private bool m_completed; - private int m_page; - - public PrintStatus_t Status - { - get { return m_status; } - } - - public bool Completed - { - get { return m_completed; } - } - - public int Page - { - get { return m_page; } - } - - public gsPrintEventArgs(PrintStatus_t status, bool completed, int page) - { - m_completed = completed; - m_status = status; - m_page = page; - } - } - - public class gsprint - { - private XpsDocumentWriter m_docWriter = null; - internal delegate void AsyncPrintCallBack(object printObject, gsPrintEventArgs info); - internal event AsyncPrintCallBack PrintUpdate; - private bool m_busy; - - public bool IsBusy() - { - return m_busy; - } - - public gsprint() - { - m_busy = false; - } - - /* Show std. print dialog */ - public PrintDialog GetPrintDialog() - { - PrintDialog dlg = new PrintDialog(); - /* Current page and page ranges is going to require a little work */ - dlg.PageRangeSelection = PageRangeSelection.AllPages; - //dlg.UserPageRangeEnabled = true; - //dlg.CurrentPageEnabled = true; - dlg.SelectedPagesEnabled = false; - m_busy = false; - if (dlg.ShowDialog() == true) - return dlg; - return null; - } - - /* Main print entry point */ - public void Print(PrintQueue queu, FixedDocumentSequence fixdoc) - { - XpsDocumentWriter docwrite = GetDocWriter(queu); - - m_busy = true; - docwrite.WritingPrintTicketRequired += - new WritingPrintTicketRequiredEventHandler(PrintTicket); - PrintPages(docwrite, fixdoc); - } - - /* Send it */ - private void PrintPages(XpsDocumentWriter xpsdw, FixedDocumentSequence fixdoc) - { - m_docWriter = xpsdw; - xpsdw.WritingCompleted += - new WritingCompletedEventHandler(AsyncCompleted); - xpsdw.WritingProgressChanged += - new WritingProgressChangedEventHandler(AsyncProgress); - xpsdw.WriteAsync(fixdoc); - } - - public void CancelAsync() - { - /* ick. This does not work in windows 8. causes crash */ - /* https://connect.microsoft.com/VisualStudio/feedback/details/778145/xpsdocumentwriter-cancelasync-cause-crash-in-win8 */ - m_docWriter.CancelAsync(); - } - - /* Done */ - private void AsyncCompleted(object sender, WritingCompletedEventArgs e) - { - PrintStatus_t status; - - if (e.Cancelled) - status = PrintStatus_t.PRINT_CANCELLED; - else if (e.Error != null) - status = PrintStatus_t.PRINT_ERROR; - else - status = PrintStatus_t.PRINT_READY; - - if (PrintUpdate != null) - { - gsPrintEventArgs info = new gsPrintEventArgs(status, true, 0); - PrintUpdate(this, info); - } - m_busy = false; - } - - /* Do this update with each fixed document (page) that is handled */ - private void AsyncProgress(object sender, WritingProgressChangedEventArgs e) - { - if (PrintUpdate != null) - { - gsPrintEventArgs info = new gsPrintEventArgs(PrintStatus_t.PRINT_BUSY, - false, e.Number); - PrintUpdate(this, info); - } - } - - /* Print ticket handling. You can customize for PrintTicketLevel at - FixedDocumentSequencePrintTicket, FixedDocumentPrintTicket, - or FixedPagePrintTicket. We may want to play around with this some */ - private void PrintTicket(Object sender, WritingPrintTicketRequiredEventArgs e) - { - if (e.CurrentPrintTicketLevel == - PrintTicketLevel.FixedDocumentSequencePrintTicket) - { - PrintTicket pts = new PrintTicket(); - pts.PageOrientation = PageOrientation.Portrait; - e.CurrentPrintTicket = pts; - } - } - - /* Create the document write */ - private XpsDocumentWriter GetDocWriter(PrintQueue pq) - { - XpsDocumentWriter xpsdw = PrintQueue.CreateXpsDocumentWriter(pq); - return xpsdw; - } - } -} diff --git a/platform/winrt/gsview/gsprintbg.cs b/platform/winrt/gsview/gsprintbg.cs deleted file mode 100644 index 199258e3..00000000 --- a/platform/winrt/gsview/gsprintbg.cs +++ /dev/null @@ -1,261 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.ComponentModel; -using System.IO; -using System.IO.Packaging; -using System.Printing; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Documents.Serialization; -using System.Windows.Media; -using System.Windows.Xps; -using System.Windows.Xps.Packaging; -using System.Windows.Xps.Serialization; -using System.Threading; - -namespace gsview -{ - public enum PrintStatus_t - { - PRINT_READY, - PRINT_BUSY, - PRINT_ERROR - }; - - public enum PrintResult_t - { - PrintOK, - PrintFAILED, - PrintCANCELLED, - PrintCOMPLETED - } - - public struct PrintParams_t - { - public int num_pages; - public int start_page; - public int end_page; - public PrintQueue queu; - public FixedDocumentSequence fixdoc; - public PrintResult_t result; - public PrintStatus_t status; - - }; - - public class PrintEventArgs : EventArgs - { - private PrintStatus_t m_status; - private PrintResult_t m_result; - private int m_percentdone; - - public PrintStatus_t Status - { - get { return m_status; } - } - - public PrintResult_t Result - { - get { return m_result; } - } - - public int Percent - { - get { return m_percentdone; } - } - - public PrintEventArgs(PrintStatus_t status, PrintResult_t completed, int percent) - { - m_status = status; - m_result = completed; - m_percentdone = percent; - } - } - - public class gsprintbg - { - BackgroundWorker m_worker; - private XpsDocumentWriter m_docWriter = null; - PrintParams_t m_pparams; - - internal delegate void PrintCallBackMain(object gsObject, PrintEventArgs info); - internal event PrintCallBackMain PrintUpdateMain; - - private void PrintProgressChanged(object sender, ProgressChangedEventArgs e) - { - /* Callback with progress */ - PrintEventArgs info = new PrintEventArgs(m_pparams.status, m_pparams.result, e.ProgressPercentage); - if (PrintUpdateMain != null) - PrintUpdateMain(this, info); - } - - /* Callback */ - private void PrintCompleted(object sender, RunWorkerCompletedEventArgs e) - { - PrintParams_t Value; - PrintEventArgs info; - PrintParams_t Params = (PrintParams_t)e.Result; - - if (e.Cancelled) - { - info = new PrintEventArgs(PrintStatus_t.PRINT_READY, PrintResult_t.PrintCANCELLED, 100); - } - else - { - Value = (PrintParams_t)e.Result; - info = new PrintEventArgs(PrintStatus_t.PRINT_READY, PrintResult_t.PrintCOMPLETED, 100); - } - PrintUpdateMain(this, info); - } - - - /* Show std. print dialog */ - public PrintDialog GetPrintDialog() - { - PrintDialog dlg = new PrintDialog(); - /* Current page and page ranges is going to require a little work */ - dlg.PageRangeSelection = PageRangeSelection.AllPages; - //dlg.UserPageRangeEnabled = true; - //dlg.CurrentPageEnabled = true; - dlg.SelectedPagesEnabled = false; - if (dlg.ShowDialog() == true) - return dlg; - return null; - } - - /* Main print entry point */ - private void Print(PrintParams_t pparams) - { - XpsDocumentWriter docwrite = GetDocWriter(pparams.queu); - docwrite.WritingPrintTicketRequired += - new WritingPrintTicketRequiredEventHandler(PrintTicket); - PrintPages(docwrite, pparams.fixdoc); - } - - /* Send it */ - private void PrintPages(XpsDocumentWriter xpsdw, FixedDocumentSequence fixdoc) - { - m_docWriter = xpsdw; - xpsdw.WritingCompleted += - new WritingCompletedEventHandler(AsyncCompleted); - xpsdw.WritingProgressChanged += - new WritingProgressChangedEventHandler(AsyncProgress); - xpsdw.WriteAsync(fixdoc); - } - - private void CancelAsync() - { - /* ick. This does not work in windows 8. causes crash */ - /* https://connect.microsoft.com/VisualStudio/feedback/details/778145/xpsdocumentwriter-cancelasync-cause-crash-in-win8 */ - m_docWriter.CancelAsync(); - } - - /* Done */ - private void AsyncCompleted(object sender, WritingCompletedEventArgs e) - { - if (e.Cancelled) - m_pparams.result = PrintResult_t.PrintCANCELLED; - else if (e.Error != null) - m_pparams.result = PrintResult_t.PrintFAILED; - else - m_pparams.result = PrintResult_t.PrintCOMPLETED; - m_worker.ReportProgress(100); - } - - /* Do this update with each fixed document (page) that is handled */ - private void AsyncProgress(object sender, WritingProgressChangedEventArgs e) - { - double perc = 100.0 * (double) e.Number / (double) m_pparams.num_pages; - m_worker.ReportProgress((int) perc); - } - - /* Print ticket handling. You can customize for PrintTicketLevel at - FixedDocumentSequencePrintTicket, FixedDocumentPrintTicket, - or FixedPagePrintTicket. We may want to play around with this some */ - private void PrintTicket(Object sender, WritingPrintTicketRequiredEventArgs e) - { - if (e.CurrentPrintTicketLevel == - PrintTicketLevel.FixedDocumentSequencePrintTicket) - { - PrintTicket pts = new PrintTicket(); - pts.PageOrientation = PageOrientation.Portrait; - e.CurrentPrintTicket = pts; - } - } - - /* Create the document write */ - private XpsDocumentWriter GetDocWriter(PrintQueue pq) - { - XpsDocumentWriter xpsdw = PrintQueue.CreateXpsDocumentWriter(pq); - return xpsdw; - } - - - private void PrintWork(object sender, DoWorkEventArgs e) - { - PrintParams_t PParams = (PrintParams_t)e.Argument; - BackgroundWorker worker = sender as BackgroundWorker; - - Print(PParams); - } - - public bool IsBusy() - { - if (m_worker != null) - return m_worker.IsBusy; - else - return false; - } - - public void PrintWorkThread(object data) - { - PrintParams_t PParams = (PrintParams_t) data; - Print(PParams); - } - - public PrintStatus_t StartPrint(PrintParams_t pparams) - { - try - { - if (m_worker != null && m_worker.IsBusy) - { - m_worker.CancelAsync(); - return PrintStatus_t.PRINT_BUSY; - } - - if (m_worker == null) - { - - Thread asyncThread = new Thread(PrintWorkThread); - asyncThread.SetApartmentState(ApartmentState.STA); - asyncThread.Start(pparams); - - /* m_worker = new BackgroundWorker(); - m_worker.WorkerReportsProgress = true; - m_worker.WorkerSupportsCancellation = true; - m_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(PrintCompleted); - m_worker.ProgressChanged += new ProgressChangedEventHandler(PrintProgressChanged); - m_worker.DoWork += new DoWorkEventHandler(PrintWork);*/ - } - - ////m_pparams = pparams; - //m_worker.RunWorkerAsync(pparams); - pparams.status = PrintStatus_t.PRINT_BUSY; - return PrintStatus_t.PRINT_READY; - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during printing\n"); - return PrintStatus_t.PRINT_ERROR; - } - } - - - public void Cancel() - { - m_worker.CancelAsync(); - } - } -} diff --git a/platform/winrt/gsview/gsview.csproj b/platform/winrt/gsview/gsview.csproj deleted file mode 100644 index 31f40f51..00000000 --- a/platform/winrt/gsview/gsview.csproj +++ /dev/null @@ -1,281 +0,0 @@ - - - - - Debug - AnyCPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1} - WinExe - Properties - gsview - gsview - v4.5 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - false - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 6.0.0.%2a - false - true - - - AnyCPU - true - full - false - bin\Debug\ - TRACE;DEBUG - prompt - 4 - MinimumRecommendedRules.ruleset - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - gsview_app.ico - - - - - - - - - - - - 4.0 - - - - - - - - - - - MSBuild:Compile - Designer - - - About.xaml - - - - - Convert.xaml - - - - - - gsOutput.xaml - - - - Info.xaml - - - - - OutputIntent.xaml - - - PageExtractSave.xaml - - - Password.xaml - - - - Selection.xaml - - - True - True - Messages.resx - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - App.xaml - Code - - - MainWindow.xaml - Code - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - Code - - - True - True - Resources.resx - - - True - Settings.settings - True - - - PublicResXFileCodeGenerator - Resources.Designer.cs - - - ResXFileCodeGenerator - Messages.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4.5 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform/winrt/gsview/gsview.visualelementsmanifest.xml b/platform/winrt/gsview/gsview.visualelementsmanifest.xml deleted file mode 100644 index 865a37fc..00000000 --- a/platform/winrt/gsview/gsview.visualelementsmanifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - \ No newline at end of file diff --git a/platform/winrt/gsview/gsview_app.ico b/platform/winrt/gsview/gsview_app.ico deleted file mode 100644 index 29c5ca50..00000000 Binary files a/platform/winrt/gsview/gsview_app.ico and /dev/null differ diff --git a/platform/winrt/gsview/mudocument.cs b/platform/winrt/gsview/mudocument.cs deleted file mode 100644 index 291a424e..00000000 --- a/platform/winrt/gsview/mudocument.cs +++ /dev/null @@ -1,1747 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using System.Threading.Tasks; -using System.Threading; -using System.Runtime.InteropServices; -using System.Security; -using System.Windows; -using System.ComponentModel; -using System.Windows.Forms; - -/* This file contains the interface between the muctx cpp class, which - implements the mupdf calls and the .net managed code */ - -namespace gsview -{ - /* Parameters for conversion */ - public struct ConvertParams_t - { - public int resolution; - public gsDevice_t device; - public String outputfile; - public int num_pages; - public System.Collections.IList pages; - public int currpage; - public GS_Result_t result; - }; - - /* Must match enum in muctx.h */ - enum mudevice_t - { - SVG_OUT, - PNM_OUT, - PCL_OUT, - PWG_OUT, - }; - - public class muPDFEventArgs : EventArgs - { - private bool m_completed; - private int m_progress; - private ConvertParams_t m_param; - - public bool Completed - { - get { return m_completed; } - } - - public ConvertParams_t Params - { - get { return m_param; } - } - - public int Progress - { - get { return m_progress; } - } - - public muPDFEventArgs(bool completed, int progress, ConvertParams_t param) - { - m_completed = completed; - m_progress = progress; - m_param = param; - } - } - - public struct content_s - { - public int page; - public IntPtr string_margin; - } - - [SuppressUnmanagedCodeSecurity] - class mudocument - { - public bool is64bit; - IntPtr mu_object; - BackgroundWorker m_worker; - ConvertParams_t m_params; - /* Callbacks to Main */ - internal delegate void mupdfDLLProblem(object muObject, String mess); - internal event mupdfDLLProblem mupdfDLLProblemMain; - internal delegate void mupdfCallBackMain(object muObject, muPDFEventArgs info); - internal event mupdfCallBackMain mupdfUpdateMain; - - private System.Object m_lock = new System.Object(); - public List contents; - - #region DLLInterface - /* The list of functions that we use to call into C interface of muctx. - * Calling into C++ code from managed code is complex. Since CLR - * compiling is needed and that does not support mutex. Hence the C - * interface */ - [DllImport("mupdfnet64.dll", EntryPoint = "mInitialize", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mInitialize64(); - - [DllImport("mupdfnet64.dll", EntryPoint = "mOpenDocument", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern status_t mOpenDocument64(IntPtr ctx, string filename); - - [DllImport("mupdfnet64.dll", EntryPoint = "mCleanUp", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mCleanUp64(IntPtr ctx); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetPageCount", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetPageCount64(IntPtr ctx); - - [DllImport("mupdfnet64.dll", EntryPoint = "mRequiresPassword", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern bool mRequiresPassword64(IntPtr ctx); - - [DllImport("mupdfnet64.dll", EntryPoint = "mApplyPassword", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern bool mApplyPassword64(IntPtr ctx, string password); - - [DllImport("mupdfnet64.dll", EntryPoint = "mRenderPage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mRenderPage64(IntPtr ctx, int page_num, - Byte[] bmp_data, int bmp_width, int bmp_height, double scale, - bool flipy); - - [DllImport("mupdfnet64.dll", EntryPoint = "mMeasurePage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mMeasurePage64(IntPtr ctx, int page_num, - ref double width, ref double height); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetContents", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetContents64(IntPtr ctx); - - [DllImport("mupdfnet64.dll", EntryPoint = "mReleaseContents", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseContents64(); - - [DllImport("mupdfnet64.dll", EntryPoint = "mSetAA", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mSetAA64(IntPtr ctx, int level); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet64.dll", EntryPoint = "mGetContentsItem", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetContentsItem64(int k, ref int len, ref int page); - - [DllImport("mupdfnet64.dll", EntryPoint = "mCreateDisplayList", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mCreateDisplayList64(IntPtr ctx, int page_num, - ref int page_width, ref int page_height); - - [DllImport("mupdfnet64.dll", EntryPoint = "mCreateDisplayListAnnot", - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mCreateDisplayListAnnot64(IntPtr ctx, int page_num); - - [DllImport("mupdfnet64.dll", EntryPoint = "mCreateDisplayListText", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mCreateDisplayListText64(IntPtr ctx, int page_num, - ref int page_width, ref int page_height, ref IntPtr text, ref int length); - - [DllImport("mupdfnet64.dll", EntryPoint = "mRenderPageMT", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mRenderPageMT64(IntPtr ctx, IntPtr dlist, - IntPtr annot_dlist, int page_width, int page_height, Byte[] bmp_data, - int bmp_width, int bmp_height, double scale, bool flipy); - - [DllImport("mupdfnet64.dll", EntryPoint = "mTextSearchPage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mTextSearchPage64(IntPtr ctx, int page_num, - string needle); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetTextSearchItem", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern bool mGetTextSearchItem64(int item_num, ref double top_x, - ref double top_y, ref double height, ref double width); - - [DllImport("mupdfnet64.dll", EntryPoint = "mReleaseTextSearch", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseTextSearch64(); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetLinksPage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetLinksPage64(IntPtr ctx, int page_num); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet64.dll", EntryPoint = "mGetLinkItem", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetLinkItem64(int item_num, ref double top_x, - ref double top_y, ref double height, ref double width, ref int topage, - ref int type); - - [DllImport("mupdfnet64.dll", EntryPoint = "mReleaseLink", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseLink64(); - - [DllImport("mupdfnet64.dll", EntryPoint = "mReleaseText", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseText64(IntPtr ctx, IntPtr textpage); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetTextBlock", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetTextBlock64(IntPtr textpage, int block_num, - ref double top_x,ref double top_y, ref double height, ref double width); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetTextLine", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetTextLine64(IntPtr textpage, int block_num, - int line_num, ref double top_x, ref double top_y, ref double height, - ref double width); - - [DllImport("mupdfnet64.dll", EntryPoint = "mGetTextCharacter", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetTextCharacter64(IntPtr textpage, int block_num, - int line_num, int item_num, ref double top_x, - ref double top_y, ref double height, ref double width); - - [DllImport("mupdfnet64.dll", EntryPoint = "mExtractPages", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mExtractPages64(String infile, String outfile, - String password, bool has_password, bool linearize, int num_pages, - IntPtr pages); - - [DllImport("mupdfnet64.dll", EntryPoint = "mSavePage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mSavePage64(IntPtr ctx, String outfile, - int page_num, int res, int type, bool append); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet64.dll", EntryPoint = "mGetVers", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetVers64(); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet64.dll", EntryPoint = "mGetText", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetText64(IntPtr ctx, int pagenum, int type); - - /* And the 32bit version */ - [DllImport("mupdfnet32.dll", EntryPoint = "mInitialize", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mInitialize32(); - - [DllImport("mupdfnet32.dll", EntryPoint = "mOpenDocument", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern status_t mOpenDocument32(IntPtr ctx, string filename); - - [DllImport("mupdfnet32.dll", EntryPoint = "mCleanUp", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mCleanUp32(IntPtr ctx); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetPageCount", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetPageCount32(IntPtr ctx); - - [DllImport("mupdfnet32.dll", EntryPoint = "mRequiresPassword", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern bool mRequiresPassword32(IntPtr ctx); - - [DllImport("mupdfnet32.dll", EntryPoint = "mApplyPassword", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern bool mApplyPassword32(IntPtr ctx, string password); - - [DllImport("mupdfnet32.dll", EntryPoint = "mRenderPage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mRenderPage32(IntPtr ctx, int page_num, - Byte[] bmp_data, int bmp_width, int bmp_height, double scale, - bool flipy); - - [DllImport("mupdfnet32.dll", EntryPoint = "mMeasurePage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mMeasurePage32(IntPtr ctx, int page_num, - ref double width, ref double height); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetContents", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetContents32(IntPtr ctx); - - [DllImport("mupdfnet32.dll", EntryPoint = "mReleaseContents", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseContents32(); - - [DllImport("mupdfnet32.dll", EntryPoint = "mSetAA", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mSetAA32(IntPtr ctx, int level); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet32.dll", EntryPoint = "mGetContentsItem", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetContentsItem32(int k, ref int len, ref int page); - - [DllImport("mupdfnet32.dll", EntryPoint = "mCreateDisplayList", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mCreateDisplayList32(IntPtr ctx, int page_num, - ref int page_width, ref int page_height); - - [DllImport("mupdfnet32.dll", EntryPoint = "mCreateDisplayListAnnot", - CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mCreateDisplayListAnnot32(IntPtr ctx, int page_num); - - - [DllImport("mupdfnet32.dll", EntryPoint = "mCreateDisplayListText", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern IntPtr mCreateDisplayListText32(IntPtr ctx, int page_num, - ref int page_width, ref int page_height, ref IntPtr text, ref int length); - - [DllImport("mupdfnet32.dll", EntryPoint = "mRenderPageMT", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mRenderPageMT32(IntPtr ctx, IntPtr dlist, - IntPtr annot_dlist, int page_width, int page_height, Byte[] bmp_data, - int bmp_width, int bmp_height, double scale, bool flipy); - - [DllImport("mupdfnet32.dll", EntryPoint = "mTextSearchPage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mTextSearchPage32(IntPtr ctx, int page_num, - string needle); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetTextSearchItem", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern bool mGetTextSearchItem32(int item_num, ref double top_x, - ref double top_y, ref double height, ref double width); - - [DllImport("mupdfnet32.dll", EntryPoint = "mReleaseTextSearch", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseTextSearch32(); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetLinksPage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetLinksPage32(IntPtr ctx, int page_num); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet32.dll", EntryPoint = "mGetLinkItem", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetLinkItem32(int item_num, ref double top_x, - ref double top_y, ref double height, ref double width, ref int topage, - ref int type); - - [DllImport("mupdfnet32.dll", EntryPoint = "mReleaseLink", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseLink32(); - - [DllImport("mupdfnet32.dll", EntryPoint = "mReleaseText", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern void mReleaseText32(IntPtr ctx, IntPtr textpage); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetTextBlock", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetTextBlock32(IntPtr textpage, int block_num, - ref double top_x, ref double top_y, ref double height, ref double width); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetTextLine", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetTextLine32(IntPtr textpage, int block_num, - int line_num, ref double top_x, ref double top_y, ref double height, - ref double width); - - [DllImport("mupdfnet32.dll", EntryPoint = "mGetTextCharacter", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mGetTextCharacter32(IntPtr textpage, int block_num, - int line_num, int item_num, ref double top_x, - ref double top_y, ref double height, ref double width); - - [DllImport("mupdfnet32.dll", EntryPoint = "mExtractPages", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mExtractPages32(String infile, String outfile, - String password, bool has_password, bool linearize, int num_pages, - IntPtr pages); - - [DllImport("mupdfnet32.dll", EntryPoint = "mSavePage", CharSet = CharSet.Auto, - CallingConvention = CallingConvention.StdCall)] - private static extern int mSavePage32(IntPtr ctx, String outfile, - int page_num, int res, int type, bool append); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet32.dll", EntryPoint = "mGetVers", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetVers32(); - - /* The managed code Marshal actually releases the allocated string from C */ - [DllImport("mupdfnet32.dll", EntryPoint = "mGetText", CharSet = CharSet.Ansi, - CallingConvention = CallingConvention.StdCall)] - [return: MarshalAs(UnmanagedType.LPStr)] - private static extern string mGetText32(IntPtr ctx, int pagenum, int type); - - #endregion DLLInterface - - #region DLLErrorTrap - /* And make sure we can catch any issues in finding the DLL or if we have - * a 32bit 64bit issue */ - private IntPtr tc_mInitialize() - { - IntPtr output; - try - { - if (is64bit) - output = mInitialize64(); - else - output = mInitialize32(); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 1"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - return output; - } - - private status_t tc_mOpenDocument(IntPtr ctx, string filename) - { - status_t output; - try - { - if (is64bit) - output = mOpenDocument64(ctx, filename); - else - output = mOpenDocument32(ctx, filename); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 2"; - mupdfDLLProblemMain(this, err); - return status_t.E_FAILURE; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return status_t.E_FAILURE; - } - return output; - } - - private int tc_mCleanUp(IntPtr ctx) - { - try - { - if (is64bit) - mCleanUp64(ctx); - else - mCleanUp32(ctx); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 3"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return 0; - } - - private int tc_mGetPageCount(IntPtr ctx) - { - int output; - try - { - if (is64bit) - output = mGetPageCount64(ctx); - else - output = mGetPageCount32(ctx); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 4"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private bool tc_mRequiresPassword(IntPtr ctx) - { - bool output; - try - { - if (is64bit) - output = mRequiresPassword64(ctx); - else - output = mRequiresPassword32(ctx); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 5"; - mupdfDLLProblemMain(this, err); - return false; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return false; - } - return output; - } - - private bool tc_mApplyPassword(IntPtr ctx, string password) - { - bool output; - try - { - if (is64bit) - output = mApplyPassword64(ctx, password); - else - output = mApplyPassword32(ctx, password); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 6"; - mupdfDLLProblemMain(this, err); - return false; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return false; - } - return output; - } - - private int tc_mRenderPage(IntPtr ctx, int page_num, Byte[] bmp_data, - int bmp_width, int bmp_height, double scale, bool flipy) - { - int output; - try - { - if (is64bit) - output = mRenderPage64(ctx, page_num, bmp_data, bmp_width, - bmp_height, scale, flipy); - else - output = mRenderPage32(ctx, page_num, bmp_data, bmp_width, - bmp_height, scale, flipy); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 7"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mMeasurePage(IntPtr ctx, int page_num, ref double width, - ref double height) - { - int output; - try - { - if (is64bit) - output = mMeasurePage64(ctx, page_num, ref width, ref height); - else - output = mMeasurePage32(ctx, page_num, ref width, ref height); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 8"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mGetContents(IntPtr ctx) - { - int output; - try - { - if (is64bit) - output = mGetContents64(ctx); - else - output = mGetContents32(ctx); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 9"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mReleaseContents() - { - try - { - if (is64bit) - mReleaseContents64(); - else - mReleaseContents32(); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 10"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return 0; - } - - private string tc_mGetContentsItem(int k, ref int len, ref int page) - { - String output; - try - { - if (is64bit) - output = mGetContentsItem64(k, ref len, ref page); - else - output = mGetContentsItem32(k, ref len, ref page); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 11"; - mupdfDLLProblemMain(this, err); - return null; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return null; - } - return output; - } - - private IntPtr tc_mCreateDisplayListAnnot(IntPtr ctx, int page_num) - { - IntPtr output; - try - { - if (is64bit) - output = mCreateDisplayListAnnot64(ctx, page_num); - else - output = mCreateDisplayListAnnot32(ctx, page_num); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 12"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - return output; - } - - private IntPtr tc_mCreateDisplayList(IntPtr ctx, int page_num, - ref int page_width, ref int page_height) - { - IntPtr output; - try - { - if (is64bit) - output = mCreateDisplayList64(ctx, page_num, ref page_width, - ref page_height); - else - output = mCreateDisplayList32(ctx, page_num, ref page_width, - ref page_height); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 13"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - return output; - } - - private int tc_mSetAA(IntPtr ctx, int level) - { - try - { - if (is64bit) - mSetAA64(ctx, level); - else - mSetAA32(ctx, level); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 14"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return 0; - } - - private IntPtr tc_mCreateDisplayListText(IntPtr ctx, int page_num, - ref int page_width, ref int page_height, ref IntPtr text, ref int length) - { - IntPtr output; - try - { - if (is64bit) - output = mCreateDisplayListText64(ctx, page_num, ref page_width, - ref page_height, ref text, ref length); - else - output = mCreateDisplayListText32(ctx, page_num, ref page_width, - ref page_height, ref text, ref length); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 15"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return IntPtr.Zero; - } - return output; - } - - private int tc_mRenderPageMT(IntPtr ctx, IntPtr dlist, IntPtr annot_dlist, - int page_width, int page_height, Byte[] bmp_data, int bmp_width, - int bmp_height, double scale, bool flipy) - { - int output; - try - { - if (is64bit) - output = mRenderPageMT64(ctx, dlist, annot_dlist, page_width, - page_height, bmp_data, bmp_width, bmp_height, scale, flipy); - else - output = mRenderPageMT32(ctx, dlist, annot_dlist, page_width, - page_height, bmp_data, bmp_width, bmp_height, scale, flipy); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 16"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mTextSearchPage(IntPtr ctx, int page_num, string needle) - { - int output; - try - { - if (is64bit) - output = mTextSearchPage64(ctx, page_num, needle); - else - output = mTextSearchPage32(ctx, page_num, needle); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 17"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private bool tc_mGetTextSearchItem(int item_num, ref double top_x, - ref double top_y, ref double height, ref double width) - { - bool output; - try - { - if (is64bit) - output = mGetTextSearchItem64(item_num, ref top_x, ref top_y, - ref height, ref width); - else - output = mGetTextSearchItem32(item_num, ref top_x, ref top_y, - ref height, ref width); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 18"; - mupdfDLLProblemMain(this, err); - return false; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return false; - } - return output; - } - - private int tc_mReleaseTextSearch() - { - try - { - if (is64bit) - mReleaseTextSearch64(); - else - mReleaseTextSearch32(); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 18"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return 0; - } - - private int tc_mGetLinksPage(IntPtr ctx, int page_num) - { - int output; - try - { - if (is64bit) - output = mGetLinksPage64(ctx, page_num); - else - output = mGetLinksPage32(ctx, page_num); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 19"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private string tc_mGetLinkItem(int item_num, ref double top_x, - ref double top_y, ref double height, ref double width, ref int topage, - ref int type) - { - String output; - try - { - if (is64bit) - output = mGetLinkItem64(item_num, ref top_x, ref top_y, ref height, - ref width, ref topage, ref type); - else - output = mGetLinkItem32(item_num, ref top_x, ref top_y, ref height, - ref width, ref topage, ref type); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 20"; - mupdfDLLProblemMain(this, err); - return null; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return null; - } - return output; - } - - private int tc_mReleaseLink() - { - try - { - if (is64bit) - mReleaseLink64(); - else - mReleaseLink32(); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 21"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return 0; - } - - private int tc_mReleaseText(IntPtr ctx, IntPtr textpage) - { - try - { - if (is64bit) - mReleaseText64(ctx, textpage); - else - mReleaseText32(ctx, textpage); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 22"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return 0; - } - - private int tc_mGetTextBlock(IntPtr textpage, int block_num, - ref double top_x, ref double top_y, ref double height, ref double width) - { - int output; - try - { - if (is64bit) - output = mGetTextBlock64(textpage, block_num, ref top_x, - ref top_y, ref height, ref width); - else - output = mGetTextBlock32(textpage, block_num, ref top_x, - ref top_y, ref height, ref width); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 23"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mGetTextLine(IntPtr textpage, int block_num, - int line_num, ref double top_x, ref double top_y, ref double height, - ref double width) - { - int output; - try - { - if (is64bit) - output = mGetTextLine64(textpage, block_num, line_num, - ref top_x, ref top_y, ref height, ref width); - else - output = mGetTextLine32(textpage, block_num, line_num, - ref top_x, ref top_y, ref height, ref width); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 24"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mGetTextCharacter(IntPtr textpage, int block_num, - int line_num, int item_num, ref double top_x, - ref double top_y, ref double height, ref double width) - { - int output; - try - { - if (is64bit) - output = mGetTextCharacter64(textpage, block_num, line_num, - item_num, ref top_x, ref top_y, ref height, ref width); - else - output = mGetTextCharacter32(textpage, block_num, line_num, - item_num, ref top_x, ref top_y, ref height, ref width); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 25"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private int tc_mExtractPages(String infile, String outfile, - String password, bool has_password, bool linearize, int num_pages, - IntPtr pages) - { - int output; - try - { - if (is64bit) - output = mExtractPages64(infile, outfile, password, has_password, - linearize, num_pages, pages); - else - output = mExtractPages32(infile, outfile, password, has_password, - linearize, num_pages, pages); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 26"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - - private string tc_mGetVers() - { - String output; - try - { - if (is64bit) - output = mGetVers64(); - else - output = mGetVers32(); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 27"; - mupdfDLLProblemMain(this, err); - return null; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return null; - } - return output; - } - - private string tc_mGetText(IntPtr ctx, int pagenum, textout_t type) - { - String output; - try - { - if (is64bit) - output = mGetText64(ctx, pagenum, (int) type); - else - output = mGetText32(ctx, pagenum, (int) type); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 28"; - mupdfDLLProblemMain(this, err); - return null; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return null; - } - return output; - } - - private int tc_mSavePage(IntPtr ctx, String outfile, int page_num, - int res, int type, bool append) - { - int output; - try - { - if (is64bit) - output = mSavePage64(ctx, outfile, page_num, res, type, append); - else - output = mSavePage32(ctx, outfile, page_num, res, type, append); - } - catch (DllNotFoundException) - { - /* DLL not found */ - String err = "DllNotFoundException: MuPDF DLL not found 29"; - mupdfDLLProblemMain(this, err); - return -1; - } - catch (BadImageFormatException) - { - /* Using 32 bit with 64 or vice versa */ - String err = "BadImageFormatException: Incorrect MuPDF DLL"; - mupdfDLLProblemMain(this, err); - return -1; - } - return output; - } - #endregion DLLErrorTrap - - /* Now the actual code that does some work */ - public status_t Initialize() - { - is64bit = Environment.Is64BitOperatingSystem && - Environment.Is64BitProcess; - - mu_object = tc_mInitialize(); - if (mu_object == null) - return status_t.E_FAILURE; - else - return status_t.S_ISOK; - } - - public void CleanUp() - { - if (mu_object != null) - { - lock(m_lock) - tc_mCleanUp(mu_object); - } - } - - public String GetText(int page_num, textout_t type) - { - return tc_mGetText(mu_object, page_num, type); - } - - public void GetVersion(out String vers) - { - vers = tc_mGetVers(); - } - - public int GetPageCount() - { - return tc_mGetPageCount(mu_object); - } - - public bool RequiresPassword() - { - return tc_mRequiresPassword(mu_object); - } - - public bool ApplyPassword(String password) - { - return tc_mApplyPassword(mu_object, password); - } - - public void SetAA(AA_t AAlevel) - { - lock (m_lock) - { - tc_mSetAA(mu_object, (int)AAlevel); - } - } - - public int RenderPage(int page_num, Byte[] bmp_data, int bmp_width, - int bmp_height, double scale, bool flipy, bool use_dlist, bool - get_text, out BlocksText blocks, bool annotation, - out Annotate_t annot_type) - { - int code; - blocks = null; - String blockcolor = "#00FFFFFF"; - String linecolor = "#402572AC"; - /* Debug */ - //blockcolor = "#20FFFF00"; - - annot_type = Annotate_t.UNKNOWN; - if (use_dlist) - { - IntPtr dlist = IntPtr.Zero; - IntPtr annot_dlist = IntPtr.Zero; - IntPtr text = IntPtr.Zero; - int num_blocks = 0; - - int page_height = 0; - int page_width = 0; - - if (get_text) - { - lock (m_lock) - { - dlist = tc_mCreateDisplayListText(mu_object, page_num, - ref page_width, ref page_height, ref text, ref num_blocks); - } - /* If we have some text go ahead and get the bounding boxes - * now. There is likely a better way to do this with passing - * a structure across the boundary in a single call. ToDO */ - /* Length here is the number of blocks. mupdf splits block - * into lines (spans) and then these into text characters - * Our goal here is to get them into a structure that we - * can rapidly use in our ui display. Maintaining the block - * and span stucture so that we can minimize the number of - * rects that are introduced */ - if (num_blocks > 0) - { - blocks = new BlocksText(); - for (int kk = 0; kk < num_blocks; kk++) - { - double top_x = 0, top_y = 0, height = 0, width = 0; - var block = new TextBlock(); - - int num_lines = tc_mGetTextBlock(text, kk, ref top_x, - ref top_y, ref height, ref width); - - block.X = top_x; - block.Y = top_y; - block.Width = width; - block.Height = height; - block.Color = blockcolor; - block.Scale = 1.0; - block.PageNumber = page_num; - blocks.Add(block); - - blocks[kk].TextLines = new List(); - for (int jj = 0; jj < num_lines; jj++) - { - var line = new TextLine(); - int num_chars = tc_mGetTextLine(text, kk, jj, ref top_x, - ref top_y, ref height, ref width); - line.X = top_x; - line.Y = top_y; - line.Width = width; - line.Height = height; - line.Scale = 1.0; - line.Color = linecolor; - blocks[kk].TextLines.Add(line); - - blocks[kk].TextLines[jj].TextCharacters = new List(); - for (int mm = 0; mm < num_chars; mm++) - { - var textchars = new TextCharacter(); - int character = tc_mGetTextCharacter(text, kk, jj, mm, ref top_x, - ref top_y, ref height, ref width); - textchars.X = top_x; - textchars.Y = top_y; - textchars.Width = width; - textchars.Height = height; - textchars.Scale = 1.0; - textchars.Color = linecolor; - textchars.character = System.Convert.ToChar(character).ToString(); - blocks[kk].TextLines[jj].TextCharacters.Add(textchars); - } - } - } - /* We are done with the text object */ - tc_mReleaseText(mu_object, text); - } - } - else - lock (m_lock) - { - dlist = tc_mCreateDisplayList(mu_object, page_num, - ref page_width, ref page_height); - } - if (annotation) - { - lock (m_lock) - { - annot_dlist = tc_mCreateDisplayListAnnot(mu_object, page_num); - if (annot_dlist == IntPtr.Zero) - annot_type = Annotate_t.NO_ANNOTATE; - else - annot_type = Annotate_t.HAS_ANNOTATE; - } - } - - /* Rendering of display list can occur with other threads so unlock */ - if (dlist == null) - { - return (int) status_t.E_FAILURE; - } - code = tc_mRenderPageMT(mu_object, dlist, annot_dlist, page_width, - page_height, bmp_data, bmp_width, bmp_height, scale, flipy); - } - else - { - lock(m_lock) - { - code = tc_mRenderPage(mu_object, page_num, bmp_data, bmp_width, - bmp_height, scale, flipy); - } - } - return code; - } - - public status_t OpenFile(string filename) - { - return tc_mOpenDocument(mu_object, filename); - } - - public int GetPageSize(int page_num, out Point size_out) - { - int code; - double height = 0, width = 0; - - size_out = new Point(); - - lock(m_lock) - { - code = tc_mMeasurePage(mu_object, page_num, ref width, ref height); - } - - size_out.X = width; - size_out.Y = height; - return code; - } - - public int ComputeContents() - { - int num_items; - int len = 0, page = 0; - - lock(m_lock) - { - num_items = tc_mGetContents(mu_object); - } - - if (contents == null) - contents = new List(); - - for (int k = 0; k < num_items; k++) - { - ContentItem item = new ContentItem(); - item.StringMargin = tc_mGetContentsItem(k, ref len, ref page); - item.Page = page; - contents.Add(item); - } - return num_items; - } - - public void ReleaseContents() - { - tc_mReleaseContents(); - } - - public int TextSearchPage(int page_num, String needle) - { - int num_found; - lock (m_lock) - { - num_found = tc_mTextSearchPage(mu_object, page_num, needle); - } - return num_found; - } - - public bool GetTextSearchItem(int k, out Point top_left, out Size size_rect) - { - double top_x = 0, top_y = 0 , height = 0, width = 0; - bool found = tc_mGetTextSearchItem(k, ref top_x, ref top_y, ref height, ref width); - - top_left = new Point(); - size_rect = new Size(); - - top_left.X = top_x; - top_left.Y = top_y; - size_rect.Width = width; - size_rect.Height = height; - - return found; - } - - public void ReleaseTextSearch() - { - tc_mReleaseTextSearch(); - } - - public int GetLinksPage(int page_num) - { - int num_found; - lock (m_lock) - { - num_found = tc_mGetLinksPage(mu_object, page_num); - } - return num_found; - } - - public void GetLinkItem(int k, out Point top_left, out Size size_rect, - out String uri, out int topage, out int typea) - { - double top_x = 0, top_y = 0, height = 0, width = 0; - int typeb = 0; - int linkpage = 0; - - uri = tc_mGetLinkItem(k, ref top_x, ref top_y, ref height, ref width, - ref linkpage, ref typeb); - - topage = linkpage; - typea = typeb; - top_left = new Point(); - size_rect = new Size(); - - top_left.X = top_x; - top_left.Y = top_y; - size_rect.Width = width; - size_rect.Height = height; - } - - public void ReleaseLink() - { - tc_mReleaseLink(); - } - - public void ReleaseText(IntPtr textpage) - { - tc_mReleaseText(mu_object, textpage); - } - - public void HTMLSaveAs(String infile, String outfile, String password, - bool has_password, bool linearize, int num_pages, System.Collections.IList pages) - { - if (num_pages > 0) - { - /* We need to do an allocation for our array of page numbers and - * perform pinning to avoid GC while in the c++ code */ - GCHandle pagesPtrStable; - int[] page_list; - page_list = new int[pages.Count]; - - for (int kk = 0; kk < pages.Count; kk++) - { - SelectPage currpage = (SelectPage)pages[kk]; - page_list[kk] = currpage.Page; - } - pagesPtrStable = GCHandle.Alloc(page_list, GCHandleType.Pinned); - tc_mExtractPages(infile, outfile, password, has_password, linearize, - num_pages, pagesPtrStable.AddrOfPinnedObject()); - pagesPtrStable.Free(); - } - else - { - tc_mExtractPages(infile, outfile, password, has_password, linearize, - num_pages, IntPtr.Zero); - } - } - - public void PDFExtract(String infile, String outfile, String password, - bool has_password, bool linearize, int num_pages, System.Collections.IList pages) - { - if (num_pages > 0) - { - /* We need to do an allocation for our array of page numbers and - * perform pinning to avoid GC while in the c++ code */ - GCHandle pagesPtrStable; - int[] page_list; - page_list = new int[pages.Count]; - - for (int kk = 0; kk < pages.Count; kk++) - { - SelectPage currpage = (SelectPage)pages[kk]; - page_list[kk] = currpage.Page; - } - pagesPtrStable = GCHandle.Alloc(page_list, GCHandleType.Pinned); - tc_mExtractPages(infile, outfile, password, has_password, linearize, - num_pages, pagesPtrStable.AddrOfPinnedObject()); - pagesPtrStable.Free(); - } - else - { - tc_mExtractPages(infile, outfile, password, has_password, linearize, - num_pages, IntPtr.Zero); - } - } - - public gsStatus ConvertSave(gsDevice_t device, String outputFile, int num_pages, - System.Collections.IList pages, int resolution) - { - ConvertParams_t convertparams = new ConvertParams_t(); - - convertparams.device = device; - convertparams.outputfile = outputFile; - convertparams.num_pages = num_pages; - convertparams.resolution = resolution; - convertparams.pages = pages; - convertparams.currpage = 1; - return ConvertMuPDF(convertparams); - } - - /* Render page by page in background with progress call back */ - private gsStatus ConvertMuPDF(ConvertParams_t Params) - { - try - { - if (m_worker != null && m_worker.IsBusy) - { - m_worker.CancelAsync(); - return gsStatus.GS_BUSY; - } - if (m_worker == null) - { - m_worker = new BackgroundWorker(); - m_worker.WorkerReportsProgress = true; - m_worker.WorkerSupportsCancellation = true; - m_worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(MuPDFCompleted); - m_worker.ProgressChanged += new ProgressChangedEventHandler(MuPDFProgressChanged); - m_worker.DoWork += new DoWorkEventHandler(MuPDFWork); - } - - m_params = Params; - m_worker.RunWorkerAsync(Params); - return gsStatus.GS_READY; - } - catch (OutOfMemoryException e) - { - Console.WriteLine("Memory allocation failed during mupdf rendering\n"); - return gsStatus.GS_ERROR; - } - } - - private void MuPDFCompleted(object sender, RunWorkerCompletedEventArgs e) - { - ConvertParams_t Value; - muPDFEventArgs info; - - if (e.Cancelled) - { - Value = new ConvertParams_t(); - Value.result = GS_Result_t.gsCANCELLED; - info = new muPDFEventArgs(true, 100, Value); - } - else - { - Value = (ConvertParams_t)e.Result; - info = new muPDFEventArgs(true, 100, Value); - } - mupdfUpdateMain(this, info); - } - - private void MuPDFProgressChanged(object sender, ProgressChangedEventArgs e) - { - /* Callback with progress */ - ConvertParams_t Value = new ConvertParams_t(); - muPDFEventArgs info = new muPDFEventArgs(false, e.ProgressPercentage, Value); - mupdfUpdateMain(this, info); - } - - public void Cancel() - { - m_worker.CancelAsync(); - } - - /* ToDo: do we report pages that failed? or just push on */ - private void MuPDFWork(object sender, DoWorkEventArgs e) - { - ConvertParams_t muparams = (ConvertParams_t)e.Argument; - String out_file = muparams.outputfile; - int num_pages = muparams.num_pages; - int resolution = muparams.resolution; - var pages = muparams.pages; - BackgroundWorker worker = sender as BackgroundWorker; - - muparams.result = GS_Result_t.gsOK; - - int result; - - for (int kk = 0; kk < num_pages; kk++) - { - SelectPage curr_page = (SelectPage)pages[kk]; - int page_num = curr_page.Page; - bool append = (kk != 0); - - /* Look for file extension. */ - string extension = System.IO.Path.GetExtension(out_file); - int len = extension.Length; - String new_out_file = out_file.Substring(0, out_file.Length - len); - String out_file_name = new_out_file + "_" + page_num + extension; - - /* Question: is lock valid when done from this worker thread? */ - switch (muparams.device) - { - case gsDevice_t.svg: - lock (this.m_lock) /* Single-page format */ - result = tc_mSavePage(mu_object, out_file_name, - page_num - 1, resolution, (int) mudevice_t.SVG_OUT, - false); - break; - case gsDevice_t.pnm: - lock (this.m_lock) /* Single-page format */ - result = tc_mSavePage(mu_object, out_file_name, - page_num - 1, resolution, (int)mudevice_t.PNM_OUT, - false); - break; - case gsDevice_t.pclbitmap: /* Multi-page format */ - lock (this.m_lock) - result = tc_mSavePage(mu_object, out_file, - page_num - 1, resolution, (int)mudevice_t.PCL_OUT, - append); - break; - case gsDevice_t.pwg: /* Multi-page format */ - lock (this.m_lock) - result = tc_mSavePage(mu_object, out_file, - page_num - 1, resolution, (int)mudevice_t.PWG_OUT, - append); - break; - } - double prog = (double) (kk+1.0)/((double) num_pages) * 100.0; - worker.ReportProgress((int)prog); - - if (worker.CancellationPending == true) - { - e.Cancel = true; - muparams.result = GS_Result_t.gsCANCELLED; - break; - } - } - e.Result = muparams; - return; - } - } -} diff --git a/platform/winrt/libmupdf-nov8_winRT.vcxproj b/platform/winrt/libmupdf-nov8_winRT.vcxproj deleted file mode 100644 index 373999a6..00000000 --- a/platform/winrt/libmupdf-nov8_winRT.vcxproj +++ /dev/null @@ -1,299 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Memento - ARM - - - Memento - Win32 - - - Memento - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - - - - {5affe821-c5c8-45fb-b834-10fed76e49a7} - Win32Proj - libmupdf-nov8_winRT - libmupdf_nov8_winRT - en-US - 12.0 - true - Windows Store - 8.1 - - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\ - - - false - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\ - - - false - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\ - - - false - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\include;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - - \ No newline at end of file diff --git a/platform/winrt/libmupdf-nov8_winRT.vcxproj.filters b/platform/winrt/libmupdf-nov8_winRT.vcxproj.filters deleted file mode 100644 index 7e73bfa6..00000000 --- a/platform/winrt/libmupdf-nov8_winRT.vcxproj.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/platform/winrt/libmupdf/libmupdf.vcxproj b/platform/winrt/libmupdf/libmupdf.vcxproj deleted file mode 100644 index 23101e73..00000000 --- a/platform/winrt/libmupdf/libmupdf.vcxproj +++ /dev/null @@ -1,360 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2} - Win32Proj - libmupdf - - - - StaticLibrary - true - v120 - Unicode - - - StaticLibrary - true - v120 - Unicode - - - StaticLibrary - false - v120 - true - Unicode - - - StaticLibrary - false - v120 - true - Unicode - - - - - - - - - - - - - - - - - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\ucdn;..\..\..\include;..\..\..\generated;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\ucdn;..\..\..\include;..\..\..\generated;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\ucdn;..\..\..\include;..\..\..\generated;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\ucdn;..\..\..\include;..\..\..\generated;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreaded - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/platform/winrt/libmupdf/libmupdf.vcxproj.filters b/platform/winrt/libmupdf/libmupdf.vcxproj.filters deleted file mode 100644 index f966e612..00000000 --- a/platform/winrt/libmupdf/libmupdf.vcxproj.filters +++ /dev/null @@ -1,639 +0,0 @@ - - - - - {c6eab433-084b-4c58-9f22-6f44c89a0289} - - - {96f21f10-5d0b-4f6e-ad70-fc8866054290} - - - {e379667f-718b-49ad-b312-9f60a08f0941} - - - {82abb70b-aa89-4767-972f-d52c819f1fb4} - - - {71d27c79-d67f-4b0e-8a5c-ad2355c905b1} - - - {7f13938e-5486-404e-8c72-1cb35d92d68b} - - - {766fb080-9cd3-4755-a074-a20a7f1748b8} - - - {e464f8d3-dcda-4cbe-bae2-48bdc6f0afd7} - - - {92cc8877-4351-49e6-8a73-9696779675ed} - - - {6350172f-767f-4cdd-8c14-3a9e5af8d4c4} - - - - - !include - - - !include - - - !include - - - !include - - - !include - - - !include - - - !include - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - fitz - - - fitz - - - fitz - - - pdf - - - pdf - - - pdf - - - - - !include\fitz - - - cbz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - img - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - tiff - - - tools - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - \ No newline at end of file diff --git a/platform/winrt/libmupdf_winRT.vcxproj b/platform/winrt/libmupdf_winRT.vcxproj deleted file mode 100644 index bc2d0a47..00000000 --- a/platform/winrt/libmupdf_winRT.vcxproj +++ /dev/null @@ -1,511 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Memento - ARM - - - Memento - Win32 - - - Memento - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {0715f3cf-5d1b-4617-a331-6527371365b7} - Win32Proj - libmupdf_winRT - libmupdf_winRT - en-US - 12.0 - true - Windows Store - 8.1 - - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MEMENTO=1;DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NDEBUG;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - MEMENTO=1;DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NDEBUG;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - MultiThreadedDebugDLL - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MEMENTO=1;DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\ucdn;..\..\include;..\..\generated;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NDEBUG;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Console - false - false - - - - - - \ No newline at end of file diff --git a/platform/winrt/libmupdf_winRT.vcxproj.filters b/platform/winrt/libmupdf_winRT.vcxproj.filters deleted file mode 100644 index 7fd7cb30..00000000 --- a/platform/winrt/libmupdf_winRT.vcxproj.filters +++ /dev/null @@ -1,642 +0,0 @@ - - - - - {89ff37a6-fa19-4690-b07f-1fb91f4b5803} - - - {a3eb732e-eaea-4b44-b168-6384494ab2cf} - - - {7b0f7938-a977-4cd9-a8bc-aeef816ae84c} - - - {631e9425-7a6a-4529-95c8-06ea5b145899} - - - {8de280a7-9403-401a-8ab5-bf7f0ce3a27f} - - - {ebee942a-03ff-4a0b-8e41-1ffa2a16d448} - - - {87d18a14-080e-4bad-8db6-c9df888baa1c} - - - {ec1b8208-f4f4-4c3f-a071-dcecc79bbd72} - - - {f541a6f9-ea8e-472e-b23f-079c7b8fca17} - - - {7e724063-cc29-4515-b722-ffca1333aea2} - - - {4e3d83f6-3258-4f7b-8174-bc825377658e} - - - - - !include\fitz - - - cbz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - fitz - - - img - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - pdf - - - tiff - - - tools - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - xps - - - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\fitz - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include\pdf - - - !include - - - !include - - - !include - - - !include - - - !include - - - !include - - - !include\pdf - - - !include - - - !include\fitz - - - fitz - - - fitz - - - fitz - - - pdf - - - pdf - - - pdf - - - \ No newline at end of file diff --git a/platform/winrt/libthirdparty/libthirdparty.vcxproj b/platform/winrt/libthirdparty/libthirdparty.vcxproj deleted file mode 100644 index 75eafa26..00000000 --- a/platform/winrt/libthirdparty/libthirdparty.vcxproj +++ /dev/null @@ -1,418 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {DF87E242-8B2C-4F04-9A7E-61C578FD994C} - Win32Proj - libthirdparty - - - - StaticLibrary - true - v120 - Unicode - - - StaticLibrary - true - v120 - Unicode - - - StaticLibrary - false - v120 - true - Unicode - - - StaticLibrary - false - v120 - true - Unicode - - - - - - - - - - - - - - - - - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - ..\$(Platform)\$(Configuration)\ - \$(Platform)\$(Configuration)\$(ProjectName)\ - - - - - - Level3 - Disabled - NO_GETENV;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - Windows - true - - - - - - - Level3 - Disabled - NO_GETENV;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - NO_GETENV;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreaded - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - NO_GETENV;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - ..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - MultiThreaded - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/platform/winrt/libthirdparty/libthirdparty.vcxproj.filters b/platform/winrt/libthirdparty/libthirdparty.vcxproj.filters deleted file mode 100644 index 8df2ff5f..00000000 --- a/platform/winrt/libthirdparty/libthirdparty.vcxproj.filters +++ /dev/null @@ -1,825 +0,0 @@ - - - - - {51262ea7-0f9e-437e-8ffe-c85bacaaf125} - - - {f4f104f6-caed-4df1-b35d-9f9767f5582d} - - - {1d957264-59db-4892-aa9b-ba1cc2679e28} - - - {90126781-c73e-4236-83b4-d587cb934c42} - - - {97ff3411-a2bc-4e1a-a226-697c94e57b49} - - - {5a89d11e-f4d3-4090-828c-3fbba6be4626} - - - {cf91998c-2e4c-46ea-9181-028cf8ffdc13} - - - {095e71bf-5b71-417b-85ab-5fc6c3401938} - - - {e8dd043a-626d-46c4-bffe-f5937b4cd5e3} - - - {2741745a-ddbb-4d7b-9102-ffa79d72d71a} - - - {a359ba61-bb36-4f26-ac90-e87eeeeae497} - - - {2c243407-7436-4da7-8cca-69ee74ea256e} - - - {2ab8b309-1ec0-4324-89e1-078246114bb1} - - - {32dbf0c4-caae-469b-a861-cad68dff8d70} - - - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libmujs - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - - - libfreetype\include - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libmujs - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - \ No newline at end of file diff --git a/platform/winrt/libthirdparty_winRT.vcxproj b/platform/winrt/libthirdparty_winRT.vcxproj deleted file mode 100644 index d9c60e17..00000000 --- a/platform/winrt/libthirdparty_winRT.vcxproj +++ /dev/null @@ -1,571 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Memento - ARM - - - Memento - Win32 - - - Memento - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {c0d1c355-1bee-40e1-9ef4-fd9fffdbf396} - Win32Proj - libthirdparty_winRT - libthirdparty_winRT - en-US - 12.0 - true - Windows Store - 8.1 - - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - StaticLibrary - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - false - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NO_GETENV;_WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - _WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NO_GETENV;_WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - - - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NO_GETENV;_WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - - - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - _WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NO_GETENV;_WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NO_GETENV;_WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - _WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - NotUsing - false - false - ..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - NO_GETENV;_WINRT;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H="slimftmodules.h";FT_CONFIG_OPTIONS_H="slimftoptions.h";DEBUG=1;verbose=-1;_UNICODE;UNICODE;%(PreprocessorDefinitions) - - - Console - false - false - - - - - - \ No newline at end of file diff --git a/platform/winrt/libthirdparty_winRT.vcxproj.filters b/platform/winrt/libthirdparty_winRT.vcxproj.filters deleted file mode 100644 index 3742ced4..00000000 --- a/platform/winrt/libthirdparty_winRT.vcxproj.filters +++ /dev/null @@ -1,825 +0,0 @@ - - - - - {01b3001f-e457-469b-935e-a61e6bb80bea} - - - {e719ccda-496e-44f1-a848-3f7e1ee5ec8d} - - - {be2b973e-2b42-45d9-9225-d017d1abd744} - - - {b6fa3d37-cb6e-45ea-88de-530cb5b26c41} - - - {34f17a77-9d71-40b1-a18b-75b0704bddf0} - - - {f0d06dd8-ab23-445f-82bd-b524f7206761} - - - {e6b91098-43cf-4337-8677-22b2c582785b} - - - {5e55ef18-6449-49c1-99aa-1cd88b6f4453} - - - {289ce62d-7110-4e8b-8045-72a557f8e6c0} - - - {bcbd304b-3787-4d77-a13d-1052885ff121} - - - {298e58d2-d279-4f1c-abb8-6224727db323} - - - {364c7937-2761-4a47-aa08-aa4cafda2e99} - - - {ae49fa93-c671-4461-b697-332bea0570b1} - - - {e2eafb1d-79ec-45b8-84e1-35acbba2fdee} - - - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype\base - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libfreetype - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjbig2dec - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libjpeg - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libz - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs\source - - - libmujs - - - - - libfreetype\include - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\config - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal\services - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libfreetype\include\freetype\internal - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libopenjpeg - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs\include - - - libmujs - - - \ No newline at end of file diff --git a/platform/winrt/mupdf.sln b/platform/winrt/mupdf.sln deleted file mode 100644 index 65818c0e..00000000 --- a/platform/winrt/mupdf.sln +++ /dev/null @@ -1,762 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generated", "generated.vcxproj", "{A5053AA7-02E5-4903-B596-04F17AEB1526}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmupdf_winRT", "libmupdf_winRT.vcxproj", "{0715F3CF-5D1B-4617-A331-6527371365B7}" - ProjectSection(ProjectDependencies) = postProject - {A5053AA7-02E5-4903-B596-04F17AEB1526} = {A5053AA7-02E5-4903-B596-04F17AEB1526} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libthirdparty_winRT", "libthirdparty_winRT.vcxproj", "{C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupdfwinrt", "mupdfwinrt\mupdfwinrt.vcxproj", "{9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}" - ProjectSection(ProjectDependencies) = postProject - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396} = {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396} - {0715F3CF-5D1B-4617-A331-6527371365B7} = {0715F3CF-5D1B-4617-A331-6527371365B7} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupdf_cpp", "mupdf_cpp\mupdf_cpp.vcxproj", "{0204A4E7-F1B8-4268-A67C-A2C674B4742D}" - ProjectSection(ProjectDependencies) = postProject - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33} = {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "gsview", "gsview\gsview.csproj", "{5DA0ECC9-4026-4427-862F-E3226EFEFEB1}" - ProjectSection(ProjectDependencies) = postProject - {4468C2E0-6C90-4FA5-8A48-0A9629776167} = {4468C2E0-6C90-4FA5-8A48-0A9629776167} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mupdfnet", "mupdfnet\mupdfnet.vcxproj", "{4468C2E0-6C90-4FA5-8A48-0A9629776167}" - ProjectSection(ProjectDependencies) = postProject - {DF87E242-8B2C-4F04-9A7E-61C578FD994C} = {DF87E242-8B2C-4F04-9A7E-61C578FD994C} - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2} = {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2} - EndProjectSection -EndProject -Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Install64", "gsview\Install64\Install64.vdproj", "{76633D68-1082-4040-B943-362B02811577}" - ProjectSection(ProjectDependencies) = postProject - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1} = {5DA0ECC9-4026-4427-862F-E3226EFEFEB1} - {4468C2E0-6C90-4FA5-8A48-0A9629776167} = {4468C2E0-6C90-4FA5-8A48-0A9629776167} - EndProjectSection -EndProject -Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Install32", "gsview\Install32\Install32.vdproj", "{FA5C8A67-3783-4096-B2E8-34BCF88F07EB}" - ProjectSection(ProjectDependencies) = postProject - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1} = {5DA0ECC9-4026-4427-862F-E3226EFEFEB1} - {4468C2E0-6C90-4FA5-8A48-0A9629776167} = {4468C2E0-6C90-4FA5-8A48-0A9629776167} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmupdf", "libmupdf\libmupdf.vcxproj", "{4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}" - ProjectSection(ProjectDependencies) = postProject - {A5053AA7-02E5-4903-B596-04F17AEB1526} = {A5053AA7-02E5-4903-B596-04F17AEB1526} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libthirdparty", "libthirdparty\libthirdparty.vcxproj", "{DF87E242-8B2C-4F04-9A7E-61C578FD994C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - CD_ROM|Any CPU = CD_ROM|Any CPU - CD_ROM|ARM = CD_ROM|ARM - CD_ROM|Mixed Platforms = CD_ROM|Mixed Platforms - CD_ROM|Win32 = CD_ROM|Win32 - CD_ROM|x64 = CD_ROM|x64 - CD_ROM|x86 = CD_ROM|x86 - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - DVD-5|Any CPU = DVD-5|Any CPU - DVD-5|ARM = DVD-5|ARM - DVD-5|Mixed Platforms = DVD-5|Mixed Platforms - DVD-5|Win32 = DVD-5|Win32 - DVD-5|x64 = DVD-5|x64 - DVD-5|x86 = DVD-5|x86 - Memento|Any CPU = Memento|Any CPU - Memento|ARM = Memento|ARM - Memento|Mixed Platforms = Memento|Mixed Platforms - Memento|Win32 = Memento|Win32 - Memento|x64 = Memento|x64 - Memento|x86 = Memento|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|Mixed Platforms = Release|Mixed Platforms - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - SingleImage|Any CPU = SingleImage|Any CPU - SingleImage|ARM = SingleImage|ARM - SingleImage|Mixed Platforms = SingleImage|Mixed Platforms - SingleImage|Win32 = SingleImage|Win32 - SingleImage|x64 = SingleImage|x64 - SingleImage|x86 = SingleImage|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|ARM.ActiveCfg = Release|ARM - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|ARM.Build.0 = Release|ARM - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|Win32.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|x64.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|x86.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.CD_ROM|x86.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|ARM.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|ARM.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|Win32.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|x64.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|x64.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|x86.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Debug|x86.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|ARM.ActiveCfg = Debug|ARM - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|ARM.Build.0 = Debug|ARM - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|Win32.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|x64.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|x86.ActiveCfg = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.DVD-5|x86.Build.0 = Debug|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|Any CPU.ActiveCfg = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|ARM.ActiveCfg = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|Mixed Platforms.ActiveCfg = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|Mixed Platforms.Build.0 = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|Win32.ActiveCfg = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|x64.ActiveCfg = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|x86.ActiveCfg = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Memento|x86.Build.0 = Memento|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|Any CPU.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|ARM.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|ARM.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|Mixed Platforms.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|Win32.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|Win32.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|x64.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|x64.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|x86.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.Release|x86.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|ARM.ActiveCfg = Release|ARM - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|ARM.Build.0 = Release|ARM - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|Win32.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|Win32.Build.0 = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|x64.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|x86.ActiveCfg = Release|Win32 - {A5053AA7-02E5-4903-B596-04F17AEB1526}.SingleImage|x86.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|ARM.ActiveCfg = Release|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|ARM.Build.0 = Release|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|Win32.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|x64.ActiveCfg = Release|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|x64.Build.0 = Release|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|x86.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.CD_ROM|x86.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|ARM.ActiveCfg = Debug|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|ARM.Build.0 = Debug|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|Win32.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|Win32.Build.0 = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|x64.ActiveCfg = Debug|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|x64.Build.0 = Debug|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|x86.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Debug|x86.Build.0 = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|ARM.ActiveCfg = Debug|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|ARM.Build.0 = Debug|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|Win32.Build.0 = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|x64.ActiveCfg = Debug|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|x64.Build.0 = Debug|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|x86.ActiveCfg = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.DVD-5|x86.Build.0 = Debug|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|Any CPU.ActiveCfg = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|ARM.ActiveCfg = Memento|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|ARM.Build.0 = Memento|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|Mixed Platforms.ActiveCfg = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|Mixed Platforms.Build.0 = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|Win32.ActiveCfg = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|Win32.Build.0 = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|x64.ActiveCfg = Memento|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|x64.Build.0 = Memento|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|x86.ActiveCfg = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Memento|x86.Build.0 = Memento|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|Any CPU.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|ARM.ActiveCfg = Release|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|ARM.Build.0 = Release|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|Mixed Platforms.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|Win32.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|Win32.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|x64.ActiveCfg = Release|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|x64.Build.0 = Release|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|x86.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.Release|x86.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|ARM.ActiveCfg = Release|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|ARM.Build.0 = Release|ARM - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|Win32.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|Win32.Build.0 = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|x64.ActiveCfg = Release|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|x64.Build.0 = Release|x64 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|x86.ActiveCfg = Release|Win32 - {0715F3CF-5D1B-4617-A331-6527371365B7}.SingleImage|x86.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|ARM.ActiveCfg = Release|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|ARM.Build.0 = Release|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|Win32.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|x64.ActiveCfg = Release|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|x64.Build.0 = Release|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|x86.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.CD_ROM|x86.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|ARM.ActiveCfg = Debug|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|ARM.Build.0 = Debug|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|Win32.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|Win32.Build.0 = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|x64.ActiveCfg = Debug|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|x64.Build.0 = Debug|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|x86.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Debug|x86.Build.0 = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|ARM.ActiveCfg = Debug|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|ARM.Build.0 = Debug|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|Win32.Build.0 = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|x64.ActiveCfg = Debug|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|x64.Build.0 = Debug|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|x86.ActiveCfg = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.DVD-5|x86.Build.0 = Debug|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|Any CPU.ActiveCfg = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|ARM.ActiveCfg = Memento|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|ARM.Build.0 = Memento|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|Mixed Platforms.ActiveCfg = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|Mixed Platforms.Build.0 = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|Win32.ActiveCfg = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|Win32.Build.0 = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|x64.ActiveCfg = Memento|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|x64.Build.0 = Memento|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|x86.ActiveCfg = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Memento|x86.Build.0 = Memento|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|Any CPU.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|ARM.ActiveCfg = Release|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|ARM.Build.0 = Release|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|Mixed Platforms.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|Win32.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|Win32.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|x64.ActiveCfg = Release|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|x64.Build.0 = Release|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|x86.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.Release|x86.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|ARM.ActiveCfg = Release|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|ARM.Build.0 = Release|ARM - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|Win32.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|Win32.Build.0 = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|x64.ActiveCfg = Release|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|x64.Build.0 = Release|x64 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|x86.ActiveCfg = Release|Win32 - {C0D1C355-1BEE-40E1-9EF4-FD9FFFDBF396}.SingleImage|x86.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|ARM.ActiveCfg = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|ARM.Build.0 = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|Win32.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|x64.ActiveCfg = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|x64.Build.0 = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|x86.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.CD_ROM|x86.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|ARM.ActiveCfg = Debug|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|ARM.Build.0 = Debug|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|Win32.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|Win32.Build.0 = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|x64.ActiveCfg = Debug|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|x64.Build.0 = Debug|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|x86.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Debug|x86.Build.0 = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|ARM.ActiveCfg = Debug|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|ARM.Build.0 = Debug|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|Win32.Build.0 = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|x64.ActiveCfg = Debug|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|x64.Build.0 = Debug|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|x86.ActiveCfg = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.DVD-5|x86.Build.0 = Debug|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|Any CPU.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|ARM.ActiveCfg = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|ARM.Build.0 = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|Mixed Platforms.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|Mixed Platforms.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|Win32.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|Win32.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|x64.ActiveCfg = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|x64.Build.0 = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|x86.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Memento|x86.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|Any CPU.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|ARM.ActiveCfg = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|ARM.Build.0 = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|Mixed Platforms.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|Win32.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|Win32.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|x64.ActiveCfg = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|x64.Build.0 = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|x86.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.Release|x86.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|ARM.ActiveCfg = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|ARM.Build.0 = Release|ARM - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|Win32.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|Win32.Build.0 = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|x64.ActiveCfg = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|x64.Build.0 = Release|x64 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|x86.ActiveCfg = Release|Win32 - {9E6AB41D-09A7-45A6-A53B-1E4BF3AC5B33}.SingleImage|x86.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|ARM.ActiveCfg = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|ARM.Build.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|ARM.Deploy.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Mixed Platforms.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Win32.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|Win32.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|x64.ActiveCfg = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|x64.Build.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|x64.Deploy.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|x86.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|x86.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.CD_ROM|x86.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|ARM.ActiveCfg = Debug|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|ARM.Build.0 = Debug|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|ARM.Deploy.0 = Debug|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Win32.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Win32.Build.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|Win32.Deploy.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|x64.ActiveCfg = Debug|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|x64.Build.0 = Debug|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|x64.Deploy.0 = Debug|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|x86.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|x86.Build.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Debug|x86.Deploy.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|ARM.ActiveCfg = Debug|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|ARM.Build.0 = Debug|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|ARM.Deploy.0 = Debug|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Mixed Platforms.Deploy.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Win32.Build.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|Win32.Deploy.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|x64.ActiveCfg = Debug|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|x64.Build.0 = Debug|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|x64.Deploy.0 = Debug|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|x86.ActiveCfg = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|x86.Build.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.DVD-5|x86.Deploy.0 = Debug|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Any CPU.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|ARM.ActiveCfg = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|ARM.Build.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|ARM.Deploy.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Mixed Platforms.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Mixed Platforms.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Mixed Platforms.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Win32.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Win32.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|Win32.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|x64.ActiveCfg = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|x64.Build.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|x64.Deploy.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|x86.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|x86.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Memento|x86.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Any CPU.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|ARM.ActiveCfg = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|ARM.Build.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|ARM.Deploy.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Mixed Platforms.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Mixed Platforms.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Win32.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Win32.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|Win32.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|x64.ActiveCfg = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|x64.Build.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|x64.Deploy.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|x86.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|x86.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.Release|x86.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|ARM.ActiveCfg = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|ARM.Build.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|ARM.Deploy.0 = Release|ARM - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Mixed Platforms.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Win32.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Win32.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|Win32.Deploy.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|x64.ActiveCfg = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|x64.Build.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|x64.Deploy.0 = Release|x64 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|x86.ActiveCfg = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|x86.Build.0 = Release|Win32 - {0204A4E7-F1B8-4268-A67C-A2C674B4742D}.SingleImage|x86.Deploy.0 = Release|Win32 - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|Any CPU.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|ARM.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|Mixed Platforms.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|Win32.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|x64.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.CD_ROM|x86.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|ARM.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|Win32.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|Win32.Build.0 = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|x64.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|x64.Build.0 = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Debug|x86.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|Any CPU.Build.0 = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|ARM.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|Mixed Platforms.Build.0 = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|Win32.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|x64.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.DVD-5|x86.ActiveCfg = Debug|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|Any CPU.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|Any CPU.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|ARM.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|Mixed Platforms.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|Mixed Platforms.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|Win32.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|x64.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Memento|x86.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|Any CPU.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|ARM.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|Win32.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|Win32.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|x64.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|x64.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|x86.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.Release|x86.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|Any CPU.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|ARM.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|Mixed Platforms.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|Mixed Platforms.Build.0 = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|Win32.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|x64.ActiveCfg = Release|Any CPU - {5DA0ECC9-4026-4427-862F-E3226EFEFEB1}.SingleImage|x86.ActiveCfg = Release|Any CPU - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|ARM.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|Win32.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|x64.ActiveCfg = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|x64.Build.0 = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|x86.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.CD_ROM|x86.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|ARM.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|Win32.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|Win32.Build.0 = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|x64.ActiveCfg = Debug|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|x64.Build.0 = Debug|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|x86.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Debug|x86.Build.0 = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|ARM.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|Win32.Build.0 = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|x64.ActiveCfg = Debug|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|x64.Build.0 = Debug|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|x86.ActiveCfg = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.DVD-5|x86.Build.0 = Debug|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|Any CPU.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|ARM.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|Mixed Platforms.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|Mixed Platforms.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|Win32.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|Win32.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|x64.ActiveCfg = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|x64.Build.0 = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|x86.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Memento|x86.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|Any CPU.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|ARM.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|Mixed Platforms.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|Win32.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|Win32.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|x64.ActiveCfg = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|x64.Build.0 = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|x86.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.Release|x86.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|ARM.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|Win32.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|Win32.Build.0 = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|x64.ActiveCfg = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|x64.Build.0 = Release|x64 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|x86.ActiveCfg = Release|Win32 - {4468C2E0-6C90-4FA5-8A48-0A9629776167}.SingleImage|x86.Build.0 = Release|Win32 - {76633D68-1082-4040-B943-362B02811577}.CD_ROM|Any CPU.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.CD_ROM|ARM.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.CD_ROM|Mixed Platforms.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.CD_ROM|Win32.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.CD_ROM|x64.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.CD_ROM|x86.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Debug|Any CPU.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.Debug|ARM.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.Debug|Mixed Platforms.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.Debug|Win32.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.Debug|x64.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.Debug|x86.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.DVD-5|Any CPU.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.DVD-5|ARM.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.DVD-5|Mixed Platforms.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.DVD-5|Win32.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.DVD-5|x64.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.DVD-5|x86.ActiveCfg = Debug - {76633D68-1082-4040-B943-362B02811577}.Memento|Any CPU.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Memento|ARM.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Memento|Mixed Platforms.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Memento|Win32.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Memento|x64.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Memento|x86.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Release|Any CPU.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Release|ARM.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Release|Mixed Platforms.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Release|Win32.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Release|x64.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.Release|x64.Build.0 = Release - {76633D68-1082-4040-B943-362B02811577}.Release|x86.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.SingleImage|Any CPU.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.SingleImage|ARM.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.SingleImage|Mixed Platforms.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.SingleImage|Win32.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.SingleImage|x64.ActiveCfg = Release - {76633D68-1082-4040-B943-362B02811577}.SingleImage|x86.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.CD_ROM|Any CPU.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.CD_ROM|ARM.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.CD_ROM|Mixed Platforms.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.CD_ROM|Win32.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.CD_ROM|x64.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.CD_ROM|x86.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Debug|Any CPU.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Debug|ARM.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Debug|Mixed Platforms.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Debug|Win32.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Debug|x64.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Debug|x86.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.DVD-5|Any CPU.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.DVD-5|ARM.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.DVD-5|Mixed Platforms.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.DVD-5|Win32.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.DVD-5|x64.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.DVD-5|x86.ActiveCfg = Debug - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Memento|Any CPU.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Memento|ARM.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Memento|Mixed Platforms.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Memento|Win32.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Memento|x64.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Memento|x86.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|Any CPU.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|ARM.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|Mixed Platforms.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|Win32.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|Win32.Build.0 = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|x64.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|x86.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.Release|x86.Build.0 = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.SingleImage|Any CPU.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.SingleImage|ARM.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.SingleImage|Mixed Platforms.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.SingleImage|Win32.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.SingleImage|x64.ActiveCfg = Release - {FA5C8A67-3783-4096-B2E8-34BCF88F07EB}.SingleImage|x86.ActiveCfg = Release - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|ARM.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|Win32.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|x64.ActiveCfg = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|x64.Build.0 = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|x86.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.CD_ROM|x86.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|ARM.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|Win32.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|Win32.Build.0 = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|x64.ActiveCfg = Debug|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|x64.Build.0 = Debug|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|x86.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Debug|x86.Build.0 = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|ARM.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|Win32.Build.0 = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|x64.ActiveCfg = Debug|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|x64.Build.0 = Debug|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|x86.ActiveCfg = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.DVD-5|x86.Build.0 = Debug|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|Any CPU.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|ARM.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|Mixed Platforms.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|Mixed Platforms.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|Win32.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|Win32.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|x64.ActiveCfg = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|x64.Build.0 = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|x86.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Memento|x86.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|Any CPU.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|ARM.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|Mixed Platforms.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|Win32.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|Win32.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|x64.ActiveCfg = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|x64.Build.0 = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|x86.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.Release|x86.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|ARM.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|Win32.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|Win32.Build.0 = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|x64.ActiveCfg = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|x64.Build.0 = Release|x64 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|x86.ActiveCfg = Release|Win32 - {4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}.SingleImage|x86.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|Any CPU.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|ARM.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|Mixed Platforms.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|Win32.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|Win32.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|x64.ActiveCfg = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|x64.Build.0 = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|x86.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.CD_ROM|x86.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|ARM.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|Win32.Build.0 = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|x64.ActiveCfg = Debug|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|x64.Build.0 = Debug|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|x86.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Debug|x86.Build.0 = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|Any CPU.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|ARM.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|Mixed Platforms.Build.0 = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|Win32.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|Win32.Build.0 = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|x64.ActiveCfg = Debug|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|x64.Build.0 = Debug|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|x86.ActiveCfg = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.DVD-5|x86.Build.0 = Debug|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|Any CPU.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|ARM.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|Mixed Platforms.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|Mixed Platforms.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|Win32.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|Win32.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|x64.ActiveCfg = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|x64.Build.0 = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|x86.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Memento|x86.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|Any CPU.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|ARM.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|Mixed Platforms.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|Win32.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|Win32.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|x64.ActiveCfg = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|x64.Build.0 = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|x86.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.Release|x86.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|Any CPU.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|ARM.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|Mixed Platforms.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|Mixed Platforms.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|Win32.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|Win32.Build.0 = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|x64.ActiveCfg = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|x64.Build.0 = Release|x64 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|x86.ActiveCfg = Release|Win32 - {DF87E242-8B2C-4F04-9A7E-61C578FD994C}.SingleImage|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/platform/winrt/mupdf_cpp/App.xaml b/platform/winrt/mupdf_cpp/App.xaml deleted file mode 100644 index dfb5d11c..00000000 --- a/platform/winrt/mupdf_cpp/App.xaml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/platform/winrt/mupdf_cpp/App.xaml.cpp b/platform/winrt/mupdf_cpp/App.xaml.cpp deleted file mode 100644 index 4bb9614c..00000000 --- a/platform/winrt/mupdf_cpp/App.xaml.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// -// App.xaml.cpp -// Implementation of the App class. -// - -#include "pch.h" -#include "MainPage.xaml.h" - -using namespace mupdf_cpp; - -using namespace Platform; -using namespace Windows::ApplicationModel; -using namespace Windows::ApplicationModel::Activation; -using namespace Windows::Foundation; -using namespace Windows::Foundation::Collections; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Controls::Primitives; -using namespace Windows::UI::Xaml::Data; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::UI::Xaml::Interop; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Navigation; - -// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227 - -/// -/// Initializes the singleton application object. This is the first line of authored code -/// executed, and as such is the logical equivalent of main() or WinMain(). -/// -App::App() -{ - InitializeComponent(); - Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending); -} - -/// -/// Invoked when the application is launched normally by the end user. Other entry points -/// will be used when the application is launched to open a specific file, to display -/// search results, and so forth. -/// -/// Details about the launch request and process. -void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ args) -{ - auto rootFrame = dynamic_cast(Window::Current->Content); - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == nullptr) - { - // Create a Frame to act as the navigation context and associate it with - // a SuspensionManager key - rootFrame = ref new Frame(); - - if (args->PreviousExecutionState == ApplicationExecutionState::Terminated) - { - // TODO: Restore the saved session state only when appropriate, scheduling the - // final launch steps after the restore is complete - - } - - if (rootFrame->Content == nullptr) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - if (!rootFrame->Navigate(TypeName(MainPage::typeid), args->Arguments)) - { - throw ref new FailureException("Failed to create initial page"); - } - } - // Place the frame in the current Window - Window::Current->Content = rootFrame; - auto rootPage = safe_cast(rootFrame->Content); - rootPage->FileEvent = nullptr; - rootPage->ProtocolEvent = nullptr; - - // Ensure the current window is active - Window::Current->Activate(); - } - else - { - if (rootFrame->Content == nullptr) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - if (!rootFrame->Navigate(TypeName(MainPage::typeid), args->Arguments)) - { - throw ref new FailureException("Failed to create initial page"); - } - } - // Ensure the current window is active - Window::Current->Activate(); - } -} - -/* Handle case where we do a association file opening and the app is already - running */ -void App::OnFileActivated(Windows::ApplicationModel::Activation::FileActivatedEventArgs^ args) -{ - auto rootFrame = dynamic_cast(Window::Current->Content); - - if (rootFrame->Content == nullptr) - { - if (!rootFrame->Navigate(TypeName(MainPage::typeid))) - { - throw ref new FailureException("Failed to create initial page"); - } - } - auto p = dynamic_cast(rootFrame->Content); - p->FileEvent = args; - p->ProtocolEvent = nullptr; - p->FromFile(); - Window::Current->Activate(); -} - -/// -/// Invoked when application execution is being suspended. Application state is saved -/// without knowing whether the application will be terminated or resumed with the contents -/// of memory still intact. -/// -/// The source of the suspend request. -/// Details about the suspend request. -void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e) -{ - (void) sender; // Unused parameter - (void) e; // Unused parameter - - //TODO: Save application state and stop any background activity -} diff --git a/platform/winrt/mupdf_cpp/App.xaml.h b/platform/winrt/mupdf_cpp/App.xaml.h deleted file mode 100644 index b62c9979..00000000 --- a/platform/winrt/mupdf_cpp/App.xaml.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// App.xaml.h -// Declaration of the App class. -// - -#pragma once - -#include "App.g.h" - -namespace mupdf_cpp -{ - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - ref class App sealed - { - public: - App(); - virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ args) override; - virtual void App::OnFileActivated(Windows::ApplicationModel::Activation::FileActivatedEventArgs^ args) override; - private: - void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e); - }; -} diff --git a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-100.png b/platform/winrt/mupdf_cpp/Assets/Logo.Scale-100.png deleted file mode 100644 index 821cb7d9..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-100.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-140.png b/platform/winrt/mupdf_cpp/Assets/Logo.Scale-140.png deleted file mode 100644 index 94eb9b67..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-140.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-180.png b/platform/winrt/mupdf_cpp/Assets/Logo.Scale-180.png deleted file mode 100644 index 44354901..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-180.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-80.png b/platform/winrt/mupdf_cpp/Assets/Logo.Scale-80.png deleted file mode 100644 index 165bda7a..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/Logo.Scale-80.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-100.png b/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-100.png deleted file mode 100644 index 5b5635e9..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-100.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-140.png b/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-140.png deleted file mode 100644 index 2813a863..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-140.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-180.png b/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-180.png deleted file mode 100644 index 1908837d..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/StoreLogo.scale-180.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-100.png b/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-100.png deleted file mode 100644 index 9497ffb5..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-100.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-140.png b/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-140.png deleted file mode 100644 index 1c6cd7a0..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-140.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-180.png b/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-180.png deleted file mode 100644 index 7d3391f8..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-180.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-80.png b/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-80.png deleted file mode 100644 index 471efbda..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/WideLogo.scale-80.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/mupdf_smallogo.png b/platform/winrt/mupdf_cpp/Assets/mupdf_smallogo.png deleted file mode 100644 index 48746c87..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/mupdf_smallogo.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Assets/mupdf_splash.png b/platform/winrt/mupdf_cpp/Assets/mupdf_splash.png deleted file mode 100644 index 624f9ae9..00000000 Binary files a/platform/winrt/mupdf_cpp/Assets/mupdf_splash.png and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/Common/StandardStyles.xaml b/platform/winrt/mupdf_cpp/Common/StandardStyles.xaml deleted file mode 100644 index ed4b0ec2..00000000 --- a/platform/winrt/mupdf_cpp/Common/StandardStyles.xaml +++ /dev/null @@ -1,1889 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mouse - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/mupdf_cpp/DocumentPage.cpp b/platform/winrt/mupdf_cpp/DocumentPage.cpp deleted file mode 100644 index 39a22aa9..00000000 --- a/platform/winrt/mupdf_cpp/DocumentPage.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "pch.h" -#include "DocumentPage.h" - -namespace mupdf_cpp -{ - DocumentPage::DocumentPage(void) - { - this->Image = nullptr; - this->Height = 0; - this->Width = 0; - this->PageZoom = 1.0; - this->Content = NOTSET; - _isPropertyChangedObserved = false; - } -} diff --git a/platform/winrt/mupdf_cpp/DocumentPage.h b/platform/winrt/mupdf_cpp/DocumentPage.h deleted file mode 100644 index 383d63d1..00000000 --- a/platform/winrt/mupdf_cpp/DocumentPage.h +++ /dev/null @@ -1,231 +0,0 @@ -#pragma once - -#include "RectList.h" -#include - -/* Used for binding to the xaml in the scroll view. */ -using namespace Windows::UI::Xaml::Media::Imaging; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::Foundation::Collections; -using namespace Windows::UI::Xaml::Data; - -typedef enum { - FULL_RESOLUTION = 0, - THUMBNAIL, - DUMMY, - OLD_RESOLUTION, - PRINT_PREVIEW, - NOTSET -} Page_Content_t; - -namespace mupdf_cpp -{ - // enables data binding with this class - [Windows::UI::Xaml::Data::Bindable] - public ref class DocumentPage sealed : Windows::UI::Xaml::Data::INotifyPropertyChanged - { - private: - int height; - int width; - double page_zoom; - int native_height; - int native_width; - WriteableBitmap^ image; - Page_Content_t content; - IVector^ textbox; - IVector^ linkbox; - public: - DocumentPage(void); - - /* Note IVector needed for WinRT interface */ - property IVector^ TextBox - { - IVector^ get() - { - return (textbox); - } - - void set(IVector^ value) - { - textbox = value; - DocumentPage::OnPropertyChanged("TextBox"); - } - } - - property IVector^ LinkBox - { - IVector^ get() - { - return (linkbox); - } - - void set(IVector^ value) - { - linkbox = value; - DocumentPage::OnPropertyChanged("LinkBox"); - } - } - - property int Content - { - int get() - { - return ((int) content); - } - - void set(int value) - { - if (value > NOTSET) - { - throw ref new Platform::InvalidArgumentException(); - } - content = (Page_Content_t) value; - } - } - - property int Height - { - int get() - { - return height; - } - - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - height = value; - } - } - - property int Width - { - int get() - { - return width; - } - - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - width = value; - } - } - property int NativeHeight - { - int get() - { - return native_height; - } - - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - native_height = value; - } - } - - property int NativeWidth - { - int get() - { - return native_width; - } - - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - native_width = value; - } - } - - property double PageZoom - { - double get() - { - return page_zoom; - } - - void set(double value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - page_zoom = value; - } - } - - property WriteableBitmap^ Image - { - WriteableBitmap^ get() - { - return image; - } - - void set(WriteableBitmap^ value) - { - image = value; - DocumentPage::OnPropertyChanged("Image"); - } - } - - private: - bool _isPropertyChangedObserved; - event Windows::UI::Xaml::Data::PropertyChangedEventHandler^ _privatePropertyChanged; - - protected: - /// - /// Notifies listeners that a property value has changed. - /// - /// Name of the property used to notify listeners. - void OnPropertyChanged(String^ propertyName) - { - if (_isPropertyChangedObserved) - { - PropertyChanged(this, ref new PropertyChangedEventArgs(propertyName)); - } - } - - public: - - // in c++, it is not neccessary to include definitions - // of add, remove, and raise. These definitions have - // been made explicitly here so that we can check if - // the event has listeners before firing the event. - virtual event Windows::UI::Xaml::Data::PropertyChangedEventHandler^ PropertyChanged - { - virtual Windows::Foundation::EventRegistrationToken add(Windows::UI::Xaml::Data::PropertyChangedEventHandler^ e) - { - _isPropertyChangedObserved = true; - return _privatePropertyChanged += e; - } - - virtual void remove(Windows::Foundation::EventRegistrationToken t) - { - _privatePropertyChanged -= t; - } - - protected: - virtual void raise(Object^ sender, Windows::UI::Xaml::Data::PropertyChangedEventArgs^ e) - { - if (_isPropertyChangedObserved) - { - _privatePropertyChanged(sender, e); - } - } - } -#pragma endregion - }; -} diff --git a/platform/winrt/mupdf_cpp/MainPage.xaml b/platform/winrt/mupdf_cpp/MainPage.xaml deleted file mode 100644 index 42296f6a..00000000 --- a/platform/winrt/mupdf_cpp/MainPage.xaml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/winrt/mupdf_cpp/MainPage.xaml.cpp b/platform/winrt/mupdf_cpp/MainPage.xaml.cpp deleted file mode 100644 index a57a7a23..00000000 --- a/platform/winrt/mupdf_cpp/MainPage.xaml.cpp +++ /dev/null @@ -1,2394 +0,0 @@ -// -// MainPage.xaml.cpp -// Implementation of the MainPage class. -// - -#include "pch.h" -#include "MainPage.xaml.h" -#include -#include -#include "DXGI1_3.h" - -#define LOOK_AHEAD 1 /* A +/- count on the pages to pre-render */ -#define THUMB_PREADD 10 -#define MIN_SCALE 0.5 - -#define SCALE_THUMB 0.1 -#define PRINT_PREVIEW_SCALE 0.5 - -#define BLANK_WIDTH 17 -#define BLANK_HEIGHT 22 - -#define KEYBOARD_ZOOM_STEP 0.25 -#define ZOOM_MAX 4 -#define ZOOM_MIN 0.25 - -#define KEY_PLUS 0xbb -#define KEY_MINUS 0xbd -#define ZOOM_IN 0 -#define ZOOM_OUT 1 - -#define SEARCH_FIT 672 -#define VS_LARGE 1366 -#define VS_SMALL 500 - -static float screenScale = 1; - -using namespace mupdf_cpp; -using namespace Windows::Foundation; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Controls::Primitives; -using namespace Windows::UI::Xaml::Data; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Navigation; -using namespace Windows::Graphics::Display; -using namespace Windows::Graphics::Printing; -using namespace Windows::UI::Core; - -//****************** Added ***************** -using namespace Windows::Storage::Pickers; -using namespace Windows::Devices::Enumeration; -using namespace concurrency; -using namespace Windows::Graphics::Imaging; -//****************** End Add **************** - -#ifndef NDEBUG -unsigned int _mainThreadId = 0U; - -#ifdef __cplusplus -extern "C" { -#endif - - // The IsMainThread function returns true if the current thread is the app's main thread and false otherwise. - bool IsMainThread() - { - return (_mainThreadId == GetCurrentThreadId()); - } - - // The IsBackgroundThread function returns false if the current thread is the app's main thread and true otherwise. - bool IsBackgroundThread() - { - return (_mainThreadId != GetCurrentThreadId()); - } - - // The RecordMainThread function registers the main thread ID for use by the IsMainThread and IsBackgroundThread functions. - void RecordMainThread() - { - _mainThreadId = GetCurrentThreadId(); - } - -#ifdef __cplusplus -} -#endif - -#endif /* not NDEBUG */ - -MainPage::MainPage() -{ - InitializeComponent(); - Application::Current->Suspending += - ref new SuspendingEventHandler(this, &MainPage::App_Suspending); - Application::Current->UnhandledException += - ref new UnhandledExceptionEventHandler(this, &MainPage::ExceptionHandler); - m_textcolor="#402572AC"; - m_linkcolor="#40AC7225"; - mu_doc = nullptr; - m_docPages = ref new Platform::Collections::Vector(); - m_thumbnails = ref new Platform::Collections::Vector(); - m_page_link_list = ref new Platform::Collections::Vector^>(); - m_text_list = ref new Platform::Collections::Vector(); - m_linkset = ref new Platform::Collections::Vector(); - if (m_docPages == nullptr || m_thumbnails == nullptr || - m_page_link_list == nullptr || m_text_list == nullptr || - m_linkset == nullptr) - throw ref new FailureException("Document allocation failed!"); - - SetUpDirectX(); - RegisterForPrinting(); - CleanUp(); -#ifndef NDEBUG - RecordMainThread(); -#endif - /* So that we can catch special loading events (e.g. open with) */ - _pageLoadedHandlerToken = Loaded += ref new RoutedEventHandler(this, &MainPage::Page_Loaded); -} - -/* You need a Direct3D device to create a Direct2D device. This gets stuff - set up for Direct2D printing support */ -void MainPage::SetUpDirectX() -{ - UINT creation_flags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; - ComPtr dxgi_device; - D2D1_FACTORY_OPTIONS options; - ZeroMemory(&options, sizeof(D2D1_FACTORY_OPTIONS)); - D3D_FEATURE_LEVEL feature_levels[] = - { - D3D_FEATURE_LEVEL_11_1, - D3D_FEATURE_LEVEL_11_0, - D3D_FEATURE_LEVEL_10_1, - D3D_FEATURE_LEVEL_10_0, - D3D_FEATURE_LEVEL_9_3, - D3D_FEATURE_LEVEL_9_2, - D3D_FEATURE_LEVEL_9_1 - }; - ComPtr device; - ComPtr context; - -#if defined(_DEBUG) - options.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION; -#endif - - ThrowIfFailed(D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, 0, - creation_flags, feature_levels, ARRAYSIZE(feature_levels), - D3D11_SDK_VERSION, &device, &m_featureLevel, &context)); - ThrowIfFailed(device.As(&m_d3d_device)); - ThrowIfFailed(context.As(&m_d3d_context)); - ThrowIfFailed(m_d3d_device.As(&dxgi_device)); - ThrowIfFailed(D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, - __uuidof(ID2D1Factory1), &options, &m_d2d_factory)); - ThrowIfFailed(CoCreateInstance(CLSID_WICImagingFactory, nullptr, - CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&m_wic_factory))); - m_d2d_factory->CreateDevice(dxgi_device.Get(), &m_d2d_device); -} - -/* Used during launch of application from file when application was not - already running */ -void MainPage::Page_Loaded(Object^ sender, RoutedEventArgs^ e) -{ - MainPage^ rootPage = dynamic_cast(sender); - if (rootPage->FileEvent != nullptr) - { - /* Launched with an "open with", or as default app */ - if (rootPage->FileEvent->Files->Size > 0) - { - IStorageItem ^file = rootPage->FileEvent->Files->GetAt(0); - StorageFile ^sfile = safe_cast(file); - - OpenDocumentPrep(sfile); - } - } -} - -/* Used during launch of application from file when application was already - running */ -void MainPage::FromFile() -{ - if (this->FileEvent != nullptr) - { - /* Launched with an "open with", or as default app */ - if (this->FileEvent->Files->Size > 0) - { - IStorageItem ^file = this->FileEvent->Files->GetAt(0); - StorageFile ^sfile = safe_cast(file); - - OpenDocumentPrep(sfile); - } - } -} - -/// -/// Invoked when this page is about to be displayed in a Frame. -/// -/// Event data that describes how this page was reached. The Parameter -/// property is typically used to configure the page. -void MainPage::OnNavigatedTo(NavigationEventArgs^ e) -{ - -} - -void MainPage::ExceptionHandler(Object^ sender, UnhandledExceptionEventArgs^ e) -{ - if (!this->m_init_done) - { - /* Windows 8.1 has some weird issues that occur before we have even tried - to open a document. For example rolling the mouse wheel throws an - exception in 8.1 but not 8.0. This is clearly a windows issue. For - now mark as handled and move on which seems to be fine */ - e->Handled = true; - } - else - { - e->Handled = true; - NotifyUser("An error was encountered", ErrorMessage); - } -} - -/* We need to clean up (Trim) the directX memory on suspension */ -void MainPage::App_Suspending(Object^ sender, SuspendingEventArgs^ e) -{ - ComPtr pDXGIDevice; - ThrowIfFailed(m_d3d_device.As(&pDXGIDevice)); - pDXGIDevice->Trim(); -} - -void MainPage::ExitInvokedHandler(Windows::UI::Popups::IUICommand^ command) -{ - -} - -void MainPage::OKInvokedHandler(Windows::UI::Popups::IUICommand^ command) -{ - -} - -void MainPage::NotifyUser(String^ strMessage, int type) -{ - MessageDialog^ msg = ref new MessageDialog(strMessage); - UICommand^ ExitCommand = nullptr; - UICommand^ OKCommand = nullptr; - - switch (type) - { - case StatusMessage: - OKCommand = ref new UICommand("OK", - ref new UICommandInvokedHandler(this, &MainPage::OKInvokedHandler)); - msg->Commands->Append(OKCommand); - /// Set the command that will be invoked by default - msg->DefaultCommandIndex = 0; - // Set the command to be invoked when escape is pressed - msg->CancelCommandIndex = 1; - break; - case ErrorMessage: - ExitCommand = ref new UICommand("Exit", - ref new UICommandInvokedHandler(this, &MainPage::ExitInvokedHandler)); - msg->Commands->Append(ExitCommand); - /// Set the command that will be invoked by default - msg->DefaultCommandIndex = 0; - // Set the command to be invoked when escape is pressed - msg->CancelCommandIndex = 1; - break; - default: - break; - } - // Show the message dialog - msg->ShowAsync(); -} - -void MainPage::Picker(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - /* If we are actively rendering a document to the print thread then notify the - user that they will need to wait */ - if (m_print_active == PRINT_ACTIVE) - { - int total_pages = GetPrintPageCount(); - auto str1 = "Cannot open new file. Currently rendering page " + - m_curr_print_count + " of " + total_pages + " for print queue"; - NotifyUser(str1, StatusMessage); - return; - } - - FileOpenPicker^ openPicker = ref new FileOpenPicker(); - openPicker->ViewMode = PickerViewMode::List; - openPicker->SuggestedStartLocation = PickerLocationId::DocumentsLibrary; - openPicker->FileTypeFilter->Append(".pdf"); - openPicker->FileTypeFilter->Append(".xps"); - openPicker->FileTypeFilter->Append(".cbz"); - openPicker->FileTypeFilter->Append(".oxps"); - - create_task(openPicker->PickSingleFileAsync()).then([this](StorageFile^ file) - { - if (file) - { - this->OpenDocumentPrep(file); - } - else - { - /* Nothing selected */ - } - }); -} - -/* Set the page with the new raster information */ -void MainPage::UpdatePage(int page_num, InMemoryRandomAccessStream^ ras, - Point ras_size, Page_Content_t content_type, double zoom_in) -{ - assert(IsMainThread()); - - WriteableBitmap ^bmp = ref new WriteableBitmap((int)ras_size.X, (int) ras_size.Y); - if (bmp == nullptr) - { -#ifdef _DEBUG - NotifyUser("BMP UpdatePage Failed Page " + page_num, ErrorMessage); -#endif - return; - } - bmp->SetSource(ras); - - DocumentPage^ doc_page = ref new DocumentPage(); - if (doc_page == nullptr) - { -#ifdef _DEBUG - NotifyUser("doc_page UpdatePage Failed Page " + page_num, ErrorMessage); -#endif - return; - } - doc_page->Image = bmp; - - if (content_type == THUMBNAIL) - { - doc_page->Height = (int) (ras_size.Y / SCALE_THUMB); - doc_page->Width = (int) (ras_size.X / SCALE_THUMB); - } - else - { - doc_page->Height = (int) ras_size.Y; - doc_page->Width = (int) ras_size.X; - } - doc_page->Content = content_type; - doc_page->PageZoom = zoom_in; - - /* We do not want flipview change notification to occur for ourselves */ - m_page_update = true; - this->m_docPages->SetAt(page_num, doc_page); - m_page_update = false; -} - -/* Set the page with the new raster information but only the image data */ -void MainPage::ReplaceImage(int page_num, InMemoryRandomAccessStream^ ras, - Point ras_size, double page_zoom) -{ - assert(IsMainThread()); - - WriteableBitmap ^bmp = ref new WriteableBitmap((int) ras_size.X, (int) ras_size.Y); - if (bmp == nullptr) - { -#ifdef _DEBUG - NotifyUser("BMP ReplaceImage Failed Page " + page_num, ErrorMessage); -#endif - return; - } - - bmp->SetSource(ras); - DocumentPage^ doc_page = this->m_docPages->GetAt(page_num); - if (doc_page == nullptr) - { -#ifdef _DEBUG - NotifyUser("doc_page ReplaceImage Failed Page " + page_num, ErrorMessage); -#endif - return; - } - doc_page->Image = bmp; - doc_page->Height = (int) ras_size.Y; - doc_page->Width = (int) ras_size.X; - doc_page->PageZoom = page_zoom; -} - -int MainPage::ComputePageSize(spatial_info_t spatial_info, int page_num, - Point *render_size, float *scale_factor) -{ - Point screenSize; - Point renpageSize; - Point size; - - try - { - size = mu_doc->GetPageSize(page_num); - } - catch (Exception ^except) - { -#ifdef _DEBUG - NotifyUser(except->Message, ErrorMessage); -#endif - return E_FAILURE; - } - - screenSize = spatial_info.size; - screenSize.Y *= screenScale; - screenSize.X *= screenScale; - - float hscale = screenSize.X / size.X; - float vscale = screenSize.Y / size.Y; - float scale = min(hscale, vscale); - renpageSize.X = (float)(size.X * scale * spatial_info.scale_factor); - renpageSize.Y = (float)(size.Y * scale * spatial_info.scale_factor); - - *scale_factor = (float) (scale * spatial_info.scale_factor); - *render_size = renpageSize; - - return S_ISOK; -} - -static Point fitPageToScreen(Point page, Point screen) -{ - Point pageSize; - - float hscale = screen.X / page.X; - float vscale = screen.Y / page.Y; - float scale = min(hscale, vscale); - pageSize.X = floorf(page.X * scale) / page.X; - pageSize.Y = floorf(page.Y * scale) / page.Y; - - return pageSize; -} - -spatial_info_t MainPage::InitSpatial(double scale) -{ - spatial_info_t value; - - value.size.Y = (float) (this->ActualHeight); - value.size.X = (float) (this->ActualWidth); - value.scale_factor = scale; - - return value; -} - -void Prepare_bmp(int width, int height, DataWriter ^dw) -{ - int row_size = width * 4; - int bmp_size = row_size * height + 54; - - dw->WriteString("BM"); - dw->ByteOrder = ByteOrder::LittleEndian; - dw->WriteInt32(bmp_size); - dw->WriteInt16(0); - dw->WriteInt16(0); - dw->WriteInt32(54); - dw->WriteInt32(40); - dw->WriteInt32(width); - dw->WriteInt32(height); - dw->WriteInt16(1); - dw->WriteInt16(32); - dw->WriteInt32(0); - dw->WriteInt32(row_size * height); - dw->WriteInt32(2835); - dw->WriteInt32(2835); - dw->WriteInt32(0); - dw->WriteInt32(0); -} - -void MainPage::ReleasePages(int old_page, int new_page) -{ - if (old_page == new_page) return; - /* To keep from having memory issue reset the page back to - the thumb if we are done rendering the thumbnails */ - for (int k = old_page - LOOK_AHEAD; k <= old_page + LOOK_AHEAD; k++) - { - if (k < new_page - LOOK_AHEAD || k > new_page + LOOK_AHEAD) - { - if (k >= 0 && k < this->m_num_pages) - { - SetThumb(k); - } - } - } -} - -/* Return this page from a full res image to the thumb image or only set - to thumb if it has not already been set */ -void MainPage::SetThumb(unsigned int page_num) -{ - /* See what is there now */ - auto doc = this->m_docPages->GetAt(page_num); - if (doc->Content == THUMBNAIL && doc->PageZoom == m_doczoom) return; - - if (this->m_thumbnails->Size > page_num) - { - m_page_update = true; - auto thumb_page = this->m_thumbnails->GetAt(page_num); - thumb_page->Height = (int)(thumb_page->NativeHeight * m_doczoom); - thumb_page->Width = (int)(thumb_page->NativeWidth * m_doczoom); - thumb_page->PageZoom = 1.0; - this->m_docPages->SetAt(page_num, thumb_page); - m_page_update = false; - } -} - -/* Initializes the flipview items with the thumb pages as they become - available */ -void MainPage::SetThumbInit(unsigned int page_num) -{ - /* See what is there now */ - auto doc = this->m_docPages->GetAt(page_num); - if (doc->Content == THUMBNAIL || doc->Content == FULL_RESOLUTION) return; - - if (this->m_thumbnails->Size > page_num) - { - doc->Content = THUMBNAIL; - auto thumb_page = this->m_thumbnails->GetAt(page_num); - thumb_page->Height = (int)(thumb_page->NativeHeight); - thumb_page->Width = (int)(thumb_page->NativeWidth); - doc->Image = thumb_page->Image; - doc->Height = thumb_page->Height; - doc->Width = thumb_page->Width; - doc->PageZoom = 1.0; - } -} - -/* Create white image for us to use as place holder in large document for flip - view filling instead of the thumbnail image */ -void MainPage::CreateBlank(int width, int height) -{ - Array^ bmp_data = ref new Array(height * 4 * width); - if (bmp_data == nullptr) - { -#ifdef _DEBUG - NotifyUser("CreateBlank failed", ErrorMessage); -#endif - return; - } - /* Set up the memory stream */ - WriteableBitmap ^bmp = ref new WriteableBitmap(width, height); - InMemoryRandomAccessStream ^ras = ref new InMemoryRandomAccessStream(); - if (bmp == nullptr || ras == nullptr) - { -#ifdef _DEBUG - NotifyUser("CreateBlank failed", ErrorMessage); -#endif - return; - } - DataWriter ^dw = ref new DataWriter(ras->GetOutputStreamAt(0)); - if (dw == nullptr) - { -#ifdef _DEBUG - NotifyUser("CreateBlank failed", ErrorMessage); -#endif - return; - } /* Go ahead and write our header data into the memory stream */ - Prepare_bmp(width, height, dw); - - /* Set the data to all white */ - memset(bmp_data->Data, 255, height * 4 * width); - - /* Write the data */ - dw->WriteBytes(bmp_data); - - DataWriterStoreOperation^ result = dw->StoreAsync(); - /* Block on the Async call */ - while(result->Status != Windows::Foundation::AsyncStatus::Completed) { - } - /* And store in a the image brush */ - bmp->SetSource(ras); - m_BlankBmp = bmp; -} - -void MainPage::SetFlipView() -{ - int height = (int) (this->ActualHeight); - int width = (int) (this->ActualWidth); - - CreateBlank(BLANK_WIDTH, BLANK_HEIGHT); - /* Set the current flip view mode */ - if (height > width) - this->m_curr_flipView = xaml_vert_flipView; - else - this->m_curr_flipView = xaml_horiz_flipView; -} - -/* Clean up everything as we are opening a new document after having another - one open */ -void MainPage::CleanUp() -{ - m_init_done = false; - /* Remove current pages in the flipviews */ - if (m_docPages != nullptr && m_docPages->Size > 0) - m_docPages->Clear(); - if (m_thumbnails != nullptr && m_thumbnails->Size > 0) - m_thumbnails->Clear(); - /* With the ref counting this should not leak */ - if (m_page_link_list != nullptr && m_page_link_list->Size > 0) - m_page_link_list->Clear(); - if (m_text_list->Size > 0) - m_text_list->Clear(); - m_ppage_num_list.clear(); - - if (m_linkset != nullptr && m_linkset->Size > 0) - m_linkset->Clear(); - - if (this->mu_doc != nullptr) - mu_doc->CleanUp(); - - mu_doc = ref new mudocument(); - if (mu_doc == nullptr) - throw ref new FailureException("Document allocation failed!"); - - this->m_curr_flipView = nullptr; - m_currpage = -1; - m_file_open = false; - m_slider_min = 0; - m_slider_max = 0; - m_memory_use = 0; - m_insearch = false; - m_search_active = false; - m_sliderchange = false; - m_flip_from_searchlink = false; - m_num_pages = -1; - m_search_rect_count = 0; - m_ren_status = REN_AVAILABLE; - m_links_on = false; - m_rectlist_page = -1; - m_Progress = 0.0; - m_doczoom = 1.0; - m_print_active = PRINT_INACTIVE; - m_curr_print_count = 1; - - this->xaml_PageSlider->Minimum = m_slider_min; - this->xaml_PageSlider->Maximum = m_slider_max; - this->xaml_PageSlider->IsEnabled = false; -} - -/* Create the thumbnail images */ -void MainPage::RenderThumbs() -{ - spatial_info_t spatial_info = this->InitSpatial(1); - int num_pages = this->m_num_pages; - cancellation_token_source cts; - auto token = cts.get_token(); - m_ThumbCancel = cts; - auto ui = task_continuation_context::use_current(); - - this->m_ren_status = REN_THUMBS; - auto task_thumb = create_task([spatial_info, num_pages, this, ui, token]()-> int - { - spatial_info_t spatial_info_local = spatial_info; - Point ras_size; - Array^ bmp_data; - int code; - float scale_factor; - - /* The renderings run on a background thread */ - assert(IsBackgroundThread()); - spatial_info_local.scale_factor = SCALE_THUMB; - - for (int k = 0; k < num_pages; k++) - { - if (ComputePageSize(spatial_info_local, k, &ras_size, &scale_factor) == S_ISOK) - { - code = mu_doc->RenderPageBitmapSync(k, (int)ras_size.X, - (int)ras_size.Y, scale_factor, false, true, false, { 0, 0 }, - { ras_size.X, ras_size.Y }, &bmp_data); - - DocumentPage^ doc_page = ref new DocumentPage(); - doc_page->Height = (int)(ras_size.Y / SCALE_THUMB); - doc_page->Width = (int)(ras_size.X / SCALE_THUMB); - doc_page->NativeHeight = (int)(ras_size.Y / SCALE_THUMB); - doc_page->NativeWidth = (int)(ras_size.X / SCALE_THUMB); - doc_page->TextBox = nullptr; - doc_page->LinkBox = nullptr; - doc_page->Content = THUMBNAIL; - - InMemoryRandomAccessStream ^ras = ref new InMemoryRandomAccessStream(); - DataWriter ^dw = ref new DataWriter(ras->GetOutputStreamAt(0)); - Prepare_bmp((int)ras_size.X, (int)ras_size.Y, dw); - dw->WriteBytes(bmp_data); - auto t = create_task(dw->StoreAsync()); - t.wait(); - - /* The update with the WriteableBitmap has to take place in the - UI thread. The fact that you cannot create a WriteableBitmap - object execept in the UI thread is a poor design in WinRT. - We will do the callback but with a low priority */ - this->Dispatcher->RunAsync(CoreDispatcherPriority::Low, - ref new DispatchedHandler([this, ras_size, k, ras, doc_page]() - { - assert(IsMainThread()); - WriteableBitmap ^bmp = ref new WriteableBitmap((int)ras_size.X, (int)ras_size.Y); - bmp->SetSource(ras); - doc_page->Image = bmp; - m_thumbnails->SetAt(k, doc_page); - SetThumbInit((unsigned int) k); - })); - } - } - return num_pages; /* all done with thumbnails! */ - }, token).then([this](task the_task) - { - /* Finish adding them, but not if we were cancelled. */ - this->m_ren_status = REN_AVAILABLE; - bool is_cancelled = false; - try - { - the_task.get(); - } - catch (const task_canceled& e) - { - (void)e; // Unused parameter - is_cancelled = true; - } - }, task_continuation_context::use_current()); -} - -void MainPage::OpenDocumentPrep(StorageFile^ file) -{ - if (this->m_num_pages != -1) - { - m_init_done = false; - - /* Set the index to the start of the document */ - this->xaml_vert_flipView->SelectedIndex = 0; - this->xaml_horiz_flipView->SelectedIndex = 0; - - /* If the thumbnail thread is running then we need to end that first */ - RenderingStatus_t *ren_status = &m_ren_status; - cancellation_token_source *ThumbCancel = &m_ThumbCancel; - - /* Create a task to wait until the renderer is available, then clean up then open */ - auto t = create_task([ren_status, ThumbCancel]()->int - { - if (*ren_status == REN_THUMBS) - ThumbCancel->cancel(); - while (*ren_status != REN_AVAILABLE) { - } - return 0; - }).then([this](task the_task) - { - CleanUp(); - return 0; - }, task_continuation_context::use_current()).then([this, file](task the_task) - { - OpenDocument(file); - }, task_continuation_context::use_current()); - } - else - { - OpenDocument(file); - } -} - -void MainPage::OpenDocument(StorageFile^ file) -{ - this->SetFlipView(); - - /* Open document and when open, push on */ - auto open_task = create_task(mu_doc->OpenFileAsync(file)); - open_task.then([this](int code) -> int - { - assert(IsMainThread()); - if (code != S_ISOK) - { - return code; - } - /* We need to check if password is required */ - if (mu_doc->RequiresPassword()) - { - xaml_PasswordStack->Visibility = Windows::UI::Xaml::Visibility::Visible; - return E_NEEDPASSWORD; - } - else - { - xaml_PasswordStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - return S_ISOK; - } - }).then([this](int code)->int - { - assert(IsMainThread()); - if (code == S_ISOK) - InitialRender(); - return code; - }, task_continuation_context::use_current()).then([this](int code) - { - if (code == S_ISOK) - RenderThumbs(); - else - { - if (code != E_NEEDPASSWORD) - { - NotifyUser("Sorry, an issue was encountered in opening file", - StatusMessage); - } - } - }, task_continuation_context::use_current()); -} - -void MainPage::InitialRender() -{ - assert(IsMainThread()); - m_num_pages = mu_doc->GetNumPages(); - - if ((m_currpage) >= m_num_pages) - { - m_currpage = m_num_pages - 1; - } - else if (m_currpage < 0) - { - m_currpage = 0; - } - /* Initialize all the flipvew items with blanks and the thumbnails. */ - for (int k = 0; k < m_num_pages; k++) - { - /* Blank pages */ - DocumentPage^ doc_page = ref new DocumentPage(); - Vector^ temp_link = ref new Vector(); - if (doc_page == nullptr || temp_link == nullptr) - throw ref new FailureException("Document allocation failed!"); - doc_page->Image = m_BlankBmp; - doc_page->Height = BLANK_HEIGHT; - doc_page->Width = BLANK_WIDTH; - doc_page->NativeHeight = BLANK_HEIGHT; - doc_page->NativeWidth = BLANK_WIDTH; - doc_page->Content = DUMMY; - doc_page->TextBox = nullptr; - doc_page->LinkBox = nullptr; - m_docPages->Append(doc_page); - m_thumbnails->Append(doc_page); - /* Create empty lists for our links and specify that they have - not been computed for these pages */ - m_page_link_list->Append(temp_link); - m_linkset->Append(false); - } - - this->xaml_horiz_flipView->ItemsSource = m_docPages; - this->xaml_vert_flipView->ItemsSource = m_docPages; - - /* Do the first few pages, then start the thumbs */ - spatial_info_t spatial_info = InitSpatial(1); - for (int k = 0; k < LOOK_AHEAD + 2; k++) - { - if (m_num_pages > k ) - { - Point ras_size; - float scale_factor; - - if (ComputePageSize(spatial_info, k, &ras_size, &scale_factor) == S_ISOK) - { - auto render_task = create_task(mu_doc->RenderPageAsync(k, (int)ras_size.X, (int)ras_size.Y, true, scale_factor)); - render_task.then([this, k, ras_size](InMemoryRandomAccessStream^ ras) - { - if (ras != nullptr) - UpdatePage(k, ras, ras_size, FULL_RESOLUTION, 1.0); - }, task_continuation_context::use_current()); - } - } - } - /* Update the slider settings, if more than one page */ - if (m_num_pages > 1) - { - this->xaml_PageSlider->Maximum = m_num_pages; - this->xaml_PageSlider->Minimum = 1; - this->xaml_PageSlider->IsEnabled = true; - } - else - { - this->xaml_PageSlider->Maximum = 0; - this->xaml_PageSlider->Minimum = 0; - this->xaml_PageSlider->IsEnabled = false; - } - /* All done with initial pages */ - this->m_init_done = true; -} - -void MainPage::RenderRange(int curr_page) -{ - /* Render +/- the look ahead from where we are if blank page is present */ - spatial_info_t spatial_info = InitSpatial(m_doczoom); - bool curr_page_rendered = true; - int range = LOOK_AHEAD; - - assert(IsMainThread()); - if (m_flip_from_searchlink) - range = 0; - for (int k = curr_page - LOOK_AHEAD; k <= curr_page + LOOK_AHEAD; k++) - { - if (k >= 0 && k < m_num_pages) - { - /* Check if page is already rendered */ - auto doc = this->m_docPages->GetAt(k); - if (doc->Content != FULL_RESOLUTION || - doc->PageZoom != m_doczoom) - { - Point ras_size; - float scale_factor; - if (ComputePageSize(spatial_info, k, &ras_size, &scale_factor) == S_ISOK) - { - double zoom = m_doczoom; - auto render_task = create_task(mu_doc->RenderPageAsync(k, (int)ras_size.X, (int)ras_size.Y, true, scale_factor)); - render_task.then([this, k, ras_size, zoom, curr_page](InMemoryRandomAccessStream^ ras) - { - if (ras != nullptr) - { - Point new_ras_size = ras_size; - - /* This is so that the scroll update will apply the zoom - keeping us in-sync. And making sure that we can't - exceed our limits with keyboard vs touch. I.e. any - resolution changes must go through the scrollviewer. - It makes the upcoming page appear to come in at its - zoom level of 1.0 but it is smoothly scaled to the - current scale resolution. */ - new_ras_size.X = (float) (new_ras_size.X / zoom); - new_ras_size.Y = (float)(new_ras_size.Y / zoom); - UpdatePage(k, ras, new_ras_size, FULL_RESOLUTION, zoom); - } - }, task_continuation_context::use_current()).then([this, k, curr_page]() - { - if (k == curr_page && this->m_links_on) - AddLinkCanvas(); - if (k == curr_page && this->m_text_list->Size > 0 && - m_flip_from_searchlink) - { - AddTextCanvas(); - m_flip_from_searchlink = false; - } - if (k == curr_page) - { - m_curr_flipView->UpdateLayout(); - UpdateZoom(); - } - }, task_continuation_context::use_current()); - - } - } - else - { - /* We did not need to render the curr_page, so add links below if - needed. Otherwise, we need to wait for the task above to - complete before we add the links. */ - if (k == curr_page) - { - curr_page_rendered = false; - UpdateZoom(); - } - } - } - } - m_currpage = curr_page; - if (this->m_links_on && !curr_page_rendered) - AddLinkCanvas(); - if (this->m_text_list->Size > 0 && !curr_page_rendered && m_flip_from_searchlink) - { - AddTextCanvas(); - m_flip_from_searchlink = false; - } -} - -void MainPage::FlipView_SelectionChanged(Object^ sender, SelectionChangedEventArgs^ e) -{ - if (m_init_done && !m_page_update) - { - int pos = this->m_curr_flipView->SelectedIndex; - - if (pos >= 0) - { - if (xaml_PageSlider->IsEnabled) - { - xaml_PageSlider->Value = pos + 1; - } - if (m_sliderchange) - { - m_sliderchange = false; - return; - } - else - { - /* Make sure to clear any text search */ - auto doc_old = this->m_docPages->GetAt(m_currpage); - doc_old->TextBox = nullptr; - } - /* Get the current page */ - int curr_page = this->m_currpage; - this->m_currpage = pos; - this->RenderRange(pos); - this->ReleasePages(curr_page, pos); - } - } -} - -/* Slider via drag */ -void MainPage::Slider_ValueChanged(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) -{ - Slider_Common(); -} - -/* Slider via keyboard */ -void MainPage::Slider_Key(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) -{ - Slider_Common(); -} - -void MainPage::Slider_Common() -{ - if (IsNotStandardView() || m_currpage == this->xaml_PageSlider->Value - 1) - return; - - int newValue = (int) this->xaml_PageSlider->Value - 1; /* zero based */ - - if (m_init_done && this->xaml_PageSlider->IsEnabled) - { - this->m_curr_flipView->SelectedIndex = (int) (this->xaml_PageSlider->Value - 1); - } - return; -} - -/* Search Related Code */ -void MainPage::Searcher(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - ShowSearchBox(); - UpdateAppBarButtonViewState(); -} - -void MainPage::ShowSearchBox() -{ - /* Update the app bar so that we can do the search */ - StackPanel^ leftPanel = (StackPanel^) this->TopAppBar->FindName("LeftPanel"); - - if (leftPanel != nullptr && m_insearch) - { - m_insearch = false; - FindBox->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - PrevSearch->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - NextSearch->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - } - else if (leftPanel != nullptr && !m_insearch) - { - /* Search is not going to work in the squashed view */ - if (this->ActualWidth < SEARCH_FIT) - { - NotifyUser("Please enlarge application to use search", StatusMessage); - return; - } - m_insearch = true; - FindBox->Visibility = Windows::UI::Xaml::Visibility::Visible; - PrevSearch->Visibility = Windows::UI::Xaml::Visibility::Visible; - NextSearch->Visibility = Windows::UI::Xaml::Visibility::Visible; - } -} - -void MainPage::ClearTextSearch() -{ - /* Clear out any old search result */ - if (m_text_list->Size > 0) - m_text_list->Clear(); -} - -void MainPage::ShowSearchResults(int page_num, unsigned int box_count) -{ - int old_page = this->m_currpage; - int new_page = page_num; - - ClearTextSearch(); - - /* Compute any scalings */ - Point screenSize; - Point pageSize; - Point scale; - - screenSize.Y = (float) (this->ActualHeight); - screenSize.X = (float) (this->ActualWidth); - screenSize.X *= screenScale; - screenSize.Y *= screenScale; - - try - { - pageSize = mu_doc->GetPageSize(m_currpage); - } - catch (Exception ^except) - { -#ifdef _DEBUG - NotifyUser(except->Message, ErrorMessage); -#endif - return; - } - scale = fitPageToScreen(pageSize, screenSize); - auto doc_page = this->m_docPages->GetAt(old_page); - - /* Construct our list of rectangles */ - for (unsigned int k = 0; k < box_count; k++) - { - RectList^ rect_item = ref new RectList(); - if (rect_item == nullptr) - { - break; - } - auto curr_box = mu_doc->GetTextSearch(k); - - rect_item->Color = m_textcolor; - rect_item->Height = (int) (curr_box->LowerRight.Y - curr_box->UpperLeft.Y); - rect_item->Width = (int) (curr_box->LowerRight.X - curr_box->UpperLeft.X); - rect_item->X = (int) (curr_box->UpperLeft.X * scale.X); - rect_item->Y = (int) (curr_box->UpperLeft.Y * scale.Y); - rect_item->Width = (int)((double)rect_item->Width * scale.X); - rect_item->Height = (int)((double)rect_item->Height * scale.Y); - rect_item->Index = k.ToString(); - m_text_list->Append(rect_item); - } - /* Make sure the current page has its text results cleared */ - doc_page->TextBox = nullptr; - - /* Go ahead and set our doc item to this in the vertical and horizontal view */ - m_searchpage = new_page; - m_flip_from_searchlink = true; - - if (old_page == new_page) - { - FlipView_SelectionChanged(nullptr, nullptr); - } - else - { - this->m_curr_flipView->SelectedIndex = new_page; - } - return; -} - -void MainPage::SearchNext(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - if (IsNotStandardView()) - return; - - StackPanel^ leftPanel = (StackPanel^) this->TopAppBar->FindName("LeftPanel"); - TextBox^ findBox = (TextBox^) leftPanel->FindName("FindBox"); - String^ textToFind = findBox->Text; - - if (this->m_search_active == false && textToFind != nullptr) - SearchInDirection(1, textToFind); -} - -void MainPage::SearchPrev(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - if (IsNotStandardView()) - return; - - StackPanel^ leftPanel = (StackPanel^) this->TopAppBar->FindName("LeftPanel"); - TextBox^ findBox = (TextBox^) leftPanel->FindName("FindBox"); - String^ textToFind = findBox->Text; - - if (this->m_search_active == false && textToFind != nullptr) - SearchInDirection(-1, textToFind); -} - -void MainPage::CancelSearch(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - m_searchcts.cancel(); - xaml_ProgressStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - this->m_search_active = false; -} - -void MainPage::AddTextCanvas() -{ - /* Go ahead and set our doc item to this in the vertical and horizontal view */ - auto doc_page = this->m_docPages->GetAt(m_currpage); - assert(doc_page->Content == FULL_RESOLUTION); - if (doc_page->Content == FULL_RESOLUTION) // We should not be doing links for thumbnails - { - doc_page->TextBox = m_text_list; - } - this->m_search_active = false; -} - -void MainPage::SearchProgress(IAsyncOperationWithProgress^ operation, double status) -{ - xaml_Progress->Value = status; -} - -void MainPage::SearchInDirection(int dir, String^ textToFind) -{ - cancellation_token_source cts; - auto token = cts.get_token(); - m_searchcts = cts; - int pos = m_currpage; - int start; - - if (m_searchpage == pos) - start = pos + dir; - else - start = pos; - - if (start < 0) - return; - if (start > this->m_num_pages - 1) - return; - this->m_search_active = true; - - ProgressBar^ my_xaml_Progress = (ProgressBar^) (this->FindName("xaml_Progress")); - xaml_ProgressStack->Visibility = Windows::UI::Xaml::Visibility::Visible; - auto temp = mu_doc->SearchDocumentWithProgressAsync(textToFind, dir, start, - m_num_pages); - temp->Progress = ref new AsyncOperationProgressHandler(this, &MainPage::SearchProgress); - - auto search_task = create_task(temp, token); - - /* Do the continuation on the ui thread */ - auto con_task = search_task.then([this, textToFind](int page_num) - { - xaml_ProgressStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - if (page_num == TEXT_NOT_FOUND) - { - auto str1 = "\"" + textToFind + "\" Was Not Found In The Search"; - NotifyUser(str1, StatusMessage); - this->m_search_active = false; - } - else - { - int box_count = mu_doc->TextSearchCount(); - - if (box_count > 0) - { - this->ShowSearchResults(page_num, (unsigned int) box_count); - } - } - }, task_continuation_context::use_current()); -} - -/* This is here to handle when we rotate or go into the snapview mode */ -void MainPage::GridSizeChanged() -{ - int height = (int) (this->ActualHeight); - int width = (int) (this->ActualWidth); - FlipView^ old_flip = m_curr_flipView; - - if (TopAppBar1->IsOpen) - { - UpdateAppBarButtonViewState(); - } - - if (height > width) - { - m_curr_flipView = this->xaml_vert_flipView; - this->xaml_zoomCanvas->Height = height; - this->xaml_zoomCanvas->Width = width; - this->m_curr_flipView->Height = height; - this->m_curr_flipView->Width = width; - - xaml_vert_flipView->IsEnabled = true; - xaml_vert_flipView->Opacity = 1; - xaml_horiz_flipView->IsEnabled = false; - xaml_horiz_flipView->Opacity = 0; - } - else - { - m_curr_flipView = this->xaml_horiz_flipView; - this->xaml_zoomCanvas->Height = height; - this->xaml_zoomCanvas->Width = width; - this->m_curr_flipView->Height = height; - this->m_curr_flipView->Width = width; - - xaml_horiz_flipView->IsEnabled = true; - xaml_horiz_flipView->Opacity = 1; - xaml_vert_flipView->IsEnabled = false; - xaml_vert_flipView->Opacity = 0; - } - - if (xaml_WebView->Visibility == Windows::UI::Xaml::Visibility::Visible) - xaml_WebView->Height = xaml_OutsideGrid->ActualHeight; - - UpdateThumbSizes(); - - if (m_num_pages > 0 && old_flip != m_curr_flipView && old_flip != nullptr) - { - /* If links are on or off, we need to invalidate */ - ClearLinks(); - InvalidateLinks(); - - /* And force a rerender */ - for (int k = m_currpage - LOOK_AHEAD; k <= m_currpage + LOOK_AHEAD; k++) - { - if (k >= 0 && k < m_num_pages) - { - DocumentPage ^doc = this->m_docPages->GetAt(k); - doc->Content = OLD_RESOLUTION; - } - } - this->m_curr_flipView->SelectedIndex = this->m_currpage; - FlipView_SelectionChanged(nullptr, nullptr); - } -} - -void MainPage::UpdatePreRenderedPageSizes() -{ - if (m_num_pages > 0) - { - for (int k = m_currpage - LOOK_AHEAD; k <= m_currpage + LOOK_AHEAD; k++) - { - if (k >= 0 && k < m_num_pages && k != m_currpage) - { - DocumentPage ^doc = this->m_docPages->GetAt(k); - doc->Content = OLD_RESOLUTION; - int curr_height = doc->Height; - int curr_width = doc->Width; - - double scale_x = (double)curr_height / (double)(this->xaml_zoomCanvas->Height); - double scale_y = (double)curr_width / (double)(this->xaml_zoomCanvas->Width); - - double min_scale = max(scale_x, scale_y); - doc->Height = (int) (curr_height * m_doczoom / min_scale); - doc->Width = (int) (curr_width * m_doczoom / min_scale); - } - } - } -} - -void MainPage::UpdateThumbSizes() -{ - /* Reset the thumbview scaling values */ - if (m_num_pages > 0) - { - int num_items = m_docPages->Size; - for (int i = 0; i < num_items; i++) - { - DocumentPage ^thumb_page = m_docPages->GetAt(i); - if (thumb_page != nullptr && thumb_page->Image != nullptr - && thumb_page->Content == THUMBNAIL) - { - int curr_height = thumb_page->NativeHeight; - int curr_width = thumb_page->NativeWidth; - - double scale_x = (double)curr_height / (double)(this->xaml_zoomCanvas->Height); - double scale_y = (double)curr_width / (double)(this->xaml_zoomCanvas->Width); - - double min_scale = max(scale_x, scale_y); - thumb_page->Height = (int)(curr_height / min_scale); - thumb_page->Width = (int)(curr_width / min_scale); - } - } - } -}; - -/* Link related code */ -void MainPage::Linker(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - m_links_on = !m_links_on; - - if (!m_init_done || IsNotStandardView()) - return; - if (m_links_on) - AddLinkCanvas(); - else - ClearLinks(); -} - -void MainPage::ClearLinks() -{ - /* Make sure surrounding render pages lose their links */ - for (int k = m_currpage - LOOK_AHEAD; k <= m_currpage + LOOK_AHEAD; k++) - { - if (k >= 0 && k < m_num_pages) - { - auto doc_page = this->m_docPages->GetAt(k); - if (doc_page->Content == FULL_RESOLUTION) - { - doc_page->LinkBox = nullptr; - } - } - } -} - -void MainPage::InvalidateLinks() -{ - for (int k = 0; k < m_num_pages; k++) - m_linkset->SetAt(k, false); -} - -/* Add in the link rects. If we have not already computed them then do that now */ -void MainPage::AddLinkCanvas() -{ - /* See if the link object for this page has already been computed */ - int link_page = m_linkset->GetAt(m_currpage); - auto doc_page = this->m_docPages->GetAt(m_currpage); - - if (!link_page) - { - m_linkset->SetAt(m_currpage, true); - unsigned int num_links = mu_doc->ComputeLinks(m_currpage); - if (num_links == 0) return; - - Point screenSize; - Point pageSize; - Point scale; - - screenSize.Y = (float) (this->ActualHeight); - screenSize.X = (float)(this->ActualWidth); - screenSize.X *= screenScale; - screenSize.Y *= screenScale; - - try - { - pageSize = mu_doc->GetPageSize(m_currpage); - } - catch (Exception ^except) - { -#ifdef _DEBUG - NotifyUser(except->Message, ErrorMessage); -#endif - return; - } - scale = fitPageToScreen(pageSize, screenSize); - - /* Create a new RectList collection */ - auto link_list = ref new Platform::Collections::Vector(); - if (link_list == nullptr) - return; - - /* Now add the rects */ - for (unsigned int k = 0; k < num_links; k++) - { - auto curr_link = mu_doc->GetLink(k); - if (curr_link->Type != NOT_SET) - { - RectList^ rect_item = ref new RectList(); - if (rect_item == nullptr) - break; - rect_item->Color = m_linkcolor; - rect_item->Height = (int) (curr_link->LowerRight.Y - curr_link->UpperLeft.Y); - rect_item->Width = (int) (curr_link->LowerRight.X - curr_link->UpperLeft.X); - rect_item->X = (int) (curr_link->UpperLeft.X * scale.X); - rect_item->Y = (int) (curr_link->UpperLeft.Y * scale.Y); - rect_item->Width = (int)((double)rect_item->Width * scale.X); - rect_item->Height = (int)((double)rect_item->Height * scale.Y); - rect_item->Type = curr_link->Type; - rect_item->Urilink = curr_link->Uri; - rect_item->PageNum = curr_link->PageNum; - rect_item->Index = k.ToString(); - link_list->Append(rect_item); - } - } - /* Now set it in our list of links */ - m_page_link_list->SetAt(m_currpage, link_list); - } - /* Go ahead and set our doc item to this in the vertical and horizontal view */ - if (doc_page->LinkBox == nullptr) - { - if (doc_page->Content == FULL_RESOLUTION) // We should not be doing links for thumbnails - { - doc_page->LinkBox = m_page_link_list->GetAt(m_currpage); - } - } -} - -/* A link was tapped */ -void MainPage::LinkTapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e) -{ - Rectangle^ rect = safe_cast(e->OriginalSource); - String^ str_index = safe_cast(rect->Tag); - int index = (int) (_wtof(str_index->Data())); - - if (index >= 0 && index < m_num_pages) - { - auto link_list = m_page_link_list->GetAt(m_currpage); - auto link = link_list->GetAt(index); - - if (link->Type == LINK_GOTO) - { - this->m_curr_flipView->SelectedIndex = link->PageNum; - } - else if (link->Type == LINK_URI) - { - // Set the option to show a warning - auto launchOptions = ref new Windows::System::LauncherOptions(); - launchOptions->TreatAsUntrusted = true; - - // Launch the URI with a warning prompt - concurrency::task launchUriOperation(Windows::System::Launcher::LaunchUriAsync(link->Urilink, launchOptions)); - launchUriOperation.then([](bool success) - { - if (success) - { - // URI launched - } - else - { - // URI launch failed - } - }); - } - } -} - -/* Bring up the contents */ -void MainPage::ContentDisplay(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - if (this->m_num_pages < 0) - return; - - if (IsNotStandardView() && !this->xaml_ListView->IsEnabled) - return; - - if (this->xaml_ListView->IsEnabled) - { - this->xaml_ListView->Opacity = 0.0; - this->xaml_ListView->IsEnabled = false; - this->m_curr_flipView->Opacity = 1.0; - this->m_curr_flipView->IsEnabled = true; - this->xaml_PageSlider->IsEnabled = true; - } - else - { - if (xaml_ListView->Items->Size == 0) - { - unsigned int size_content = mu_doc->ComputeContents(); - /* Bring up the content now */ - for (unsigned int k = 0; k < size_content; k++) - { - ContentItem^ item = mu_doc->GetContent(k); - this->xaml_ListView->Items->Append(item); - } - if (size_content > 0) - { - this->xaml_ListView->Opacity = 1.0; - this->xaml_ListView->IsEnabled = true; - this->m_curr_flipView->Opacity = 0.0; - this->m_curr_flipView->IsEnabled = false; - this->xaml_PageSlider->IsEnabled = false; - } - } - else - { - this->xaml_ListView->Opacity = 1.0; - this->xaml_ListView->IsEnabled = true; - this->m_curr_flipView->Opacity = 0.0; - this->m_curr_flipView->IsEnabled = false; - this->xaml_PageSlider->IsEnabled = false; - } - } -} - -void MainPage::ContentSelected(Platform::Object^ sender, Windows::UI::Xaml::Controls::ItemClickEventArgs^ e) -{ - ContentItem^ b = safe_cast(e->ClickedItem); - int newpage = b->Page; - - if (newpage > -1 && newpage < this->m_num_pages) - { - this->xaml_ListView->Opacity = 0.0; - this->xaml_ListView->IsEnabled = false; - this->m_curr_flipView->Opacity = 1.0; - this->m_curr_flipView->IsEnabled = true; - this->xaml_PageSlider->IsEnabled = true; - - int old_page = this->m_currpage; - this->m_curr_flipView->SelectedIndex = newpage; - this->m_currpage = newpage; - } -} - -void MainPage::Reflower(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - if (this->m_num_pages < 0) return; - - if (xaml_WebView->Visibility == Windows::UI::Xaml::Visibility::Visible) - { - /* Go back to flip view */ - xaml_WebView->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - this->xaml_MainGrid->Opacity = 1.0; - this->m_curr_flipView->IsEnabled = true; - this->xaml_PageSlider->IsEnabled = true; - } - else if (this->m_curr_flipView->IsEnabled) - { - String^ html_string = mu_doc->ComputeHTML(this->m_currpage); - xaml_WebView->Visibility = Windows::UI::Xaml::Visibility::Visible; - this->xaml_MainGrid->Opacity = 0.0; - this->m_curr_flipView->IsEnabled = false; - this->xaml_PageSlider->IsEnabled = false; - this->xaml_WebView->NavigateToString(html_string); - this->xaml_WebView->Height = this->ActualHeight; - } -} - -/* Need to handle resizing of app bar to make sure everything fits */ -void MainPage::topAppBar_Loaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - /* Remove search box in snapped view as we don't have the room for it */ - int temp = (int) (this->ActualWidth); - if (this->ActualWidth < SEARCH_FIT && m_insearch) - ShowSearchBox(); - UpdateAppBarButtonViewState(); - /* This is needed to make sure we get the proper state during start-up. The - object has to be visible to set the state. So that is the way we start */ - if (!m_insearch && FindBox->Visibility == Windows::UI::Xaml::Visibility::Visible) - { - FindBox->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - PrevSearch->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - NextSearch->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - } -} - -String^ MainPage::GetVisualState() -{ - String^ visualstate = "FullScreenLandscape"; - - int width = (int) (this->ActualWidth); - int height = (int) (this->ActualHeight); - - if (width < VS_SMALL) - { - visualstate = "Snapped"; - } - else if (width < VS_LARGE) - { - if (width < height) - { - visualstate = "FullScreenPortrait"; - } - else - { - visualstate = "Snapped"; - } - } - return visualstate; -} - -void MainPage::UpdateAppBarButtonViewState() -{ - String ^viewState = GetVisualState(); - VisualStateManager::GoToState(Search, viewState, true); - VisualStateManager::GoToState(Contents, viewState, true); - VisualStateManager::GoToState(Links, viewState, true); - VisualStateManager::GoToState(Reflow, viewState, true); - VisualStateManager::GoToState(ZoomIn, viewState, true); - VisualStateManager::GoToState(ZoomOut, viewState, true); - VisualStateManager::GoToState(PrevSearch, viewState, true); - VisualStateManager::GoToState(NextSearch, viewState, true); -} - -/* Scroll viewer scale changes. If first time to this page, then we essentially - have our scroll setting set at 1.0. */ -void MainPage::ScrollChanged(Platform::Object^ sender, - Windows::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs^ e) -{ - ScrollViewer^ scrollviewer = safe_cast (sender); - auto doc_page = this->m_docPages->GetAt(m_currpage); - double new_scroll_zoom = scrollviewer->ZoomFactor; - - /* Check if we are already at this resolution with this page */ - if (new_scroll_zoom == doc_page->PageZoom) - return; - - if (!e->IsIntermediate) - { - int page = m_currpage; - - m_doczoom = new_scroll_zoom; - if (m_doczoom > ZOOM_MAX) - { - m_doczoom = ZOOM_MAX; - } - if (m_doczoom < ZOOM_MIN) - { - m_doczoom = ZOOM_MIN; - } - /* Render at new resolution. */ - spatial_info_t spatial_info = InitSpatial(m_doczoom); - Point ras_size; - float scale_factor; - if (ComputePageSize(spatial_info, page, &ras_size, &scale_factor) == S_ISOK) - { - doc_page->PageZoom = m_doczoom; - auto render_task = create_task(mu_doc->RenderPageAsync(page, (int)ras_size.X, (int)ras_size.Y, true, scale_factor)); - render_task.then([this, page, ras_size, scrollviewer](InMemoryRandomAccessStream^ ras) - { - if (ras != nullptr) - ReplaceImage(page, ras, ras_size, m_doczoom); - }, task_continuation_context::use_current()); - } - } -} - -/* Needed to find scrollviewer child from template of flipview item */ -Windows::UI::Xaml::FrameworkElement^ FindVisualChildByName(DependencyObject^ obj, String^ name) -{ - FrameworkElement^ ret; - if (obj == nullptr) return nullptr; - - int numChildren = VisualTreeHelper::GetChildrenCount(obj); - - for (int i = 0; i < numChildren; i++) - { - auto objChild = VisualTreeHelper::GetChild(obj, i); - auto child = safe_cast(objChild); - if (child != nullptr && child->Name == name) - { - return child; - } - ret = FindVisualChildByName(objChild, name); - if (ret != nullptr) - break; - } - return ret; -} - -void MainPage::ZoomInPress(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - if (!m_init_done || IsNotStandardView()) return; - NonTouchZoom(ZOOM_IN); -} - -void MainPage::ZoomOutPress(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - if (!m_init_done || IsNotStandardView()) return; - NonTouchZoom(ZOOM_OUT); -} - -void MainPage::NonTouchZoom(int zoom) -{ - auto doc_page = this->m_docPages->GetAt(m_currpage); - double curr_zoom = doc_page->PageZoom; - - ScrollViewer^ scrollviewer; - FlipViewItem^ item = safe_cast - (m_curr_flipView->ContainerFromIndex(m_currpage)); - auto item2 = m_curr_flipView->ContainerFromIndex(m_currpage); - - /* We don't know which one so check for both */ - ScrollViewer^ t1 = - safe_cast (FindVisualChildByName(item2, "xaml_ScrollView_v")); - ScrollViewer^ t2 = - safe_cast (FindVisualChildByName(item2, "xaml_ScrollView_h")); - - if (t1 != nullptr) - scrollviewer = t1; - else - scrollviewer = t2; - - if (scrollviewer == nullptr) - return; - - if (zoom == ZOOM_IN) - { - curr_zoom = curr_zoom + KEYBOARD_ZOOM_STEP; - if (curr_zoom > ZOOM_MAX) curr_zoom = ZOOM_MAX; - } - else if (zoom == ZOOM_OUT) - { - curr_zoom = curr_zoom - KEYBOARD_ZOOM_STEP; - if (curr_zoom < ZOOM_MIN) curr_zoom = ZOOM_MIN; - } else - return; - - /* It all needs to be driven by the scroll viewer otherwise we - end up out of sync */ - Platform::Object^ obj_zoom = (float)curr_zoom; - Platform::IBox^ box_zoom; - box_zoom = safe_cast^>(obj_zoom); - - scrollviewer->ChangeView(nullptr, nullptr, box_zoom, false); -} - -/* Adjust the page scrollviewer to the current zoom level */ -void MainPage::UpdateZoom() -{ - ScrollViewer^ scrollviewer; - FlipViewItem^ item = safe_cast - (m_curr_flipView->ContainerFromIndex(m_currpage)); - auto item2 = m_curr_flipView->ContainerFromIndex(m_currpage); - - /* We don't know which one so check for both */ - ScrollViewer^ t1 = - safe_cast (FindVisualChildByName(item2, "xaml_ScrollView_v")); - ScrollViewer^ t2 = - safe_cast (FindVisualChildByName(item2, "xaml_ScrollView_h")); - - if (t1 != nullptr) - scrollviewer = t1; - else - scrollviewer = t2; - - if (scrollviewer == nullptr) - return; - - float curr_zoom = scrollviewer->ZoomFactor; - Platform::Object^ obj_zoom = (float)m_doczoom; - Platform::IBox^ box_zoom; - box_zoom = safe_cast^>(obj_zoom); - scrollviewer->ChangeView(nullptr, nullptr, box_zoom, false); -} - -/* Zoom in and out for keyboard only case. */ -void MainPage::OnKeyDown(KeyRoutedEventArgs^ e) -{ - if (!m_init_done || IsNotStandardView()) return; - - long val = (long) (e->Key); - - if (val == KEY_PLUS) - NonTouchZoom(ZOOM_IN); - else if (val == KEY_MINUS) - NonTouchZoom(ZOOM_OUT); - else - return; -} - -void MainPage::PasswordOK(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - /* If password checks out then go ahead and start rendering */ - if (mu_doc->ApplyPassword(xaml_password->Password)) - { - xaml_password->Password = nullptr; - xaml_PasswordStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - InitialRender(); - RenderThumbs(); - } - else - NotifyUser("Incorrect Password", StatusMessage); -} - -/* So that we know if we are in a standard view case and not in reflow, or - * content type */ -bool MainPage::IsNotStandardView() -{ - return (this->xaml_ListView->Opacity == 1.0 || - xaml_WebView->Visibility == Windows::UI::Xaml::Visibility::Visible); -} - -/* The following code is for print support. */ -void MainPage::RegisterForPrinting() -{ - m_print_manager = Windows::Graphics::Printing::PrintManager::GetForCurrentView(); - m_print_manager->PrintTaskRequested += - ref new TypedEventHandler(this, &MainPage::SetPrintTask); -} - -void MainPage::SetPrintTask(PrintManager^ sender, PrintTaskRequestedEventArgs^ args) -{ - PrintTaskSourceRequestedHandler^ source_handler = - ref new PrintTaskSourceRequestedHandler([this](PrintTaskSourceRequestedArgs^ args)-> void{ - Microsoft::WRL::ComPtr document_source; - ThrowIfFailed(Microsoft::WRL::MakeAndInitialize(&document_source, reinterpret_cast(this))); - IPrintDocumentSource^ objSource(reinterpret_cast(document_source.Get())); - args->SetSource(objSource); - }); - - PrintTask^ print_task = - args->Request->CreatePrintTask(L"MuPDF WinRT Print", source_handler); - - /* Call backs so that we know when we are all done with the printing */ - print_task->Progressing += - ref new TypedEventHandler(this, &MainPage::PrintProgress); - print_task->Completed += - ref new TypedEventHandler(this, &MainPage::PrintCompleted); - m_print_active = PRINT_ACTIVE; - m_curr_print_count = 0; - - PrintTaskOptionDetails^ printDetailedOptions = - PrintTaskOptionDetails::GetFromPrintTaskOptions(print_task->Options); - - // Some standard printer options - printDetailedOptions->DisplayedOptions->Clear(); - printDetailedOptions->DisplayedOptions->Append(Windows::Graphics::Printing::StandardPrintTaskOptions::MediaSize); - printDetailedOptions->DisplayedOptions->Append(Windows::Graphics::Printing::StandardPrintTaskOptions::Copies); - - // Our custom options - PrintCustomItemListOptionDetails^ resolution = - printDetailedOptions->CreateItemListOption("resolution", "Render Resolution"); - resolution->AddItem("sres96", "96dpi"); - resolution->AddItem("sres150", "150 dpi"); - resolution->AddItem("sres300", "300 dpi"); - resolution->AddItem("sres600", "600 dpi"); - resolution->TrySetValue("sres600"); - m_printresolution = 600; - printDetailedOptions->DisplayedOptions->Append("resolution"); - - PrintCustomItemListOptionDetails^ location = printDetailedOptions->CreateItemListOption("location", "Location"); - location->AddItem("sCenter", "Center"); - location->AddItem("sTopleft", "Top Left"); - // Add the custom option to the option list. - printDetailedOptions->DisplayedOptions->Append("location"); - location->TrySetValue("sCenter"); - m_centerprint = true; - print_task->Options->MediaSize = PrintMediaSize::NorthAmericaLetter; - - PrintCustomItemListOptionDetails^ pageFormat = printDetailedOptions->CreateItemListOption(L"PageRange", L"Page Range"); - pageFormat->AddItem(L"PrintAll", L"Print all"); - pageFormat->AddItem(L"PrintRange", L"Print Range"); - printDetailedOptions->DisplayedOptions->Append(L"PageRange"); - PrintCustomTextOptionDetails^ pageRangeEdit = printDetailedOptions->CreateTextOption(L"PageRangeEdit", L"Range"); - - printDetailedOptions->OptionChanged += - ref new TypedEventHandler(this, &MainPage::PrintOptionsChanged); -} - -int MainPage::GetPrintPageCount() -{ - if (m_ppage_num_list.size() > 0) - return (int) m_ppage_num_list.size(); - else - return m_num_pages; -} - -void MainPage::PrintOptionsChanged(PrintTaskOptionDetails^ sender, PrintTaskOptionChangedEventArgs^ args) -{ - bool force_reset = false; - - if (args->OptionId == nullptr) - return; - - String^ optionId = safe_cast(args->OptionId); - - if (optionId == "resolution") - { - IPrintOptionDetails^ resolution = sender->Options->Lookup(optionId); - String^ resolutionValue = safe_cast(resolution->Value); - - if (resolutionValue == "sres96") - { - m_printresolution = 96; - } - else if (resolutionValue == "sres150") - { - m_printresolution = 150; - } - else if (resolutionValue == "sres300") - { - m_printresolution = 300; - } - else if(resolutionValue == "sres600") - { - m_printresolution = 600; - } - } - - /* Need to update preview with a change of this one */ - if (optionId == "location") - { - IPrintOptionDetails^ scaling = sender->Options->Lookup(optionId); - String^ scaleValue = safe_cast(scaling->Value); - - if (scaleValue == "sCenter") - { - m_centerprint = true; - } - if (scaleValue == "sTopleft") - { - m_centerprint = false; - } - force_reset = true; - } - - if (optionId == L"PageRange") - { - IPrintOptionDetails^ pagerange = sender->Options->Lookup(optionId); - String^ pageRangeValue = pagerange->Value->ToString(); - - if(pageRangeValue == L"PrintRange") - { - sender->DisplayedOptions->Append(L"PageRangeEdit"); - m_pageRangeEditVisible = true; - } - else - { - RemovePageRangeEdit(sender); - } - RefreshPreview(); - } - - if (optionId == L"PageRangeEdit") - { - IPrintOptionDetails^ pagerange = sender->Options->Lookup(optionId); - - std::wregex rangePattern(L"^\\s*\\d+\\s*(\\-\\s*\\d+\\s*)?(\\,\\s*\\d+\\s*(\\-\\s*\\d+\\s*)?)*$"); - std::wstring pageRangeValue(pagerange->Value->ToString()->Data()); - - if(!std::regex_match(pageRangeValue.begin(), pageRangeValue.end(), rangePattern)) - { - pagerange->ErrorText = L"Invalid Page Range (eg: 1-3, 5)"; - } - else - { - pagerange->ErrorText = L""; - try - { - GetPagesInRange(pagerange->Value->ToString()); - } - catch(PageRangeException* rangeException) - { - pagerange->ErrorText = ref new String(rangeException->get_DisplayMessage().data()); - delete rangeException; - } - force_reset = true; - } - } - if (force_reset) - { - RefreshPreview(); - } -} - -void MainPage::SplitString(String^ string, wchar_t delimiter, std::vector& words) - { - std::wistringstream iss(string->Data()); - - std::wstring part; - while(std::getline(iss, part, delimiter)) - { - words.push_back(part); - }; -} - -void MainPage::GetPagesInRange(String^ pagerange) -{ - std::vector vector_range; - SplitString(pagerange, ',', vector_range); - - m_ppage_num_list.clear(); - for(std::vector::iterator it = vector_range.begin(); it != vector_range.end(); ++ it) - { - int intervalPos = static_cast((*it).find('-')); - if( intervalPos != -1) - { - int start = _wtoi((*it).substr(0, intervalPos).data()); - int end = _wtoi((*it).substr(intervalPos + 1, (*it).length() - intervalPos - 1).data()); - - if ((start < 1) || (end > static_cast(m_num_pages)) || (start >= end)) - { - std::wstring message(L"Invalid page(s) in range "); - - message.append(std::to_wstring(start)); - message.append(L" - "); - message.append(std::to_wstring(end)); - - throw new PageRangeException(message); - } - - for(int intervalPage=start; intervalPage <= end; ++intervalPage) - { - m_ppage_num_list.push_back(intervalPage); - } - } - else - { - int pageNr = _wtoi((*it).data()); - std::wstring message(L"Invalid page "); - - if (pageNr < 1) - { - message.append(std::to_wstring(pageNr)); - throw new PageRangeException(message); - } - if (pageNr > static_cast(m_num_pages)) - { - message.append(std::to_wstring(pageNr)); - throw new PageRangeException(message); - } - m_ppage_num_list.push_back(pageNr); - } - } - std::sort(m_ppage_num_list.begin(), m_ppage_num_list.end(), std::less()); - std::unique(m_ppage_num_list.begin(), m_ppage_num_list.end()); -} - -void MainPage::RemovePageRangeEdit(PrintTaskOptionDetails^ printTaskOptionDetails) -{ - if (m_pageRangeEditVisible) - { - unsigned int index; - if(printTaskOptionDetails->DisplayedOptions->IndexOf(ref new String(L"PageRangeEdit"), &index)) - { - printTaskOptionDetails->DisplayedOptions->RemoveAt(index); - } - m_pageRangeEditVisible = false; - } -} - -void MainPage::CreatePrintControl(_In_ IPrintDocumentPackageTarget* docPackageTarget, - _In_ D2D1_PRINT_CONTROL_PROPERTIES* printControlProperties) -{ - m_d2d_printcontrol = nullptr; - ThrowIfFailed(m_d2d_device->CreatePrintControl(m_wic_factory.Get(), docPackageTarget, - printControlProperties, &m_d2d_printcontrol)); -} - -void MainPage::DrawPreviewSurface(float width, float height, float scale_in, - D2D1_RECT_F contentBox, uint32 page_num, - IPrintPreviewDxgiPackageTarget* previewTarget) -{ - int dpi = 96; - int index_page_num = page_num - 1; - int ren_page_num = index_page_num; - - if (m_ppage_num_list.size() > 0) - ren_page_num = m_ppage_num_list[page_num - 1] - 1; - - /* This goes on in a background thread. Hence is non-blocking for UI */ - assert(IsBackgroundThread()); - - /* Set up all the DirectX stuff */ - CD3D11_TEXTURE2D_DESC textureDesc(DXGI_FORMAT_B8G8R8A8_UNORM, - static_cast(ceil(width * dpi / 96)), - static_cast(ceil(height * dpi / 96)), - 1, 1, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE); - ComPtr texture; - ThrowIfFailed(m_d3d_device->CreateTexture2D(&textureDesc, nullptr, &texture)); - ComPtr dxgi_surface; - ThrowIfFailed(texture.As(&dxgi_surface)); - - // Create a new D2D device context for rendering the preview surface. D2D - // device contexts are stateful, and hence a unique device context must be - // used on each thread. - ComPtr d2d_context; - ThrowIfFailed(m_d2d_device->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_NONE, - &d2d_context)); - // Update DPI for preview surface as well. - d2d_context->SetDpi(96, 96); - - D2D1_BITMAP_PROPERTIES1 bitmap_properties = - D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW, - D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE)); - - // Create surface bitmap on which page content is drawn. - ComPtr d2d_surfacebitmap; - ThrowIfFailed(d2d_context->CreateBitmapFromDxgiSurface(dxgi_surface.Get(), - &bitmap_properties, &d2d_surfacebitmap)); - d2d_context->SetTarget(d2d_surfacebitmap.Get()); - - /* Figure out all the sizing */ - spatial_info_t spatial_info; - spatial_info.scale_factor = 1.0; - spatial_info.size.X = width; - spatial_info.size.Y = height; - Point ras_size; - float scale_factor; - - if (ComputePageSize(spatial_info, ren_page_num, &ras_size, &scale_factor) != S_ISOK) - return; - - ras_size.X = ceil(ras_size.X); - ras_size.Y = ceil(ras_size.Y); - - Array^ bmp_data; - int code = mu_doc->RenderPageBitmapSync(ren_page_num, (int) ras_size.X, - (int)ras_size.Y, scale_factor, true, false, false, { 0, 0 }, - { ras_size.X, ras_size.Y }, &bmp_data); - if (bmp_data == nullptr) - return; - D2D1_SIZE_U bit_map_rect; - bit_map_rect.width = (UINT32) (ras_size.X); - bit_map_rect.height = (UINT32) (ras_size.Y); - - D2D1_BITMAP_PROPERTIES1 bitmap_prop = - D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_NONE, - D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE)); - - ID2D1Bitmap1 *bit_map; - ThrowIfFailed(d2d_context->CreateBitmap(bit_map_rect, &(bmp_data[0]), - (UINT32) (ras_size.X * 4), - &bitmap_prop, &bit_map)); - D2D1_SIZE_F size = bit_map->GetSize(); - - /* Handle centering */ - float y_offset = 0; - float x_offset = 0; - if (m_centerprint) - { - y_offset = (float) ((height - size.height) / 2.0); - x_offset = (float) ((width - size.width) / 2.0); - } - - d2d_context->BeginDraw(); - d2d_context->DrawBitmap(bit_map, D2D1::RectF(x_offset, y_offset, - size.width + x_offset, size.height + y_offset)); - ThrowIfFailed(d2d_context->EndDraw()); - ThrowIfFailed(previewTarget->DrawPage(page_num, dxgi_surface.Get(), - (float) dpi, (float) dpi)); -} - -HRESULT MainPage::ClosePrintControl() -{ - return (m_d2d_printcontrol == nullptr) ? S_OK : m_d2d_printcontrol->Close(); -} - -/* To support high resolution printing, we tile renderings at the maxbitmap size - allowed with DirectX for this particular device. e.g the low end surface - will have a smaller maxbitmap size compared to a laptop or desktop. */ -void MainPage::PrintPage(uint32 page_num, D2D1_RECT_F image_area, D2D1_SIZE_F page_area, - float device_dpi, IStream* print_ticket) -{ - int dpi = m_printresolution; - int index_page_num = page_num - 1; - int ren_page_num = index_page_num; - bool tile = false; - Point tile_count; - D2D1_SIZE_U bit_map_rect; - Array^ bmp_data; - - if (index_page_num == 0) - { - this->Dispatcher->RunAsync(CoreDispatcherPriority::Low, - ref new DispatchedHandler([this]() - { - xaml_PrintStack->Visibility = Windows::UI::Xaml::Visibility::Visible; - })); - } - - /* Windoze seems to hand me a bogus dpi. Need to follow up on this */ - device_dpi = 96; - - if (m_ppage_num_list.size() > 0) - ren_page_num = m_ppage_num_list[page_num - 1] - 1; - - /* This goes on in a background thread. Hence is non-blocking for UI */ - assert(IsBackgroundThread()); - - /* Print command list set up */ - ComPtr d2d_context; - ThrowIfFailed(m_d2d_device->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_NONE, - &d2d_context)); - - /* This should let us work in pixel dimensions but after much testing - it clearly has some issues. May investigate this further later. */ - //d2d_context->SetUnitMode(D2D1_UNIT_MODE_PIXELS); - ComPtr clist; - ThrowIfFailed(d2d_context->CreateCommandList(&clist)); - d2d_context->SetTarget(clist.Get()); - - /* Width and height here are at 96 dpi */ - float width = image_area.right - image_area.left; - float height = image_area.bottom - image_area.top; - - /* MuPDF native resolution is 72dpi */ - spatial_info_t spatial_info; - spatial_info.scale_factor = 1.0; - spatial_info.size.X = (width / device_dpi) * (m_printresolution); - spatial_info.size.Y = (height /device_dpi) * (m_printresolution); - Point ras_size; - float scale_factor; - - if (ComputePageSize(spatial_info, ren_page_num, &ras_size, &scale_factor) != S_ISOK) - return; - ras_size.X = ceil(ras_size.X); - ras_size.Y = ceil(ras_size.Y); - - /* Determine if we need to do any tiling */ - int tile_size = d2d_context->GetMaximumBitmapSize(); - tile_count.Y = 1; - if (ras_size.X > tile_size) - { - tile = true; - tile_count.X = (float) ceil((float) ras_size.X / (float) tile_size); - bit_map_rect.width = (UINT32) (tile_size); - } - else - { - tile_count.X = 1; - bit_map_rect.width = (UINT32) (ras_size.X); - } - if (ras_size.Y > tile_size) - { - tile = true; - tile_count.Y = (float) ceil((float) ras_size.Y / (float) tile_size); - bit_map_rect.height = (UINT32) (tile_size); - } - else - { - tile_count.Y = 1; - bit_map_rect.height = (UINT32) (ras_size.Y); - } - - /* Adjust for centering in media page */ - float y_offset = 0; - float x_offset = 0; - if (m_centerprint) - { - y_offset = (float)round(((page_area.height - (ras_size.Y) * device_dpi / m_printresolution) / 2.0)); - x_offset = (float)round(((page_area.width - (ras_size.X) * device_dpi / m_printresolution) / 2.0)); - } - - D2D1_BITMAP_PROPERTIES1 bitmap_prop = - D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_NONE, - D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE), - (float) m_printresolution, (float) m_printresolution); - - ID2D1Bitmap1 *bit_map = NULL; - Point top_left, top_left_dip; - Point bottom_right, bottom_right_dip; - - /* Initialize X location */ - top_left.X = 0; - bottom_right.X = (float) bit_map_rect.width; - - d2d_context->BeginDraw(); - /* Useful for debugging */ - //d2d_context->Clear(D2D1::ColorF(D2D1::ColorF::Coral)); - int total_tile = (int) (tile_count.X * tile_count.Y); - - for (int x = 0; x < tile_count.X; x++) - { - /* Reset Y location */ - top_left.Y = 0; - bottom_right.Y = (float) bit_map_rect.height; - - for (int y = 0; y < tile_count.Y; y++) - { - int code = mu_doc->RenderPageBitmapSync(ren_page_num, (int)bit_map_rect.width, - (int)bit_map_rect.height, scale_factor, true, false, tile, top_left, - bottom_right, &bmp_data); - if (bmp_data == nullptr || code != 0) - break; - - ThrowIfFailed(d2d_context->CreateBitmap(bit_map_rect, &(bmp_data[0]), - (UINT32)(bit_map_rect.width * 4), &bitmap_prop, &bit_map)); - - // This is where D2D1_UNIT_MODE_PIXELS fails to work. Essentially, - // DirectX ends up clipping based upon the origin still in DIPS - // instead of actual pixel positions. - top_left_dip.X = (float)((double) top_left.X * (double)device_dpi / (double)m_printresolution + x_offset - 0.5); - top_left_dip.Y = (float)((double)top_left.Y * (double)device_dpi / (double)m_printresolution + y_offset - 0.5); - bottom_right_dip.X = (float)((double)bottom_right.X * (double)device_dpi / (double)m_printresolution + x_offset + 0.5); - bottom_right_dip.Y = (float)((double)bottom_right.Y * (double)device_dpi / (double)m_printresolution + y_offset + 0.5); - d2d_context->DrawBitmap(bit_map, D2D1::RectF(top_left_dip.X, top_left_dip.Y, - bottom_right_dip.X, bottom_right_dip.Y)); - bit_map->Release(); - - /* Increment Y location */ - top_left.Y += (float) bit_map_rect.height; - bottom_right.Y += (float) bit_map_rect.height; - PrintProgressTile(total_tile); - } - /* Increment X location */ - top_left.X += (float) bit_map_rect.width; - bottom_right.X += (float) bit_map_rect.width; - } - ThrowIfFailed(d2d_context->EndDraw()); - ThrowIfFailed(clist->Close()); - ThrowIfFailed(m_d2d_printcontrol->AddPage(clist.Get(), page_area, print_ticket)); -} - -void MainPage::RefreshPreview() -{ - PrintPages *p_struct = (PrintPages*) m_print_struct; - p_struct->ResetPreview(); -} - -/* This reference is needed so that we can reset preview when changes occur on options */ -void MainPage::SetPrintTarget(void *print_struct) -{ - m_print_struct = print_struct; -} - -void MainPage::PrintProgress(PrintTask^ sender, PrintTaskProgressingEventArgs^ args) -{ - assert(IsBackgroundThread()); - this->m_curr_print_count = args->DocumentPageCount; - - /* Update the progress bar if it is still active */ - this->Dispatcher->RunAsync(CoreDispatcherPriority::Low, - ref new DispatchedHandler([this]() - { - if (this->xaml_PrintStack->Visibility != Windows::UI::Xaml::Visibility::Collapsed) - { - xaml_PrintProgress->Value = - 100.0 * (double)m_curr_print_count / (double)GetPrintPageCount(); - } - })); -} - -void MainPage::PrintProgressTile(int total_tiles) -{ - assert(IsBackgroundThread()); - double step_size = 100.0 / ((double)GetPrintPageCount() * (double)total_tiles); - /* Update the progress bar if it is still active. The tiling of each - page can be slow on the surface if the resolution is high, hence - the need for this feedback */ - this->Dispatcher->RunAsync(CoreDispatcherPriority::Low, - ref new DispatchedHandler([this, step_size]() - { - if (this->xaml_PrintStack->Visibility != Windows::UI::Xaml::Visibility::Collapsed) - { - xaml_PrintProgress->Value += step_size; - } - })); -} - -void MainPage::PrintCompleted(PrintTask^ sender, PrintTaskCompletedEventArgs^ args) -{ - assert(IsBackgroundThread()); - m_print_active = PRINT_INACTIVE; - this->Dispatcher->RunAsync(CoreDispatcherPriority::Low, - ref new DispatchedHandler([this]() - { - xaml_PrintStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - xaml_PrintProgress->Value = 0; - })); -} - -void mupdf_cpp::MainPage::HideProgress(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) -{ - xaml_PrintStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; -} diff --git a/platform/winrt/mupdf_cpp/MainPage.xaml.h b/platform/winrt/mupdf_cpp/MainPage.xaml.h deleted file mode 100644 index 1cf8dd97..00000000 --- a/platform/winrt/mupdf_cpp/MainPage.xaml.h +++ /dev/null @@ -1,319 +0,0 @@ -// -// MainPage.xaml.h -// Declaration of the MainPage class. -// - -#pragma once - -#include "MainPage.g.h" -#include "ppl.h" -#include "ppltasks.h" -#include -#include -#include -#include "DocumentPage.h" -#include "status.h" -#include "PrintPage.h" - -using namespace Platform; -using namespace Concurrency; -using namespace Windows::Storage; -using namespace Windows::UI::Xaml; -using namespace Windows::UI::Xaml::Media::Imaging; -using namespace Windows::Storage::Streams; -using namespace Windows::Foundation; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::UI::Xaml::Media; -using namespace Windows::UI::Xaml::Input; -using namespace Windows::UI::Xaml::Shapes; -using namespace Windows::Foundation::Collections; -using namespace Platform::Collections; -using namespace Windows::UI::ViewManagement; -using namespace Windows::UI::Popups; -using namespace Windows::UI::Xaml::Navigation; -using namespace Windows::ApplicationModel; -using namespace Windows::UI::Core; -using namespace mupdfwinrt; - -using namespace Windows::Graphics::Display; -using namespace Windows::Graphics::Printing; -using namespace Windows::UI; -using namespace Windows::UI::Text; -using namespace Windows::UI::Xaml::Documents; -using namespace Windows::Graphics::Printing::OptionDetails; -using namespace Windows::UI::Xaml::Printing; - -typedef enum -{ - StatusMessage, - ErrorMessage -} NotifyType_t; - -typedef enum { - REN_AVAILABLE = 0, - REN_THUMBS, - REN_UPDATE_THUMB_CANVAS, - REN_PAGE /* Used to ignore value when source based setting */ -} RenderingStatus_t; - -typedef enum { - PRINT_INACTIVE = 0, - PRINT_ACTIVE, - PRINT_FAILED -} PrintStatus_t; - -typedef struct spatial_info_s -{ - Point size; - double scale_factor; -} spatial_info_t; - -namespace mupdf_cpp -{ - class PageRangeException - { - private: - std::wstring m_message; - public: - PageRangeException(std::wstring &message) - { - m_message = message; - } - ~PageRangeException() - { - } - std::wstring get_DisplayMessage() - { - return m_message; - } - }; - - public value class PrintPageDesc - { - public: - Size margin; - Size pagesize; - Size printpagesize; - Size resolution; - - friend bool operator == (PrintPageDesc pp1, PrintPageDesc pp2) - { - bool equal = (std::abs(pp1.pagesize.Width - pp2.pagesize.Width) < FLT_EPSILON) && - (std::abs(pp1.pagesize.Height - pp2.pagesize.Height) < FLT_EPSILON); - if (equal) - { - equal = (std::abs(pp1.printpagesize.Width - pp2.printpagesize.Width) < FLT_EPSILON) && - (std::abs(pp1.printpagesize.Height - pp2.printpagesize.Height) < FLT_EPSILON); - } - if (equal) - { - equal = (std::abs(pp1.resolution.Width - pp2.resolution.Width) < FLT_EPSILON) && - (std::abs(pp1.resolution.Height - pp2.resolution.Height) < FLT_EPSILON); - } - return equal; - } - friend bool operator != (PrintPageDesc pp1, PrintPageDesc pp2) - { - return !(pp1 == pp2); - } - }; - - public ref class MainPage sealed - { - - inline void ThrowIfFailed(HRESULT hr) - { - if (FAILED(hr)) - { - /* We are in a different thread in this case. */ - this->Dispatcher->RunAsync(CoreDispatcherPriority::Low, - ref new DispatchedHandler([this]() - { - this->m_print_active = PRINT_FAILED; - xaml_PrintStack->Visibility = Windows::UI::Xaml::Visibility::Collapsed; - this->NotifyUser("Print Failed", ErrorMessage); - })); - throw Platform::Exception::CreateException(hr, "Print Failed"); - } - } - - public: - MainPage(); - - property Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^ ProtocolEvent - { - Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^ get() { return _protocolEventArgs; } - void set(Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^ value) { _protocolEventArgs = value; } - } - - property Windows::ApplicationModel::Activation::FileActivatedEventArgs^ FileEvent - { - Windows::ApplicationModel::Activation::FileActivatedEventArgs^ get() { return _fileEventArgs; } - void set(Windows::ApplicationModel::Activation::FileActivatedEventArgs^ value) { _fileEventArgs = value; } - } - void NotifyUser(String^ strMessage, int type); - void FromFile(); /* For association cases when we are already running */ - - protected: - virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override; - virtual void OnKeyDown(Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) override; - property Windows::Graphics::Printing::IPrintDocumentSource^ PrintDocumentSource - { - Windows::Graphics::Printing::IPrintDocumentSource^ get() - { - return m_printdoc_source; - } - } - - private: - Windows::Foundation::EventRegistrationToken _pageLoadedHandlerToken; - Vector^ m_docPages; - Vector^ m_thumbnails; - Vector^>^ m_page_link_list; - Vector^ m_linkset; - Vector^ m_text_list; - mudocument^ mu_doc; - int m_rectlist_page; - bool m_file_open; - int m_currpage; - int m_searchpage; - int m_num_pages; - int m_slider_min; - int m_slider_max; - bool m_init_done; - bool m_flip_from_searchlink; - bool m_links_on; - int m_search_rect_count; - cancellation_token_source m_searchcts; - bool m_page_update; - long long m_memory_use; - WriteableBitmap ^m_BlankBmp; - String^ m_textcolor; - String^ m_linkcolor; - FlipView^ m_curr_flipView; - RenderingStatus_t m_ren_status; - cancellation_token_source m_ThumbCancel; - bool m_insearch; /* Used for UI display */ - bool m_search_active; /* Used to avoid multiple UI clicks */ - bool m_sliderchange; - double m_Progress; - double m_doczoom; - - /* Print related */ - PrintDocument^ m_printdoc; - IPrintDocumentSource^ m_printdoc_source; - PrintPageDesc m_printpagedesc; - int m_printresolution; - bool m_centerprint; - bool m_pageRangeEditVisible; - std::vector m_ppage_num_list; - int m_curr_print_count; - PrintStatus_t m_print_active; - - /* DirectX Print Control */ - PrintManager ^m_print_manager; - Microsoft::WRL::ComPtr m_d3d_device; - Microsoft::WRL::ComPtr m_d3d_context; - Microsoft::WRL::ComPtr m_d2d_printcontrol; - Microsoft::WRL::ComPtr m_d2d_device; - Microsoft::WRL::ComPtr m_wic_factory; - Microsoft::WRL::ComPtr m_d2d_factory; - D3D_FEATURE_LEVEL m_featureLevel; - void *m_print_struct; - - void ReplaceImage(int page_num, InMemoryRandomAccessStream^ ras, Point ras_size, double zoom); - void Picker(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void Searcher(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void OpenDocumentPrep(StorageFile^ file); - void OpenDocument(StorageFile^ file); - void InitialRender(); - void RenderRange(int curr_page); - void CleanUp(); - void UpdatePage(int page_num, InMemoryRandomAccessStream^ ras, Point ras_size, Page_Content_t content_type, double zoom); - void CreateBlank(int width, int height); - void HandleFileNotFoundException(Platform::COMException^ e); - void NotifyUserFileNotExist(); - void SetFlipView(); - void FlipView_SelectionChanged(Object^ sender, SelectionChangedEventArgs^ e); - void SearchNext(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void SearchPrev(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void CancelSearch(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void SearchInDirection(int dir, String^ textToFind); - void ShowSearchResults(int page_num, unsigned int box_count); - void ClearTextSearch(); - void AddTextCanvas(); - void GridSizeChanged(); - void UpdateThumbSizes(); - void UpdatePreRenderedPageSizes(); - void ShowThumbnail(); - void Canvas_ManipulationCompleted(Platform::Object^ sender, Windows::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs^ e); - void AddThumbNail(int page_num, FlipView^ flip_view); - spatial_info_t InitSpatial(double scale); - void RenderThumbs(); - void SetThumb(unsigned int page_num); - void ReleasePages(int old_page, int new_page); - void Linker(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void AddLinkCanvas(); - void ClearLinks(); - void InvalidateLinks(); - void ContentDisplay(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void ListView_Single_Tap(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e); - void ContentSelected(Platform::Object^ sender, Windows::UI::Xaml::Controls::ItemClickEventArgs^ e); - void ContentChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e); - void Reflower(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void topAppBar_Loaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void UpdateAppBarButtonViewState(); - void ExitInvokedHandler(Windows::UI::Popups::IUICommand^ command); - void OKInvokedHandler(Windows::UI::Popups::IUICommand^ command); - int ComputePageSize(spatial_info_t spatial_info, int page_num, Point *ren_size, float *scale_factor); - void ScrollChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::ScrollViewerViewChangedEventArgs^ e); - void LinkTapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e); - void SearchProgress(IAsyncOperationWithProgress^ operation, double status); - void PasswordOK(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void App_Suspending(Object^ sender, SuspendingEventArgs^ e); - void ExceptionHandler(Object^ sender, UnhandledExceptionEventArgs^ e); - void ZoomInPress(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void ZoomOutPress(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); - void NonTouchZoom(int zoom); - void ShowSearchBox(); - bool IsNotStandardView(); - void Page_Loaded(Object^ sender, RoutedEventArgs^ e); - Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^ _protocolEventArgs; - Windows::ApplicationModel::Activation::FileActivatedEventArgs^ _fileEventArgs; - void Slider_ValueChanged(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); - void Slider_Key(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e); - void Slider_Common(); - void FlipView_Started(Platform::Object^ sender, Windows::UI::Xaml::Input::ManipulationStartedRoutedEventArgs^ e); - void UpdateZoom(); - String^ GetVisualState(); - void SetThumbInit(unsigned int page_num); - - /* Print Related */ - void RegisterForPrinting(); - void PrintOptionsChanged(PrintTaskOptionDetails^ sender, PrintTaskOptionChangedEventArgs^ args); - void RefreshPreview(); - void RemovePageRangeEdit(PrintTaskOptionDetails^ printTaskOptionDetails); - void SplitString(String^ string, wchar_t delimiter, std::vector& words); - void GetPagesInRange(String^ pageRange); - void SetPrintTask( PrintManager^, PrintTaskRequestedEventArgs^ args); - void SetUpDirectX(); - - internal: - void CreatePrintControl(IPrintDocumentPackageTarget* docPackageTarget, - D2D1_PRINT_CONTROL_PROPERTIES* printControlProperties); - void PrintPage(uint32 page_num, D2D1_RECT_F image_area, D2D1_SIZE_F page_area, - float device_dpi, IStream* print_ticket); - HRESULT ClosePrintControl(); - void DrawPreviewSurface(float width, float height, float scale, - D2D1_RECT_F contentBox, uint32 desiredJobPage, - IPrintPreviewDxgiPackageTarget* previewTarget); - int GetPrintPageCount(); - void SetPrintTarget(void *print_struct); - void PrintProgress(PrintTask^ sender, PrintTaskProgressingEventArgs^ args); - void PrintProgressTile(int total_tiles); - void PrintCompleted(PrintTask^ sender, PrintTaskCompletedEventArgs^ args); -private: - void Testing(Platform::Object^ sender, Windows::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs^ e); - void HideProgress(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); -}; -} diff --git a/platform/winrt/mupdf_cpp/Package.StoreAssociation.xml b/platform/winrt/mupdf_cpp/Package.StoreAssociation.xml deleted file mode 100644 index 099c2431..00000000 --- a/platform/winrt/mupdf_cpp/Package.StoreAssociation.xml +++ /dev/null @@ -1,375 +0,0 @@ - - - CN=B93265AA-82AD-458A-A08E-7069B8ED88B5 - ArtifexSoftware - Artifex Software - http://www.w3.org/2001/04/xmlenc#sha256 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ArtifexSoftware.MuPDF - - MuPDF - - - - - - 6.2.1.0 - arm - 1.0.0.10 - - - 6.2.1.0 - x86 - 1.0.0.10 - - - 6.2.1.0 - x64 - 1.0.0.10 - - - \ No newline at end of file diff --git a/platform/winrt/mupdf_cpp/Package.appxmanifest b/platform/winrt/mupdf_cpp/Package.appxmanifest deleted file mode 100644 index ce62ba5f..00000000 --- a/platform/winrt/mupdf_cpp/Package.appxmanifest +++ /dev/null @@ -1,41 +0,0 @@ - - - - - MuPDF - Artifex Software - Assets\StoreLogo.png - - - 6.3 - 6.3 - - - - - - - - - - - - .pdf - .xps - .cbz - .oxps - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform/winrt/mupdf_cpp/PrintPage.cpp b/platform/winrt/mupdf_cpp/PrintPage.cpp deleted file mode 100644 index 83d31791..00000000 --- a/platform/winrt/mupdf_cpp/PrintPage.cpp +++ /dev/null @@ -1,165 +0,0 @@ -#include "pch.h" -#include "PrintPage.h" - -using namespace Microsoft::WRL; -using namespace Windows::Graphics::Printing; - -#pragma region IDocumentPageSource Methods - -/* This is the interface to the print thread calls */ -IFACEMETHODIMP -PrintPages::GetPreviewPageCollection(IPrintDocumentPackageTarget* doc_target, - IPrintPreviewPageCollection** doc_collection) -{ - HRESULT hr = (doc_target != nullptr) ? S_OK : E_INVALIDARG; - - if (SUCCEEDED(hr)) - { - hr = doc_target->GetPackageTarget(ID_PREVIEWPACKAGETARGET_DXGI, - IID_PPV_ARGS(&m_dxgi_previewtarget)); - } - ComPtr page_collection; - if (SUCCEEDED(hr)) - { - ComPtr docSource(this); - hr = docSource.As(&page_collection); - } - if (SUCCEEDED(hr)) - hr = page_collection.CopyTo(doc_collection); - - if (SUCCEEDED(hr)) - this->m_renderer->SetPrintTarget((void*) this); - return hr; -} - -IFACEMETHODIMP -PrintPages::MakeDocument(IInspectable* doc_options, IPrintDocumentPackageTarget* doc_target) -{ - if (doc_options == nullptr || doc_target == nullptr) - return E_INVALIDARG; - - PrintTaskOptions^ option = reinterpret_cast(doc_options); - PrintPageDescription page_desc = option->GetPageDescription(1); - - D2D1_PRINT_CONTROL_PROPERTIES print_properties; - - print_properties.rasterDPI = (float)(min(page_desc.DpiX, page_desc.DpiY)); - print_properties.colorSpace = D2D1_COLOR_SPACE_SRGB; - print_properties.fontSubset = D2D1_PRINT_FONT_SUBSET_MODE_DEFAULT; - - HRESULT hr = S_OK; - - try - { - m_renderer->CreatePrintControl(doc_target, &print_properties); - - D2D1_RECT_F imageableRect = D2D1::RectF(page_desc.ImageableRect.X, - page_desc.ImageableRect.Y, - page_desc.ImageableRect.X + page_desc.ImageableRect.Width, - page_desc.ImageableRect.Y + page_desc.ImageableRect.Height); - - D2D1_SIZE_F pageSize = D2D1::SizeF(page_desc.PageSize.Width, page_desc.PageSize.Height); - m_totalpages = m_renderer->GetPrintPageCount(); - - for (uint32 page_num = 1; page_num <= m_totalpages; ++page_num) - m_renderer->PrintPage(page_num, imageableRect, pageSize, (float) page_desc.DpiX, nullptr); - } - catch (Platform::Exception^ e) - { - hr = e->HResult; - } - - HRESULT hrClose = m_renderer->ClosePrintControl(); - if (SUCCEEDED(hr)) - { - hr = hrClose; - } - return hr; -} - -#pragma endregion IDocumentPageSource Methods - -#pragma region IPrintPreviewPageCollection Methods - -IFACEMETHODIMP -PrintPages::Paginate(uint32 current_jobpage, IInspectable* doc_options) -{ - HRESULT hr = (doc_options != nullptr) ? S_OK : E_INVALIDARG; - - if (SUCCEEDED(hr)) - { - PrintTaskOptions^ option = reinterpret_cast(doc_options); - PrintPageDescription page_desc = option->GetPageDescription(current_jobpage); - - hr = m_dxgi_previewtarget->InvalidatePreview(); - m_totalpages = m_renderer->GetPrintPageCount(); - - if (SUCCEEDED(hr)) - hr = m_dxgi_previewtarget->SetJobPageCount(PageCountType::FinalPageCount, m_totalpages); - - if (SUCCEEDED(hr)) - { - m_width = page_desc.PageSize.Width; - m_height = page_desc.PageSize.Height; - m_imageable_rect = D2D1::RectF(page_desc.ImageableRect.X, page_desc.ImageableRect.Y, - page_desc.ImageableRect.X + page_desc.ImageableRect.Width, - page_desc.ImageableRect.Y + page_desc.ImageableRect.Height); - m_paginate_called = true; - } - } - return hr; -} - -float -PrintPages::TransformedPageSize(float desired_width, float desired_height, - Windows::Foundation::Size* preview_size) -{ - float scale = 1.0f; - - if (desired_width > 0 && desired_height > 0) - { - preview_size->Width = desired_width; - preview_size->Height = desired_height; - scale = m_width / desired_width; - } - else - { - preview_size->Width = 0; - preview_size->Height = 0; - } - return scale; -} - -void -PrintPages::ResetPreview() -{ - m_dxgi_previewtarget->InvalidatePreview(); -} - -IFACEMETHODIMP -PrintPages::MakePage(uint32 desired_jobpage, float width, float height) -{ - HRESULT hr = (width > 0 && height > 0) ? S_OK : E_INVALIDARG; - - if (desired_jobpage == JOB_PAGE_APPLICATION_DEFINED && m_paginate_called) - desired_jobpage = 1; - - if (SUCCEEDED(hr) && m_paginate_called) - { - Windows::Foundation::Size preview_size; - float scale = TransformedPageSize(width, height, &preview_size); - - try - { - m_renderer->DrawPreviewSurface(preview_size.Width, preview_size.Height, - scale, m_imageable_rect, desired_jobpage, - m_dxgi_previewtarget.Get()); - } - catch (Platform::Exception^ e) - { - hr = e->HResult; - } - } - return hr; -} -#pragma region IPrintPreviewPageCollection Methods diff --git a/platform/winrt/mupdf_cpp/PrintPage.h b/platform/winrt/mupdf_cpp/PrintPage.h deleted file mode 100644 index 725a5a43..00000000 --- a/platform/winrt/mupdf_cpp/PrintPage.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once -#include -#include -#include -#include "MainPage.xaml.h" - -using namespace Microsoft::WRL; -using namespace mupdf_cpp; - -/* This is the interface to the print thread calls */ -class PrintPages : public Microsoft::WRL::RuntimeClass, - ABI::Windows::Graphics::Printing::IPrintDocumentSource, - IPrintDocumentPageSource, - IPrintPreviewPageCollection> -{ -private: - InspectableClass(L"Windows.Graphics.Printing.IPrintDocumentSource", BaseTrust); - -public: - HRESULT RuntimeClassInitialize(IUnknown* pageRenderer) - { - HRESULT hr = (pageRenderer != nullptr) ? S_OK : E_INVALIDARG; - - if (SUCCEEDED(hr)) - { - m_paginate_called = false; - m_totalpages = 1; - m_height = 0.f; - m_width = 0.f; - m_renderer = reinterpret_cast(pageRenderer); - } - return hr; - } - IFACEMETHODIMP GetPreviewPageCollection(IPrintDocumentPackageTarget* doc_target, - IPrintPreviewPageCollection** doc_collection); - IFACEMETHODIMP MakeDocument(IInspectable* doc_options, - IPrintDocumentPackageTarget* doc_target); - IFACEMETHODIMP Paginate(uint32 current_jobpage, IInspectable* doc_options); - IFACEMETHODIMP MakePage(uint32 desired_jobpage, float width, float height); - void ResetPreview(); - -private: - float TransformedPageSize(float desired_width, float desired_height, - Windows::Foundation::Size* preview_size); - uint32 m_totalpages; - bool m_paginate_called; - float m_height; - float m_width; - D2D1_RECT_F m_imageable_rect; - MainPage^ m_renderer; - - Microsoft::WRL::ComPtr m_dxgi_previewtarget; - - void DrawPreviewSurface(float width, float height, float scale_in, - D2D1_RECT_F contentBox, uint32 page_num, - IPrintPreviewDxgiPackageTarget* previewTarget); -}; diff --git a/platform/winrt/mupdf_cpp/RectList.cpp b/platform/winrt/mupdf_cpp/RectList.cpp deleted file mode 100644 index b9c1560d..00000000 --- a/platform/winrt/mupdf_cpp/RectList.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "pch.h" -#include "RectList.h" - -namespace mupdf_cpp -{ - RectList::RectList(void) - { - } -} diff --git a/platform/winrt/mupdf_cpp/RectList.h b/platform/winrt/mupdf_cpp/RectList.h deleted file mode 100644 index 999fe3d2..00000000 --- a/platform/winrt/mupdf_cpp/RectList.h +++ /dev/null @@ -1,153 +0,0 @@ -#pragma once - -/* WinRT RectList class for binding a collection of rects to the xaml ui */ -using namespace Windows::UI::Xaml::Media::Imaging; -using namespace Windows::UI::Xaml::Controls; -using namespace Platform; /* For String */ - -namespace mupdf_cpp -{ - [Windows::UI::Xaml::Data::Bindable] // in c++, adding this attribute to ref classes enables data binding for more info search for 'Bindable' on the page http://go.microsoft.com/fwlink/?LinkId=254639 - - public ref class RectList sealed - { - private: - int height; - int width; - int x; - int y; - String^ color; - /* These are used to store the link infomation */ - int type; - int pagenum; - Windows::Foundation::Uri ^uri; - String^ index; // For identify which rectangle was tapped - public: - RectList(void); - - property String^ Index - { - String^ get() - { - return ((String^) index); - } - - void set(String^ value) - { - index = value; - } - } - - property String^ Color - { - String^ get() - { - return (color); - } - - void set(String^ value) - { - color = value; - } - } - - property int Height - { - int get() - { - return ((int) height); - } - - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - height = value; - } - } - - property int Width - { - int get() - { - return width; - } - - void set(int value) - { - if (value < 0) - { - throw ref new Platform::InvalidArgumentException(); - } - width = value; - } - } - - property int X - { - int get() - { - return x; - } - - void set(int value) - { - x = value; - } - } - - property int Y - { - int get() - { - return y; - } - - void set(int value) - { - y = value; - } - } - - property int Type - { - int get() - { - return type; - } - - void set(int value) - { - type = value; - } - } - - property int PageNum - { - int get() - { - return pagenum; - } - - void set(int value) - { - pagenum = value; - } - } - - property Windows::Foundation::Uri^ Urilink - { - Windows::Foundation::Uri^ get() - { - return uri; - } - - void set(Windows::Foundation::Uri^ value) - { - uri = value; - } - } - }; -} diff --git a/platform/winrt/mupdf_cpp/mupdf_cpp.rc b/platform/winrt/mupdf_cpp/mupdf_cpp.rc deleted file mode 100644 index 0d7c7a75..00000000 Binary files a/platform/winrt/mupdf_cpp/mupdf_cpp.rc and /dev/null differ diff --git a/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj b/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj deleted file mode 100644 index eee0eb95..00000000 --- a/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj +++ /dev/null @@ -1,280 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {0204a4e7-f1b8-4268-a67c-a2c674b4742d} - mupdf_cpp - en-US - 12.0 - true - Windows Store - 8.1 - - - - Application - true - v120 - - - Application - true - v120 - - - Application - true - v120 - - - Application - false - true - v120 - - - Application - false - true - v120 - - - Application - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - - 03074CFDB8E2AB0CD384A1FFA139F7959DC8A656 - True - mupdf_cpp_StoreKey.pfx - x86|x64|arm - - - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(MSBuildProjectName)\ - - - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(MSBuildProjectName)\ - - - $(Platform)\$(Configuration)\$(MSBuildProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - $(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(MSBuildProjectName)\ - - - $(Platform)\$(Configuration)\$(MSBuildProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - $(Platform)\$(Configuration)\$(MSBuildProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - - - /bigobj %(AdditionalOptions) - 4453 - ../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories) - - - D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib - /APPCONTAINER %(AdditionalOptions) - - - - - /bigobj %(AdditionalOptions) - 4453 - ../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories) - _UNICODE;NDEBUG;UNICODE;%(PreprocessorDefinitions) - - - D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib - - - /APPCONTAINER %(AdditionalOptions) - - - - - /bigobj %(AdditionalOptions) - 4453 - ../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories) - - - D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib - /APPCONTAINER /SAFESEH %(AdditionalOptions) - - - - - /bigobj %(AdditionalOptions) - 4453 - ../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories) - _UNICODE;NDEBUG;UNICODE;%(PreprocessorDefinitions) - - - D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib - - - /APPCONTAINER /SAFESEH %(AdditionalOptions) - - - - - /bigobj %(AdditionalOptions) - 4453 - ../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories) - - - D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib - /APPCONTAINER %(AdditionalOptions) - - - - - /bigobj %(AdditionalOptions) - 4453 - ../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories) - _UNICODE;NDEBUG;UNICODE;%(PreprocessorDefinitions) - - - D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib - - - /APPCONTAINER %(AdditionalOptions) - - - - - - - - - - App.xaml - - - MainPage.xaml - - - - - - Designer - - - Designer - - - Designer - - - - - Designer - - - - - - - App.xaml - - - - - MainPage.xaml - - - Create - Create - Create - Create - Create - Create - - - - - - - - - true - - - - - true - - - true - - - true - - - - - - - - {9e6ab41d-09a7-45a6-a53b-1e4bf3ac5b33} - - - - - - \ No newline at end of file diff --git a/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj.filters b/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj.filters deleted file mode 100644 index 5d7615b2..00000000 --- a/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj.filters +++ /dev/null @@ -1,75 +0,0 @@ - - - - - 0204a4e7-f1b8-4268-a67c-a2c674b4742d - - - a297f943-f0d7-4847-867e-a7aa1ef7f484 - - - Common - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - \ No newline at end of file diff --git a/platform/winrt/mupdf_cpp/pch.cpp b/platform/winrt/mupdf_cpp/pch.cpp deleted file mode 100644 index 01484ff5..00000000 --- a/platform/winrt/mupdf_cpp/pch.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// -// pch.cpp -// Include the standard header and generate the precompiled header. -// - -#include "pch.h" diff --git a/platform/winrt/mupdf_cpp/pch.h b/platform/winrt/mupdf_cpp/pch.h deleted file mode 100644 index b23c6b70..00000000 --- a/platform/winrt/mupdf_cpp/pch.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// pch.h -// Header for standard system include files. -// - -#pragma once - -#include -#include "App.xaml.h" -/* DirectX requirements */ -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/platform/winrt/mupdfnet/mupdfnet.cpp b/platform/winrt/mupdfnet/mupdfnet.cpp deleted file mode 100644 index 6a59aec9..00000000 --- a/platform/winrt/mupdfnet/mupdfnet.cpp +++ /dev/null @@ -1,471 +0,0 @@ -#include "mupdfnet.h" -#include -#include "muctx.h" - -BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - -std::shared_ptr> gContents; -std::shared_ptr> gTextResults; -std::shared_ptr> gLinkResults; - -char* String_to_char(PCWSTR text) -{ - int cb = WideCharToMultiByte(CP_UTF8, 0, text, -1, nullptr, 0, nullptr, nullptr); - char* charout = new char[cb]; - if (!charout) - { - return nullptr; - } - WideCharToMultiByte(CP_UTF8, 0, text, -1, charout, cb, nullptr, nullptr); - return charout; -} - -PCWSTR char_to_String(const char *char_in) -{ - size_t size = MultiByteToWideChar(CP_UTF8, 0, char_in, -1, NULL, 0); - wchar_t *pw; - pw = new wchar_t[size]; - if (!pw) - { - return nullptr; - } - MultiByteToWideChar(CP_UTF8, 0, char_in, -1, pw, size); - return pw; -} - -/* We have to have a C-Style API to access the C++ code */ -SYMBOL_DECLSPEC void* __stdcall mInitialize() -{ - muctx *mu_ctx = new muctx; - status_t result = mu_ctx->InitializeContext(); - - if (result == S_ISOK) - return static_cast(mu_ctx); - else - return nullptr; -} - -SYMBOL_DECLSPEC int __stdcall mOpenDocument(void *ctx, PCWSTR filename) -{ - muctx *mu_ctx = static_cast(ctx); - - mReleaseContents(); - return mu_ctx->OpenDocument(String_to_char(filename)); -} - -SYMBOL_DECLSPEC void __stdcall mCleanUp(void *ctx) -{ - muctx *mu_ctx = static_cast(ctx); - - mReleaseContents(); - mu_ctx->CleanUp(); -} - -SYMBOL_DECLSPEC int __stdcall mGetPageCount(void *ctx) -{ - muctx *mu_ctx = static_cast(ctx); - return mu_ctx->GetPageCount(); -} - -SYMBOL_DECLSPEC bool __stdcall mRequiresPassword(void *ctx) -{ - muctx *mu_ctx = static_cast(ctx); - return mu_ctx->RequiresPassword(); -} - -SYMBOL_DECLSPEC bool __stdcall mApplyPassword(void *ctx, PCWSTR password) -{ - muctx *mu_ctx = static_cast(ctx); - return mu_ctx->ApplyPassword(String_to_char(password)); -} - -SYMBOL_DECLSPEC int __stdcall mRenderPage(void *ctx, int page_num, - byte* bmp_data, int bmp_width, - int bmp_height, double scale, bool flipy) -{ - muctx *mu_ctx = static_cast(ctx); - int code = mu_ctx->RenderPage(page_num, &(bmp_data[0]), bmp_width, - bmp_height, scale, flipy); - - return code; -} - -SYMBOL_DECLSPEC int __stdcall mMeasurePage(void *ctx, int page_num, - double *width, double *height) -{ - muctx *mu_ctx = static_cast(ctx); - point_t size; - - int code = mu_ctx->MeasurePage(page_num, &size); - *width = size.X; - *height = size.Y; - - return code; -} - -SYMBOL_DECLSPEC int __stdcall mGetContents(void *ctx) -{ - muctx *mu_ctx = static_cast(ctx); - int has_content; - sh_vector_content content_smart_ptr_vec(new std::vector()); - gContents = content_smart_ptr_vec; - has_content = mu_ctx->GetContents(gContents); - if (has_content) - return gContents->size(); - else - return 0; -} - -SYMBOL_DECLSPEC void __stdcall mReleaseContents() -{ - if (gContents != nullptr) - gContents.reset(); -} - -SYMBOL_DECLSPEC char* __stdcall mGetContentsItem(int k, int *len, int *page) -{ - char* retstr = NULL; - - sh_content muctx_content = gContents->at(k); - const char* str = (muctx_content->string_margin.c_str()); - *len = strlen(str); - *page = muctx_content->page; - - /* This allocation ensures that Marshal will release in the managed code */ - retstr = (char*)::CoTaskMemAlloc(*len + 1); - strcpy(retstr, str); - return retstr; -} - -SYMBOL_DECLSPEC char * __stdcall mGetText(void *ctx, int pagenum, int type) -{ - char* retstr = NULL; - muctx *mu_ctx = static_cast(ctx); - std::string text_cstr; - int len; - - text_cstr = mu_ctx->GetText(pagenum, type); - if (text_cstr.size() > 0) - { - auto text = text_cstr.c_str(); - len = strlen(text); - retstr = (char*)::CoTaskMemAlloc(len + 1); - strcpy(retstr, text); - } - return retstr; -} - -SYMBOL_DECLSPEC int __stdcall mTextSearchPage(void *ctx, int page_num, PCWSTR needle) -{ - muctx *mu_ctx = static_cast(ctx); - - sh_vector_text text_smart_ptr_vec(new std::vector()); - gTextResults = text_smart_ptr_vec; - - return mu_ctx->GetTextSearch(page_num, String_to_char(needle), gTextResults); -} - -SYMBOL_DECLSPEC bool __stdcall mGetTextSearchItem(int k, double *top_x, double - *top_y, double *height, double *width) -{ - char* retstr = NULL; - - if (k < 0 || k > gTextResults->size()) - return false; - sh_text muctx_search = gTextResults->at(k); - *top_x = muctx_search->upper_left.X; - *top_y = muctx_search->upper_left.Y; - *width = muctx_search->lower_right.X - muctx_search->upper_left.X; - *height = muctx_search->lower_right.Y - muctx_search->upper_left.Y; - return true; -} - -SYMBOL_DECLSPEC void __stdcall mReleaseTextSearch() -{ - if (gTextResults != nullptr) - gTextResults.reset(); -} - -SYMBOL_DECLSPEC int __stdcall mGetLinksPage(void *ctx, int page_num) -{ - muctx *mu_ctx = static_cast(ctx); - - sh_vector_link link_smart_ptr_vec(new std::vector()); - gLinkResults = link_smart_ptr_vec; - - return mu_ctx->GetLinks(page_num, gLinkResults); -} - -SYMBOL_DECLSPEC void __stdcall mSetAA(void *ctx, int level) -{ - muctx *mu_ctx = static_cast(ctx); - mu_ctx->SetAA(level); -} - -SYMBOL_DECLSPEC char* __stdcall mGetVers() -{ - int len = strlen(FZ_VERSION); - char* retstr = NULL; - - if (len > 0) - { - /* This allocation ensures that Marshal will release in the managed code */ - retstr = (char*)::CoTaskMemAlloc(len + 1); - strcpy(retstr, FZ_VERSION); - } - return retstr; -} - -SYMBOL_DECLSPEC char* __stdcall mGetLinkItem(int k, double *top_x, double - *top_y, double *height, double *width, int *topage, int *type) -{ - char* retstr = NULL; - - if (k < 0 || k > gLinkResults->size()) - return false; - sh_link muctx_link = gLinkResults->at(k); - *top_x = muctx_link->upper_left.X; - *top_y = muctx_link->upper_left.Y; - *width = muctx_link->lower_right.X - muctx_link->upper_left.X; - *height = muctx_link->lower_right.Y - muctx_link->upper_left.Y; - *topage = muctx_link->page_num; - *type = (int) muctx_link->type; - - if (muctx_link->type == LINK_URI) - { - const char* str = muctx_link->uri.get(); - int len = strlen(str); - if (len > 0) - { - /* This allocation ensures that Marshal will release in the managed code */ - retstr = (char*)::CoTaskMemAlloc(len + 1); - strcpy(retstr, str); - } - muctx_link->uri.release(); - } - return retstr; -} - -SYMBOL_DECLSPEC void __stdcall mReleaseLink() -{ - if (gTextResults != nullptr) - gTextResults.reset(); -} - -SYMBOL_DECLSPEC void* __stdcall mCreateDisplayList(void *ctx, int page_num, - int *page_width, int *page_height) -{ - muctx *mu_ctx = static_cast(ctx); - return (void*)mu_ctx->CreateDisplayList(page_num, page_width, page_height); -} - -SYMBOL_DECLSPEC void* __stdcall mCreateDisplayListAnnot(void *ctx, int page_num) -{ - muctx *mu_ctx = static_cast(ctx); - return (void*)mu_ctx->CreateAnnotationList(page_num); -} - -SYMBOL_DECLSPEC void* __stdcall mCreateDisplayListText(void *ctx, int page_num, - int *page_width, int *page_height, void **text_out, int *length) -{ - muctx *mu_ctx = static_cast(ctx); - fz_text_page *text; - void *text_ptr = (void*)mu_ctx->CreateDisplayListText(page_num, page_width, page_height, - &text, length); - *text_out = (void*) text; - return text_ptr; -} - -SYMBOL_DECLSPEC int __stdcall mRenderPageMT(void *ctx, void *dlist, - void *annot_dlist, int page_width, int page_height, byte *bmp_data, int bmp_width, - int bmp_height, double scale, bool flipy) -{ - muctx *mu_ctx = static_cast(ctx); - - return (int) mu_ctx->RenderPageMT(dlist, annot_dlist, page_width, page_height, - &(bmp_data[0]), bmp_width, bmp_height, - scale, flipy, false, { 0, 0 }, { 0, 0 }); -} - -SYMBOL_DECLSPEC void __stdcall mReleaseText(void *ctx, void *page) -{ - muctx *mu_ctx = static_cast(ctx); - mu_ctx->ReleaseText(page); -} - -/* Information about a block of text */ -SYMBOL_DECLSPEC int __stdcall mGetTextBlock(void *page, int block_num, - double *top_x, double *top_y, double *height, double *width) -{ - fz_text_page *text = (fz_text_page*) page; - fz_text_block *block; - - if (text->blocks[block_num].type != FZ_PAGE_BLOCK_TEXT) - return 0; - block = text->blocks[block_num].u.text; - - *top_x = block->bbox.x0; - *top_y = block->bbox.y0; - *height = block->bbox.y1 - *top_y; - *width = block->bbox.x1 - *top_x; - return block->len; -} - -/* Information about a line of text */ -SYMBOL_DECLSPEC int __stdcall mGetTextLine(void *page, int block_num, int line_num, - double *top_x, double *top_y, double *height, double *width) -{ - int len = 0; - fz_text_block *block; - fz_text_line line; - fz_text_span *span; - fz_text_page *text = (fz_text_page*)page; - - block = text->blocks[block_num].u.text; - line = block->lines[line_num]; - - *top_x = line.bbox.x0; - *top_y = line.bbox.y0; - *height = line.bbox.y1 - *top_y; - *width = line.bbox.x1 - *top_x; - - for (span = line.first_span; span; span = span->next) - { - len += span->len; - } - return len; -} - -/* Information down to the character level */ -SYMBOL_DECLSPEC int __stdcall mGetTextCharacter(void *page, int block_num, int line_num, - int item_num, double *top_x, double *top_y, double *height, double *width) -{ - fz_text_block *block; - fz_text_line line; - fz_text_span *span; - fz_text_page *text = (fz_text_page*)page; - fz_char_and_box cab; - int index = item_num; - - block = text->blocks[block_num].u.text; - line = block->lines[line_num]; - - span = line.first_span; - while (index >= span->len) - { - index = index - span->len; /* Reset to start of next span */ - span = span->next; /* Get next span */ - } - - cab.c = span->text[index].c; - fz_text_char_bbox(&(cab.bbox), span, index); - *top_x = cab.bbox.x0; - *top_y = cab.bbox.y0; - *height = cab.bbox.y1 - *top_y; - *width = cab.bbox.x1 - *top_x; - - return cab.c; -} - -/* pdf clean methods */ -SYMBOL_DECLSPEC int __stdcall mExtractPages(PCWSTR infile, PCWSTR outfile, - PCWSTR password, bool has_password, bool linearize, int num_pages, void *pages) -{ - int argc = 3 + ((has_password) ? (2) : (0)) + ((linearize) ? (1) : (0)) + ((num_pages > 0) ? (1) : (0)); - char **argv; - int size_pages; - char *infilechar = String_to_char(infile); - char *outfilechar = String_to_char(outfile); - char *passchar; - int *pagenum = (int*) pages; - char *pagenums; - char* num; - int num_size; - int result; - int pos = 1; - - argv = new char*[argc]; - - if (has_password) - { - passchar = String_to_char(password); - argv[pos++] = "-p"; - argv[pos++] = passchar; - } - if (linearize) - { - argv[pos++] = "-l"; - } - - argv[pos++] = infilechar; - argv[pos++] = outfilechar; - - if (num_pages > 0) - { - /* Get last page, for number length and number of pages */ - int last = pagenum[num_pages - 1]; - if (last == 0) - { - num_size = 1; - size_pages = num_size; - } - else - { - num_size = floor(log10(last)) + 1; - size_pages = (num_size + 1) * num_pages; - } - - /* Create the list of page numbers */ - pagenums = new char[size_pages + 1]; - pagenums[0] = '\0'; - num = new char[num_size + 2]; - for (int kk = 0; kk < num_pages; kk++) - { - if (kk < num_pages - 1) - sprintf(num, "%d,", pagenum[kk]); - else - sprintf(num, "%d", pagenum[kk]); - strcat(pagenums, num); - } - argv[pos++] = pagenums; - } - - fz_optind = 1; - result = pdfclean_main(argc, argv); - - delete(num); - delete(infilechar); - delete(outfilechar); - if (has_password) - delete(passchar); - if (num_pages > 0) - delete(pagenums); - delete(argv); - return result; -} - -/* output methods */ -SYMBOL_DECLSPEC int __stdcall mSavePage(void *ctx, PCWSTR outfile, int page_num, - int resolution, int type, bool append) -{ - muctx *mu_ctx = static_cast(ctx); - char *outfilechar = String_to_char(outfile); - status_t result = mu_ctx->SavePage(outfilechar, page_num, resolution, type, - append); - delete(outfilechar); - if (result == S_ISOK) - return 0; - else - return -1; -} diff --git a/platform/winrt/mupdfnet/mupdfnet.h b/platform/winrt/mupdfnet/mupdfnet.h deleted file mode 100644 index 99d23062..00000000 --- a/platform/winrt/mupdfnet/mupdfnet.h +++ /dev/null @@ -1,77 +0,0 @@ - -#pragma once - -#include -#include -using namespace std; - -#ifdef __cplusplus -#define EXTERNC extern "C" -#else -#define EXTERNC -#endif - -typedef struct sharp_content_s -{ - int page; - PCWSTR string_margin; -} sharp_content_t; - -#define SYMBOL_DECLSPEC __declspec(dllexport) - -EXTERN_C SYMBOL_DECLSPEC void* __stdcall mInitialize(); -EXTERN_C SYMBOL_DECLSPEC void __stdcall mCleanUp(void *ctx); -EXTERN_C SYMBOL_DECLSPEC int __stdcall mGetPageCount(void *ctx); -EXTERN_C SYMBOL_DECLSPEC bool __stdcall mRequiresPassword(void *ctx); -EXTERN_C SYMBOL_DECLSPEC bool __stdcall mApplyPassword(void *ctx, PCWSTR password); -EXTERN_C SYMBOL_DECLSPEC int __stdcall mOpenDocument(void *ctx, PCWSTR filename); -EXTERN_C SYMBOL_DECLSPEC int __stdcall mMeasurePage(void *ctx, int page_num, double *width, double *height); -EXTERN_C SYMBOL_DECLSPEC int __stdcall mRenderPage(void *ctx, int page_num, - byte *bmp_data, int bmp_width, - int bmp_height, double scale, bool flipy); -EXTERN_C SYMBOL_DECLSPEC int __stdcall mGetContents(void *ctx); -EXTERN_C SYMBOL_DECLSPEC char* __stdcall mGetContentsItem(int k, int *len, int *page); -EXTERN_C SYMBOL_DECLSPEC void __stdcall mReleaseContents(); -EXTERN_C SYMBOL_DECLSPEC int __stdcall mTextSearchPage(void *ctx, int page_num, PCWSTR needle); -EXTERN_C SYMBOL_DECLSPEC bool __stdcall mGetTextSearchItem(int k, double *top_x, double - *top_y, double *height, double *width); -EXTERN_C SYMBOL_DECLSPEC void __stdcall mReleaseTextSearch(); -EXTERN_C SYMBOL_DECLSPEC char* __stdcall mGetVers(); -EXTERN_C SYMBOL_DECLSPEC char * __stdcall mGetText(void *ctx, int pagenum, int type); - -EXTERN_C SYMBOL_DECLSPEC int __stdcall mGetLinksPage(void *ctx, int page_num); -EXTERN_C SYMBOL_DECLSPEC char* __stdcall mGetLinkItem(int k, double *top_x, double - *top_y, double *height, double *width, int *topage, int *type); -EXTERN_C SYMBOL_DECLSPEC void __stdcall mReleaseLink(); - -EXTERN_C SYMBOL_DECLSPEC void* __stdcall mCreateDisplayList(void *ctx, int page_num, - int *page_width, int *page_height); -EXTERN_C SYMBOL_DECLSPEC void* __stdcall mCreateDisplayListText(void *ctx, int page_num, - int *page_width, int *page_height, void **textptr, int *length); -EXTERN_C SYMBOL_DECLSPEC void* __stdcall mCreateDisplayListAnnot(void *ctx, - int page_num); - -EXTERN_C SYMBOL_DECLSPEC int __stdcall mRenderPageMT(void *ctx, void *dlist, - void *annot_dlist, int page_width, int page_height, byte *bmp_data, int bmp_width, - int bmp_height, double scale, bool flipy); - -EXTERN_C SYMBOL_DECLSPEC int __stdcall mGetTextBlock(void *text, int block_num, - double *top_x, double *top_y, double *height, double *width); - -EXTERN_C SYMBOL_DECLSPEC int __stdcall mGetTextLine(void *text, int block_num, - int line_num, double *top_x, double *top_y, double *height, double *width); - -EXTERN_C SYMBOL_DECLSPEC int __stdcall mGetTextCharacter(void *text, int block_num, - int line_num, int item_num, double *top_x, double *top_y, double *height, - double *width); - -EXTERN_C SYMBOL_DECLSPEC void __stdcall mReleaseText(void *ctx, void *page); - -EXTERN_C SYMBOL_DECLSPEC void __stdcall mSetAA(void *ctx, int level); - -/* pdfclean methods */ -EXTERN_C SYMBOL_DECLSPEC int __stdcall mExtractPages(PCWSTR infile, PCWSTR outfile, - PCWSTR password, bool has_password, bool linearize, int num_pages, void *pages); -/* output */ -EXTERN_C SYMBOL_DECLSPEC int __stdcall mSavePage(void *ctx, PCWSTR outfile, int page_num, - int resolution, int type, bool append); diff --git a/platform/winrt/mupdfnet/mupdfnet.vcxproj b/platform/winrt/mupdfnet/mupdfnet.vcxproj deleted file mode 100644 index 2db67449..00000000 --- a/platform/winrt/mupdfnet/mupdfnet.vcxproj +++ /dev/null @@ -1,221 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {4468C2E0-6C90-4FA5-8A48-0A9629776167} - CppDynamicLinkLibrary - Win32Proj - - - - DynamicLibrary - Unicode - true - v120 - - - DynamicLibrary - Unicode - v120 - - - DynamicLibrary - Unicode - true - v120 - - - DynamicLibrary - Unicode - v120 - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)\gsview\bin\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - $(SolutionDir)\gsview\bin\$(Configuration)\ - $(Platform)\$(Configuration)\ - true - $(SolutionDir)\gsview\bin\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - $(SolutionDir)\gsview\bin\$(Configuration)\ - $(Platform)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - - - $(ProjectName)64 - - - $(ProjectName)64 - - - $(ProjectName)32 - - - $(ProjectName)32 - - - - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - ../../../include/;../mupdfwinrt; - - - - - true - Windows - MachineX86 - ../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies) - - - - - X64 - - - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - ../../../include/;../mupdfwinrt; - false - - - - - true - Windows - MachineX64 - ../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies) - - - - - MaxSpeed - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions) - MultiThreaded - true - - - Level3 - ProgramDatabase - ../../../include/;../mupdfwinrt; - - - - - true - Windows - true - true - MachineX86 - ../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies) - - - - - X64 - - - MaxSpeed - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions) - MultiThreaded - true - - - Level3 - ProgramDatabase - ../../../include/;../mupdfwinrt; - - - - - true - Windows - true - true - MachineX64 - ../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies) - - - - - true - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform/winrt/mupdfnet/mupdfnet.vcxproj.filters b/platform/winrt/mupdfnet/mupdfnet.vcxproj.filters deleted file mode 100644 index e06c17d7..00000000 --- a/platform/winrt/mupdfnet/mupdfnet.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/platform/winrt/mupdfwinrt/Cache.cpp b/platform/winrt/mupdfwinrt/Cache.cpp deleted file mode 100644 index b129710f..00000000 --- a/platform/winrt/mupdfwinrt/Cache.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include "pch.h" -#include "Cache.h" - -Cache::Cache(void) -{ - this->size = 0; - this->head = NULL; - this->tail = NULL; -} - -Cache::~Cache(void) -{ -} - -void Cache::Empty(fz_context *mu_ctx) -{ - if (this != nullptr) { - cache_entry_t *curr_entry = this->head; - - while (curr_entry != NULL) - { - cache_entry_t *old_entry = curr_entry; - curr_entry = old_entry->next; - fz_drop_display_list(mu_ctx, old_entry->dlist); - - delete old_entry; - } - this->size = 0; - this->head = NULL; - this->tail = NULL; - } -} - -void Cache::Add(int value, int width_in, int height_in, fz_display_list *dlist, - fz_context *mu_ctx) -{ - std::lock_guard lock(cache_lock); - - /* If full, then delete the tail */ - if (size >= MAX_DISPLAY_CACHE_SIZE) - { - cache_entry_t *curr_entry = this->tail; - cache_entry_t *prev_entry = curr_entry->prev; - - if (prev_entry != NULL) - prev_entry->next = NULL; - else - head = NULL; - - tail = prev_entry; - - /* Decrement the caches rc of this list */ - fz_drop_display_list(mu_ctx, curr_entry->dlist); - delete curr_entry; - size--; - } - - /* Make a new entry and stick at head */ - cache_entry_t *new_entry = new cache_entry_t; - - new_entry->dlist = dlist; - new_entry->index = value; - new_entry->width = width_in; - new_entry->height = height_in; - new_entry->prev = NULL; - if (head == NULL) - { - new_entry->next = NULL; - head = new_entry; - tail = new_entry; - } - else - { - new_entry->next = head; - head->prev = new_entry; - head = new_entry; - } - size++; - /* We are going to use this item now */ - fz_keep_display_list(mu_ctx, new_entry->dlist); -} - -fz_display_list* Cache::Use(int value, int *width_out, int *height_out, fz_context *mu_ctx) -{ - std::lock_guard lock(cache_lock); - cache_entry_t *curr_entry = this->head; - - while (curr_entry != NULL) - { - if (curr_entry->index == value) - break; - curr_entry = curr_entry->next; - } - if (curr_entry != NULL) - { - fz_keep_display_list(mu_ctx, curr_entry->dlist); - /* Move this to the front */ - if (curr_entry != head) - { - cache_entry_t *prev_entry = curr_entry->prev; - cache_entry_t *next_entry = curr_entry->next; - prev_entry->next = next_entry; - - if (next_entry != NULL) - next_entry->prev = prev_entry; - else - tail = prev_entry; - - curr_entry->prev = NULL; - curr_entry->next = head; - head->prev = curr_entry; - head = curr_entry; - } - *width_out = curr_entry->width; - *height_out = curr_entry->height; - return curr_entry->dlist; - } - else - return NULL; -} diff --git a/platform/winrt/mupdfwinrt/Cache.h b/platform/winrt/mupdfwinrt/Cache.h deleted file mode 100644 index e8c9801d..00000000 --- a/platform/winrt/mupdfwinrt/Cache.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include -extern "C" { - #include "mupdf/fitz.h" -} - -#define MAX_DISPLAY_CACHE_SIZE 3 - -typedef struct cache_entry_s cache_entry_t; - -struct cache_entry_s -{ - int number; - int width; - int height; - fz_display_list *dlist; - cache_entry_t *next; - cache_entry_t *prev; - int index; -}; - -class Cache -{ -private: - int size; - cache_entry_t *head; - cache_entry_t *tail; - std::mutex cache_lock; - -public: - Cache(void); - ~Cache(void); - void GetSize(int *width, int *height); - fz_display_list* Use(int value, int *width, int *height, fz_context *mu_ctx); - void Add(int value, int width, int height, fz_display_list *dlist, fz_context *mu_ctx); - void Empty(fz_context *mu_ctx); -}; diff --git a/platform/winrt/mupdfwinrt/ContentItem.cpp b/platform/winrt/mupdfwinrt/ContentItem.cpp deleted file mode 100644 index eff1f58b..00000000 --- a/platform/winrt/mupdfwinrt/ContentItem.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "pch.h" -#include "ContentItem.h" - -using namespace mupdfwinrt; - -ContentItem::ContentItem(void) -{ - StringOrig = nullptr; - StringMargin = nullptr; - Page = 0; -} diff --git a/platform/winrt/mupdfwinrt/ContentItem.h b/platform/winrt/mupdfwinrt/ContentItem.h deleted file mode 100644 index 7077127d..00000000 --- a/platform/winrt/mupdfwinrt/ContentItem.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - -using namespace Platform; /* For String */ - -namespace mupdfwinrt { - [Windows::UI::Xaml::Data::Bindable] - public ref class ContentItem sealed - { - private: - int page; - String^ string_orig; - String^ string_margin; - - public: - ContentItem(void); - - property int Page - { - int get() - { - return (page); - } - - void set(int value) - { - if (value < 0) - throw ref new Platform::InvalidArgumentException(); - page = value; - } - } - - property String^ StringOrig - { - String^ get() - { - return (string_orig); - } - - void set(String^ value) - { - string_orig = value; - } - } - - property String^ StringMargin - { - String^ get() - { - return (string_margin); - } - - void set(String^ value) - { - string_margin = value; - } - } - }; -} diff --git a/platform/winrt/mupdfwinrt/Links.cpp b/platform/winrt/mupdfwinrt/Links.cpp deleted file mode 100644 index 50db8ff2..00000000 --- a/platform/winrt/mupdfwinrt/Links.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "pch.h" -#include "Links.h" -#include "status.h" - -using namespace mupdfwinrt; - -Links::Links(void) -{ - this->uri = nullptr; - this->page_num = -1; - this->type = NOT_SET; -} diff --git a/platform/winrt/mupdfwinrt/Links.h b/platform/winrt/mupdfwinrt/Links.h deleted file mode 100644 index 39ebfc0b..00000000 --- a/platform/winrt/mupdfwinrt/Links.h +++ /dev/null @@ -1,88 +0,0 @@ -#pragma once - -#include "utils.h" -#include "status.h" - -using namespace Windows::Foundation; - -namespace mupdfwinrt -{ - public ref class Links sealed - { - private: - int type; - Point upper_left; - Point lower_right; - Windows::Foundation::Uri ^uri; - int page_num; - public: - Links(void); - - property int Type - { - int get() - { - return (type); - } - - void set(int value) - { - if (value > NOT_SET) - throw ref new Platform::InvalidArgumentException(); - type = value; - } - } - - property Point UpperLeft - { - Point get() - { - return upper_left; - } - - void set(Point value) - { - upper_left = value; - } - } - - property Point LowerRight - { - Point get() - { - return lower_right; - } - - void set(Point value) - { - lower_right = value; - } - } - - property int PageNum - { - int get() - { - return page_num; - } - - void set(int value) - { - page_num = value; - } - } - - property Windows::Foundation::Uri^ Uri - { - Windows::Foundation::Uri^ get() - { - return uri; - } - - void set(Windows::Foundation::Uri^ value) - { - uri = value; - } - } - }; -} diff --git a/platform/winrt/mupdfwinrt/muctx.cpp b/platform/winrt/mupdfwinrt/muctx.cpp deleted file mode 100644 index d5c34c80..00000000 --- a/platform/winrt/mupdfwinrt/muctx.cpp +++ /dev/null @@ -1,895 +0,0 @@ -#pragma once - -#include "pch.h" -#include "muctx.h" -#include "Cache.h" -#include - -/* This class interfaces to mupdf API with minimal windows objects - * (other than the file streaming stuff) */ -static int textlen(fz_text_page *page); - -#ifdef _WINRT_DLL -// Attempt to use t.wait() -//#include -//using namespace concurrency; -/* File streaming set up for WinRT */ -static int win_next_file(fz_stream *stm, int len) -{ - void *temp = stm->state; - win_stream_struct *state = reinterpret_cast (temp); - IRandomAccessStream^ Stream = state->stream; - unsigned char *buf = state->public_buffer; - unsigned long long curr_pos = Stream->Position; - unsigned long long length = Stream->Size; - DataReader^ local_reader = ref new DataReader(Stream); - if (local_reader == nullptr) - return 0; - - // This does not work here. mupdf is not set up to wait for win_next_file - // to complete in an ansyn manner - //auto t = create_task(local_reader->LoadAsync(len)); - //t.wait(); - DataReaderLoadOperation^ result = local_reader->LoadAsync(len); - while (result->Status != AsyncStatus::Completed) { - } - result->GetResults(); - - /* First see what is available */ - int curr_len2 = local_reader->UnconsumedBufferLength; - if (curr_len2 < len) - len = curr_len2; - - /* And make sure that we have enough room */ - if (len > sizeof(state->public_buffer)) - len = sizeof(state->public_buffer); - - Platform::Array^ arrByte = ref new Platform::Array(len); - if (arrByte == nullptr) - return 0; - local_reader->ReadBytes(arrByte); - - memcpy(buf, arrByte->Data, len); - local_reader->DetachStream(); - - stm->rp = buf; - stm->wp = buf + len; - stm->pos += len; - if (len == 0) - return EOF; - return *stm->rp++; -} - -static void win_seek_file(fz_stream *stm, int offset, int whence) -{ - void *temp = stm->state; - win_stream_struct *stream = reinterpret_cast (temp); - IRandomAccessStream^ Stream = stream->stream; - unsigned long long curr_pos = Stream->Position; - unsigned long long length = Stream->Size; - unsigned long long n; - - if (whence == SEEK_END) - { - n = length + offset; - } - else if (whence == SEEK_CUR) - { - n = curr_pos + offset; - } - else if (whence == SEEK_SET) - { - n = offset; - } - Stream->Seek(n); - curr_pos = Stream->Position; - stm->pos = n; - stm->wp = stm->rp; -} - -static void win_close_file(fz_context *ctx, void *state) -{ - win_stream_struct *win_stream = reinterpret_cast (state); - IRandomAccessStream^ stream = win_stream->stream; - delete stream; -} - -status_t muctx::InitializeStream(IRandomAccessStream^ readStream, char *ext) -{ - win_stream.stream = readStream; - fz_stream *mu_stream = fz_new_stream(mu_ctx, 0, win_next_file, win_close_file, NULL); - mu_stream->seek = win_seek_file; - mu_stream->state = reinterpret_cast (&win_stream); - - /* Now lets see if we can open the file */ - fz_try(mu_ctx) - { - mu_doc = fz_open_document_with_stream(mu_ctx, ext, mu_stream); - } - fz_always(mu_ctx) - { - fz_close(mu_stream); - } - fz_catch(mu_ctx) - { - return E_FAILURE; - } - return S_ISOK; -} -#else -status_t muctx::OpenDocument(char *filename) -{ - fz_try(mu_ctx) - { - this->mu_doc = fz_open_document(mu_ctx, filename); - } - fz_catch(mu_ctx) - { - return E_FAILURE; - } - return S_ISOK; -} -#endif - -/* mutext functions see mupdf readme for details */ -static void lock_mutex(void *user, int lock) -{ - LPCRITICAL_SECTION locks = (LPCRITICAL_SECTION)user; - EnterCriticalSection(&locks[lock]); -} - -static void unlock_mutex(void *user, int lock) -{ - LPCRITICAL_SECTION locks = (LPCRITICAL_SECTION)user; - LeaveCriticalSection(&locks[lock]); -} - -void muctx::CleanUp(void) -{ - fz_free_outline(mu_ctx, mu_outline); - fz_close_document(mu_doc); - page_cache->Empty(mu_ctx); - annot_cache->Empty(mu_ctx); - fz_free_context(mu_ctx); - - delete page_cache; - delete annot_cache; - annot_cache = NULL; - page_cache = NULL; - this->mu_ctx = NULL; - this->mu_doc = NULL; - this->mu_outline = NULL; -} - -void muctx::SetAA(int level) -{ - fz_set_aa_level(mu_ctx, level); -} - -/* Set up the context, mutex and cookie */ -status_t muctx::InitializeContext() -{ - int i; - - /* Get the mutexes set up */ - for (i = 0; i < FZ_LOCK_MAX; i++) - InitializeCriticalSectionEx(&mu_criticalsec[i], 0, 0); - mu_locks.user = &mu_criticalsec[0]; - mu_locks.lock = lock_mutex; - mu_locks.unlock = unlock_mutex; - - /* Allocate the context */ - this->mu_ctx = fz_new_context(NULL, &mu_locks, FZ_STORE_DEFAULT); - if (this->mu_ctx == NULL) - { - return E_OUTOFMEM; - } - else - { - fz_register_document_handlers(this->mu_ctx); - return S_ISOK; - } -} - -/* Initializer */ -muctx::muctx(void) -{ - mu_ctx = NULL; - mu_doc = NULL; - mu_outline = NULL; - page_cache = new Cache(); - annot_cache = new Cache(); -} - -/* Destructor */ -muctx::~muctx(void) -{ - fz_free_outline(mu_ctx, mu_outline); - fz_close_document(mu_doc); - page_cache->Empty(mu_ctx); - annot_cache->Empty(mu_ctx); - fz_free_context(mu_ctx); - - mu_ctx = NULL; - mu_doc = NULL; - mu_outline = NULL; - delete page_cache; - page_cache = NULL; - delete annot_cache; - annot_cache = NULL; -} - -/* Return the documents page count */ -int muctx::GetPageCount() -{ - if (this->mu_doc == NULL) - return -1; - else - return this->mu_doc->count_pages(this->mu_doc); -} - -/* Get page size */ -int muctx::MeasurePage(int page_num, point_t *size) -{ - fz_rect rect; - fz_page *page = NULL; - fz_rect *bounds; - - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - bounds = fz_bound_page(mu_doc, page, &rect); - size->X = bounds->x1 - bounds->x0; - size->Y = bounds->y1 - bounds->y0; - } - fz_always(mu_ctx) - { - fz_free_page(mu_doc, page); - } - fz_catch(mu_ctx) - { - return E_FAIL; - } - return 0; -} - -/* Get page size */ -point_t muctx::MeasurePage(fz_page *page) -{ - point_t pageSize; - fz_rect rect; - fz_rect *bounds; - - bounds = fz_bound_page(mu_doc, page, &rect); - pageSize.X = bounds->x1 - bounds->x0; - pageSize.Y = bounds->y1 - bounds->y0; - - return pageSize; -} - -void muctx::FlattenOutline(fz_outline *outline, int level, - sh_vector_content contents_vec) -{ - char indent[8*4+1]; - if (level > 8) - level = 8; - memset(indent, ' ', level * 4); - indent[level * 4] = 0; - - std::string indent_str = indent; - std::string str_indent; - - while (outline) - { - if (outline->dest.kind == FZ_LINK_GOTO) - { - int page = outline->dest.ld.gotor.page; - if (page >= 0 && outline->title) - { - /* Add to the contents std:vec */ - sh_content content_item(new content_t()); - content_item->page = page; - content_item->string_orig = outline->title; - str_indent = content_item->string_orig; - str_indent.insert(0, indent_str); - content_item->string_margin = str_indent; - contents_vec->push_back(content_item); - } - } - FlattenOutline(outline->down, level + 1, contents_vec); - outline = outline->next; - } -} - -int muctx::GetContents(sh_vector_content contents_vec) -{ - fz_outline *root = NULL; - int has_content = 0; - - fz_var(root); - fz_try(mu_ctx) - { - root = fz_load_outline(mu_doc); - if (root != NULL) - { - has_content = 1; - FlattenOutline(root, 0, contents_vec); - } - } - fz_always(mu_ctx) - { - fz_free_outline(mu_ctx, root); - } - fz_catch(mu_ctx) - { - return E_FAIL; - } - return has_content; -} - -int muctx::GetTextSearch(int page_num, char* needle, sh_vector_text texts_vec) -{ - fz_page *page = NULL; - fz_text_sheet *sheet = NULL; - fz_device *dev = NULL; - fz_text_page *text = NULL; - int hit_count = 0; - int k; - - fz_var(page); - fz_var(sheet); - fz_var(dev); - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - sheet = fz_new_text_sheet(mu_ctx); - text = fz_new_text_page(mu_ctx); - dev = fz_new_text_device(mu_ctx, sheet, text); - fz_run_page(mu_doc, page, dev, &fz_identity, NULL); - fz_free_device(dev); /* Why does this need to be done here? Seems odd */ - dev = NULL; - hit_count = fz_search_text_page(mu_ctx, text, needle, mu_hit_bbox, nelem(mu_hit_bbox)); - - for (k = 0; k < hit_count; k++) - { - sh_text text_search(new text_search_t()); - text_search->upper_left.X = mu_hit_bbox[k].x0; - text_search->upper_left.Y = mu_hit_bbox[k].y0; - text_search->lower_right.X = mu_hit_bbox[k].x1; - text_search->lower_right.Y = mu_hit_bbox[k].y1; - texts_vec->push_back(text_search); - } - } - fz_always(mu_ctx) - { - fz_free_page(mu_doc, page); - fz_free_device(dev); - fz_free_text_sheet(mu_ctx, sheet); - fz_free_text_page(mu_ctx, text); - } - fz_catch(mu_ctx) - { - return E_FAIL; - } - return hit_count; -} - -/* Get the links and pack into a smart pointer structure */ -unsigned int muctx::GetLinks(int page_num, sh_vector_link links_vec) -{ - fz_page *page = NULL; - fz_link *links = NULL; - int k = 0; - unsigned int num_links = 0; - - fz_var(page); - fz_var(links); - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - links = fz_load_links(mu_doc, page); - - fz_link *curr_link = links; - if (curr_link != NULL) - { - /* Get our smart pointer structure filled */ - while (curr_link != NULL) - { - fz_rect curr_rect = curr_link->rect; - sh_link link(new document_link_t()); - - link->upper_left.X = curr_rect.x0; - link->upper_left.Y = curr_rect.y0; - link->lower_right.X = curr_rect.x1; - link->lower_right.Y = curr_rect.y1; - - switch (curr_link->dest.kind) - { - case FZ_LINK_GOTO: - - link->type = LINK_GOTO; - link->page_num = curr_link->dest.ld.gotor.page; - break; - - case FZ_LINK_URI: - { - int lenstr = strlen(curr_link->dest.ld.uri.uri); - std::unique_ptr uri(new char[lenstr + 1]); - strcpy_s(uri.get(), lenstr + 1, curr_link->dest.ld.uri.uri); - link->uri.swap(uri); - link->type = LINK_URI; - break; - } - - default: - link->type = NOT_SET; - - } - links_vec->push_back(link); - curr_link = curr_link->next; - num_links += 1; - } - } - } - fz_always(mu_ctx) - { - fz_free_page(mu_doc, page); - fz_drop_link(mu_ctx, links); - } - fz_catch(mu_ctx) - { - return E_FAIL; - } - return num_links; -} - -fz_display_list * muctx::CreateAnnotationList(int page_num) -{ - fz_device *dev = NULL; - fz_page *page = NULL; - int width, height; - - /* First see if we have this one in the cache */ - fz_display_list *dlist = annot_cache->Use(page_num, &width, &height, mu_ctx); - if (dlist != NULL) - return dlist; - - /* Apparently not, lets go ahead and create and add to cache */ - fz_var(dev); - fz_var(page); - fz_var(dlist); - - fz_try(mu_ctx) - { - fz_annot *annot; - page = fz_load_page(mu_doc, page_num); - annot = fz_first_annot(mu_doc, page); - if (annot != NULL) - { - /* Create display list */ - dlist = fz_new_display_list(mu_ctx); - dev = fz_new_list_device(mu_ctx, dlist); - - for (annot = fz_first_annot(mu_doc, page); annot; annot = fz_next_annot(mu_doc, annot)) - fz_run_annot(mu_doc, page, annot, dev, &fz_identity, NULL); - annot_cache->Add(page_num, 0, 0, dlist, mu_ctx); - } - } - fz_always(mu_ctx) - { - fz_free_device(dev); - fz_free_page(mu_doc, page); - } - fz_catch(mu_ctx) - { - fz_drop_display_list(mu_ctx, dlist); - return NULL; - } - return dlist; -} - -fz_display_list * muctx::CreateDisplayList(int page_num, int *width, int *height) -{ - fz_device *dev = NULL; - fz_page *page = NULL; - point_t page_size; - - /* First see if we have this one in the cache */ - fz_display_list *dlist = page_cache->Use(page_num, width, height, mu_ctx); - if (dlist != NULL) - return dlist; - - /* Apparently not, lets go ahead and create and add to cache */ - fz_var(dev); - fz_var(page); - fz_var(dlist); - - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - - /* Create a new list */ - dlist = fz_new_display_list(mu_ctx); - dev = fz_new_list_device(mu_ctx, dlist); - fz_run_page_contents(mu_doc, page, dev, &fz_identity, NULL); - page_size = MeasurePage(page); - *width = page_size.X; - *height = page_size.Y; - /* Add it to the cache and set that it is in use */ - page_cache->Add(page_num, *width, *height, dlist, mu_ctx); - } - fz_always(mu_ctx) - { - fz_free_device(dev); - fz_free_page(mu_doc, page); - } - fz_catch(mu_ctx) - { - fz_drop_display_list(mu_ctx, dlist); - return NULL; - } - return dlist; -} - -/* A special version which will create the display list AND get the information - that we need for various text selection tasks */ -fz_display_list * muctx::CreateDisplayListText(int page_num, int *width, int *height, - fz_text_page **text_out, int *length) -{ - fz_text_sheet *sheet = NULL; - fz_text_page *text = NULL; - fz_device *dev = NULL; - fz_device *textdev = NULL; - fz_page *page = NULL; - - point_t page_size; - *length = 0; - - /* First see if we have this one in the cache */ - fz_display_list *dlist = page_cache->Use(page_num, width, height, mu_ctx); - if (dlist != NULL) - return dlist; - - /* Apparently not, lets go ahead and create and add to cache */ - fz_var(dev); - fz_var(textdev); - fz_var(page); - fz_var(dlist); - fz_var(sheet); - fz_var(text); - - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - sheet = fz_new_text_sheet(mu_ctx); - text = fz_new_text_page(mu_ctx); - - /* Create a new list */ - dlist = fz_new_display_list(mu_ctx); - dev = fz_new_list_device(mu_ctx, dlist); - - /* Deal with text device */ - textdev = fz_new_text_device(mu_ctx, sheet, text); - fz_run_page(mu_doc, page, textdev, &fz_identity, NULL); - - *length = text->len; - fz_free_device(textdev); - textdev = NULL; - *text_out = text; - - fz_run_page_contents(mu_doc, page, dev, &fz_identity, NULL); - page_size = MeasurePage(page); - *width = page_size.X; - *height = page_size.Y; - /* Add it to the cache and set that it is in use */ - page_cache->Add(page_num, *width, *height, dlist, mu_ctx); - } - fz_always(mu_ctx) - { - fz_free_device(dev); - fz_free_page(mu_doc, page); - fz_free_text_sheet(mu_ctx, sheet); - - } - fz_catch(mu_ctx) - { - fz_drop_display_list(mu_ctx, dlist); - return NULL; - } - return dlist; -} - -/* Render display list bmp_data buffer. No lock needed for this operation */ -status_t muctx::RenderPageMT(void *dlist, void *a_dlist, int page_width, int page_height, - unsigned char *bmp_data, int bmp_width, int bmp_height, - float scale, bool flipy, bool tile, point_t top_left, - point_t bottom_right) -{ - fz_device *dev = NULL; - fz_pixmap *pix = NULL; - fz_matrix ctm, *pctm = &ctm; - fz_context *ctx_clone = NULL; - fz_display_list *display_list = (fz_display_list*) dlist; - fz_display_list *annot_displaylist = (fz_display_list*) a_dlist; - - ctx_clone = fz_clone_context(mu_ctx); - - fz_var(dev); - fz_var(pix); - fz_var(display_list); - fz_var(annot_displaylist); - - fz_try(ctx_clone) - { - pctm = fz_scale(pctm, scale, scale); - /* Flip on Y. */ - if (flipy) - { - ctm.f = (float) page_height * ctm.d; - ctm.d = -ctm.d; - ctm.f += top_left.Y; - } - else - { - ctm.f -= top_left.Y; - } - ctm.e -= top_left.X; - - pix = fz_new_pixmap_with_data(ctx_clone, fz_device_bgr(ctx_clone), - bmp_width, bmp_height, bmp_data); - fz_clear_pixmap_with_value(ctx_clone, pix, 255); - dev = fz_new_draw_device(ctx_clone, pix); - fz_run_display_list(display_list, dev, pctm, NULL, NULL); - if (annot_displaylist != NULL) - fz_run_display_list(annot_displaylist, dev, pctm, NULL, NULL); - - } - fz_always(ctx_clone) - { - fz_free_device(dev); - fz_drop_pixmap(ctx_clone, pix); - fz_drop_display_list(ctx_clone, display_list); - fz_drop_display_list(ctx_clone, annot_displaylist); - } - fz_catch(ctx_clone) - { - fz_free_context(ctx_clone); - return E_FAILURE; - } - fz_free_context(ctx_clone); - return S_ISOK; -} - -/* Render page_num to size width by height into bmp_data buffer. Lock needed. */ -status_t muctx::RenderPage(int page_num, unsigned char *bmp_data, int bmp_width, - int bmp_height, float scale, bool flipy) -{ - fz_device *dev = NULL; - fz_pixmap *pix = NULL; - fz_page *page = NULL; - fz_matrix ctm, *pctm = &ctm; - point_t page_size; - - fz_var(dev); - fz_var(pix); - fz_var(page); - - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - page_size = MeasurePage(page); - pctm = fz_scale(pctm, scale, scale); - /* Flip on Y */ - if (flipy) - { - ctm.f = bmp_height; - ctm.d = -ctm.d; - } - pix = fz_new_pixmap_with_data(mu_ctx, fz_device_bgr(mu_ctx), bmp_width, - bmp_height, bmp_data); - fz_clear_pixmap_with_value(mu_ctx, pix, 255); - dev = fz_new_draw_device(mu_ctx, pix); - fz_run_page(mu_doc, page, dev, pctm, NULL); - - fz_annot *annot; - for (annot = fz_first_annot(mu_doc, page); annot; annot = fz_next_annot(mu_doc, annot)) - fz_run_annot(mu_doc, page, annot, dev, &fz_identity, NULL); - } - fz_always(mu_ctx) - { - fz_free_device(dev); - fz_drop_pixmap(mu_ctx, pix); - fz_free_page(mu_doc, page); - } - fz_catch(mu_ctx) - { - return E_FAILURE; - } - return S_ISOK; -} - -bool muctx::RequiresPassword(void) -{ - return fz_needs_password(mu_doc) != 0; -} - -bool muctx::ApplyPassword(char* password) -{ - return fz_authenticate_password(mu_doc, password) != 0; -} - -std::string muctx::GetText(int page_num, int type) -{ - fz_output *out = NULL; - fz_device *dev = NULL; - fz_page *page = NULL; - fz_text_sheet *sheet = NULL; - fz_text_page *text = NULL; - fz_buffer *buf = NULL; - std::string output; - - fz_var(dev); - fz_var(page); - fz_var(sheet); - fz_var(text); - fz_var(buf); - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - sheet = fz_new_text_sheet(mu_ctx); - text = fz_new_text_page(mu_ctx); - dev = fz_new_text_device(mu_ctx, sheet, text); - fz_run_page(mu_doc, page, dev, &fz_identity, NULL); - fz_free_device(dev); - dev = NULL; - fz_analyze_text(mu_ctx, sheet, text); - buf = fz_new_buffer(mu_ctx, 256); - out = fz_new_output_with_buffer(mu_ctx, buf); - if (type == HTML) - { - fz_print_text_page_html(mu_ctx, out, text); - } - else if (type == XML) - { - fz_print_text_page_xml(mu_ctx, out, text); - } - else - { - fz_print_text_page(mu_ctx, out, text); - } - output = std::string(((char*)buf->data)); - } - fz_always(mu_ctx) - { - fz_free_device(dev); - fz_free_page(mu_doc, page); - fz_free_text_sheet(mu_ctx, sheet); - fz_free_text_page(mu_ctx, text); - fz_drop_buffer(mu_ctx, buf); - } - fz_catch(mu_ctx) - { - return nullptr; - } - return output; -} - -void muctx::ReleaseText(void *text) -{ - fz_text_page *text_page = (fz_text_page*) text; - fz_free_text_page(mu_ctx, text_page); -} - -/* To do: banding */ -status_t muctx::SavePage(char *filename, int page_num, int resolution, int type, - bool append) -{ - float zoom; - fz_matrix ctm; - fz_rect bounds, tbounds; - FILE *file = NULL; - fz_output *out = NULL; - fz_device *dev = NULL; - int width, height; - fz_display_list *dlist = NULL; - fz_display_list *annot_dlist = NULL; - fz_page *page = NULL; - bool valid = true; - fz_pixmap *pix = NULL; - fz_irect ibounds; - - fz_var(dev); - fz_var(page); - fz_var(dlist); - fz_var(annot_dlist); - fz_var(pix); - - fz_try(mu_ctx) - { - page = fz_load_page(mu_doc, page_num); - fz_bound_page(mu_doc, page, &bounds); - zoom = resolution / 72; - fz_scale(&ctm, zoom, zoom); - tbounds = bounds; - fz_transform_rect(&tbounds, &ctm); - fz_round_rect(&ibounds, &tbounds); - - /* First see if we have this one in the cache */ - dlist = page_cache->Use(page_num, &width, &height, mu_ctx); - annot_dlist = annot_cache->Use(page_num, &width, &height, mu_ctx); - - if (type == SVG_OUT) - { - file = fopen(filename, "wb"); - if (file == NULL) - fz_throw(mu_ctx, FZ_ERROR_GENERIC, "cannot open file '%s'", filename); - out = fz_new_output_with_file(mu_ctx, file); - - dev = fz_new_svg_device(mu_ctx, out, tbounds.x1 - tbounds.x0, tbounds.y1 - tbounds.y0); - if (dlist != NULL) - fz_run_display_list(dlist, dev, &ctm, &tbounds, NULL); - else - fz_run_page(mu_doc, page, dev, &ctm, NULL); - if (annot_dlist != NULL) - fz_run_display_list(annot_dlist, dev, &ctm, &tbounds, NULL); - else - { - fz_annot *annot; - for (annot = fz_first_annot(mu_doc, page); annot; annot = fz_next_annot(mu_doc, annot)) - fz_run_annot(mu_doc, page, annot, dev, &fz_identity, NULL); - } - } - else - { - pix = fz_new_pixmap_with_bbox(mu_ctx, fz_device_rgb(mu_ctx), &ibounds); - fz_pixmap_set_resolution(pix, resolution); - fz_clear_pixmap_with_value(mu_ctx, pix, 255); - dev = fz_new_draw_device(mu_ctx, pix); - if (dlist != NULL) - fz_run_display_list(dlist, dev, &ctm, &tbounds, NULL); - else - fz_run_page(mu_doc, page, dev, &ctm, NULL); - if (annot_dlist != NULL) - fz_run_display_list(annot_dlist, dev, &ctm, &tbounds, NULL); - else - { - fz_annot *annot; - for (annot = fz_first_annot(mu_doc, page); annot; annot = fz_next_annot(mu_doc, annot)) - fz_run_annot(mu_doc, page, annot, dev, &fz_identity, NULL); - } - switch (type) - { - case PNM_OUT: - fz_write_pnm(mu_ctx, pix, filename); - break; - case PCL_OUT: /* This can do multi-page */ - fz_pcl_options options; - fz_pcl_preset(mu_ctx, &options, "ljet4"); - fz_write_pcl(mu_ctx, pix, filename, append, &options); - break; - case PWG_OUT: /* This can do multi-page */ - fz_write_pwg(mu_ctx, pix, filename, append, NULL); - break; - } - } - } - fz_always(mu_ctx) - { - if (pix != NULL) - fz_drop_pixmap(mu_ctx, pix); - fz_free_device(dev); - fz_free_page(mu_doc, page); - if (dlist != NULL) - fz_drop_display_list(mu_ctx, dlist); - if (out != NULL) - { - fz_close_output(out); - fclose(file); - } - } - fz_catch(mu_ctx) - { - return E_FAILURE; - } - return S_ISOK; -} \ No newline at end of file diff --git a/platform/winrt/mupdfwinrt/muctx.h b/platform/winrt/mupdfwinrt/muctx.h deleted file mode 100644 index 16c44cd1..00000000 --- a/platform/winrt/mupdfwinrt/muctx.h +++ /dev/null @@ -1,123 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include "status.h" -#include "Cache.h" -extern "C" { -#include "mupdf/fitz.h" -#include "mupdf/pdf-tools.h" -} - - -#define MAX_SEARCH 500 - -enum { SVG_OUT, PNM_OUT, PCL_OUT, PWG_OUT }; -enum { HTML = 0, XML, TEXT }; - -typedef struct point_s -{ - double X; - double Y; -} point_t; - -/* Links */ -typedef struct document_link_s -{ - link_t type; - point_t upper_left; - point_t lower_right; - std::unique_ptr uri; - int page_num; -} document_link_t; -#define sh_link std::shared_ptr -#define sh_vector_link std::shared_ptr> - -/* Text Search */ -typedef struct text_search_s -{ - point_t upper_left; - point_t lower_right; -} text_search_t; -#define sh_text std::shared_ptr -#define sh_vector_text std::shared_ptr> - -/* Content Results */ -typedef struct content_s -{ - int page; - std::string string_orig; - std::string string_margin; -} content_t; -#define sh_content std::shared_ptr -#define sh_vector_content std::shared_ptr> - -#ifdef _WINRT_DLL -using namespace Windows::Storage::Streams; -using namespace Windows::Foundation; - -typedef struct win_stream_struct_s -{ - IRandomAccessStream^ stream; - unsigned char public_buffer[4096]; -} win_stream_struct; -#else -typedef struct win_stream_struct_s -{ - char* stream; -} win_stream_struct; -#endif - -class muctx -{ -private: - CRITICAL_SECTION mu_criticalsec[FZ_LOCK_MAX]; - win_stream_struct win_stream; - fz_locks_context mu_locks; - fz_context *mu_ctx; - fz_document *mu_doc; - fz_outline *mu_outline; - fz_rect mu_hit_bbox[MAX_SEARCH]; - void FlattenOutline(fz_outline *outline, int level, - sh_vector_content contents_vec); - Cache *page_cache; - Cache *annot_cache; - -public: - muctx(void); - ~muctx(void); - void CleanUp(void); - int GetPageCount(); - status_t InitializeContext(); - status_t RenderPage(int page_num, unsigned char *bmp_data, int bmp_width, - int bmp_height, float scale, bool flipy); - status_t RenderPageMT(void *dlist, void *a_dlist, int page_width, int page_height, - unsigned char *bmp_data, int bmp_width, int bmp_height, - float scale, bool flipy, bool tile, point_t top_left, - point_t bottom_right); - fz_display_list* CreateDisplayList(int page_num, int *width, int *height); - fz_display_list * CreateDisplayListText(int page_num, int *width, - int *height, fz_text_page **text, int *length); - fz_display_list * CreateAnnotationList(int page_num); - int MeasurePage(int page_num, point_t *size); - point_t MeasurePage(fz_page *page); - unsigned int GetLinks(int page_num, sh_vector_link links_vec); - void SetAA(int level); - int GetTextSearch(int page_num, char* needle, sh_vector_text texts_vec); - int GetContents(sh_vector_content contents_vec); - std::string GetText(int page_num, int type); - void ReleaseText(void *text); - bool RequiresPassword(void); - bool ApplyPassword(char* password); - status_t SavePage(char *filename, int pagenum, int resolution, int type, - bool append); - -#ifdef _WINRT_DLL - status_t InitializeStream(IRandomAccessStream^ readStream, char *ext); -#else - status_t OpenDocument(char *filename); -#endif - -}; diff --git a/platform/winrt/mupdfwinrt/mudocument.cpp b/platform/winrt/mupdfwinrt/mudocument.cpp deleted file mode 100644 index 060144b3..00000000 --- a/platform/winrt/mupdfwinrt/mudocument.cpp +++ /dev/null @@ -1,470 +0,0 @@ -// mudocument.cpp - -/* This file contains the interface between the muctx class, which - implements the mupdf calls and the WinRT objects enabling calling from - C#, C++, Visual Basic, JavaScript applications */ - -#include "pch.h" -#include "mudocument.h" -#include "status.h" -#include "utils.h" - -using namespace mupdfwinrt; -using namespace concurrency; -using namespace Platform::Collections; - -mudocument::mudocument() -{ - this->mu_object.InitializeContext(); - this->links = nullptr; -} - -bool mudocument::RequiresPassword() -{ - return mu_object.RequiresPassword(); -} - -bool mudocument::ApplyPassword(String^ password) -{ - char* pass_char = String_to_char(password); - bool ok = mu_object.ApplyPassword(pass_char); - delete []pass_char; - return ok; -} - -void mudocument::CleanUp() -{ - this->mu_object.CleanUp(); -} - -int mudocument::GetNumPages() -{ - return this->mu_object.GetPageCount(); -} - -Point mudocument::GetPageSize(int page_num) -{ - Point size_out; - point_t size; - - mutex_lock.lock(); - int code = this->mu_object.MeasurePage(page_num, &size); - mutex_lock.unlock(); - if (code < 0) - throw ref new Exception(code, ref new String(L"Get Page Size Failed")); - - size_out.X = size.X; - size_out.Y = size.Y; - return size_out; -} - -Windows::Foundation::IAsyncOperation^ mudocument::OpenFileAsync(StorageFile^ file) -{ - return create_async([this, file]() - { - String^ filetype = file->FileType; - const wchar_t *w = filetype->Data(); - int cb = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); - char* name = new char[cb]; - - WideCharToMultiByte(CP_UTF8, 0, w ,-1 ,name ,cb ,nullptr, nullptr); - char *ext = strrchr(name, '.'); - - auto t = create_task(file->OpenAsync(FileAccessMode::Read)); - - return t.then([this, file, ext](task task) - { - try - { - IRandomAccessStream^ readStream = task.get(); - UINT64 const size = readStream->Size; - - if (size <= MAXUINT32) - { - status_t code = this->mu_object.InitializeStream(readStream, ext); - if (code != S_ISOK) - delete readStream; - return (int) code; - } - else - { - delete readStream; - return (int) E_FAILURE; - } - } - catch(COMException^ ex) { - throw ref new FailureException("Open File Failed"); - } - }); - }); -} - -/* Header info for bmp stream so that we can use the image brush */ -static void Prepare_bmp(int width, int height, DataWriter ^dw) -{ - int row_size = width * 4; - int bmp_size = row_size * height + 54; - - dw->WriteString("BM"); - dw->ByteOrder = ByteOrder::LittleEndian; - dw->WriteInt32(bmp_size); - dw->WriteInt16(0); - dw->WriteInt16(0); - dw->WriteInt32(54); - dw->WriteInt32(40); - dw->WriteInt32(width); - dw->WriteInt32(height); - dw->WriteInt16(1); - dw->WriteInt16(32); - dw->WriteInt32(0); - dw->WriteInt32(row_size * height); - dw->WriteInt32(2835); - dw->WriteInt32(2835); - dw->WriteInt32(0); - dw->WriteInt32(0); -} - -/* Do the search through the pages with an async task with progress callback */ -Windows::Foundation::IAsyncOperationWithProgress^ - mudocument::SearchDocumentWithProgressAsync(String^ textToFind, int dir, - int start_page, int num_pages) -{ - return create_async([this, textToFind, dir, start_page, num_pages] - (progress_reporter reporter) -> int - { - double progress; - int box_count, result; - - for (int i = start_page; i >= 0 && i < num_pages; i += dir) - { - box_count = this->ComputeTextSearch(textToFind, i); - result = i; - if (dir == SEARCH_FORWARD) - { - progress = 100.0 * (double) (i + 1) / (double) num_pages; - } - else - { - progress = 100.0 * (double) (num_pages - i) / (double) num_pages; - } - /* We could have it only update with certain percentage changes but - we are just looping over the pages here so it is not too bad */ - reporter.report(progress); - - if (is_task_cancellation_requested()) - { - // Cancel the current task. - cancel_current_task(); - } - - if (box_count > 0) - { - return result; - } - if (is_task_cancellation_requested()) - { - } - } - reporter.report(100.0); - if (box_count == 0) - return TEXT_NOT_FOUND; - else - return result; - }); -} - -/* Pack the page into a bitmap. This is used in the DirectX code for printing - not in the xaml related code. It is also used by the thumbnail creation - thread to ensure that the thumbs are created in order and we don't create - thousands of threads */ -int mudocument::RenderPageBitmapSync(int page_num, int bmp_width, int bmp_height, - float scale, bool use_dlist, bool flipy, bool tile, - Point top_left, Point bottom_right, - Array^* bit_map) -{ - status_t code; - /* Allocate space for bmp */ - Array^ bmp_data = - ref new Array(bmp_height * 4 * bmp_width); - - if (bmp_data == nullptr) - { - *bit_map = nullptr; - return E_OUTOFMEM; - } - - if (use_dlist) - { - void *dlist; - void *annotlist; - int page_height; - int page_width; - - mutex_lock.lock(); - /* This lock will keep out issues in mupdf as well as race conditions - in the page cache */ - dlist = (void*) mu_object.CreateDisplayList(page_num, &page_width, - &page_height); - annotlist = (void*)mu_object.CreateAnnotationList(page_num); - /* Rendering of display list can occur with other threads so unlock */ - mutex_lock.unlock(); - if (dlist == NULL) - { - *bit_map = nullptr; - return E_FAILURE; - } - code = mu_object.RenderPageMT(dlist, annotlist, page_width, page_height, - &(bmp_data[0]), bmp_width, bmp_height, - scale, flipy, tile, { top_left.X, top_left.Y }, - { bottom_right.X, bottom_right.Y }); - } - else - { - /* Not dealing with the case of tiling and no display list at this time. */ - if (tile) - { - *bit_map = nullptr; - return E_FAILURE; - } - /* Rendering in immediate mode. Keep lock in place */ - mutex_lock.lock(); - code = mu_object.RenderPage(page_num, &(bmp_data[0]), bmp_width, - bmp_height, scale, flipy); - mutex_lock.unlock(); - } - if (code != S_ISOK) - { - *bit_map = nullptr; - return E_FAILURE; - } - - *bit_map = bmp_data; - return (int) code; -} - -/* Pack the page into a bmp stream */ -Windows::Foundation::IAsyncOperation^ - mudocument::RenderPageAsync(int page_num, int bmp_width, int bmp_height, - bool use_dlist, float scale) -{ - return create_async([this, bmp_width, bmp_height, page_num, use_dlist, scale] - (cancellation_token ct) -> InMemoryRandomAccessStream^ - { - /* Allocate space for bmp */ - Array^ bmp_data = - ref new Array(bmp_height * 4 * bmp_width); - if (bmp_data == nullptr) - return nullptr; - - /* Set up the memory stream */ - InMemoryRandomAccessStream ^ras = ref new InMemoryRandomAccessStream(); - if (ras == nullptr) - return nullptr; - DataWriter ^dw = ref new DataWriter(ras->GetOutputStreamAt(0)); - if (dw == nullptr) - return nullptr; - - status_t code; - - /* Go ahead and write our header data into the memory stream */ - Prepare_bmp(bmp_width, bmp_height, dw); - - if (use_dlist) - { - void *dlist; - void *annotlist; - int page_height; - int page_width; - - mutex_lock.lock(); - /* This lock will keep out issues in mupdf as well as race conditions - in the page cache */ - dlist = (void*) mu_object.CreateDisplayList(page_num, &page_width, - &page_height); - annotlist = (void*)mu_object.CreateAnnotationList(page_num); - mutex_lock.unlock(); - if (dlist == NULL) - return nullptr; - /* Rendering of display list can occur with other threads so unlock */ - code = mu_object.RenderPageMT(dlist, annotlist, page_width, page_height, - &(bmp_data[0]), bmp_width, bmp_height, - scale, true, false, { 0.0, 0.0 }, - { (float) bmp_width, (float) bmp_height }); - } - else - { - /* Rendering in immediate mode. Keep lock in place */ - mutex_lock.lock(); - code = mu_object.RenderPage(page_num, &(bmp_data[0]), bmp_width, - bmp_height, scale, true); - mutex_lock.unlock(); - } - if (code != S_ISOK) - return nullptr; - /* Now the data into the memory stream */ - dw->WriteBytes(bmp_data); - auto t = create_task(dw->StoreAsync()); - t.wait(); - /* Return raster stream */ - return ras; - }); -} - -unsigned int mudocument::ComputeLinks(int page_num) -{ - /* We get back a standard smart pointer from muctx interface and go to WinRT - type here */ - sh_vector_link link_smart_ptr_vec(new std::vector()); - mutex_lock.lock(); - unsigned int num_items = mu_object.GetLinks(page_num, link_smart_ptr_vec); - mutex_lock.unlock(); - if (num_items == 0 || num_items == E_FAIL) - return 0; - /* Pack into winRT type*/ - this->links = ref new Platform::Collections::Vector(); - if (this->links == nullptr) - return 0; - for (unsigned int k = 0; k < num_items; k++) - { - auto new_link = ref new Links(); - if (new_link == nullptr) - { - this->links = nullptr; - return 0; - } - sh_link muctx_link = link_smart_ptr_vec->at(k); - new_link->LowerRight = { (float) muctx_link->lower_right.X, (float) muctx_link->lower_right.Y }; - new_link->UpperLeft = { (float) muctx_link->upper_left.X, (float) muctx_link->upper_left.Y }; - new_link->PageNum = muctx_link->page_num; - new_link->Type = muctx_link->type; - if (new_link->Type == LINK_URI) - { - String^ str = char_to_String(muctx_link->uri.get()); - // The URI to launch - new_link->Uri = ref new Windows::Foundation::Uri(str); - if (new_link->Uri == nullptr) - { - this->links = nullptr; - return 0; - } - } - this->links->Append(new_link); - } - return num_items; -} - -Links^ mudocument::GetLink(unsigned int k) -{ - if (k >= this->links->Size) - return nullptr; - return this->links->GetAt(k); -} - -int mudocument::ComputeTextSearch(String^ text, int page_num) -{ - /* We get back a standard smart pointer from muctx interface and go to - * WinRT type here */ - char* text_char = String_to_char(text); - sh_vector_text text_smart_ptr_vec(new std::vector()); - int num_items; - - mutex_lock.lock(); - num_items = mu_object.GetTextSearch(page_num, text_char, text_smart_ptr_vec); - mutex_lock.unlock(); - - if (num_items == 0) - return 0; - /* Pack into winRT type*/ - this->textsearch = ref new Platform::Collections::Vector(); - if (this->textsearch == nullptr) - return 0; - for (int k = 0; k < num_items; k++) - { - auto new_link = ref new Links(); - if (new_link == nullptr) - { - this->textsearch = nullptr; - return 0; - } - sh_text muctx_text = text_smart_ptr_vec->at(k); - new_link->LowerRight = { (float) muctx_text->lower_right.X, (float) muctx_text->lower_right.Y }; - new_link->UpperLeft = { (float) muctx_text->upper_left.X, (float) muctx_text->upper_left.Y }; - new_link->Type = TEXTBOX; - this->textsearch->Append(new_link); - } - delete []text_char; - return num_items; -} - -/* Return number of hits found on most recent page */ -int mudocument::TextSearchCount(void) -{ - if (this->textsearch != nullptr) - return this->textsearch->Size; - else - return 0; -} - -/* Returns the kth item for a page after a text search query */ -Links^ mudocument::GetTextSearch(unsigned int k) -{ - if (k >= this->textsearch->Size) - return nullptr; - return this->textsearch->GetAt(k); -} - -unsigned int mudocument::ComputeContents() -{ - /* We get back a standard smart pointer from muctx interface and go to - * WinRT type here */ - sh_vector_content content_smart_ptr_vec(new std::vector()); - int has_content; - - mutex_lock.lock(); - has_content = mu_object.GetContents(content_smart_ptr_vec); - mutex_lock.unlock(); - - if (!has_content) - return 0; - /* Pack into winRT type */ - this->contents = ref new Platform::Collections::Vector(); - if (this->contents == nullptr) - return 0; - unsigned int num_items = content_smart_ptr_vec->size(); - - for (unsigned int k = 0; k < num_items; k++) - { - auto new_content = ref new ContentItem(); - if (new_content == nullptr) - { - this->contents = nullptr; - return 0; - } - sh_content muctx_content = content_smart_ptr_vec->at(k); - new_content->Page = muctx_content->page; - new_content->StringMargin = char_to_String(muctx_content->string_margin.c_str()); - new_content->StringOrig = char_to_String(muctx_content->string_orig.c_str()); - this->contents->Append(new_content); - } - return num_items; -} - -ContentItem^ mudocument::GetContent(unsigned int k) -{ - if (k >= this->contents->Size) - return nullptr; - return this->contents->GetAt(k); -} - -String^ mudocument::ComputeHTML(int page_num) -{ - String^ html = nullptr; - std::string html_cstr; - - mutex_lock.lock(); - html_cstr = mu_object.GetText(page_num, HTML); - mutex_lock.unlock(); - - html = char_to_String(html_cstr.c_str()); - return html; -} diff --git a/platform/winrt/mupdfwinrt/mudocument.h b/platform/winrt/mupdfwinrt/mudocument.h deleted file mode 100644 index 9ab37ed7..00000000 --- a/platform/winrt/mupdfwinrt/mudocument.h +++ /dev/null @@ -1,55 +0,0 @@ -#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 -#include - -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; - Platform::Collections::Vector^ textsearch; - Platform::Collections::Vector^ contents; - public: - mudocument(); - void CleanUp(); - Windows::Foundation::IAsyncOperation^ OpenFileAsync(StorageFile^ file); - int GetNumPages(void); - Point GetPageSize(int page_num); - Windows::Foundation::IAsyncOperation^ - RenderPageAsync(int page_num, int width, int height, - bool use_dlist, float scale); - int RenderPageBitmapSync(int page_num, int bmp_width, int bmp_height, - float scale, bool use_dlist, bool flipy, bool tiling, Point top_left, - Point bottom_right, Array^* bit_map); - Windows::Foundation::IAsyncOperationWithProgress^ - SearchDocumentWithProgressAsync(String^ textToFind, int dir, - int start_page, int num_pages); - String^ ComputeHTML(int page_num); - int ComputeTextSearch(String^ text, int page_num); - Links^ GetTextSearch(unsigned int k); - int TextSearchCount(void); - unsigned int ComputeContents(void); - ContentItem^ GetContent(unsigned int k); - unsigned int ComputeLinks(int page_num); - Links^ GetLink(unsigned int k); - bool RequiresPassword(); - bool ApplyPassword(String^ password); - }; -} diff --git a/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj b/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj deleted file mode 100644 index fa162f0e..00000000 --- a/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj +++ /dev/null @@ -1,249 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {9e6ab41d-09a7-45a6-a53b-1e4bf3ac5b33} - Win32Proj - mupdfwinrt - mupdfwinrt - en-US - 12.0 - true - Windows Store - 8.1 - - - - DynamicLibrary - true - v120 - - - DynamicLibrary - true - v120 - - - DynamicLibrary - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - DynamicLibrary - false - true - v120 - - - - - - - - - - - - - - - - - - - - - - - - false - ..\$(Platform)\$(Configuration)\ - ..\$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - ..\$(Platform)\$(Configuration)\ - ..\$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - ..\$(Platform)\$(Configuration)\ - ..\$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - ..\$(Platform)\$(Configuration)\ - ..\$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - ..\$(Platform)\$(Configuration)\ - ..\$(Platform)\$(Configuration)\$(ProjectName)\ - - - false - ..\$(Platform)\$(Configuration)\ - ..\$(Platform)\$(Configuration)\$(ProjectName)\ - - - - Use - _WINRT_DLL;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - ../../../include/;%(AdditionalIncludeDirectories) - - - Console - runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib - false - - - - - Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - ../../../include/;%(AdditionalIncludeDirectories) - - - Console - runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib - false - - - - - Use - _WINRT_DLL;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - ../../../include/;%(AdditionalIncludeDirectories) - - - Console - runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib - false - - - - - Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - ../../../include/;%(AdditionalIncludeDirectories) - - - Console - runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib - false - - - - - Use - _WINRT_DLL;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - ../../../include/;%(AdditionalIncludeDirectories) - - - Console - runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib - false - - - - - Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - ../../../include/;%(AdditionalIncludeDirectories) - - - Console - runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib - false - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - \ No newline at end of file diff --git a/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj.filters b/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj.filters deleted file mode 100644 index 99e37356..00000000 --- a/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - 16ec6626-1276-4cf1-b7af-8d28de2c8f75 - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/platform/winrt/mupdfwinrt/pch.cpp b/platform/winrt/mupdfwinrt/pch.cpp deleted file mode 100644 index 01484ff5..00000000 --- a/platform/winrt/mupdfwinrt/pch.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// -// pch.cpp -// Include the standard header and generate the precompiled header. -// - -#include "pch.h" diff --git a/platform/winrt/mupdfwinrt/pch.h b/platform/winrt/mupdfwinrt/pch.h deleted file mode 100644 index f815ac97..00000000 --- a/platform/winrt/mupdfwinrt/pch.h +++ /dev/null @@ -1,6 +0,0 @@ -// -// pch.h -// Header for standard system include files. -// - -#pragma once diff --git a/platform/winrt/mupdfwinrt/status.h b/platform/winrt/mupdfwinrt/status.h deleted file mode 100644 index 9eea09aa..00000000 --- a/platform/winrt/mupdfwinrt/status.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -typedef enum { - S_ISOK = 0, - E_FAILURE = -1, - E_OUTOFMEM = -2, - E_NEEDPASSWORD = -3 -} status_t; - -typedef enum { - LINK_GOTO = 0, - LINK_URI, - TEXTBOX, /* Do double duty with this class */ - NOT_SET, -} link_t; - -#define SEARCH_FORWARD 1 -#define SEARCH_BACKWARD -1 -#define TEXT_NOT_FOUND -1 diff --git a/platform/winrt/mupdfwinrt/utils.cpp b/platform/winrt/mupdfwinrt/utils.cpp deleted file mode 100644 index 9c20c620..00000000 --- a/platform/winrt/mupdfwinrt/utils.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "pch.h" -#include "utils.h" - -/* Window string hurdles.... */ -String^ char_to_String(const char *char_in) -{ - size_t size = MultiByteToWideChar(CP_UTF8, 0, char_in, -1, NULL, 0); - wchar_t *pw; - pw = new wchar_t[size]; - if (!pw) - { - delete []pw; - return nullptr; - } - MultiByteToWideChar(CP_UTF8, 0, char_in, -1, pw, size ); - String^ str_out = ref new String(pw); - delete []pw; - return str_out; -} - -char* String_to_char(String^ text) -{ - const wchar_t *w = text->Data(); - int cb = WideCharToMultiByte(CP_UTF8, 0, text->Data(), -1, nullptr, 0, nullptr, nullptr); - char* charout = new char[cb]; - WideCharToMultiByte(CP_UTF8, 0, text->Data() ,-1 ,charout ,cb ,nullptr, nullptr); - return charout; -} diff --git a/platform/winrt/mupdfwinrt/utils.h b/platform/winrt/mupdfwinrt/utils.h deleted file mode 100644 index 78f4dbc4..00000000 --- a/platform/winrt/mupdfwinrt/utils.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include "Windows.h" -using namespace Platform; - -String^ char_to_String(const char *char_in); -char* String_to_char(String^ text); -- cgit v1.2.3