summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/README.txt39
-rw-r--r--platform/windows/generate.bat39
-rw-r--r--platform/windows/generated.vcxproj160
-rw-r--r--platform/windows/generated.vcxproj.filters60
-rw-r--r--platform/windows/gsview/About.xaml96
-rw-r--r--platform/windows/gsview/About.xaml.cs255
-rw-r--r--platform/windows/gsview/App.config6
-rw-r--r--platform/windows/gsview/App.xaml7
-rw-r--r--platform/windows/gsview/App.xaml.cs16
-rw-r--r--platform/windows/gsview/ContentEntry.cs29
-rw-r--r--platform/windows/gsview/ContentItem.cs42
-rw-r--r--platform/windows/gsview/Convert.xaml120
-rw-r--r--platform/windows/gsview/Convert.xaml.cs214
-rw-r--r--platform/windows/gsview/DocPage.cs281
-rw-r--r--platform/windows/gsview/Info.xaml11
-rw-r--r--platform/windows/gsview/Info.xaml.cs31
-rw-r--r--platform/windows/gsview/Install32/Install32.vdproj1225
-rw-r--r--platform/windows/gsview/Install64/Install64.vdproj1238
-rw-r--r--platform/windows/gsview/Links.cs31
-rw-r--r--platform/windows/gsview/MainWindow.xaml794
-rw-r--r--platform/windows/gsview/MainWindow.xaml.cs4906
-rw-r--r--platform/windows/gsview/OutputIntent.xaml50
-rw-r--r--platform/windows/gsview/OutputIntent.xaml.cs105
-rw-r--r--platform/windows/gsview/PageExtractSave.xaml59
-rw-r--r--platform/windows/gsview/PageExtractSave.xaml.cs213
-rw-r--r--platform/windows/gsview/Password.xaml15
-rw-r--r--platform/windows/gsview/Password.xaml.cs35
-rw-r--r--platform/windows/gsview/Properties/AssemblyInfo.cs55
-rw-r--r--platform/windows/gsview/Properties/Resources.Designer.cs153
-rw-r--r--platform/windows/gsview/Properties/Resources.resx148
-rw-r--r--platform/windows/gsview/Properties/Settings.Designer.cs26
-rw-r--r--platform/windows/gsview/Properties/Settings.settings7
-rw-r--r--platform/windows/gsview/Properties/pdfa_def.ps40
-rw-r--r--platform/windows/gsview/Properties/pdfx_def.ps48
-rw-r--r--platform/windows/gsview/README.txt8
-rw-r--r--platform/windows/gsview/RectList.cs99
-rw-r--r--platform/windows/gsview/Resources/ActualSize48.pngbin0 -> 4830 bytes
-rw-r--r--platform/windows/gsview/Resources/Close.icobin0 -> 29926 bytes
-rw-r--r--platform/windows/gsview/Resources/ContScrollFill48.pngbin0 -> 4269 bytes
-rw-r--r--platform/windows/gsview/Resources/ExpandFill48.pngbin0 -> 4753 bytes
-rw-r--r--platform/windows/gsview/Resources/FloppyDisk.icobin0 -> 304054 bytes
-rw-r--r--platform/windows/gsview/Resources/Left.icobin0 -> 29926 bytes
-rw-r--r--platform/windows/gsview/Resources/Message.pngbin0 -> 232 bytes
-rw-r--r--platform/windows/gsview/Resources/OpenFile.pngbin0 -> 3157 bytes
-rw-r--r--platform/windows/gsview/Resources/Right.icobin0 -> 29926 bytes
-rw-r--r--platform/windows/gsview/Resources/banner.pngbin0 -> 12172 bytes
-rw-r--r--platform/windows/gsview/Resources/contents.icobin0 -> 4286 bytes
-rw-r--r--platform/windows/gsview/Resources/copy.icobin0 -> 37611 bytes
-rw-r--r--platform/windows/gsview/Resources/folder_open.icobin0 -> 53411 bytes
-rw-r--r--platform/windows/gsview/Resources/gsview_app.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/hyperlink.pngbin0 -> 3531 bytes
-rw-r--r--platform/windows/gsview/Resources/info.pngbin0 -> 4639 bytes
-rw-r--r--platform/windows/gsview/Resources/pageCBZ.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pageEPS.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pageJPG.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pageOXPS.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pagePDF.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pagePNG.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pagePS.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/pageXPS.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/Resources/printer.icobin0 -> 55326 bytes
-rw-r--r--platform/windows/gsview/Resources/saveHS.pngbin0 -> 595 bytes
-rw-r--r--platform/windows/gsview/Resources/search.icobin0 -> 67646 bytes
-rw-r--r--platform/windows/gsview/Resources/search.pngbin0 -> 3491 bytes
-rw-r--r--platform/windows/gsview/Resources/thumbnail.icobin0 -> 1150 bytes
-rw-r--r--platform/windows/gsview/Resources/zoom_in.icobin0 -> 67646 bytes
-rw-r--r--platform/windows/gsview/Resources/zoom_out.icobin0 -> 67646 bytes
-rw-r--r--platform/windows/gsview/Selection.xaml49
-rw-r--r--platform/windows/gsview/Selection.xaml.cs235
-rw-r--r--platform/windows/gsview/Strings/en-US/Messages.Designer.cs63
-rw-r--r--platform/windows/gsview/Strings/en-US/Messages.resx101
-rw-r--r--platform/windows/gsview/TextBlock.cs121
-rw-r--r--platform/windows/gsview/TextCharacter.cs79
-rw-r--r--platform/windows/gsview/TextLine.cs121
-rw-r--r--platform/windows/gsview/ghostsharp.cs1165
-rw-r--r--platform/windows/gsview/gsIO.cs32
-rw-r--r--platform/windows/gsview/gsOutput.xaml51
-rw-r--r--platform/windows/gsview/gsOutput.xaml.cs60
-rw-r--r--platform/windows/gsview/gsprint.cs167
-rw-r--r--platform/windows/gsview/gsprintbg.cs261
-rw-r--r--platform/windows/gsview/gsview.csproj281
-rw-r--r--platform/windows/gsview/gsview.visualelementsmanifest.xml7
-rw-r--r--platform/windows/gsview/gsview_app.icobin0 -> 370070 bytes
-rw-r--r--platform/windows/gsview/mudocument.cs1747
-rw-r--r--platform/windows/libmupdf-nov8_winRT.vcxproj299
-rw-r--r--platform/windows/libmupdf-nov8_winRT.vcxproj.filters6
-rw-r--r--platform/windows/libmupdf/libmupdf.vcxproj360
-rw-r--r--platform/windows/libmupdf/libmupdf.vcxproj.filters639
-rw-r--r--platform/windows/libmupdf_winRT.vcxproj511
-rw-r--r--platform/windows/libmupdf_winRT.vcxproj.filters642
-rw-r--r--platform/windows/libthirdparty/libthirdparty.vcxproj418
-rw-r--r--platform/windows/libthirdparty/libthirdparty.vcxproj.filters825
-rw-r--r--platform/windows/libthirdparty_winRT.vcxproj571
-rw-r--r--platform/windows/libthirdparty_winRT.vcxproj.filters825
-rw-r--r--platform/windows/mupdf.sln762
-rw-r--r--platform/windows/mupdf_cpp/App.xaml20
-rw-r--r--platform/windows/mupdf_cpp/App.xaml.cpp131
-rw-r--r--platform/windows/mupdf_cpp/App.xaml.h24
-rw-r--r--platform/windows/mupdf_cpp/Assets/Logo.Scale-100.pngbin0 -> 14183 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/Logo.Scale-140.pngbin0 -> 19150 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/Logo.Scale-180.pngbin0 -> 24211 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/Logo.Scale-80.pngbin0 -> 11656 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/StoreLogo.scale-100.pngbin0 -> 5816 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/StoreLogo.scale-140.pngbin0 -> 7512 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/StoreLogo.scale-180.pngbin0 -> 9262 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/WideLogo.scale-100.pngbin0 -> 30014 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/WideLogo.scale-140.pngbin0 -> 51342 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/WideLogo.scale-180.pngbin0 -> 68929 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/WideLogo.scale-80.pngbin0 -> 22486 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/mupdf_smallogo.pngbin0 -> 4299 bytes
-rw-r--r--platform/windows/mupdf_cpp/Assets/mupdf_splash.pngbin0 -> 28390 bytes
-rw-r--r--platform/windows/mupdf_cpp/Common/StandardStyles.xaml1889
-rw-r--r--platform/windows/mupdf_cpp/DocumentPage.cpp15
-rw-r--r--platform/windows/mupdf_cpp/DocumentPage.h231
-rw-r--r--platform/windows/mupdf_cpp/MainPage.xaml299
-rw-r--r--platform/windows/mupdf_cpp/MainPage.xaml.cpp2394
-rw-r--r--platform/windows/mupdf_cpp/MainPage.xaml.h319
-rw-r--r--platform/windows/mupdf_cpp/Package.StoreAssociation.xml375
-rw-r--r--platform/windows/mupdf_cpp/Package.appxmanifest41
-rw-r--r--platform/windows/mupdf_cpp/PrintPage.cpp165
-rw-r--r--platform/windows/mupdf_cpp/PrintPage.h57
-rw-r--r--platform/windows/mupdf_cpp/RectList.cpp9
-rw-r--r--platform/windows/mupdf_cpp/RectList.h153
-rw-r--r--platform/windows/mupdf_cpp/mupdf_cpp.rcbin0 -> 2664 bytes
-rw-r--r--platform/windows/mupdf_cpp/mupdf_cpp.vcxproj280
-rw-r--r--platform/windows/mupdf_cpp/mupdf_cpp.vcxproj.filters75
-rw-r--r--platform/windows/mupdf_cpp/pch.cpp6
-rw-r--r--platform/windows/mupdf_cpp/pch.h18
-rw-r--r--platform/windows/mupdfnet/mupdfnet.cpp471
-rw-r--r--platform/windows/mupdfnet/mupdfnet.h77
-rw-r--r--platform/windows/mupdfnet/mupdfnet.vcxproj221
-rw-r--r--platform/windows/mupdfnet/mupdfnet.vcxproj.filters42
-rw-r--r--platform/windows/mupdfwinrt/Cache.cpp120
-rw-r--r--platform/windows/mupdfwinrt/Cache.h38
-rw-r--r--platform/windows/mupdfwinrt/ContentItem.cpp11
-rw-r--r--platform/windows/mupdfwinrt/ContentItem.h58
-rw-r--r--platform/windows/mupdfwinrt/Links.cpp12
-rw-r--r--platform/windows/mupdfwinrt/Links.h88
-rw-r--r--platform/windows/mupdfwinrt/muctx.cpp895
-rw-r--r--platform/windows/mupdfwinrt/muctx.h123
-rw-r--r--platform/windows/mupdfwinrt/mudocument.cpp470
-rw-r--r--platform/windows/mupdfwinrt/mudocument.h55
-rw-r--r--platform/windows/mupdfwinrt/mupdfwinrt.vcxproj249
-rw-r--r--platform/windows/mupdfwinrt/mupdfwinrt.vcxproj.filters27
-rw-r--r--platform/windows/mupdfwinrt/pch.cpp6
-rw-r--r--platform/windows/mupdfwinrt/pch.h6
-rw-r--r--platform/windows/mupdfwinrt/status.h19
-rw-r--r--platform/windows/mupdfwinrt/utils.cpp28
-rw-r--r--platform/windows/mupdfwinrt/utils.h7
149 files changed, 30583 insertions, 0 deletions
diff --git a/platform/windows/README.txt b/platform/windows/README.txt
new file mode 100644
index 00000000..4beaefbf
--- /dev/null
+++ b/platform/windows/README.txt
@@ -0,0 +1,39 @@
+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/windows/generate.bat b/platform/windows/generate.bat
new file mode 100644
index 00000000..934dec4b
--- /dev/null
+++ b/platform/windows/generate.bat
@@ -0,0 +1,39 @@
+@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/windows/generated.vcxproj b/platform/windows/generated.vcxproj
new file mode 100644
index 00000000..77127696
--- /dev/null
+++ b/platform/windows/generated.vcxproj
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|ARM">
+ <Configuration>Memento</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|Win32">
+ <Configuration>Memento</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A5053AA7-02E5-4903-B596-04F17AEB1526}</ProjectGuid>
+ <Keyword>MakeFileProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>11.0.51106.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ <NMakeBuildCommandLine>generate.bat</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>del /q ..\..\generated &amp;&amp; generate.bat</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>del /q ..\..\generated</NMakeCleanCommandLine>
+ <NMakeOutput>
+ </NMakeOutput>
+ <NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <NMakeBuildCommandLine>generate.bat</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>del /q ..\generated &amp;&amp; generate.bat</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>del /q ..\generated</NMakeCleanCommandLine>
+ <NMakeOutput />
+ <NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ <NMakeBuildCommandLine>generate.bat</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>del /q ..\..\generated &amp;&amp; generate.bat</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>del /q ..\..\generated</NMakeCleanCommandLine>
+ <NMakeOutput>
+ </NMakeOutput>
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <NMakeBuildCommandLine>generate.bat</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>del /q ..\generated &amp;&amp; generate.bat</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>del /q ..\generated</NMakeCleanCommandLine>
+ <NMakeOutput>generated\cmap_cns.h</NMakeOutput>
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <OutDir>$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ <NMakeBuildCommandLine>generate.bat</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>del /q ..\..\generated &amp;&amp; generate.bat</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>del /q ..\..\generated</NMakeCleanCommandLine>
+ <NMakeOutput>
+ </NMakeOutput>
+ <NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'">
+ <NMakeBuildCommandLine>generate.bat</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>del /q ..\generated &amp;&amp; generate.bat</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>del /q ..\generated</NMakeCleanCommandLine>
+ <NMakeOutput>generated\cmap_cns.h</NMakeOutput>
+ <NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\scripts\bin2hex.c" />
+ <ClCompile Include="..\..\scripts\cmapdump.c" />
+ <ClCompile Include="..\..\scripts\cquote.c" />
+ <ClCompile Include="..\..\scripts\fontdump.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\generated\gen_adobe_ca.h" />
+ <ClInclude Include="..\..\generated\gen_cmap_cns.h" />
+ <ClInclude Include="..\..\generated\gen_cmap_gb.h" />
+ <ClInclude Include="..\..\generated\gen_cmap_japan.h" />
+ <ClInclude Include="..\..\generated\gen_cmap_korea.h" />
+ <ClInclude Include="..\..\generated\gen_font_base14.h" />
+ <ClInclude Include="..\..\generated\gen_font_cjk.h" />
+ <ClInclude Include="..\..\generated\gen_font_cjk_full.h" />
+ <ClInclude Include="..\..\generated\gen_font_droid.h" />
+ <ClInclude Include="..\..\generated\gen_js_util.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="generate.bat" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/generated.vcxproj.filters b/platform/windows/generated.vcxproj.filters
new file mode 100644
index 00000000..94e3a8e0
--- /dev/null
+++ b/platform/windows/generated.vcxproj.filters
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="scripts">
+ <UniqueIdentifier>{336f64c0-6502-4d6d-91bd-4b52ff0e5be6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="generated">
+ <UniqueIdentifier>{d381092b-b798-4bb4-851b-9d85f2072427}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\scripts\bin2hex.c">
+ <Filter>scripts</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\scripts\cmapdump.c">
+ <Filter>scripts</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\scripts\cquote.c">
+ <Filter>scripts</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\scripts\fontdump.c">
+ <Filter>scripts</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\generated\gen_adobe_ca.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_cmap_cns.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_cmap_gb.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_cmap_japan.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_cmap_korea.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_font_cjk.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_font_cjk_full.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_font_droid.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_js_util.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\generated\gen_font_base14.h">
+ <Filter>generated</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="generate.bat" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/gsview/About.xaml b/platform/windows/gsview/About.xaml
new file mode 100644
index 00000000..13b3b142
--- /dev/null
+++ b/platform/windows/gsview/About.xaml
@@ -0,0 +1,96 @@
+<Window
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="gsview.About"
+ Title="{Binding ProductTitle, Mode=OneTime, RelativeSource={RelativeSource Self}}"
+ x:Uid="idAboutBox"
+ Style="{DynamicResource AboutDialogStyle}" WindowStartupLocation="CenterOwner" Height="353" Width="501">
+ <Window.Resources>
+ <XmlDataProvider x:Key="aboutProvider" XPath="ApplicationInfo" IsAsynchronous="False" IsInitialLoadEnabled="True">
+ <x:XData>
+ <ApplicationInfo xmlns="">
+ <Link Uri="http://www.gsview.com">More Info</Link>
+ </ApplicationInfo>
+ </x:XData>
+ </XmlDataProvider>
+ <Image x:Key="aboutLogo" Source="resources/banner.png" />
+ <Style x:Key="AboutDialogStyle" TargetType="{x:Type Window}">
+ <Setter Property="Height" Value="Auto" />
+ <Setter Property="Width" Value="500" />
+ <Setter Property="ShowInTaskbar" Value="False" />
+ <Setter Property="ResizeMode" Value="NoResize" />
+ <Setter Property="WindowStyle" Value="SingleBorderWindow" />
+ <Setter Property="SizeToContent" Value="Height" />
+ </Style>
+ <Style x:Key="DisplayAreaStyle" TargetType="{x:Type StackPanel}">
+ <Setter Property="Margin" Value="10,10,10,5" />
+ </Style>
+ <Style x:Key="BackgroundStyle" TargetType="{x:Type StackPanel}">
+ <Setter Property="Background">
+ <Setter.Value>
+ <LinearGradientBrush EndPoint="0,1">
+ <GradientStop Offset="0" Color="#FF317896" />
+ <GradientStop Offset="0.27" Color="White" />
+ <GradientStop Offset="0.85" Color="#FF317896" />
+ <GradientStop Offset="1" Color="#FF317896" />
+ </LinearGradientBrush>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ <Style TargetType="{x:Type Label}">
+ <Setter Property="Padding" Value="0" />
+ </Style>
+ <Style x:Key="ParagraphSeparator" TargetType="{x:Type Label}">
+ <Setter Property="Padding" Value="0,10,0,0" />
+ </Style>
+ <Style x:Key="LinkLabelStyle">
+ <Setter Property="Control.Padding" Value="0" />
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Center" />
+ </Style>
+ <Style x:Key="ReadOnlyDescStyle" TargetType="{x:Type TextBox}">
+ <Setter Property="MinLines" Value="6" />
+ <Setter Property="MaxLines" Value="6" />
+ <Setter Property="IsReadOnly" Value="True" />
+ <Setter Property="TextWrapping" Value="WrapWithOverflow" />
+ <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
+ </Style>
+ <Style x:Key="OkButtonStyle" TargetType="{x:Type Button}">
+ <Setter Property="MinWidth" Value="75" />
+ <Setter Property="Margin" Value="0,5" />
+ <Setter Property="DockPanel.Dock" Value="Right" />
+ <Setter Property="IsDefault" Value="True" />
+ <Setter Property="IsCancel" Value="True" />
+ </Style>
+ </Window.Resources>
+ <StackPanel x:Uid="clientArea" Style="{StaticResource BackgroundStyle}">
+ <StaticResource ResourceKey="aboutLogo" />
+ <StackPanel x:Uid="displayArea" Style="{StaticResource DisplayAreaStyle}"
+ DataContext="{Binding Mode=OneTime, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
+ <Label x:Name="productName" x:Uid="productName"
+ Content="{Binding Product, Mode=OneTime}" />
+ <StackPanel x:Uid="versionArea" Orientation="Horizontal">
+ <Label x:Name="versionLabel" x:Uid="VersionLabel" Content="Version - " />
+ <Label x:Name="version" x:Uid="version" Content="{Binding Version, Mode=OneTime}" />
+ </StackPanel>
+ <Label x:Name="copyright" x:Uid="copyright" Content="{Binding Copyright, Mode=OneTime}" />
+ <Label x:Name="company" x:Uid="company" Content="{Binding Company, Mode=OneTime}" />
+ <Label x:Name="reserved" x:Uid="reserved" Content="All Rights Reserved." />
+ <Label x:Name="info" x:Uid="info" Style="{StaticResource ParagraphSeparator}"
+ Content="Product details:" />
+ <TextBox x:Name="description" x:Uid="description" Text=""
+ Style="{StaticResource ReadOnlyDescStyle}" Height="140" />
+ <DockPanel x:Uid="buttonArea">
+ <Button x:Name="okButton" x:Uid="okButton" Style="{StaticResource OkButtonStyle}"
+ Content="OK" />
+ <Label x:Name="productLink" x:Uid="productLink" Style="{StaticResource LinkLabelStyle}" >
+ <Hyperlink x:Name="hyperlink" x:Uid="hyperlink" NavigateUri="{Binding LinkUri, Mode=OneTime}" Style="{StaticResource LinkLabelStyle}"
+ RequestNavigate="hyperlink_RequestNavigate">
+ <InlineUIContainer>
+ <TextBlock Text="{Binding LinkText, Mode=OneTime}" />
+ </InlineUIContainer>
+ </Hyperlink>
+ </Label>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+</Window> \ No newline at end of file
diff --git a/platform/windows/gsview/About.xaml.cs b/platform/windows/gsview/About.xaml.cs
new file mode 100644
index 00000000..6bd50cbe
--- /dev/null
+++ b/platform/windows/gsview/About.xaml.cs
@@ -0,0 +1,255 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Reflection;
+using System.Windows;
+using System.Windows.Data;
+using System.Xml;
+using System.ComponentModel;
+
+namespace gsview
+{
+ /// <summary>
+ /// Interaction logic for About.xaml
+ /// </summary>
+ public partial class About : Window
+ {
+ /// <summary>
+ /// Default constructor is protected so callers must use one with a parent.
+ /// </summary>
+ protected About()
+ {
+ InitializeComponent();
+ }
+
+
+ /// <summary>
+ /// Constructor that takes a parent for this About dialog.
+ /// </summary>
+ /// <param name="parent">Parent window for this dialog.</param>
+ public About(Window parent)
+ : this()
+ {
+ this.Owner = parent;
+ }
+
+ /// <summary>
+ /// Handles click navigation on the hyperlink in the About dialog.
+ /// </summary>
+ /// <param name="sender">Object the sent the event.</param>
+ /// <param name="e">Navigation events arguments.</param>
+ private void hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
+ {
+ if (e.Uri != null && string.IsNullOrEmpty(e.Uri.OriginalString) == false)
+ {
+ string uri = e.Uri.AbsoluteUri;
+ Process.Start(new ProcessStartInfo(uri));
+ e.Handled = true;
+ }
+ }
+
+ #region AboutData Provider
+ #region Member data
+ private XmlDocument xmlDoc = null;
+ private string variabledescription;
+ private const string propertyNameTitle = "Title";
+ private const string propertyNameDescription = "Description";
+ private const string propertyNameProduct = "Product";
+ private const string propertyNameCopyright = "Copyright";
+ private const string propertyNameCompany = "Company";
+ private const string xPathRoot = "ApplicationInfo/";
+ private const string xPathTitle = xPathRoot + propertyNameTitle;
+ private const string xPathVersion = xPathRoot + "Version";
+ private const string xPathDescription = xPathRoot + propertyNameDescription;
+ private const string xPathProduct = xPathRoot + propertyNameProduct;
+ private const string xPathCopyright = xPathRoot + propertyNameCopyright;
+ private const string xPathCompany = xPathRoot + propertyNameCompany;
+ private const string xPathLink = xPathRoot + "Link";
+ private const string xPathLinkUri = xPathRoot + "Link/@Uri";
+ #endregion
+
+ #region Properties
+ /// <summary>
+ /// Gets the title property, which is display in the About dialogs window title.
+ /// </summary>
+ public string ProductTitle
+ {
+ get
+ {
+ string result = CalculatePropertyValue<AssemblyTitleAttribute>(propertyNameTitle, xPathTitle);
+ if (string.IsNullOrEmpty(result))
+ {
+ // otherwise, just get the name of the assembly itself.
+ result = Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ }
+ return result;
+ }
+ }
+
+ /// <summary>
+ /// Gets the application's version information to show.
+ /// </summary>
+ public string Version
+ {
+ get
+ {
+ string result = string.Empty;
+ // first, try to get the version string from the assembly.
+ Version version = Assembly.GetExecutingAssembly().GetName().Version;
+ if (version != null)
+ {
+ result = version.ToString();
+ }
+ else
+ {
+ // if that fails, try to get the version from a resource in the Application.
+ result = GetLogicalResourceString(xPathVersion);
+ }
+ return result;
+ }
+ }
+
+ /// <summary>
+ /// Gets the description about the application.
+ /// </summary>
+ public string Description
+ {
+ get { return CalculatePropertyValue<AssemblyDescriptionAttribute>(propertyNameDescription, xPathDescription);}
+ }
+
+ public string VariableDescription
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// Gets the product's full name.
+ /// </summary>
+ public string Product
+ {
+ get { return CalculatePropertyValue<AssemblyProductAttribute>(propertyNameProduct, xPathProduct); }
+ }
+
+ /// <summary>
+ /// Gets the copyright information for the product.
+ /// </summary>
+ public string Copyright
+ {
+ get { return CalculatePropertyValue<AssemblyCopyrightAttribute>(propertyNameCopyright, xPathCopyright); }
+ }
+
+ /// <summary>
+ /// Gets the product's company name.
+ /// </summary>
+ public string Company
+ {
+ get { return CalculatePropertyValue<AssemblyCompanyAttribute>(propertyNameCompany, xPathCompany); }
+ }
+
+ /// <summary>
+ /// Gets the link text to display in the About dialog.
+ /// </summary>
+ public string LinkText
+ {
+ get { return GetLogicalResourceString(xPathLink); }
+ }
+
+ /// <summary>
+ /// Gets the link uri that is the navigation target of the link.
+ /// </summary>
+ public string LinkUri
+ {
+ get { return GetLogicalResourceString(xPathLinkUri); }
+ }
+ #endregion
+
+ #region Resource location methods
+ /// <summary>
+ /// Gets the specified property value either from a specific attribute, or from a resource dictionary.
+ /// </summary>
+ /// <typeparam name="T">Attribute type that we're trying to retrieve.</typeparam>
+ /// <param name="propertyName">Property name to use on the attribute.</param>
+ /// <param name="xpathQuery">XPath to the element in the XML data resource.</param>
+ /// <returns>The resulting string to use for a property.
+ /// Returns null if no data could be retrieved.</returns>
+ private string CalculatePropertyValue<T>(string propertyName, string xpathQuery)
+ {
+ string result = string.Empty;
+ // first, try to get the property value from an attribute.
+ object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(T), false);
+ if (attributes.Length > 0)
+ {
+ T attrib = (T)attributes[0];
+ PropertyInfo property = attrib.GetType().GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance);
+ if (property != null)
+ {
+ result = property.GetValue(attributes[0], null) as string;
+ }
+ }
+
+ // if the attribute wasn't found or it did not have a value, then look in an xml resource.
+ if (result == string.Empty)
+ {
+ // if that fails, try to get it from a resource.
+ result = GetLogicalResourceString(xpathQuery);
+ }
+ return result;
+ }
+
+ /// <summary>
+ /// Gets the XmlDataProvider's document from the resource dictionary.
+ /// </summary>
+ protected virtual XmlDocument ResourceXmlDocument
+ {
+ get
+ {
+ if (xmlDoc == null)
+ {
+ // if we haven't already found the resource XmlDocument, then try to find it.
+ XmlDataProvider provider = this.TryFindResource("aboutProvider") as XmlDataProvider;
+ if (provider != null)
+ {
+ // save away the XmlDocument, so we don't have to get it multiple times.
+ xmlDoc = provider.Document;
+ }
+ }
+ return xmlDoc;
+ }
+ }
+
+ /// <summary>
+ /// Gets the specified data element from the XmlDataProvider in the resource dictionary.
+ /// </summary>
+ /// <param name="xpathQuery">An XPath query to the XML element to retrieve.</param>
+ /// <returns>The resulting string value for the specified XML element.
+ /// Returns empty string if resource element couldn't be found.</returns>
+ protected virtual string GetLogicalResourceString(string xpathQuery)
+ {
+ string result = string.Empty;
+ // get the About xml information from the resources.
+ XmlDocument doc = this.ResourceXmlDocument;
+ if (doc != null)
+ {
+ // if we found the XmlDocument, then look for the specified data.
+ XmlNode node = doc.SelectSingleNode(xpathQuery);
+ if (node != null)
+ {
+ if (node is XmlAttribute)
+ {
+ // only an XmlAttribute has a Value set.
+ result = node.Value;
+ }
+ else
+ {
+ // otherwise, need to just return the inner text.
+ result = node.InnerText;
+ }
+ }
+ }
+ return result;
+ }
+ #endregion
+ #endregion
+ }
+}
diff --git a/platform/windows/gsview/App.config b/platform/windows/gsview/App.config
new file mode 100644
index 00000000..7d2f9bbc
--- /dev/null
+++ b/platform/windows/gsview/App.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <startup>
+
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup>
+</configuration>
diff --git a/platform/windows/gsview/App.xaml b/platform/windows/gsview/App.xaml
new file mode 100644
index 00000000..2b1d6cbf
--- /dev/null
+++ b/platform/windows/gsview/App.xaml
@@ -0,0 +1,7 @@
+<Application x:Class="gsview.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ StartupUri="MainWindow.xaml">
+ <Application.Resources>
+ </Application.Resources>
+</Application>
diff --git a/platform/windows/gsview/App.xaml.cs b/platform/windows/gsview/App.xaml.cs
new file mode 100644
index 00000000..76d96a97
--- /dev/null
+++ b/platform/windows/gsview/App.xaml.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace gsview
+{
+ /// <summary>
+ /// Interaction logic for App.xaml
+ /// </summary>
+ public partial class App : Application
+ {
+ }
+}
diff --git a/platform/windows/gsview/ContentEntry.cs b/platform/windows/gsview/ContentEntry.cs
new file mode 100644
index 00000000..a384be16
--- /dev/null
+++ b/platform/windows/gsview/ContentEntry.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace gsview
+{
+ public class ContentEntry
+ {
+ public String Name
+ {
+ get;
+ set;
+ }
+
+ public int PageNum
+ {
+ get;
+ set;
+ }
+
+ public ContentEntry(String Name, int PageNum)
+ {
+ this.Name = Name;
+ this.PageNum = PageNum;
+ }
+ };
+}
+
diff --git a/platform/windows/gsview/ContentItem.cs b/platform/windows/gsview/ContentItem.cs
new file mode 100644
index 00000000..a58bdf79
--- /dev/null
+++ b/platform/windows/gsview/ContentItem.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+//using System.Threading.Tasks;
+using System.ComponentModel;
+
+namespace gsview
+{
+ class ContentItem : INotifyPropertyChanged
+ {
+
+ public int Page
+ {
+ get;
+ internal set;
+ }
+
+ public String StringMargin
+ {
+ get;
+ internal set;
+ }
+
+ public ContentItem()
+ {
+ StringMargin = "";
+ Page = 0;
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public void ContentRefresh()
+ {
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs("StringMargin"));
+ PropertyChanged(this, new PropertyChangedEventArgs("Page"));
+ }
+ }
+ }
+}
diff --git a/platform/windows/gsview/Convert.xaml b/platform/windows/gsview/Convert.xaml
new file mode 100644
index 00000000..120f2eec
--- /dev/null
+++ b/platform/windows/gsview/Convert.xaml
@@ -0,0 +1,120 @@
+<Window x:Class="gsview.Convert"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="Convert Pages" Height="270.96" Width="419.424">
+
+ <DockPanel LastChildFill="True">
+
+ <!-- Device viewer/selector -->
+ <Grid x:Name="xaml_DeviceGrid" Width="100" Background="DarkGray" DockPanel.Dock="Left" Visibility="Visible" >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <TextBlock Grid.Column="0" Grid.Row="0" Margin="15,0,0,0">
+ <Bold>Devices:</Bold>
+ </TextBlock>
+
+ <ListView Grid.Column="0" Grid.Row="1" x:Name="xaml_DeviceList" HorizontalAlignment="Stretch"
+ ScrollViewer.CanContentScroll="False"
+ Background="White" Margin="10,5,10,10" SelectionMode="Single">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="5,5,0,0" HorizontalAlignment="Left">
+ <TextBlock TextWrapping="Wrap" Text="{Binding DeviceName}" FontFamily="Segoe UI" FontSize="11" />
+ </StackPanel>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </Grid>
+
+ <Grid x:Name="xaml_PageGrid" Width="100" Background="DarkGray" DockPanel.Dock="Left" Visibility="Visible">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <TextBlock Grid.Column="0" Grid.Row="0" Margin="15,0,0,0">
+ <Bold>Pages:</Bold>
+ </TextBlock>
+ <ListView Grid.Column="0" Grid.Row="1" x:Name="xaml_PageList" HorizontalAlignment="Stretch"
+ ScrollViewer.CanContentScroll="False"
+ Background="White" Margin="10,5,10,10">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="5,5,0,0" HorizontalAlignment="Left">
+ <TextBlock TextWrapping="Wrap" Text="{Binding PageString}" FontFamily="Segoe UI" FontSize="11" />
+ </StackPanel>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </Grid>
+
+ <!-- Buttons and extra options -->
+ <Grid Background="DarkGray" DockPanel.Dock="Left">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid Grid.Column="0" Grid.Row="0" Background="DarkGray">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Grid Background="DarkGray" Grid.Row="0" Grid.Column="0" Margin="30,15,0,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Button Grid.Column="0" Grid.Row="0" Width="50" Height="20" Name="xaml_Convert" Click="ConvertClick" Margin="0,0,0,0">
+ <TextBlock>Convert</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="1" Width="50" Height="20" Name="xaml_Cancel" Click="ConvertCancel" Margin="0,5,0,0">
+ <TextBlock>Cancel</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="2" Width="50" Height="20" Name="xaml_HelpConvert" Click="HelpConvert" Margin="0,5,0,0">
+ <TextBlock>Help</TextBlock>
+ </Button>
+ </Grid>
+
+
+ <Grid Background="DarkGray" Grid.Row="0" Grid.Column="1" Margin="25,15,0,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Button Grid.Column="0" Grid.Row="0" Width="70" Height="20" Name="xaml_AllPages" Click="AllPages" Margin="0,0,0,0">
+ <TextBlock>All Pages</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="1" Width="70" Height="20" Name="xaml_EvenPages" Click="EvenPages" Margin="0,5,0,0">
+ <TextBlock>Even Pages</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="2" Width="70" Height="20" Name="xaml_OddPages" Click="OddPages" Margin="0,5,0,0">
+ <TextBlock>Odd Pages</TextBlock>
+ </Button>
+ </Grid>
+ </Grid>
+
+
+ <TextBlock Grid.Column="0" Grid.Row="1" Margin="5,10,0,0">
+ <Bold>GhostScript Options:</Bold>
+ </TextBlock>
+ <TextBox x:Name="xaml_options" Grid.Row="2" Background="White" Height="40" Margin="5,5,5,5" Text=""></TextBox>
+ <TextBlock Grid.Column="0" Grid.Row="3" Margin="5,10,0,0">
+ <Bold>MuPDF Resolution:</Bold>
+ </TextBlock>
+ <TextBox x:Name="xaml_resolution" Grid.Row="4" Background="White" Margin="5,5,153,19" Text=""
+ PreviewTextInput="PreviewInput"/>
+ </Grid>
+
+
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/Convert.xaml.cs b/platform/windows/gsview/Convert.xaml.cs
new file mode 100644
index 00000000..c2c3ec65
--- /dev/null
+++ b/platform/windows/gsview/Convert.xaml.cs
@@ -0,0 +1,214 @@
+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"));
+ }
+ }
+ };
+
+ /// <summary>
+ /// Interaction logic for Convert.xaml
+ /// </summary>
+ public partial class Convert : Window
+ {
+ List<Device> GSDevices;
+ List<SelectPage> ConvertPages;
+
+ /* Callback to Main */
+ internal delegate void ConvertCallBackMain(object gsObject);
+ internal event ConvertCallBackMain ConvertUpdateMain;
+
+ public Convert(int num_pages)
+ {
+ InitializeComponent();
+ GSDevices = new List<Device>();
+ ConvertPages = new List<SelectPage>();
+ 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/windows/gsview/DocPage.cs b/platform/windows/gsview/DocPage.cs
new file mode 100644
index 00000000..267d99e8
--- /dev/null
+++ b/platform/windows/gsview/DocPage.cs
@@ -0,0 +1,281 @@
+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<RectList> textbox;
+ private List<RectList> 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<RectList> TextBox
+ {
+ get { return textbox; }
+ set
+ {
+ textbox = value;
+ OnPropertyChanged("TextBox");
+ }
+ }
+
+ public List<RectList> 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<RectList> TextBox, List<RectList> 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<DocPage>
+ {
+ public Pages()
+ : base()
+ {
+ }
+ }
+}
diff --git a/platform/windows/gsview/Info.xaml b/platform/windows/gsview/Info.xaml
new file mode 100644
index 00000000..4033d2ee
--- /dev/null
+++ b/platform/windows/gsview/Info.xaml
@@ -0,0 +1,11 @@
+<Window x:Class="gsview.Info"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="Info" Height="216.304" Width="430.434" Background="WhiteSmoke">
+ <DockPanel LastChildFill="True">
+ <Button DockPanel.Dock="Bottom" Width="70" Height="20" Name="xaml_CloseInfo" Click="OKClose" Margin="0,0,0,20" IsDefault="True">
+ <TextBlock Name="xaml_ButtonText" FontFamily="Courier" Text="OK"/>
+ </Button>
+ <TextBlock Name="xaml_TextInfo" Text="File not open" Margin="10,10,10,10" FontFamily="Courier New"></TextBlock>
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/Info.xaml.cs b/platform/windows/gsview/Info.xaml.cs
new file mode 100644
index 00000000..8a544aa8
--- /dev/null
+++ b/platform/windows/gsview/Info.xaml.cs
@@ -0,0 +1,31 @@
+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
+{
+ /// <summary>
+ /// Interaction logic for Info.xaml
+ /// </summary>
+ public partial class Info : Window
+ {
+ public Info()
+ {
+ InitializeComponent();
+ }
+
+ private void OKClose(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/platform/windows/gsview/Install32/Install32.vdproj b/platform/windows/gsview/Install32/Install32.vdproj
new file mode 100644
index 00000000..4fecfe14
--- /dev/null
+++ b/platform/windows/gsview/Install32/Install32.vdproj
@@ -0,0 +1,1225 @@
+"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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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/windows/gsview/Install64/Install64.vdproj b/platform/windows/gsview/Install64/Install64.vdproj
new file mode 100644
index 00000000..1d660c05
--- /dev/null
+++ b/platform/windows/gsview/Install64/Install64.vdproj
@@ -0,0 +1,1238 @@
+"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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\VsdBasicDialogs.wim"
+ }
+ "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_C0B167A59DF14DA9A4170111D28C6057"
+ {
+ "UseDynamicProperties" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "SourcePath" = "8:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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:<VsdDialogDir>\\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/windows/gsview/Links.cs b/platform/windows/gsview/Links.cs
new file mode 100644
index 00000000..ef902381
--- /dev/null
+++ b/platform/windows/gsview/Links.cs
@@ -0,0 +1,31 @@
+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/windows/gsview/MainWindow.xaml b/platform/windows/gsview/MainWindow.xaml
new file mode 100644
index 00000000..10d126bb
--- /dev/null
+++ b/platform/windows/gsview/MainWindow.xaml
@@ -0,0 +1,794 @@
+<Window x:Class="gsview.MainWindow"
+ xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="gsview" Height="850" Width="714" UseLayoutRounding="True"
+ KeyDown="OnKeyDownHandler" Closing="AppClosing">
+ <!-- UseLayoutRounding needed to avoid funny interpolation effects on pages -->
+
+ <Window.Resources>
+ <DataTemplate x:Key="PageTemplate">
+ <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="{Binding Height}" Width="{Binding Width}" Margin="0,0,0,0"
+ MouseLeftButtonDown="PageMouseDown" MouseMove="PageMouseMove" MouseLeftButtonUp="PageLeftClickUp" ClipToBounds="True"
+ MouseRightButtonDown="ShowContextMenu">
+ <Image Width="{Binding Width}" Height="{Binding Height}" Stretch="Fill" HorizontalAlignment="Center" Source="{Binding BitMap}">
+ <Image.BitmapEffect>
+ <DropShadowBitmapEffect Color="Black" Direction="-50"
+ ShadowDepth="40" Softness=".7" />
+ </Image.BitmapEffect>
+ </Image>
+
+ <!-- Single selection rectangle. Not a list -->
+ <Rectangle Width="{Binding Path=SelWidth}" Height="{Binding Path=SelHeight}" Stroke="{Binding Path=SelColor}">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=SelX}" Y="{Binding Path=SelY}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+
+ <ItemsControl ItemsSource="{Binding Path=TextBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Tag="{Binding Path=Index}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <ItemsControl ItemsSource="{Binding Path=SelectedLines}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <ItemsControl ItemsSource="{Binding Path=TextBlocks}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}" MouseLeave="ExitTextBlock" MouseEnter="EnterTextBlock">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <ItemsControl ItemsSource="{Binding Path=LinkBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Tag="{Binding Path=Index}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}" IsEnabled="True" MouseDown="LinkClick">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ </Canvas>
+ </DataTemplate>
+
+ <DataTemplate x:Key="ThumbTemplate">
+ <Image Width="{Binding Width}" Height="{Binding Height}" Stretch="Fill" HorizontalAlignment="Center" Source="{Binding BitMap}" Margin="24,24,0,0">
+ <Image.BitmapEffect>
+ <DropShadowBitmapEffect Color="Black" Direction="-50"
+ ShadowDepth="5" Softness=".7" />
+ </Image.BitmapEffect>
+ </Image>
+ </DataTemplate>
+
+ <Style TargetType="{x:Type Button}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsPressed" Value="True">
+ <Setter Property="Background" Value="Black" />
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ <!-- Customize listview to turn off selection -->
+ </Window.Resources>
+
+ <!-- The following is needed to set up all the keyboard short cuts -->
+ <Window.CommandBindings>
+ <CommandBinding Command="Open" Executed="OpenFileCommand"></CommandBinding>
+ <CommandBinding Command="SelectAll" Executed="SelectAllCommand"></CommandBinding>
+ <CommandBinding Command="Copy" Executed="CopyCommand"></CommandBinding>
+ <CommandBinding Command="Print" Executed="PrintCommand"></CommandBinding>
+ <CommandBinding Command="Help" Executed="HelpCommand"></CommandBinding>
+ <CommandBinding Command="Close" Executed="CloseCommand"></CommandBinding>
+ </Window.CommandBindings>
+ <Window.InputBindings>
+ <KeyBinding Key="O" Modifiers="Control" Command="Open"></KeyBinding>
+ <KeyBinding Key="A" Modifiers="Control" Command="SelectAll"></KeyBinding>
+ <KeyBinding Key="C" Modifiers="Control" Command="Copy"></KeyBinding>
+ <KeyBinding Key="P" Modifiers="Control" Command="Print"></KeyBinding>
+ <KeyBinding Key="W" Modifiers="Control" Command="Close"></KeyBinding>
+ <KeyBinding Key="F1" Command="Help"></KeyBinding>
+ </Window.InputBindings>
+
+ <!-- To do add in command short cuts and bindings -->
+ <DockPanel LastChildFill="True">
+ <!-- Menu item at top -->
+ <Menu IsMainMenu="True" DockPanel.Dock="Top">
+ <MenuItem Header="_File" x:Name="xaml_file">
+ <MenuItem Header="_Open..." Command="Open" InputGestureText="Ctrl+O">
+ <MenuItem.Icon>
+ <Image Source="Resources/OpenFile.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Save As..." x:Name="xaml_saveas">
+ <MenuItem.Icon>
+ <Image Source="Resources/saveHS.png" />
+ </MenuItem.Icon>
+ <MenuItem Header="PDF" Click="SavePDF" x:Name="xaml_savepdf"/>
+ <MenuItem Header="Linearized PDF" Click="Linearize" x:Name="xaml_linearize_pdf"/>
+ <MenuItem Header="PDF-1.3" Click="SavePDF13" x:Name="xaml_savepdf13"/>
+ <MenuItem Header="PDF/A" x:Name="xaml_savepdfa">
+ <MenuItem Header="PDF/A-1 RGB" Click="SavePDFA1_RGB" x:Name="xaml_savepdfa1_rgb"/>
+ <MenuItem Header="PDF/A-1 CMYK" Click="SavePDFA1_CMYK" x:Name="xaml_savepdfa1_cmyk"/>
+ <MenuItem Header="PDF/A-2 RGB" Click="SavePDFA2_RGB" x:Name="xaml_savepdfa2_rgb"/>
+ <MenuItem Header="PDF/A-2 CMYK" Click="SavePDFA2_CMYK" x:Name="xaml_savepdfa2_cmyk"/>
+ </MenuItem>
+ <MenuItem Header="PDF/X-3 Gray" Click="SavePDFX3_Gray" x:Name="xaml_savepdfx3_gray"/>
+ <MenuItem Header="PDF/X-3 CMYK" Click="SavePDFX3_CMYK" x:Name="xaml_savepdfx3_cmyk"/>
+ <MenuItem Header="PCL-XL" Click="SavePCLXL" x:Name="xaml_savepclxl"/>
+ <MenuItem Header="XPS" Click="SaveXPS"/>
+ <MenuItem Header="TEXT" Click="SaveText"/>
+ <MenuItem Header="HTML" Click="SaveHTML"/>
+ <MenuItem Header="XML" Click="SaveXML"/>
+ </MenuItem>
+ <MenuItem Header="_Close" Command="Close" InputGestureText="Ctrl+W" x:Name="xaml_closefile">
+ <MenuItem.Icon>
+ <Image Source="Resources/Close.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Info" Click="ShowInfo" x:Name="xaml_showinfo">
+ <MenuItem.Icon>
+ <Image Source="Resources/info.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Extract Selection..." x:Name="xaml_extractselection">
+ <MenuItem.Icon>
+ <Image Source="Resources/saveHS.png" />
+ </MenuItem.Icon>
+ <MenuItem Header="PDF" Click="ExtractPDF" x:Name="xaml_extractpdf"/>
+ <MenuItem Header="EPS" Click="ExtractEPS" x:Name="xaml_extracteps"/>
+ <MenuItem Header="PS" Click="ExtractPS" x:Name="xaml_extractps"/>
+ </MenuItem>
+ <MenuItem Header="Page Conversions..." Click="ConvertClick" x:Name="xaml_conversions">
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Print..." Command="Print" InputGestureText="Ctrl+P" x:Name="xaml_print">
+ <MenuItem.Icon>
+ <Image Source="Resources/printer.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Show Messages" Click="ShowGSMessage" x:Name="xaml_gsmessage">
+ <MenuItem.Icon>
+ <Image Source="Resources/Message.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </MenuItem>
+ <MenuItem Header="_Edit" x:Name="xaml_edit">
+ <MenuItem Header="Extract PDF Pages" Click="ExtractPages" x:Name="xaml_Extract">
+ <MenuItem.Icon>
+ <Image Source="Resources/saveHS.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Copy Page" Click="CopyPage" x:Name="xaml_copypage">
+ <MenuItem.Icon>
+ <Image Source="Resources/copy.ico" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="Paste Page To" x:Name="xaml_pastpageto">
+ <MenuItem Header="BMP" Click="PastePage" Tag="BMP"/>
+ <MenuItem Header="GIF" Click="PastePage" Tag="GIF"/>
+ <MenuItem Header="JPEG" Click="PastePage" Tag="JPG"/>
+ <MenuItem Header="PNG" Click="PastePage" Tag="PNG"/>
+ <MenuItem Header="TIFF" Click="PastePage" Tag="TIF"/>
+ <MenuItem Header="WDP (HD Photo)" Click="PastePage" Tag="WDP"/>
+ </MenuItem>
+ <Separator />
+ <MenuItem Header="Select Text All" Command="SelectAll" InputGestureText="Ctrl+A" x:Name="xaml_selectalltext" />
+ <MenuItem Header="Deselect Text" x:Name="xaml_deselecttext" />
+ <MenuItem Header="Copy Text" Command="Copy" InputGestureText="Ctrl+C" x:Name="xaml_copytext" />
+ </MenuItem>
+ <MenuItem Header="_View" x:Name="xaml_view">
+ <MenuItem Header="Next Page" Click="OnForwardPageClick"/>
+ <MenuItem Header="Previous Page" Click="OnBackPageClick"/>
+ <MenuItem Header="_Find" Click="Search"/>
+ </MenuItem>
+ <MenuItem Header="_Options">
+ <MenuItem Header="Output Intents" Click="OutputIntents" />
+ <MenuItem Header="Zoom Control" IsCheckable="true" Checked="ShowFooter" Unchecked="HideFooter"/>
+ <MenuItem Header="Show Annotations" IsCheckable="True" IsChecked ="True" Checked="AnnotationOn" Unchecked="AnnotationOff"/>
+ <MenuItem Header="AntiAlias" >
+ <MenuItem x:Name="xaml_AA_High" Header="High" IsCheckable="True" IsChecked="True" Checked="OnAAChecked" />
+ <MenuItem x:Name="xaml_AA_MedHigh" Header="Medium High" IsCheckable="True" IsChecked="False" Checked="OnAAChecked"/>
+ <MenuItem x:Name="xaml_AA_Med" Header="Medium" IsCheckable="True" IsChecked="False" Checked="OnAAChecked"/>
+ <MenuItem x:Name="xaml_AA_Low" Header="Low" IsCheckable="True" IsChecked="False" Checked="OnAAChecked" />
+ <MenuItem x:Name="xaml_AA_None" Header="None" IsCheckable="True" IsChecked="False" Checked="OnAAChecked" />
+ </MenuItem>
+
+ </MenuItem>
+
+ <MenuItem Header="_Help">
+ <MenuItem Header="GSView Help" Command="Help" InputGestureText="F1"/>
+ <MenuItem Header="About" Click="OnAboutClick"/>
+ </MenuItem>
+ </Menu>
+
+ <!-- List of icons for page navigation, print, etc -->
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Background="WhiteSmoke">
+ <Button x:Name="xaml_open" Width="20" Height="20" Click="OpenFile" Background="Transparent" BorderBrush="Transparent" Margin="10,0,0,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/folder_open.ico"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button x:Name="xaml_SavePDF" Width="20" Height="20" Click="SavePDF" Background="Transparent" BorderBrush="Transparent" Margin="10,0,0,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/FloppyDisk.ico"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button x:Name="xaml_Print" Margin="10 0 0 0" Width="20" Height="20" Click="Print" Background="Transparent" BorderBrush="Transparent">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/printer.ico"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Rectangle Width="2" Height="20" Margin="10 0 0 0">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="DarkGray">
+ </SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <Button Width="20" Height="20" x:Name="xaml_BackPage" Click="OnBackPageClick" Background="Transparent" BorderBrush="Transparent" Margin="10,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/Left.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Width="20" Height="20" x:Name="xaml_ForwardPage" Click="OnForwardPageClick" Background="Transparent" BorderBrush="Transparent">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/Right.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <TextBox x:Name="xaml_currPage" Grid.Row="0" Width="25" Height="20" VerticalScrollBarVisibility="Hidden"
+ HorizontalScrollBarVisibility="Hidden" TextAlignment="Center" Margin="10,2,0,2" PreviewKeyDown="PageEnterClicked"/>
+ <TextBlock Margin="5,0,0,0" Height="20" Text="/ 0" x:Name="xaml_TotalPages">
+ <TextBlock.FontSize>12</TextBlock.FontSize>
+ </TextBlock>
+ <Rectangle Width="2" Height="20" Margin="10 0 0 0">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="DarkGray">
+ </SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+
+ <Button Margin="10 0 0 0" Width="20" Height="20" Click="ZoomIn" Background="Transparent" BorderBrush="Transparent" x:Name="xaml_zoomIn">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/zoom_in.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Margin="10 0 0 0" x:Name="xaml_zoomOut" Width="20" Height="20" Click="ZoomOut" Background="Transparent" BorderBrush="Transparent">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/zoom_out.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <TextBox Grid.Row="0" Grid.Column="2" Width="30" Height="20" VerticalScrollBarVisibility="Hidden"
+ HorizontalScrollBarVisibility="Hidden" TextAlignment="Left" x:Name="xaml_Zoomsize"
+ Text="{Binding Mode=TwoWay, ElementName=xaml_ZoomSlider,Path=Value, UpdateSourceTrigger=PropertyChanged}" Margin="10 0 0 0"
+ PreviewKeyDown="ZoomEnterClicked"/>
+ <TextBlock Margin="5,0,0,0" Height="20" Text="%">
+ <TextBlock.FontSize>12</TextBlock.FontSize>
+ </TextBlock>
+
+ <Button Margin="10 0 0 0" Width="20" Height="20" Click="ActualSize" Background="Transparent" BorderBrush="Transparent" x:Name="xaml_ActualSize">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/ActualSize48.png"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+
+ <Button Margin="10 0 0 0" Width="20" Height="20" Click="ContScrollFill" Background="Transparent" BorderBrush="Transparent" x:Name="xaml_ContScrollFill">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/ContScrollFill48.png"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+
+ <Button Margin="10 0 0 0" Width="20" Height="20" Click="ExpandFill" Background="Transparent" BorderBrush="Transparent" x:Name="xaml_ExpandFill">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/ExpandFill48.png"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+
+
+ <Rectangle Width="2" Height="20" Margin="10 0 0 0">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="DarkGray">
+ </SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <Button Margin="10 0 0 0" x:Name="xaml_Thumbs" Width="20" Height="20" Click="ToggleThumbs" Background="Transparent" BorderBrush="Transparent">
+ <Button.ToolTip>
+ <TextBlock Text="Thumbnails"/>
+ </Button.ToolTip>
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/thumbnail.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Margin="10 0 0 0" x:Name="xaml_Contents" Width="20" Height="20" Click="ToggleContents" Background="Transparent" BorderBrush="Transparent">
+ <Button.ToolTip>
+ <TextBlock Text="Contents"/>
+ </Button.ToolTip>
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/contents.ico"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Margin="10 0 0 0" x:Name="xaml_Search" Width="20" Height="20" Click="Search" Background="Transparent" BorderBrush="Transparent">
+ <Button.ToolTip>
+ <TextBlock Text="Search"/>
+ </Button.ToolTip>
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Width="20" Height="20">
+ <Rectangle.Fill>
+ <ImageBrush ImageSource="Resources/search.png"/>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Margin="10 0 0 0" x:Name="xaml_Links" Width="20" Height="20" Click="LinksToggle" Background="Transparent" BorderBrush="Transparent">
+ <Button.ToolTip>
+ <TextBlock Text="Hyperlinks"/>
+ </Button.ToolTip>
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/hyperlink.png"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ </StackPanel>
+
+ <!-- Search control -->
+ <Grid x:Name="xaml_SearchControl" Background="WhiteSmoke" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <TextBlock Grid.Row="0" Grid.Column="0" Margin="5,5,0,5"><Bold>Search:</Bold></TextBlock>
+ <TextBox x:Name="xaml_SearchText" Grid.Row="0" Grid.Column="1" Width="100" Height="20" VerticalScrollBarVisibility="Hidden"
+ HorizontalScrollBarVisibility="Hidden" TextAlignment="Center" Margin="5,5,0,5"/>
+ <Button Grid.Row="0" Grid.Column="2" Width="20" Height="20" Click="OnSearchBackClick" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/Left.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Grid.Row="0" Grid.Column="3" Width="20" Height="20" Click="OnSearchForwardClick" Background="Transparent" BorderBrush="Transparent">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/Right.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ </Grid>
+
+ <!-- Footer control Currently just zoom slider in here but we may add more -->
+ <Grid x:Name="xaml_FooterControl" Background="WhiteSmoke" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <TextBlock Grid.Row="0" Grid.Column="0" Margin="5,0,0,0"><Bold>Zoom:</Bold></TextBlock>
+ <Slider x:Name="xaml_ZoomSlider" Grid.Row="0" Grid.Column="1" Margin="10, 0, 0, 0"
+ Width="150" Orientation="Horizontal" HorizontalAlignment="Center"
+ Value="100" Minimum="25" Maximum="400"
+ SmallChange="1" LargeChange="1"
+ TickPlacement="None" TickFrequency="1" IsSnapToTickEnabled="True"/>
+ </Grid>
+
+ <!-- The progress bar that runs while the thumbnails are rendered -->
+ <Grid x:Name="xaml_ProgressGrid" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar x:Name="xaml_ThumbProgress" Grid.Row="0" Grid.Column="0" Margin="3" Minimum="0"
+ Maximum="100" Height="20" HorizontalAlignment="Stretch" />
+ <TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5, 0, 5, 0"><Bold>Creating Thumbs</Bold></TextBlock>
+ <!-- <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Name="xaml_CancelThumb" Click="CancelLoadClick" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Cancel</Bold></TextBlock>
+ </Button> -->
+ </Grid>
+
+ <!-- The progress bar that runs during text search -->
+ <Grid x:Name="xaml_SearchGrid" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar x:Name="xaml_SearchProgress" Grid.Row="0" Grid.Column="0" Margin="3" Minimum="0"
+ Maximum="100" Height="20" HorizontalAlignment="Stretch" />
+ <TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5, 0, 5, 0"><Bold>Searching</Bold></TextBlock>
+ <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Name="xaml_CancelSearch" Click="CancelSearchClick" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Cancel</Bold></TextBlock>
+ </Button>
+ </Grid>
+
+ <!-- The progress bar that runs during copy all text to clipboard -->
+ <Grid x:Name="xaml_CopyTextGrid" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar x:Name="xaml_CopyTextProgress" Grid.Row="0" Grid.Column="0" Margin="3" Minimum="0"
+ Maximum="100" Height="20" HorizontalAlignment="Stretch" />
+ <TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5, 0, 5, 0"><Bold>Printing</Bold></TextBlock>
+ <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Name="xaml_CancelCopyText" Click="CancelCopyText" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Cancel</Bold></TextBlock>
+ </Button>
+ </Grid>
+
+ <!-- The progress bar that runs during printing -->
+ <Grid x:Name="xaml_PrintGrid" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar x:Name="xaml_PrintProgress" Grid.Row="0" Grid.Column="0" Margin="3" Minimum="0"
+ Maximum="100" Height="20" HorizontalAlignment="Stretch" />
+ <TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5, 0, 5, 0"><Bold>Printing</Bold></TextBlock>
+ <!-- Asyc Cancel crashes in windows 8 for this xps creation -->
+ <!-- <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Name="xaml_CancelPrint" Click="CancelPrintClick" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Cancel</Bold></TextBlock>
+ </Button> -->
+ </Grid>
+
+ <!-- The progress bar that runs during MuPDF page by page conversion to file-->
+ <Grid x:Name="xaml_MuPDFGrid" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar x:Name="xaml_MuPDFProgress" Grid.Row="0" Grid.Column="0" Margin="3" Minimum="0"
+ Maximum="100" Height="20" HorizontalAlignment="Stretch"/>
+ <TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5, 0, 5, 0"><Bold>MuPDF Converting Document</Bold></TextBlock>
+ <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Name="xaml_CancelMuPDF" Click="CancelMuPDFClick" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Cancel</Bold></TextBlock>
+ </Button>
+ </Grid>
+
+ <!-- The progress bar that runs during GS distilling -->
+ <Grid x:Name="xaml_DistillGrid" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <ProgressBar x:Name="xaml_DistillProgress" Grid.Row="0" Grid.Column="0" Margin="3" Minimum="0"
+ Maximum="100" Height="20" HorizontalAlignment="Stretch"/>
+ <TextBlock x:Name="xaml_DistillName" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5, 0, 5, 0"><Bold>Distilling</Bold></TextBlock>
+ <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Name="xaml_CancelDistill" Click="CancelDistillClick" Background="Transparent" BorderBrush="Transparent" Margin="5,0,5,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Cancel</Bold></TextBlock>
+ </Button>
+ </Grid>
+
+ <!-- Thumb viewer/selector -->
+ <Grid x:Name="xaml_ThumbGrid" Width="100" Background="DarkGray" DockPanel.Dock="Left" Visibility="Collapsed">
+ <ListView x:Name="xaml_ThumbList" HorizontalAlignment="Stretch"
+ ItemTemplate="{StaticResource ThumbTemplate}"
+ ScrollViewer.CanContentScroll="False"
+ Background="DarkGray"
+ PreviewMouseLeftButtonUp="ThumbSelected">
+ </ListView>
+ </Grid>
+
+ <!-- Contents viewer/selector. -->
+ <Grid x:Name="xaml_ContentGrid" Width="250" Background="DarkGray" DockPanel.Dock="Left" Visibility="Collapsed">
+ <ListView x:Name="xaml_ContentList" HorizontalAlignment="Stretch"
+ ScrollViewer.CanContentScroll="False" PreviewMouseLeftButtonUp="ContentSelected"
+ Background="DarkGray" >
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="5,5,0,0" HorizontalAlignment="Left">
+ <TextBlock TextWrapping="Wrap" Text="{Binding StringMargin}" FontFamily="Segoe UI" FontSize="11" />
+ </StackPanel>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </Grid>
+
+ <Grid x:Name="xaml_OpenProgressGrid" HorizontalAlignment="Stretch" Background="DarkGray" DockPanel.Dock="Bottom" Visibility="Collapsed">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <TextBlock x:Name ="xaml_openfilestatus" Text="Opening File" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" HorizontalAlignment="Center"></TextBlock>
+ <ProgressBar Grid.Row="1" Grid.Column="0" x:Name="xaml_OpenProgress" Minimum="0"
+ Maximum="100" Height="20" Margin="100,0,100,200" HorizontalAlignment="Stretch" IsIndeterminate="True" />
+ </Grid>
+
+ <!-- The stock scroll bar that comes with the ListView scrollviewer does is not well behaved when
+ the page sizes change. So we have our own here that we will set up -->
+ <ScrollBar x:Name="xaml_VerticalScroll" Orientation="Vertical" Grid.Row="0" Grid.Column="1" DockPanel.Dock="Right"
+ Width ="5" Height="Auto" Margin="0,0,0,0" Background="WhiteSmoke" Visibility="Collapsed"
+ Scroll="VerticalScroll"/>
+
+ <!-- Pages are last child fill. This goes in the center of our dock panel ScrollViewer.CanContentScroll False allows continuous scrolling-->
+ <!-- <Grid x:Name="xaml_PageGrid" HorizontalAlignment="Stretch" Background="DarkGray" DockPanel.Dock="Left" AllowDrop="True"> -->
+ <ListView x:Name="xaml_PageList" HorizontalAlignment="Stretch"
+ ItemTemplate="{StaticResource PageTemplate}"
+ ScrollViewer.CanContentScroll="False"
+ Background="DarkGray"
+ ScrollViewer.ScrollChanged="ListViewScrollChanged"
+ MouseDoubleClick="PageDoubleClick" IsHitTestVisible="True"
+ SelectionMode="Single"
+ PreviewMouseLeftButtonDown="ListPreviewMouseLeftButtonDown"
+ PreviewMouseLeftButtonUp="ListPreviewLeftButtonUp"
+ MouseLeave="ListMouseLeave"
+ PreviewMouseMove="ListPreviewMouseMove"
+ ScrollViewer.HorizontalScrollBarVisibility="Auto"
+ ScrollViewer.VerticalScrollBarVisibility="Hidden"
+ ScrollViewer.IsDeferredScrollingEnabled ="False" DockPanel.Dock="Left" AllowDrop="True"
+ >
+ <!-- This keeps the pages in the center of the panel -->
+
+ <ListView.ItemContainerStyle>
+
+ <Style TargetType="ListViewItem">
+ <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
+ <EventSetter Event="RequestBringIntoView" Handler="AvoidScrollIntoView"/>
+ </Style>
+ </ListView.ItemContainerStyle>
+ </ListView>
+ <!-- </Grid> -->
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/MainWindow.xaml.cs b/platform/windows/gsview/MainWindow.xaml.cs
new file mode 100644
index 00000000..6e6ee855
--- /dev/null
+++ b/platform/windows/gsview/MainWindow.xaml.cs
@@ -0,0 +1,4906 @@
+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
+{
+ /// <summary>
+ /// Interaction logic for MainWindow.xaml
+ /// </summary>
+ ///
+
+ 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<Rect> 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<textSelectInfo_t> m_textSelect;
+ List<DocPage> m_thumbnails;
+ List<List<RectList>> m_page_link_list = null;
+ IList<RectList> m_text_list;
+ public List<LinesText> m_lineptrs = null;
+ public List<BlocksText> m_textptrs = null;
+ List<Boolean> 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<DocPage>();
+ m_lineptrs = new List<LinesText>();
+ m_textptrs = new List<BlocksText>();
+ m_textset = new List<Boolean>();
+ 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<int> ren_task =
+ new Task<int>(() => 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<SelectPage> pages = new List<SelectPage>(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<int> ren_task =
+ new Task<int>(() => 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 = "<</Install {-" + start.X + " -" +
+ start.Y + " translate (testing) == flush}>> 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<object> genericlist = e.Argument as List<object>;
+ 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<Rect>();
+
+ 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<RectList>();
+ /* 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<object>();
+ 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<List<RectList>>();
+ 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<RectList> links = new List<RectList>();
+ 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<textSelectInfo_t>();
+
+ 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<TextCharacter>();
+ 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<TextCharacter>();
+ 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<TextCharacter>();
+ 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<TextCharacter>();
+ 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<textSelectInfo_t>();
+
+ 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/windows/gsview/OutputIntent.xaml b/platform/windows/gsview/OutputIntent.xaml
new file mode 100644
index 00000000..fdfb7e3c
--- /dev/null
+++ b/platform/windows/gsview/OutputIntent.xaml
@@ -0,0 +1,50 @@
+<Window x:Class="gsview.OutputIntent"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="OutputIntent" Height="176" Width="338"
+ SizeToContent="Width">
+
+ <DockPanel LastChildFill="True" Margin="0,0,0,0">
+
+ <Grid Background="DarkGray" DockPanel.Dock="Bottom" >
+ <Button Width="50" Height="20" Click="ClickOK" Margin="0,5,0,5">
+ <TextBlock>OK</TextBlock>
+ </Button>
+ </Grid>
+
+ <Grid Background="DarkGray" DockPanel.Dock="Top" >
+ <Grid Background="DarkGray" Grid.Row="0" Grid.Column="0" Margin="25,15,25,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Button Grid.Column="0" Grid.Row="0" Width="50" Height="20" Click="SelectGray" Margin="0,0,0,0">
+ <TextBlock>Gray</TextBlock>
+ </Button>
+ <TextBox x:Name="xaml_gray" Grid.Column="1" Grid.Row="0" Background="DarkGray" Height="20" Margin="5,5,5,5" IsReadOnly="True" Text="Not Set" BorderBrush="Red"></TextBox>
+
+ <Button Grid.Column="0" Grid.Row="1" Width="50" Height="20" Click="SelectRGB" Margin="0,0,0,0">
+ <TextBlock>RGB</TextBlock>
+ </Button>
+ <TextBox x:Name="xaml_rgb" Grid.Column="1" Grid.Row="1" Background="DarkGray" Height="20" Margin="5,5,5,5" IsReadOnly="True" Text="Not Set" BorderBrush="Red"></TextBox>
+
+ <Button Grid.Column="0" Grid.Row="2" Width="50" Height="20" Click="SelectCMYK" Margin="0,0,0,0">
+ <TextBlock>CMYK</TextBlock>
+ </Button>
+ <TextBox x:Name="xaml_cmyk" Grid.Column="1" Grid.Row="2" Background="DarkGray" Height="20" Margin="5,5,5,5" IsReadOnly="True" Text="Not Set" BorderBrush="Red"></TextBox>
+
+
+
+
+ </Grid>
+ </Grid>
+
+
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/OutputIntent.xaml.cs b/platform/windows/gsview/OutputIntent.xaml.cs
new file mode 100644
index 00000000..eb11f0f6
--- /dev/null
+++ b/platform/windows/gsview/OutputIntent.xaml.cs
@@ -0,0 +1,105 @@
+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
+ }
+
+ /// <summary>
+ /// Interaction logic for OutputIntent.xaml
+ /// </summary>
+ 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/windows/gsview/PageExtractSave.xaml b/platform/windows/gsview/PageExtractSave.xaml
new file mode 100644
index 00000000..36f30324
--- /dev/null
+++ b/platform/windows/gsview/PageExtractSave.xaml
@@ -0,0 +1,59 @@
+<Window x:Class="gsview.PageExtractSave"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="Extract/Rearrange Pages" Height="306" Width="282">
+
+ <DockPanel LastChildFill="True">
+ <Grid x:Name="xaml_PageGrid" Width="100" Background="DarkGray" DockPanel.Dock="Left" Visibility="Visible">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <TextBlock Grid.Column="0" Grid.Row="0" Margin="15,0,0,0">
+ <Bold>Pages:</Bold>
+ </TextBlock>
+ <ListView Grid.Column="0" Grid.Row="1" x:Name="xaml_PageList" HorizontalAlignment="Stretch"
+ ScrollViewer.CanContentScroll="False"
+ Background="White" Margin="10,5,10,10"
+ PreviewMouseLeftButtonDown="ExtractLeftButtonDown" PreviewMouseLeftButtonUp="ExtractLeftButtonUp"
+ PreviewMouseMove="ExtractMouseMove" MouseLeave="ExtractMouseLeave" PreviewMouseRightButtonDown="RightButtonDown">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="5,5,0,0" HorizontalAlignment="Left">
+ <TextBlock TextWrapping="Wrap" Text="{Binding PageString}" FontFamily="Segoe UI" FontSize="11" />
+ </StackPanel>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </Grid>
+
+ <Grid Background="DarkGray" Grid.Row="0" Grid.Column="1" Margin="0,0,0,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Button Grid.Column="0" Grid.Row="0" Width="70" Height="20" Name="xaml_AllPages" Click="AllPages" Margin="0,40,0,0">
+ <TextBlock>All Pages</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="1" Width="70" Height="20" Name="xaml_EvenPages" Click="EvenPages" Margin="0,5,0,0">
+ <TextBlock>Even Pages</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="2" Width="70" Height="20" Name="xaml_OddPages" Click="OddPages" Margin="0,5,0,0">
+ <TextBlock>Odd Pages</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="3" Width="70" Height="20" Name="xaml_ReversePages" Click="Reverse" Margin="0,5,0,0">
+ <TextBlock>Reverse</TextBlock>
+ </Button>
+ <Button Grid.Column="0" Grid.Row="4" Width="70" Height="20" Name="xaml_Extract" Click="ExtractPages" Margin="0,20,0,0">
+ <TextBlock>Extract</TextBlock>
+ </Button>
+ <TextBlock Grid.Column="0" Grid.Row="5" Margin="0,20,0,0"> Use drag/drop to rearrange. <LineBreak /> Right click to delete from list.
+ <LineBreak /> Only selected pages extracted. </TextBlock>
+ </Grid>
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/PageExtractSave.xaml.cs b/platform/windows/gsview/PageExtractSave.xaml.cs
new file mode 100644
index 00000000..e3985d17
--- /dev/null
+++ b/platform/windows/gsview/PageExtractSave.xaml.cs
@@ -0,0 +1,213 @@
+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<SelectPage> 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<SelectPage>();
+ 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/windows/gsview/Password.xaml b/platform/windows/gsview/Password.xaml
new file mode 100644
index 00000000..8692244f
--- /dev/null
+++ b/platform/windows/gsview/Password.xaml
@@ -0,0 +1,15 @@
+<Window x:Class="gsview.Password"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Height="110" Width="306">
+ <Grid Background="WhiteSmoke">
+
+ <StackPanel>
+ <Label Content="Password:" />
+ <PasswordBox x:Name="xaml_Password" Width="150" />
+ <Button Width="50" Height="20" Name="xaml_PasswordClick" Click="PasswordCheck" Margin="0,5,0,0" IsDefault="True">
+ <TextBlock>OK</TextBlock>
+ </Button>
+ </StackPanel>
+ </Grid>
+</Window>
diff --git a/platform/windows/gsview/Password.xaml.cs b/platform/windows/gsview/Password.xaml.cs
new file mode 100644
index 00000000..5c45200e
--- /dev/null
+++ b/platform/windows/gsview/Password.xaml.cs
@@ -0,0 +1,35 @@
+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
+{
+ /// <summary>
+ /// Interaction logic for Password.xaml
+ /// </summary>
+ 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/windows/gsview/Properties/AssemblyInfo.cs b/platform/windows/gsview/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..8bd14cda
--- /dev/null
+++ b/platform/windows/gsview/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+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
+//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
+//inside a <PropertyGroup>. For example, if you are using US english
+//in your source files, set the <UICulture> 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/windows/gsview/Properties/Resources.Designer.cs b/platform/windows/gsview/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..4fdb3c91
--- /dev/null
+++ b/platform/windows/gsview/Properties/Resources.Designer.cs
@@ -0,0 +1,153 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// 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.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace gsview.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // 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() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [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;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
+ /// </summary>
+ public static System.Drawing.Icon Close {
+ get {
+ object obj = ResourceManager.GetObject("Close", resourceCulture);
+ return ((System.Drawing.Icon)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
+ /// </summary>
+ public static System.Drawing.Icon copy {
+ get {
+ object obj = ResourceManager.GetObject("copy", resourceCulture);
+ return ((System.Drawing.Icon)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap info {
+ get {
+ object obj = ResourceManager.GetObject("info", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap Message {
+ get {
+ object obj = ResourceManager.GetObject("Message", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap OpenFile {
+ get {
+ object obj = ResourceManager.GetObject("OpenFile", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Byte[].
+ /// </summary>
+ public static byte[] PDFA_def {
+ get {
+ object obj = ResourceManager.GetObject("PDFA_def", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Byte[].
+ /// </summary>
+ public static byte[] PDFX_def {
+ get {
+ object obj = ResourceManager.GetObject("PDFX_def", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
+ /// </summary>
+ public static System.Drawing.Icon printer {
+ get {
+ object obj = ResourceManager.GetObject("printer", resourceCulture);
+ return ((System.Drawing.Icon)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ public static System.Drawing.Bitmap saveHS {
+ get {
+ object obj = ResourceManager.GetObject("saveHS", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/platform/windows/gsview/Properties/Resources.resx b/platform/windows/gsview/Properties/Resources.resx
new file mode 100644
index 00000000..b87e9f79
--- /dev/null
+++ b/platform/windows/gsview/Properties/Resources.resx
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\close.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="info" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Message" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\message.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="OpenFile" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\openfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="printer" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\printer.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="saveHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\resources\savehs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="PDFA_def" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>pdfa_def.ps;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="PDFX_def" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>pdfx_def.ps;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </data>
+ <data name="copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\copy.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/platform/windows/gsview/Properties/Settings.Designer.cs b/platform/windows/gsview/Properties/Settings.Designer.cs
new file mode 100644
index 00000000..aec7d913
--- /dev/null
+++ b/platform/windows/gsview/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// 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.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+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/windows/gsview/Properties/Settings.settings b/platform/windows/gsview/Properties/Settings.settings
new file mode 100644
index 00000000..033d7a5e
--- /dev/null
+++ b/platform/windows/gsview/Properties/Settings.settings
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+ <Profiles>
+ <Profile Name="(Default)" />
+ </Profiles>
+ <Settings />
+</SettingsFile> \ No newline at end of file
diff --git a/platform/windows/gsview/Properties/pdfa_def.ps b/platform/windows/gsview/Properties/pdfa_def.ps
new file mode 100644
index 00000000..5d242d56
--- /dev/null
+++ b/platform/windows/gsview/Properties/pdfa_def.ps
@@ -0,0 +1,40 @@
+%!
+% 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} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
diff --git a/platform/windows/gsview/Properties/pdfx_def.ps b/platform/windows/gsview/Properties/pdfx_def.ps
new file mode 100644
index 00000000..a2bd0108
--- /dev/null
+++ b/platform/windows/gsview/Properties/pdfx_def.ps
@@ -0,0 +1,48 @@
+%!
+% 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} <</N systemdict /ProcessColorModel get /DeviceGray eq {1} {4} ifelse >> /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} <</OutputIntents [ {OutputIntent_PDFX} ]>> /PUT pdfmark
diff --git a/platform/windows/gsview/README.txt b/platform/windows/gsview/README.txt
new file mode 100644
index 00000000..35593bce
--- /dev/null
+++ b/platform/windows/gsview/README.txt
@@ -0,0 +1,8 @@
+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/windows/gsview/RectList.cs b/platform/windows/gsview/RectList.cs
new file mode 100644
index 00000000..ecbc013a
--- /dev/null
+++ b/platform/windows/gsview/RectList.cs
@@ -0,0 +1,99 @@
+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/windows/gsview/Resources/ActualSize48.png b/platform/windows/gsview/Resources/ActualSize48.png
new file mode 100644
index 00000000..4c6e990f
--- /dev/null
+++ b/platform/windows/gsview/Resources/ActualSize48.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/Close.ico b/platform/windows/gsview/Resources/Close.ico
new file mode 100644
index 00000000..131dcf0c
--- /dev/null
+++ b/platform/windows/gsview/Resources/Close.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/ContScrollFill48.png b/platform/windows/gsview/Resources/ContScrollFill48.png
new file mode 100644
index 00000000..2ebf672f
--- /dev/null
+++ b/platform/windows/gsview/Resources/ContScrollFill48.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/ExpandFill48.png b/platform/windows/gsview/Resources/ExpandFill48.png
new file mode 100644
index 00000000..9df8e512
--- /dev/null
+++ b/platform/windows/gsview/Resources/ExpandFill48.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/FloppyDisk.ico b/platform/windows/gsview/Resources/FloppyDisk.ico
new file mode 100644
index 00000000..c50273e2
--- /dev/null
+++ b/platform/windows/gsview/Resources/FloppyDisk.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/Left.ico b/platform/windows/gsview/Resources/Left.ico
new file mode 100644
index 00000000..b2507e31
--- /dev/null
+++ b/platform/windows/gsview/Resources/Left.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/Message.png b/platform/windows/gsview/Resources/Message.png
new file mode 100644
index 00000000..7746354e
--- /dev/null
+++ b/platform/windows/gsview/Resources/Message.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/OpenFile.png b/platform/windows/gsview/Resources/OpenFile.png
new file mode 100644
index 00000000..99262d52
--- /dev/null
+++ b/platform/windows/gsview/Resources/OpenFile.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/Right.ico b/platform/windows/gsview/Resources/Right.ico
new file mode 100644
index 00000000..c2f9238f
--- /dev/null
+++ b/platform/windows/gsview/Resources/Right.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/banner.png b/platform/windows/gsview/Resources/banner.png
new file mode 100644
index 00000000..60ec5ea0
--- /dev/null
+++ b/platform/windows/gsview/Resources/banner.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/contents.ico b/platform/windows/gsview/Resources/contents.ico
new file mode 100644
index 00000000..97a12dd8
--- /dev/null
+++ b/platform/windows/gsview/Resources/contents.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/copy.ico b/platform/windows/gsview/Resources/copy.ico
new file mode 100644
index 00000000..7c8600f9
--- /dev/null
+++ b/platform/windows/gsview/Resources/copy.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/folder_open.ico b/platform/windows/gsview/Resources/folder_open.ico
new file mode 100644
index 00000000..ef6ac424
--- /dev/null
+++ b/platform/windows/gsview/Resources/folder_open.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/gsview_app.ico b/platform/windows/gsview/Resources/gsview_app.ico
new file mode 100644
index 00000000..29c5ca50
--- /dev/null
+++ b/platform/windows/gsview/Resources/gsview_app.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/hyperlink.png b/platform/windows/gsview/Resources/hyperlink.png
new file mode 100644
index 00000000..6ea0d798
--- /dev/null
+++ b/platform/windows/gsview/Resources/hyperlink.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/info.png b/platform/windows/gsview/Resources/info.png
new file mode 100644
index 00000000..172d23c3
--- /dev/null
+++ b/platform/windows/gsview/Resources/info.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/pageCBZ.ico b/platform/windows/gsview/Resources/pageCBZ.ico
new file mode 100644
index 00000000..42a0f829
--- /dev/null
+++ b/platform/windows/gsview/Resources/pageCBZ.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pageEPS.ico b/platform/windows/gsview/Resources/pageEPS.ico
new file mode 100644
index 00000000..3acc64d3
--- /dev/null
+++ b/platform/windows/gsview/Resources/pageEPS.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pageJPG.ico b/platform/windows/gsview/Resources/pageJPG.ico
new file mode 100644
index 00000000..d1b6b885
--- /dev/null
+++ b/platform/windows/gsview/Resources/pageJPG.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pageOXPS.ico b/platform/windows/gsview/Resources/pageOXPS.ico
new file mode 100644
index 00000000..8a79ffa9
--- /dev/null
+++ b/platform/windows/gsview/Resources/pageOXPS.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pagePDF.ico b/platform/windows/gsview/Resources/pagePDF.ico
new file mode 100644
index 00000000..74423969
--- /dev/null
+++ b/platform/windows/gsview/Resources/pagePDF.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pagePNG.ico b/platform/windows/gsview/Resources/pagePNG.ico
new file mode 100644
index 00000000..dad4bb15
--- /dev/null
+++ b/platform/windows/gsview/Resources/pagePNG.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pagePS.ico b/platform/windows/gsview/Resources/pagePS.ico
new file mode 100644
index 00000000..2ddcfe05
--- /dev/null
+++ b/platform/windows/gsview/Resources/pagePS.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/pageXPS.ico b/platform/windows/gsview/Resources/pageXPS.ico
new file mode 100644
index 00000000..e30ec2a7
--- /dev/null
+++ b/platform/windows/gsview/Resources/pageXPS.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/printer.ico b/platform/windows/gsview/Resources/printer.ico
new file mode 100644
index 00000000..c03d9853
--- /dev/null
+++ b/platform/windows/gsview/Resources/printer.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/saveHS.png b/platform/windows/gsview/Resources/saveHS.png
new file mode 100644
index 00000000..5ca4d106
--- /dev/null
+++ b/platform/windows/gsview/Resources/saveHS.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/search.ico b/platform/windows/gsview/Resources/search.ico
new file mode 100644
index 00000000..2841a637
--- /dev/null
+++ b/platform/windows/gsview/Resources/search.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/search.png b/platform/windows/gsview/Resources/search.png
new file mode 100644
index 00000000..9bbb2255
--- /dev/null
+++ b/platform/windows/gsview/Resources/search.png
Binary files differ
diff --git a/platform/windows/gsview/Resources/thumbnail.ico b/platform/windows/gsview/Resources/thumbnail.ico
new file mode 100644
index 00000000..71d38e97
--- /dev/null
+++ b/platform/windows/gsview/Resources/thumbnail.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/zoom_in.ico b/platform/windows/gsview/Resources/zoom_in.ico
new file mode 100644
index 00000000..b0ca2ead
--- /dev/null
+++ b/platform/windows/gsview/Resources/zoom_in.ico
Binary files differ
diff --git a/platform/windows/gsview/Resources/zoom_out.ico b/platform/windows/gsview/Resources/zoom_out.ico
new file mode 100644
index 00000000..a31d6c8b
--- /dev/null
+++ b/platform/windows/gsview/Resources/zoom_out.ico
Binary files differ
diff --git a/platform/windows/gsview/Selection.xaml b/platform/windows/gsview/Selection.xaml
new file mode 100644
index 00000000..af67b2d5
--- /dev/null
+++ b/platform/windows/gsview/Selection.xaml
@@ -0,0 +1,49 @@
+<Window x:Class="gsview.Selection"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="Selection" Height="524" Width="452">
+
+ <DockPanel LastChildFill="True">
+ <Menu IsMainMenu="True" DockPanel.Dock="Top">
+ <MenuItem Header="OK" Click="ClickOK"/>
+ <MenuItem Header="Exit" Click="ClickExit"/>
+ <MenuItem Header="Clear" Click="ClickClear"/>
+ </Menu>
+
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Background="WhiteSmoke">
+ <Button Margin="10 0 0 0" Width="20" Height="20" Click="ZoomIn" Background="Transparent" BorderBrush="Transparent">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/zoom_in.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ <Button Margin="10 0 0 0" Width="20" Height="20" Click="ZoomOut" Background="Transparent" BorderBrush="Transparent">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Ellipse>
+ <Ellipse.Fill >
+ <ImageBrush ImageSource="Resources/zoom_out.ico"/>
+ </Ellipse.Fill>
+ </Ellipse>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ </Button>
+ </StackPanel>
+ <ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" HorizontalAlignment="Stretch" Background="DarkGray" DockPanel.Dock="Left">
+ <Canvas x:Name="xaml_Canvas" MouseDown="Canvas_MouseDown" MouseMove="Canvas_MouseMove" Background="Transparent" Width="{Binding ActualWidth, ElementName=xaml_Image}" Height="{Binding ActualHeight, ElementName=xaml_Image}">
+ <Image x:Name="xaml_Image" Width="{Binding Width}" Height="{Binding Height}" Stretch="Fill" HorizontalAlignment="Center" Source="{Binding BitMap}"/>
+ </Canvas>
+ </ScrollViewer>
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/Selection.xaml.cs b/platform/windows/gsview/Selection.xaml.cs
new file mode 100644
index 00000000..1fe76fd1
--- /dev/null
+++ b/platform/windows/gsview/Selection.xaml.cs
@@ -0,0 +1,235 @@
+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
+{
+ /// <summary>
+ /// Interaction logic for Selection.xaml
+ /// </summary>
+ ///
+
+ 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/windows/gsview/Strings/en-US/Messages.Designer.cs b/platform/windows/gsview/Strings/en-US/Messages.Designer.cs
new file mode 100644
index 00000000..1c34b901
--- /dev/null
+++ b/platform/windows/gsview/Strings/en-US/Messages.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// 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.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace gsview.Strings.en_US {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // 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() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [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;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [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/windows/gsview/Strings/en-US/Messages.resx b/platform/windows/gsview/Strings/en-US/Messages.resx
new file mode 100644
index 00000000..4fdb1b6a
--- /dev/null
+++ b/platform/windows/gsview/Strings/en-US/Messages.resx
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 1.3
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">1.3</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1">this is my long string</data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ [base64 mime encoded serialized .NET Framework object]
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ [base64 mime encoded string representing a byte array form of the .NET Framework object]
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>1.3</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root> \ No newline at end of file
diff --git a/platform/windows/gsview/TextBlock.cs b/platform/windows/gsview/TextBlock.cs
new file mode 100644
index 00000000..55d3e744
--- /dev/null
+++ b/platform/windows/gsview/TextBlock.cs
@@ -0,0 +1,121 @@
+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<TextLine> 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<TextBlock>
+ {
+ public BlocksText()
+ : base()
+ {
+ }
+ }
+}
diff --git a/platform/windows/gsview/TextCharacter.cs b/platform/windows/gsview/TextCharacter.cs
new file mode 100644
index 00000000..b69cfbff
--- /dev/null
+++ b/platform/windows/gsview/TextCharacter.cs
@@ -0,0 +1,79 @@
+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/windows/gsview/TextLine.cs b/platform/windows/gsview/TextLine.cs
new file mode 100644
index 00000000..c37f604b
--- /dev/null
+++ b/platform/windows/gsview/TextLine.cs
@@ -0,0 +1,121 @@
+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<TextCharacter> 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<TextLine>
+ {
+ public LinesText()
+ : base()
+ {
+ }
+ }
+}
diff --git a/platform/windows/gsview/ghostsharp.cs b/platform/windows/gsview/ghostsharp.cs
new file mode 100644
index 00000000..168ce476
--- /dev/null
+++ b/platform/windows/gsview/ghostsharp.cs
@@ -0,0 +1,1165 @@
+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<String> GetOptions(String options)
+ {
+ List<String> optionlist = new List<String>();
+
+ 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<String> 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<byte[]> CharacterArray = new List<byte[]>(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<byte[]> CharacterArray = new List<byte[]>(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/windows/gsview/gsIO.cs b/platform/windows/gsview/gsIO.cs
new file mode 100644
index 00000000..82e47be6
--- /dev/null
+++ b/platform/windows/gsview/gsIO.cs
@@ -0,0 +1,32 @@
+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/windows/gsview/gsOutput.xaml b/platform/windows/gsview/gsOutput.xaml
new file mode 100644
index 00000000..0c69461c
--- /dev/null
+++ b/platform/windows/gsview/gsOutput.xaml
@@ -0,0 +1,51 @@
+<Window x:Class="gsview.gsOutput"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ Title="Ghostscript Messages" Height="500" Width="500">
+
+ <DockPanel LastChildFill="True">
+ <Grid DockPanel.Dock="Bottom" Visibility="Visible" Background="WhiteSmoke">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <Button Grid.Row="0" Grid.Column="1" Width="50" Height="20" Click="ClearContents" Background="Transparent" BorderBrush="Transparent" Margin="5,0,15,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>Clear</Bold></TextBlock>
+ </Button>
+ <Button Grid.Row="0" Grid.Column="2" Width="50" Height="20" Click="HideWindow" Background="Transparent" BorderBrush="Transparent" Margin="5,0,15,0">
+ <Button.Template>
+ <ControlTemplate TargetType="{x:Type Button}">
+ <Grid>
+ <Rectangle Height="Auto" RadiusX="5" RadiusY="5">
+ <Rectangle.Fill >
+ <SolidColorBrush Color="LightSlateGray"></SolidColorBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Grid>
+ </ControlTemplate>
+ </Button.Template>
+ <TextBlock><Bold>OK</Bold></TextBlock>
+ </Button>
+ </Grid>
+
+ <!-- Pages are last child fill. This goes in the center of our dock panel -->
+ <Grid HorizontalAlignment="Stretch" Background="DarkGray">
+ <TextBox x:Name="xaml_gsText" Margin="1, 1, 1, 1" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" Text="{Binding gsIOString}" IsReadOnly="True"/>
+ </Grid>
+
+ </DockPanel>
+</Window>
diff --git a/platform/windows/gsview/gsOutput.xaml.cs b/platform/windows/gsview/gsOutput.xaml.cs
new file mode 100644
index 00000000..c2aa9375
--- /dev/null
+++ b/platform/windows/gsview/gsOutput.xaml.cs
@@ -0,0 +1,60 @@
+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
+{
+ /// <summary>
+ /// Interaction logic for gsOutput.xaml
+ /// </summary>
+ 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/windows/gsview/gsprint.cs b/platform/windows/gsview/gsprint.cs
new file mode 100644
index 00000000..27976bc0
--- /dev/null
+++ b/platform/windows/gsview/gsprint.cs
@@ -0,0 +1,167 @@
+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/windows/gsview/gsprintbg.cs b/platform/windows/gsview/gsprintbg.cs
new file mode 100644
index 00000000..199258e3
--- /dev/null
+++ b/platform/windows/gsview/gsprintbg.cs
@@ -0,0 +1,261 @@
+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/windows/gsview/gsview.csproj b/platform/windows/gsview/gsview.csproj
new file mode 100644
index 00000000..31f40f51
--- /dev/null
+++ b/platform/windows/gsview/gsview.csproj
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{5DA0ECC9-4026-4427-862F-E3226EFEFEB1}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>gsview</RootNamespace>
+ <AssemblyName>gsview</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <TargetFrameworkProfile />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>6.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
+ <PropertyGroup>
+ <ApplicationIcon>gsview_app.ico</ApplicationIcon>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ReachFramework" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Printing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="UIAutomationProvider" />
+ <Reference Include="UIAutomationTypes" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Compile Include="About.xaml.cs">
+ <DependentUpon>About.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="ContentEntry.cs" />
+ <Compile Include="ContentItem.cs" />
+ <Compile Include="Convert.xaml.cs">
+ <DependentUpon>Convert.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="DocPage.cs" />
+ <Compile Include="ghostsharp.cs" />
+ <Compile Include="gsIO.cs" />
+ <Compile Include="gsOutput.xaml.cs">
+ <DependentUpon>gsOutput.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="gsprint.cs" />
+ <Compile Include="Info.xaml.cs">
+ <DependentUpon>Info.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Links.cs" />
+ <Compile Include="mudocument.cs" />
+ <Compile Include="OutputIntent.xaml.cs">
+ <DependentUpon>OutputIntent.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="PageExtractSave.xaml.cs">
+ <DependentUpon>PageExtractSave.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Password.xaml.cs">
+ <DependentUpon>Password.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="RectList.cs" />
+ <Compile Include="Selection.xaml.cs">
+ <DependentUpon>Selection.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Strings\en-US\Messages.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Messages.resx</DependentUpon>
+ </Compile>
+ <Compile Include="TextBlock.cs" />
+ <Compile Include="TextCharacter.cs" />
+ <Compile Include="TextLine.cs" />
+ <Page Include="About.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Convert.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="gsOutput.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Info.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="MainWindow.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MainWindow.xaml.cs">
+ <DependentUpon>MainWindow.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Page Include="OutputIntent.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="PageExtractSave.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Password.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Selection.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Strings\en-US\Messages.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Messages.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <AppDesigner Include="Properties\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\ActualSize48.png" />
+ <Resource Include="Resources\Close.ico" />
+ <Resource Include="Resources\ContScrollFill48.png" />
+ <Resource Include="Resources\ExpandFill48.png" />
+ <Resource Include="Resources\info.png" />
+ <Resource Include="Resources\Message.png" />
+ <Resource Include="Resources\OpenFile.png" />
+ <Resource Include="Resources\printer.ico" />
+ <Resource Include="Resources\saveHS.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include=".NETFramework,Version=v4.5">
+ <Visible>False</Visible>
+ <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\Left.ico" />
+ <Resource Include="Resources\Right.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\thumbnail.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\hyperlink.png" />
+ <Resource Include="Resources\search.ico" />
+ <Resource Include="Resources\zoom_in.ico" />
+ <Resource Include="Resources\zoom_out.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\search.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\contents.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\folder_open.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\FloppyDisk.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\copy.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadata Include="Service References\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\banner.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\gsview_app.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\PDF.bmp" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="gsview_app.ico" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/platform/windows/gsview/gsview.visualelementsmanifest.xml b/platform/windows/gsview/gsview.visualelementsmanifest.xml
new file mode 100644
index 00000000..865a37fc
--- /dev/null
+++ b/platform/windows/gsview/gsview.visualelementsmanifest.xml
@@ -0,0 +1,7 @@
+<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <VisualElements
+ BackgroundColor="#FFFFFF"
+ ShowNameOnSquare150x150Logo="on"
+ ForegroundText="dark"
+ />
+</Application> \ No newline at end of file
diff --git a/platform/windows/gsview/gsview_app.ico b/platform/windows/gsview/gsview_app.ico
new file mode 100644
index 00000000..29c5ca50
--- /dev/null
+++ b/platform/windows/gsview/gsview_app.ico
Binary files differ
diff --git a/platform/windows/gsview/mudocument.cs b/platform/windows/gsview/mudocument.cs
new file mode 100644
index 00000000..291a424e
--- /dev/null
+++ b/platform/windows/gsview/mudocument.cs
@@ -0,0 +1,1747 @@
+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<ContentItem> 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<TextLine>();
+ 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<TextCharacter>();
+ 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<ContentItem>();
+
+ 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/windows/libmupdf-nov8_winRT.vcxproj b/platform/windows/libmupdf-nov8_winRT.vcxproj
new file mode 100644
index 00000000..373999a6
--- /dev/null
+++ b/platform/windows/libmupdf-nov8_winRT.vcxproj
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|ARM">
+ <Configuration>Memento</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|Win32">
+ <Configuration>Memento</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|x64">
+ <Configuration>Memento</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\source\pdf\js\pdf-js-none.c" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5affe821-c5c8-45fb-b834-10fed76e49a7}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>libmupdf-nov8_winRT</ProjectName>
+ <RootNamespace>libmupdf_nov8_winRT</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ <ApplicationType>Windows Store</ApplicationType>
+ <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libmupdf-nov8_winRT.vcxproj.filters b/platform/windows/libmupdf-nov8_winRT.vcxproj.filters
new file mode 100644
index 00000000..7e73bfa6
--- /dev/null
+++ b/platform/windows/libmupdf-nov8_winRT.vcxproj.filters
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\..\source\pdf\js\pdf-js-none.c" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libmupdf/libmupdf.vcxproj b/platform/windows/libmupdf/libmupdf.vcxproj
new file mode 100644
index 00000000..23101e73
--- /dev/null
+++ b/platform/windows/libmupdf/libmupdf.vcxproj
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\mupdf\cbz.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\annotation.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\bitmap.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\buffer.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\colorspace.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\compressed-buffer.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\context.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\crypt.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\device.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\display-list.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\document.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\filter.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\font.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\function.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\getopt.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\glyph-cache.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\hash.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\image.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\link.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\math.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\meta.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\outline.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-pcl.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-png.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-pnm.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-pwg.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-svg.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\path.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\pixmap.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\shade.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\store.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\stream.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\string.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\structured-text.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\system.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\text.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\transition.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\write-document.h" />
+ <ClInclude Include="..\..\..\include\mupdf\fitz\xml.h" />
+ <ClInclude Include="..\..\..\include\mupdf\img.h" />
+ <ClInclude Include="..\..\..\include\mupdf\memento.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf-tools.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\annot.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\appearance.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\cmap.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\crypt.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\document.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\event.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\field.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\font.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\javascript.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\object.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\output-pdf.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\page.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\parse.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\resource.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\widget.h" />
+ <ClInclude Include="..\..\..\include\mupdf\pdf\xref.h" />
+ <ClInclude Include="..\..\..\include\mupdf\xps.h" />
+ <ClInclude Include="..\..\..\source\fitz\draw-imp.h" />
+ <ClInclude Include="..\..\..\source\fitz\jmemcust.h" />
+ <ClInclude Include="..\..\..\source\fitz\ucdn.h" />
+ <ClInclude Include="..\..\..\source\fitz\unicodedata_db.h" />
+ <ClInclude Include="..\..\..\source\pdf\pdf-encodings.h" />
+ <ClInclude Include="..\..\..\source\pdf\pdf-glyphlist.h" />
+ <ClInclude Include="..\..\..\source\pdf\pdf-interpret-imp.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\source\cbz\mucbz.c" />
+ <ClCompile Include="..\..\..\source\fitz\bbox-device.c" />
+ <ClCompile Include="..\..\..\source\fitz\bitmap.c" />
+ <ClCompile Include="..\..\..\source\fitz\buffer.c" />
+ <ClCompile Include="..\..\..\source\fitz\colorspace.c" />
+ <ClCompile Include="..\..\..\source\fitz\compressed-buffer.c" />
+ <ClCompile Include="..\..\..\source\fitz\context.c" />
+ <ClCompile Include="..\..\..\source\fitz\crypt-aes.c" />
+ <ClCompile Include="..\..\..\source\fitz\crypt-arc4.c" />
+ <ClCompile Include="..\..\..\source\fitz\crypt-md5.c" />
+ <ClCompile Include="..\..\..\source\fitz\crypt-sha2.c" />
+ <ClCompile Include="..\..\..\source\fitz\device.c" />
+ <ClCompile Include="..\..\..\source\fitz\document-all.c" />
+ <ClCompile Include="..\..\..\source\fitz\document-no-run.c" />
+ <ClCompile Include="..\..\..\source\fitz\document.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-affine.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-blend.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-device.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-edge.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-glyph.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-mesh.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-paint.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-path.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-scale-simple.c" />
+ <ClCompile Include="..\..\..\source\fitz\draw-unpack.c" />
+ <ClCompile Include="..\..\..\source\fitz\error.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-basic.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-dct.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-fax.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-flate.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-jbig2.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-leech.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-lzw.c" />
+ <ClCompile Include="..\..\..\source\fitz\filter-predict.c" />
+ <ClCompile Include="..\..\..\source\fitz\font.c" />
+ <ClCompile Include="..\..\..\source\fitz\function.c" />
+ <ClCompile Include="..\..\..\source\fitz\geometry.c" />
+ <ClCompile Include="..\..\..\source\fitz\getopt.c" />
+ <ClCompile Include="..\..\..\source\fitz\glyph.c" />
+ <ClCompile Include="..\..\..\source\fitz\halftone.c" />
+ <ClCompile Include="..\..\..\source\fitz\hash.c" />
+ <ClCompile Include="..\..\..\source\fitz\image.c" />
+ <ClCompile Include="..\..\..\source\fitz\jmemcust.c" />
+ <ClCompile Include="..\..\..\source\fitz\link.c" />
+ <ClCompile Include="..\..\..\source\fitz\list-device.c" />
+ <ClCompile Include="..\..\..\source\fitz\load-jpeg.c" />
+ <ClCompile Include="..\..\..\source\fitz\load-jpx.c" />
+ <ClCompile Include="..\..\..\source\fitz\load-jxr.c" />
+ <ClCompile Include="..\..\..\source\fitz\load-png.c" />
+ <ClCompile Include="..\..\..\source\fitz\load-tiff.c" />
+ <ClCompile Include="..\..\..\source\fitz\memento.c" />
+ <ClCompile Include="..\..\..\source\fitz\memory.c" />
+ <ClCompile Include="..\..\..\source\fitz\outline.c" />
+ <ClCompile Include="..\..\..\source\fitz\output-pcl.c" />
+ <ClCompile Include="..\..\..\source\fitz\output-pwg.c" />
+ <ClCompile Include="..\..\..\source\fitz\output.c" />
+ <ClCompile Include="..\..\..\source\fitz\path.c" />
+ <ClCompile Include="..\..\..\source\fitz\pixmap.c" />
+ <ClCompile Include="..\..\..\source\fitz\printf.c" />
+ <ClCompile Include="..\..\..\source\fitz\shade.c" />
+ <ClCompile Include="..\..\..\source\fitz\stext-device.c" />
+ <ClCompile Include="..\..\..\source\fitz\stext-output.c" />
+ <ClCompile Include="..\..\..\source\fitz\stext-paragraph.c" />
+ <ClCompile Include="..\..\..\source\fitz\stext-search.c" />
+ <ClCompile Include="..\..\..\source\fitz\store.c" />
+ <ClCompile Include="..\..\..\source\fitz\stream-open.c" />
+ <ClCompile Include="..\..\..\source\fitz\stream-read.c" />
+ <ClCompile Include="..\..\..\source\fitz\string.c" />
+ <ClCompile Include="..\..\..\source\fitz\svg-device.c" />
+ <ClCompile Include="..\..\..\source\fitz\text.c" />
+ <ClCompile Include="..\..\..\source\fitz\time.c" />
+ <ClCompile Include="..\..\..\source\fitz\trace-device.c" />
+ <ClCompile Include="..\..\..\source\fitz\transition.c" />
+ <ClCompile Include="..\..\..\source\fitz\ucdn.c" />
+ <ClCompile Include="..\..\..\source\fitz\xml.c" />
+ <ClCompile Include="..\..\..\source\img\muimage.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-annot.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-appearance.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-clean.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap-load.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap-parse.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap-table.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-colorspace.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-crypt.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-device.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-encoding.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-event.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-field.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-font.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-fontfile.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-form.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-function.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-image.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-interpret.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-lex.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-metrics.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-nametree.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-object.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-op-buffer.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-op-filter.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-op-run.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-outline.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-page.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-parse.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-pattern.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-pkcs7.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-repair.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-run.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-shade.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-store.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-stream.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-type3.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-unicode.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-write.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-xobject.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-xref-aux.c" />
+ <ClCompile Include="..\..\..\source\pdf\pdf-xref.c" />
+ <ClCompile Include="..\..\..\source\tiff\mutiff.c" />
+ <ClCompile Include="..\..\..\source\tools\pdfclean.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-common.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-doc.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-glyphs.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-gradient.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-image.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-outline.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-path.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-resource.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-tile.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-util.c" />
+ <ClCompile Include="..\..\..\source\xps\xps-zip.c" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{4D5C4349-480D-4CD6-9D3B-09C50BA35FA2}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmupdf</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\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)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\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)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\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)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\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)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libmupdf/libmupdf.vcxproj.filters b/platform/windows/libmupdf/libmupdf.vcxproj.filters
new file mode 100644
index 00000000..f966e612
--- /dev/null
+++ b/platform/windows/libmupdf/libmupdf.vcxproj.filters
@@ -0,0 +1,639 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="!include">
+ <UniqueIdentifier>{c6eab433-084b-4c58-9f22-6f44c89a0289}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="!include\fitz">
+ <UniqueIdentifier>{96f21f10-5d0b-4f6e-ad70-fc8866054290}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="!include\pdf">
+ <UniqueIdentifier>{e379667f-718b-49ad-b312-9f60a08f0941}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="cbz">
+ <UniqueIdentifier>{82abb70b-aa89-4767-972f-d52c819f1fb4}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="fitz">
+ <UniqueIdentifier>{71d27c79-d67f-4b0e-8a5c-ad2355c905b1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="img">
+ <UniqueIdentifier>{7f13938e-5486-404e-8c72-1cb35d92d68b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="pdf">
+ <UniqueIdentifier>{766fb080-9cd3-4755-a074-a20a7f1748b8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tiff">
+ <UniqueIdentifier>{e464f8d3-dcda-4cbe-bae2-48bdc6f0afd7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tools">
+ <UniqueIdentifier>{92cc8877-4351-49e6-8a73-9696779675ed}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="xps">
+ <UniqueIdentifier>{6350172f-767f-4cdd-8c14-3a9e5af8d4c4}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\mupdf\cbz.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\img.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\memento.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf-tools.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\xps.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\annotation.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\bitmap.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\buffer.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\colorspace.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\compressed-buffer.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\context.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\crypt.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\device.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\display-list.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\document.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\filter.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\font.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\function.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\getopt.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\glyph-cache.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\hash.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\image.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\link.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\math.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\meta.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\outline.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-pcl.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-png.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-pnm.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-pwg.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output-svg.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\output.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\path.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\pixmap.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\shade.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\store.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\stream.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\string.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\structured-text.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\system.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\text.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\transition.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\write-document.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\fitz\xml.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\fitz\jmemcust.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\annot.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\appearance.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\cmap.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\crypt.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\document.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\event.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\field.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\font.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\javascript.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\object.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\output-pdf.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\page.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\parse.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\resource.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\widget.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\mupdf\pdf\xref.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\fitz\draw-imp.h">
+ <Filter>fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\fitz\ucdn.h">
+ <Filter>fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\fitz\unicodedata_db.h">
+ <Filter>fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\pdf\pdf-encodings.h">
+ <Filter>pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\pdf\pdf-glyphlist.h">
+ <Filter>pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\source\pdf\pdf-interpret-imp.h">
+ <Filter>pdf</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\source\fitz\document-no-run.c">
+ <Filter>!include\fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\cbz\mucbz.c">
+ <Filter>cbz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\bbox-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\bitmap.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\buffer.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\colorspace.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\compressed-buffer.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\context.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\crypt-aes.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\crypt-arc4.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\crypt-md5.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\crypt-sha2.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\document-all.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\document.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-affine.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-blend.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-edge.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-glyph.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-mesh.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-paint.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-path.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-scale-simple.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\draw-unpack.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\error.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-basic.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-dct.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-fax.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-flate.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-jbig2.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-leech.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-lzw.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\filter-predict.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\font.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\function.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\geometry.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\getopt.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\glyph.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\halftone.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\hash.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\image.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\link.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\list-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\load-jpeg.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\load-jpx.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\load-jxr.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\load-png.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\load-tiff.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\memento.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\memory.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\outline.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\output-pcl.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\output-pwg.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\output.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\path.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\pixmap.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\printf.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\shade.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\stext-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\stext-output.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\stext-paragraph.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\stext-search.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\store.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\stream-open.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\stream-read.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\string.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\svg-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\text.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\time.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\trace-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\transition.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\ucdn.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\xml.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\fitz\jmemcust.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\img\muimage.c">
+ <Filter>img</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-annot.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-appearance.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-clean.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap-load.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap-parse.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap-table.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-cmap.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-colorspace.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-crypt.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-device.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-encoding.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-event.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-field.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-font.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-fontfile.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-form.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-function.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-image.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-interpret.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-lex.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-metrics.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-nametree.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-object.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-op-buffer.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-op-filter.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-op-run.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-outline.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-page.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-parse.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-pattern.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-pkcs7.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-repair.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-run.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-shade.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-store.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-stream.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-type3.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-unicode.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-write.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-xobject.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-xref-aux.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\pdf\pdf-xref.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\tiff\mutiff.c">
+ <Filter>tiff</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\tools\pdfclean.c">
+ <Filter>tools</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-common.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-doc.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-glyphs.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-gradient.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-image.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-outline.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-path.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-resource.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-tile.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-util.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\source\xps\xps-zip.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libmupdf_winRT.vcxproj b/platform/windows/libmupdf_winRT.vcxproj
new file mode 100644
index 00000000..bc2d0a47
--- /dev/null
+++ b/platform/windows/libmupdf_winRT.vcxproj
@@ -0,0 +1,511 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|ARM">
+ <Configuration>Memento</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|Win32">
+ <Configuration>Memento</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|x64">
+ <Configuration>Memento</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\source\cbz\mucbz.c" />
+ <ClCompile Include="..\..\source\fitz\bbox-device.c" />
+ <ClCompile Include="..\..\source\fitz\bitmap.c" />
+ <ClCompile Include="..\..\source\fitz\buffer.c" />
+ <ClCompile Include="..\..\source\fitz\colorspace.c" />
+ <ClCompile Include="..\..\source\fitz\compressed-buffer.c" />
+ <ClCompile Include="..\..\source\fitz\context.c" />
+ <ClCompile Include="..\..\source\fitz\crypt-aes.c" />
+ <ClCompile Include="..\..\source\fitz\crypt-arc4.c" />
+ <ClCompile Include="..\..\source\fitz\crypt-md5.c" />
+ <ClCompile Include="..\..\source\fitz\crypt-sha2.c" />
+ <ClCompile Include="..\..\source\fitz\device.c" />
+ <ClCompile Include="..\..\source\fitz\document-all.c" />
+ <ClCompile Include="..\..\source\fitz\document-no-run.c" />
+ <ClCompile Include="..\..\source\fitz\document.c" />
+ <ClCompile Include="..\..\source\fitz\draw-affine.c" />
+ <ClCompile Include="..\..\source\fitz\draw-blend.c" />
+ <ClCompile Include="..\..\source\fitz\draw-device.c" />
+ <ClCompile Include="..\..\source\fitz\draw-edge.c" />
+ <ClCompile Include="..\..\source\fitz\draw-glyph.c" />
+ <ClCompile Include="..\..\source\fitz\draw-mesh.c" />
+ <ClCompile Include="..\..\source\fitz\draw-paint.c" />
+ <ClCompile Include="..\..\source\fitz\draw-path.c" />
+ <ClCompile Include="..\..\source\fitz\draw-scale-simple.c" />
+ <ClCompile Include="..\..\source\fitz\draw-unpack.c" />
+ <ClCompile Include="..\..\source\fitz\error.c" />
+ <ClCompile Include="..\..\source\fitz\filter-basic.c" />
+ <ClCompile Include="..\..\source\fitz\filter-dct.c" />
+ <ClCompile Include="..\..\source\fitz\filter-fax.c" />
+ <ClCompile Include="..\..\source\fitz\filter-flate.c" />
+ <ClCompile Include="..\..\source\fitz\filter-jbig2.c" />
+ <ClCompile Include="..\..\source\fitz\filter-leech.c" />
+ <ClCompile Include="..\..\source\fitz\filter-lzw.c" />
+ <ClCompile Include="..\..\source\fitz\filter-predict.c" />
+ <ClCompile Include="..\..\source\fitz\font.c" />
+ <ClCompile Include="..\..\source\fitz\function.c" />
+ <ClCompile Include="..\..\source\fitz\geometry.c" />
+ <ClCompile Include="..\..\source\fitz\getopt.c" />
+ <ClCompile Include="..\..\source\fitz\glyph.c" />
+ <ClCompile Include="..\..\source\fitz\halftone.c" />
+ <ClCompile Include="..\..\source\fitz\hash.c" />
+ <ClCompile Include="..\..\source\fitz\image.c" />
+ <ClCompile Include="..\..\source\fitz\jmemcust.c" />
+ <ClCompile Include="..\..\source\fitz\link.c" />
+ <ClCompile Include="..\..\source\fitz\list-device.c" />
+ <ClCompile Include="..\..\source\fitz\load-jpeg.c" />
+ <ClCompile Include="..\..\source\fitz\load-jpx.c" />
+ <ClCompile Include="..\..\source\fitz\load-jxr.c" />
+ <ClCompile Include="..\..\source\fitz\load-png.c" />
+ <ClCompile Include="..\..\source\fitz\load-tiff.c" />
+ <ClCompile Include="..\..\source\fitz\memento.c" />
+ <ClCompile Include="..\..\source\fitz\memory.c" />
+ <ClCompile Include="..\..\source\fitz\outline.c" />
+ <ClCompile Include="..\..\source\fitz\output-pcl.c" />
+ <ClCompile Include="..\..\source\fitz\output-pwg.c" />
+ <ClCompile Include="..\..\source\fitz\output.c" />
+ <ClCompile Include="..\..\source\fitz\path.c" />
+ <ClCompile Include="..\..\source\fitz\pixmap.c" />
+ <ClCompile Include="..\..\source\fitz\printf.c" />
+ <ClCompile Include="..\..\source\fitz\shade.c" />
+ <ClCompile Include="..\..\source\fitz\stext-device.c" />
+ <ClCompile Include="..\..\source\fitz\stext-output.c" />
+ <ClCompile Include="..\..\source\fitz\stext-paragraph.c" />
+ <ClCompile Include="..\..\source\fitz\stext-search.c" />
+ <ClCompile Include="..\..\source\fitz\store.c" />
+ <ClCompile Include="..\..\source\fitz\stream-open.c" />
+ <ClCompile Include="..\..\source\fitz\stream-read.c" />
+ <ClCompile Include="..\..\source\fitz\string.c" />
+ <ClCompile Include="..\..\source\fitz\svg-device.c" />
+ <ClCompile Include="..\..\source\fitz\text.c" />
+ <ClCompile Include="..\..\source\fitz\time.c" />
+ <ClCompile Include="..\..\source\fitz\trace-device.c" />
+ <ClCompile Include="..\..\source\fitz\transition.c" />
+ <ClCompile Include="..\..\source\fitz\ucdn.c" />
+ <ClCompile Include="..\..\source\fitz\xml.c" />
+ <ClCompile Include="..\..\source\img\muimage.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-annot.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-appearance.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-clean.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-cmap-load.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-cmap-parse.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-cmap-table.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-cmap.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-colorspace.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-crypt.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-device.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-encoding.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-event.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-field.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-font.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-fontfile.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-form.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-function.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-image.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-interpret.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-lex.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-metrics.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-nametree.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-object.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-op-buffer.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-op-filter.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-op-run.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-outline.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-page.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-parse.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-pattern.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-pkcs7.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-repair.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-run.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-shade.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-store.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-stream.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-type3.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-unicode.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-write.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-xobject.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-xref-aux.c" />
+ <ClCompile Include="..\..\source\pdf\pdf-xref.c" />
+ <ClCompile Include="..\..\source\tiff\mutiff.c" />
+ <ClCompile Include="..\..\source\tools\pdfclean.c" />
+ <ClCompile Include="..\..\source\xps\xps-common.c" />
+ <ClCompile Include="..\..\source\xps\xps-doc.c" />
+ <ClCompile Include="..\..\source\xps\xps-glyphs.c" />
+ <ClCompile Include="..\..\source\xps\xps-gradient.c" />
+ <ClCompile Include="..\..\source\xps\xps-image.c" />
+ <ClCompile Include="..\..\source\xps\xps-outline.c" />
+ <ClCompile Include="..\..\source\xps\xps-path.c" />
+ <ClCompile Include="..\..\source\xps\xps-resource.c" />
+ <ClCompile Include="..\..\source\xps\xps-tile.c" />
+ <ClCompile Include="..\..\source\xps\xps-util.c" />
+ <ClCompile Include="..\..\source\xps\xps-zip.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\mupdf\cbz.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\annotation.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\bitmap.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\buffer.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\colorspace.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\compressed-buffer.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\context.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\crypt.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\device.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\display-list.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\document.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\filter.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\font.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\function.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\getopt.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\glyph-cache.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\hash.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\image.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\link.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\math.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\meta.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\outline.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\output-pcl.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\output-png.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\output-pnm.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\output-pwg.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\output-svg.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\output.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\path.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\pixmap.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\shade.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\store.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\stream.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\string.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\structured-text.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\system.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\text.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\transition.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\write-document.h" />
+ <ClInclude Include="..\..\include\mupdf\fitz\xml.h" />
+ <ClInclude Include="..\..\include\mupdf\img.h" />
+ <ClInclude Include="..\..\include\mupdf\memento.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf-tools.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\annot.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\appearance.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\cmap.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\crypt.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\document.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\event.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\field.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\font.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\javascript.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\object.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\output-pdf.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\page.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\parse.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\resource.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\widget.h" />
+ <ClInclude Include="..\..\include\mupdf\pdf\xref.h" />
+ <ClInclude Include="..\..\include\mupdf\xps.h" />
+ <ClInclude Include="..\..\source\fitz\draw-imp.h" />
+ <ClInclude Include="..\..\source\fitz\jmemcust.h" />
+ <ClInclude Include="..\..\source\fitz\ucdn.h" />
+ <ClInclude Include="..\..\source\fitz\unicodedata_db.h" />
+ <ClInclude Include="..\..\source\pdf\pdf-encodings.h" />
+ <ClInclude Include="..\..\source\pdf\pdf-glyphlist.h" />
+ <ClInclude Include="..\..\source\pdf\pdf-interpret-imp.h" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{0715f3cf-5d1b-4617-a331-6527371365b7}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>libmupdf_winRT</ProjectName>
+ <RootNamespace>libmupdf_winRT</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ <ApplicationType>Windows Store</ApplicationType>
+ <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>MEMENTO=1;DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <PreprocessorDefinitions>DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <PreprocessorDefinitions>MEMENTO=1;DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>MEMENTO=1;DEBUG=1;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\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)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINRT;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libmupdf_winRT.vcxproj.filters b/platform/windows/libmupdf_winRT.vcxproj.filters
new file mode 100644
index 00000000..7fd7cb30
--- /dev/null
+++ b/platform/windows/libmupdf_winRT.vcxproj.filters
@@ -0,0 +1,642 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="!include">
+ <UniqueIdentifier>{89ff37a6-fa19-4690-b07f-1fb91f4b5803}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="!include\fitz">
+ <UniqueIdentifier>{a3eb732e-eaea-4b44-b168-6384494ab2cf}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="!include\pdf">
+ <UniqueIdentifier>{7b0f7938-a977-4cd9-a8bc-aeef816ae84c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tiff">
+ <UniqueIdentifier>{631e9425-7a6a-4529-95c8-06ea5b145899}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="cbz">
+ <UniqueIdentifier>{8de280a7-9403-401a-8ab5-bf7f0ce3a27f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="fitz">
+ <UniqueIdentifier>{ebee942a-03ff-4a0b-8e41-1ffa2a16d448}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="img">
+ <UniqueIdentifier>{87d18a14-080e-4bad-8db6-c9df888baa1c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="pdf">
+ <UniqueIdentifier>{ec1b8208-f4f4-4c3f-a071-dcecc79bbd72}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tiff">
+ <UniqueIdentifier>{f541a6f9-ea8e-472e-b23f-079c7b8fca17}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tools">
+ <UniqueIdentifier>{7e724063-cc29-4515-b722-ffca1333aea2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="xps">
+ <UniqueIdentifier>{4e3d83f6-3258-4f7b-8174-bc825377658e}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\source\fitz\document-no-run.c">
+ <Filter>!include\fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\cbz\mucbz.c">
+ <Filter>cbz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\bbox-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\bitmap.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\buffer.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\colorspace.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\compressed-buffer.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\context.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\crypt-aes.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\crypt-arc4.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\crypt-md5.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\crypt-sha2.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\document-all.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\document.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-affine.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-blend.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-edge.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-glyph.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-mesh.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-paint.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-path.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-scale-simple.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\draw-unpack.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\error.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-basic.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-dct.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-fax.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-flate.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-jbig2.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-leech.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-lzw.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\filter-predict.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\font.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\function.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\geometry.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\getopt.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\glyph.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\halftone.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\hash.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\image.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\link.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\list-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\load-jpeg.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\load-jpx.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\load-jxr.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\load-png.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\load-tiff.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\memento.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\memory.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\outline.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\output-pcl.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\output-pwg.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\output.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\path.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\pixmap.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\printf.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\shade.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\stext-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\stext-output.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\stext-paragraph.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\stext-search.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\store.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\stream-open.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\stream-read.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\string.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\svg-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\text.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\time.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\trace-device.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\transition.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\ucdn.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\xml.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\fitz\jmemcust.c">
+ <Filter>fitz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\img\muimage.c">
+ <Filter>img</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-annot.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-appearance.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-clean.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-cmap-load.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-cmap-parse.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-cmap-table.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-cmap.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-colorspace.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-crypt.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-device.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-encoding.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-event.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-field.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-font.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-fontfile.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-form.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-function.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-image.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-interpret.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-lex.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-metrics.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-nametree.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-object.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-op-buffer.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-op-filter.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-op-run.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-outline.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-page.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-parse.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-pattern.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-pkcs7.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-repair.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-run.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-shade.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-store.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-stream.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-type3.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-unicode.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-write.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-xobject.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-xref-aux.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\pdf\pdf-xref.c">
+ <Filter>pdf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\tiff\mutiff.c">
+ <Filter>tiff</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\tools\pdfclean.c">
+ <Filter>tools</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-common.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-doc.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-glyphs.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-gradient.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-image.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-outline.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-path.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-resource.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-tile.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-util.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\source\xps\xps-zip.c">
+ <Filter>xps</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\mupdf\fitz\function.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\getopt.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\glyph-cache.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\hash.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\image.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\link.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\math.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\meta.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\outline.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\output.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\output-pcl.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\output-png.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\output-pnm.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\output-pwg.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\output-svg.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\path.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\pixmap.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\shade.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\store.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\stream.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\string.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\structured-text.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\system.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\text.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\transition.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\write-document.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\xml.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\annotation.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\bitmap.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\buffer.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\colorspace.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\compressed-buffer.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\context.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\crypt.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\device.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\display-list.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\document.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\filter.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz\font.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\annot.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\cmap.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\crypt.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\document.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\event.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\field.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\font.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\javascript.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\object.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\output-pdf.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\page.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\parse.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\resource.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\widget.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\xref.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\cbz.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\fitz.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\img.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\memento.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\xps.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf\appearance.h">
+ <Filter>!include\pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\mupdf\pdf-tools.h">
+ <Filter>!include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\fitz\jmemcust.h">
+ <Filter>!include\fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\fitz\draw-imp.h">
+ <Filter>fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\fitz\ucdn.h">
+ <Filter>fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\fitz\unicodedata_db.h">
+ <Filter>fitz</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\pdf\pdf-encodings.h">
+ <Filter>pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\pdf\pdf-glyphlist.h">
+ <Filter>pdf</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\source\pdf\pdf-interpret-imp.h">
+ <Filter>pdf</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libthirdparty/libthirdparty.vcxproj b/platform/windows/libthirdparty/libthirdparty.vcxproj
new file mode 100644
index 00000000..75eafa26
--- /dev/null
+++ b/platform/windows/libthirdparty/libthirdparty.vcxproj
@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftbase.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftbbox.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftbitmap.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftgasp.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftglyph.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftinit.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftstroke.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftsynth.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftsystem.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\fttype1.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftxf86.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\cff\cff.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\cid\type1cid.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\psaux\psaux.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\pshinter\pshinter.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\psnames\psnames.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\raster\raster.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\sfnt\sfnt.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\smooth\smooth.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\truetype\truetype.c" />
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\type1\type1.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_arith.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_arith_iaid.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_arith_int.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_generic.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_halftone.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_huffman.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_image.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_metadata.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_mmr.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_page.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_refinement.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_segment.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_symbol_dict.c" />
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_text.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jaricom.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jcomapi.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdapimin.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdapistd.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdarith.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdatadst.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdatasrc.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdcoefct.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdcolor.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jddctmgr.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdhuff.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdinput.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmainct.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmarker.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmaster.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmerge.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdpostct.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdsample.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdtrans.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jerror.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jfdctflt.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jfdctfst.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jfdctint.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jidctflt.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jidctfst.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jidctint.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jmemmgr.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jmemnobs.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jquant1.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jquant2.c" />
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jutils.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsarray.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsboolean.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsbuiltin.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jscompile.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsdate.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsdtoa.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsdump.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jserror.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsfunction.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsgc.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsintern.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jslex.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsmath.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsnumber.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsobject.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\json.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsparse.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsproperty.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsregexp.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsrun.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsstate.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsstring.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsvalue.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\main.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\one.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\regex.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\utf.c" />
+ <ClCompile Include="..\..\..\thirdparty\mujs\utftype.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\bio.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cio.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\dwt.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\event.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\function_list.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\image.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\invert.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\jp2.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mct.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mqc.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\phix_manager.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\pi.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\ppix_manager.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\raw.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1_generate_luts.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t2.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tcd.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tgt.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\thix_manager.c" />
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tpix_manager.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\adler32.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\compress.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\crc32.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\deflate.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\inffast.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\inflate.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\inftrees.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\trees.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\uncompr.c" />
+ <ClCompile Include="..\..\..\thirdparty\zlib\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftconfig.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftheader.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftmodule.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftoption.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftstdlib.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\freetype.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftadvanc.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftautoh.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbbox.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbdf.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbitmap.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbzip2.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftcache.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftchapters.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftcid.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fterrdef.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fterrors.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftgasp.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftglyph.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftgxval.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftgzip.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftimage.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftincrem.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftlcdfil.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftlist.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftlzw.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmac.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmm.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmodapi.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmoderr.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftotval.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftoutln.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftpfr.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftrender.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsizes.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsnames.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftstroke.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsynth.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsystem.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fttrigon.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fttypes.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftwinfnt.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftxf86.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\autohint.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftcalc.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftdebug.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftdriver.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftgloadr.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftmemory.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftobjs.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftpic.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftrfork.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftserv.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftstream.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\fttrace.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftvalid.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\internal.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\psaux.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\pshints.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svbdf.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svcid.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svgldict.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svgxval.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svkern.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svmm.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svotval.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpfr.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpostnm.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svprop.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpscmap.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpsinfo.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svsfnt.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svttcmap.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svtteng.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svttglyf.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svwinfnt.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svxf86nm.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\sfnt.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\t1types.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\tttypes.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\t1tables.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ttnameid.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\tttables.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\tttags.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ttunpat.h" />
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\ft2build.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\astnames.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsbuiltin.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\jscompile.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsi.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\jslex.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsrun.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsvalue.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\mujs.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\opnames.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\regex.h" />
+ <ClInclude Include="..\..\..\thirdparty\mujs\utf.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\bio.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cio.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\dwt.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\event.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\fix.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\function_list.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\image.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\indexbox_manager.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\int.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\invert.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\jp2.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mct.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mqc.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_config.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_config_private.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_includes.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_intmath.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_inttypes.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_malloc.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_stdint.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\pi.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\raw.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1_luts.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t2.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tcd.h" />
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tgt.h" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DF87E242-8B2C-4F04-9A7E-61C578FD994C}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libthirdparty</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\scripts\freetype;..\..\..\scripts\jpeg;..\..\..\scripts\openjpeg;..\..\..\thirdparty\jbig2dec;..\..\..\thirdparty\jpeg;..\..\..\thirdparty\openjpeg\libopenjpeg;..\..\..\thirdparty\zlib;..\..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libthirdparty/libthirdparty.vcxproj.filters b/platform/windows/libthirdparty/libthirdparty.vcxproj.filters
new file mode 100644
index 00000000..8df2ff5f
--- /dev/null
+++ b/platform/windows/libthirdparty/libthirdparty.vcxproj.filters
@@ -0,0 +1,825 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="libfreetype">
+ <UniqueIdentifier>{51262ea7-0f9e-437e-8ffe-c85bacaaf125}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\base">
+ <UniqueIdentifier>{f4f104f6-caed-4df1-b35d-9f9767f5582d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include">
+ <UniqueIdentifier>{1d957264-59db-4892-aa9b-ba1cc2679e28}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype">
+ <UniqueIdentifier>{90126781-c73e-4236-83b4-d587cb934c42}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype\config">
+ <UniqueIdentifier>{97ff3411-a2bc-4e1a-a226-697c94e57b49}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype\internal">
+ <UniqueIdentifier>{5a89d11e-f4d3-4090-828c-3fbba6be4626}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype\internal\services">
+ <UniqueIdentifier>{cf91998c-2e4c-46ea-9181-028cf8ffdc13}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libjbig2dec">
+ <UniqueIdentifier>{095e71bf-5b71-417b-85ab-5fc6c3401938}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libjpeg">
+ <UniqueIdentifier>{e8dd043a-626d-46c4-bffe-f5937b4cd5e3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libopenjpeg">
+ <UniqueIdentifier>{2741745a-ddbb-4d7b-9102-ffa79d72d71a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libz">
+ <UniqueIdentifier>{a359ba61-bb36-4f26-ac90-e87eeeeae497}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libmujs">
+ <UniqueIdentifier>{2c243407-7436-4da7-8cca-69ee74ea256e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libmujs\include">
+ <UniqueIdentifier>{2ab8b309-1ec0-4324-89e1-078246114bb1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libmujs\source">
+ <UniqueIdentifier>{32dbf0c4-caae-469b-a861-cad68dff8d70}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\cff\cff.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\cid\type1cid.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\psaux\psaux.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\pshinter\pshinter.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\psnames\psnames.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\raster\raster.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\sfnt\sfnt.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\smooth\smooth.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\truetype\truetype.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\type1\type1.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftbase.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftbbox.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftbitmap.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftgasp.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftglyph.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftinit.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftstroke.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftsynth.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftsystem.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\fttype1.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\freetype\src\base\ftxf86.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_arith.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_arith_iaid.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_arith_int.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_generic.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_halftone.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_huffman.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_image.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_metadata.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_mmr.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_page.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_refinement.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_segment.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_symbol_dict.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jbig2dec\jbig2_text.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jaricom.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jcomapi.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdapimin.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdapistd.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdarith.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdatadst.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdatasrc.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdcoefct.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdcolor.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jddctmgr.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdhuff.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdinput.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmainct.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmarker.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmaster.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdmerge.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdpostct.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdsample.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jdtrans.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jerror.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jfdctflt.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jfdctfst.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jfdctint.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jidctflt.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jidctfst.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jidctint.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jmemmgr.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jmemnobs.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jquant1.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jquant2.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\jpeg\jutils.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\bio.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cio.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\dwt.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\event.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\function_list.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\image.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\invert.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\jp2.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mct.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mqc.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\phix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\pi.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\ppix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\raw.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1_generate_luts.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t2.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tcd.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tgt.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\thix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tpix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\adler32.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\compress.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\crc32.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\deflate.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\inffast.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\inflate.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\inftrees.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\trees.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\uncompr.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\zlib\zutil.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\one.c">
+ <Filter>libmujs</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsarray.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsboolean.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsbuiltin.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jscompile.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsdate.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsdtoa.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsdump.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jserror.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsfunction.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsgc.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsintern.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jslex.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsmath.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsnumber.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsobject.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\json.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsparse.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsproperty.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsregexp.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsrun.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsstate.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsstring.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\jsvalue.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\main.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\regex.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\utf.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\thirdparty\mujs\utftype.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\ft2build.h">
+ <Filter>libfreetype\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\freetype.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftadvanc.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftautoh.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbbox.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbdf.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbitmap.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftbzip2.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftcache.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftchapters.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftcid.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fterrdef.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fterrors.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftgasp.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftglyph.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftgxval.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftgzip.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftimage.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftincrem.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftlcdfil.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftlist.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftlzw.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmac.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmm.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmodapi.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftmoderr.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftotval.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftoutln.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftpfr.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftrender.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsizes.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsnames.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftstroke.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsynth.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftsystem.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fttrigon.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\fttypes.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftwinfnt.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ftxf86.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\t1tables.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ttnameid.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\tttables.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\tttags.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\ttunpat.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftconfig.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftheader.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftmodule.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftoption.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\config\ftstdlib.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\autohint.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftcalc.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftdebug.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftdriver.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftgloadr.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftmemory.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftobjs.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftpic.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftrfork.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftserv.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftstream.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\fttrace.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\ftvalid.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\internal.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\psaux.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\pshints.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\sfnt.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\t1types.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\tttypes.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svbdf.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svcid.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svgldict.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svgxval.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svkern.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svmm.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svotval.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpfr.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpostnm.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svprop.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpscmap.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svpsinfo.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svsfnt.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svttcmap.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svtteng.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svttglyf.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svwinfnt.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\freetype\include\freetype\internal\services\svxf86nm.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\bio.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\cio.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\dwt.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\event.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\fix.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\function_list.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\image.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\indexbox_manager.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\int.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\invert.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\jp2.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mct.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\mqc.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_config.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_config_private.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_includes.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_intmath.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_inttypes.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_malloc.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\opj_stdint.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\pi.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\raw.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t1_luts.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\t2.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tcd.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\openjpeg\libopenjpeg\tgt.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\mujs.h">
+ <Filter>libmujs</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\astnames.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsbuiltin.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\jscompile.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsi.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\jslex.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsrun.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\jsvalue.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\opnames.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\regex.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\thirdparty\mujs\utf.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libthirdparty_winRT.vcxproj b/platform/windows/libthirdparty_winRT.vcxproj
new file mode 100644
index 00000000..d9c60e17
--- /dev/null
+++ b/platform/windows/libthirdparty_winRT.vcxproj
@@ -0,0 +1,571 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|ARM">
+ <Configuration>Memento</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|Win32">
+ <Configuration>Memento</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Memento|x64">
+ <Configuration>Memento</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftbase.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftbbox.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftbitmap.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftgasp.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftglyph.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftinit.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftstroke.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftsynth.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftsystem.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\fttype1.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftxf86.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\cff\cff.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\cid\type1cid.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\psaux\psaux.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\pshinter\pshinter.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\psnames\psnames.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\raster\raster.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\sfnt\sfnt.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\smooth\smooth.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\truetype\truetype.c" />
+ <ClCompile Include="..\..\thirdparty\freetype\src\type1\type1.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_arith.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_arith_iaid.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_arith_int.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_generic.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_halftone.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_huffman.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_image.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_metadata.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_mmr.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_page.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_refinement.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_segment.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_symbol_dict.c" />
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_text.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jaricom.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jcomapi.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdapimin.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdapistd.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdarith.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdatadst.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdatasrc.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdcoefct.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdcolor.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jddctmgr.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdhuff.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdinput.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmainct.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmarker.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmaster.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmerge.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdpostct.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdsample.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jdtrans.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jerror.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jfdctflt.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jfdctfst.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jfdctint.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jidctflt.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jidctfst.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jidctint.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jmemmgr.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jmemnobs.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jquant1.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jquant2.c" />
+ <ClCompile Include="..\..\thirdparty\jpeg\jutils.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsarray.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsboolean.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsbuiltin.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jscompile.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsdate.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsdtoa.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsdump.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jserror.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsfunction.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsgc.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsintern.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jslex.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsmath.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsnumber.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsobject.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\json.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsparse.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsproperty.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsregexp.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsrun.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsstate.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsstring.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\jsvalue.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\main.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\one.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\regex.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\utf.c" />
+ <ClCompile Include="..\..\thirdparty\mujs\utftype.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\bio.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\cio.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\dwt.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\event.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\function_list.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\image.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\invert.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\jp2.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\mct.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\mqc.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\phix_manager.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\pi.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\ppix_manager.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\raw.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\t1.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\t1_generate_luts.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\t2.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\tcd.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\tgt.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\thix_manager.c" />
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\tpix_manager.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\adler32.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\compress.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\crc32.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\deflate.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\inffast.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\inflate.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\inftrees.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\trees.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\uncompr.c" />
+ <ClCompile Include="..\..\thirdparty\zlib\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftconfig.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftheader.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftmodule.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftoption.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftstdlib.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\freetype.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftadvanc.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftautoh.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbbox.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbdf.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbitmap.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbzip2.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftcache.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftchapters.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftcid.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fterrdef.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fterrors.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftgasp.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftglyph.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftgxval.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftgzip.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftimage.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftincrem.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftlcdfil.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftlist.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftlzw.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmac.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmm.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmodapi.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmoderr.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftotval.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftoutln.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftpfr.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftrender.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsizes.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsnames.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftstroke.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsynth.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsystem.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fttrigon.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fttypes.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftwinfnt.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftxf86.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\autohint.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftcalc.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftdebug.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftdriver.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftgloadr.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftmemory.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftobjs.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftpic.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftrfork.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftserv.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftstream.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\fttrace.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftvalid.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\internal.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\psaux.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\pshints.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svbdf.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svcid.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svgldict.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svgxval.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svkern.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svmm.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svotval.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpfr.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpostnm.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svprop.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpscmap.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpsinfo.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svsfnt.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svttcmap.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svtteng.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svttglyf.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svwinfnt.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svxf86nm.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\sfnt.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\t1types.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\tttypes.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\t1tables.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ttnameid.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\tttables.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\tttags.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ttunpat.h" />
+ <ClInclude Include="..\..\thirdparty\freetype\include\ft2build.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\astnames.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\jsbuiltin.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\jscompile.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\jsi.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\jslex.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\jsrun.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\jsvalue.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\mujs.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\opnames.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\regex.h" />
+ <ClInclude Include="..\..\thirdparty\mujs\utf.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\bio.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\cio.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\dwt.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\event.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\fix.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\function_list.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\image.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\indexbox_manager.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\int.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\invert.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\jp2.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\mct.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\mqc.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_config.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_config_private.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_includes.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_intmath.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_inttypes.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_malloc.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_stdint.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\pi.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\raw.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\t1.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\t1_luts.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\t2.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\tcd.h" />
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\tgt.h" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{c0d1c355-1bee-40e1-9ef4-fd9fffdbf396}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>libthirdparty_winRT</ProjectName>
+ <RootNamespace>libthirdparty_winRT</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ <ApplicationType>Windows Store</ApplicationType>
+ <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <PrecompiledHeaderFile>
+ </PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <PrecompiledHeaderFile>
+ </PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <CompileAsWinRT>false</CompileAsWinRT>
+ <SDLCheck>false</SDLCheck>
+ <AdditionalIncludeDirectories>..\..\scripts\freetype;..\..\scripts\jpeg;..\..\scripts\openjpeg;..\..\thirdparty\jbig2dec;..\..\thirdparty\jpeg;..\..\thirdparty\openjpeg\libopenjpeg;..\..\thirdparty\zlib;..\..\thirdparty\freetype\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>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)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/libthirdparty_winRT.vcxproj.filters b/platform/windows/libthirdparty_winRT.vcxproj.filters
new file mode 100644
index 00000000..3742ced4
--- /dev/null
+++ b/platform/windows/libthirdparty_winRT.vcxproj.filters
@@ -0,0 +1,825 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="libfreetype">
+ <UniqueIdentifier>{01b3001f-e457-469b-935e-a61e6bb80bea}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\base">
+ <UniqueIdentifier>{e719ccda-496e-44f1-a848-3f7e1ee5ec8d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include">
+ <UniqueIdentifier>{be2b973e-2b42-45d9-9225-d017d1abd744}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype">
+ <UniqueIdentifier>{b6fa3d37-cb6e-45ea-88de-530cb5b26c41}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libjbig2dec">
+ <UniqueIdentifier>{34f17a77-9d71-40b1-a18b-75b0704bddf0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libjpeg">
+ <UniqueIdentifier>{f0d06dd8-ab23-445f-82bd-b524f7206761}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libopenjpeg">
+ <UniqueIdentifier>{e6b91098-43cf-4337-8677-22b2c582785b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libz">
+ <UniqueIdentifier>{5e55ef18-6449-49c1-99aa-1cd88b6f4453}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype\config">
+ <UniqueIdentifier>{289ce62d-7110-4e8b-8045-72a557f8e6c0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype\internal">
+ <UniqueIdentifier>{bcbd304b-3787-4d77-a13d-1052885ff121}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libfreetype\include\freetype\internal\services">
+ <UniqueIdentifier>{298e58d2-d279-4f1c-abb8-6224727db323}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libmujs">
+ <UniqueIdentifier>{364c7937-2761-4a47-aa08-aa4cafda2e99}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libmujs\include">
+ <UniqueIdentifier>{ae49fa93-c671-4461-b697-332bea0570b1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="libmujs\source">
+ <UniqueIdentifier>{e2eafb1d-79ec-45b8-84e1-35acbba2fdee}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftstroke.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftsynth.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftsystem.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\fttype1.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftxf86.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftbase.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftbbox.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftbitmap.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftgasp.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftglyph.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\base\ftinit.c">
+ <Filter>libfreetype\base</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\cff\cff.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\psaux\psaux.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\pshinter\pshinter.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\psnames\psnames.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\raster\raster.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\sfnt\sfnt.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\smooth\smooth.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\truetype\truetype.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\type1\type1.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\freetype\src\cid\type1cid.c">
+ <Filter>libfreetype</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_metadata.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_mmr.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_page.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_refinement.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_segment.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_symbol_dict.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_text.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_arith.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_arith_iaid.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_arith_int.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_generic.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_halftone.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_huffman.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jbig2dec\jbig2_image.c">
+ <Filter>libjbig2dec</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jquant1.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jquant2.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jutils.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jaricom.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jcomapi.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdapimin.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdapistd.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdarith.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdatadst.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdatasrc.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdcoefct.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdcolor.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jddctmgr.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdhuff.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdinput.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmainct.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmarker.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmaster.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdmerge.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdpostct.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdsample.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jdtrans.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jerror.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jfdctflt.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jfdctfst.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jfdctint.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jidctflt.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jidctfst.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jidctint.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jmemmgr.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\jpeg\jmemnobs.c">
+ <Filter>libjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\zutil.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\adler32.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\compress.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\crc32.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\deflate.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\inffast.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\inflate.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\inftrees.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\trees.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\zlib\uncompr.c">
+ <Filter>libz</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\bio.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\cio.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\dwt.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\event.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\function_list.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\image.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\invert.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\jp2.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\mct.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\mqc.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\phix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\pi.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\ppix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\raw.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\t1.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\t1_generate_luts.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\t2.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\tcd.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\tgt.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\thix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\openjpeg\libopenjpeg\tpix_manager.c">
+ <Filter>libopenjpeg</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsarray.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsboolean.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsbuiltin.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jscompile.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsdate.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsdtoa.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsdump.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jserror.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsfunction.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsgc.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsintern.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jslex.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsmath.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsnumber.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsobject.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\json.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsparse.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsproperty.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsregexp.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsrun.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsstate.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsstring.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\jsvalue.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\main.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\regex.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\utf.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\utftype.c">
+ <Filter>libmujs\source</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\thirdparty\mujs\one.c">
+ <Filter>libmujs</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\thirdparty\freetype\include\ft2build.h">
+ <Filter>libfreetype\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmodapi.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmoderr.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftotval.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftoutln.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftpfr.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftrender.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsizes.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsnames.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftstroke.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsynth.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftsystem.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fttrigon.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fttypes.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftwinfnt.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftxf86.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\t1tables.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ttnameid.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\tttables.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\tttags.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ttunpat.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\freetype.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftadvanc.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftautoh.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbbox.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbdf.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbitmap.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftbzip2.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftcache.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftchapters.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftcid.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fterrdef.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\fterrors.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftgasp.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftglyph.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftgxval.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftgzip.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftimage.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftincrem.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftlcdfil.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftlist.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftlzw.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmac.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\ftmm.h">
+ <Filter>libfreetype\include\freetype</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftconfig.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftheader.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftmodule.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftoption.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\config\ftstdlib.h">
+ <Filter>libfreetype\include\freetype\config</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svbdf.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svcid.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svgldict.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svgxval.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svkern.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svmm.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svotval.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpfr.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpostnm.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svprop.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpscmap.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svpsinfo.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svsfnt.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svttcmap.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svtteng.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svttglyf.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svwinfnt.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\services\svxf86nm.h">
+ <Filter>libfreetype\include\freetype\internal\services</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftrfork.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftserv.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftstream.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\fttrace.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftvalid.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\internal.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\psaux.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\pshints.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\sfnt.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\t1types.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\tttypes.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\autohint.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftcalc.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftdebug.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftdriver.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftgloadr.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftmemory.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftobjs.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\freetype\include\freetype\internal\ftpic.h">
+ <Filter>libfreetype\include\freetype\internal</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\bio.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\cidx_manager.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\cio.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\dwt.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\event.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\fix.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\function_list.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\image.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\indexbox_manager.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\int.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\invert.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\j2k_lib.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\jp2.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\mct.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\mqc.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\openjpeg.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_config.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_config_private.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_includes.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_intmath.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_inttypes.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_malloc.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\opj_stdint.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\pi.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\raw.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\t1.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\t1_luts.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\t2.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\tcd.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\openjpeg\libopenjpeg\tgt.h">
+ <Filter>libopenjpeg</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\astnames.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\jsbuiltin.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\jscompile.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\jsi.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\jslex.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\jsrun.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\jsvalue.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\opnames.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\regex.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\utf.h">
+ <Filter>libmujs\include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\thirdparty\mujs\mujs.h">
+ <Filter>libmujs</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdf.sln b/platform/windows/mupdf.sln
new file mode 100644
index 00000000..65818c0e
--- /dev/null
+++ b/platform/windows/mupdf.sln
@@ -0,0 +1,762 @@
+
+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/windows/mupdf_cpp/App.xaml b/platform/windows/mupdf_cpp/App.xaml
new file mode 100644
index 00000000..dfb5d11c
--- /dev/null
+++ b/platform/windows/mupdf_cpp/App.xaml
@@ -0,0 +1,20 @@
+<Application
+ x:Class="mupdf_cpp.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:mupdf_cpp">
+
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+
+ <!--
+ Styles that define common aspects of the platform look and feel
+ Required by Visual Studio project and item templates
+ -->
+ <ResourceDictionary Source="Common/StandardStyles.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+
+ </ResourceDictionary>
+ </Application.Resources>
+</Application>
diff --git a/platform/windows/mupdf_cpp/App.xaml.cpp b/platform/windows/mupdf_cpp/App.xaml.cpp
new file mode 100644
index 00000000..4bb9614c
--- /dev/null
+++ b/platform/windows/mupdf_cpp/App.xaml.cpp
@@ -0,0 +1,131 @@
+//
+// 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
+
+/// <summary>
+/// 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().
+/// </summary>
+App::App()
+{
+ InitializeComponent();
+ Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
+}
+
+/// <summary>
+/// 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.
+/// </summary>
+/// <param name="args">Details about the launch request and process.</param>
+void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ args)
+{
+ auto rootFrame = dynamic_cast<Frame^>(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<MainPage^>(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<Frame^>(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<MainPage^>(rootFrame->Content);
+ p->FileEvent = args;
+ p->ProtocolEvent = nullptr;
+ p->FromFile();
+ Window::Current->Activate();
+}
+
+/// <summary>
+/// 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.
+/// </summary>
+/// <param name="sender">The source of the suspend request.</param>
+/// <param name="e">Details about the suspend request.</param>
+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/windows/mupdf_cpp/App.xaml.h b/platform/windows/mupdf_cpp/App.xaml.h
new file mode 100644
index 00000000..b62c9979
--- /dev/null
+++ b/platform/windows/mupdf_cpp/App.xaml.h
@@ -0,0 +1,24 @@
+//
+// App.xaml.h
+// Declaration of the App class.
+//
+
+#pragma once
+
+#include "App.g.h"
+
+namespace mupdf_cpp
+{
+ /// <summary>
+ /// Provides application-specific behavior to supplement the default Application class.
+ /// </summary>
+ 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/windows/mupdf_cpp/Assets/Logo.Scale-100.png b/platform/windows/mupdf_cpp/Assets/Logo.Scale-100.png
new file mode 100644
index 00000000..821cb7d9
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/Logo.Scale-100.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/Logo.Scale-140.png b/platform/windows/mupdf_cpp/Assets/Logo.Scale-140.png
new file mode 100644
index 00000000..94eb9b67
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/Logo.Scale-140.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/Logo.Scale-180.png b/platform/windows/mupdf_cpp/Assets/Logo.Scale-180.png
new file mode 100644
index 00000000..44354901
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/Logo.Scale-180.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/Logo.Scale-80.png b/platform/windows/mupdf_cpp/Assets/Logo.Scale-80.png
new file mode 100644
index 00000000..165bda7a
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/Logo.Scale-80.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-100.png b/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-100.png
new file mode 100644
index 00000000..5b5635e9
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-100.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-140.png b/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-140.png
new file mode 100644
index 00000000..2813a863
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-140.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-180.png b/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-180.png
new file mode 100644
index 00000000..1908837d
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/StoreLogo.scale-180.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/WideLogo.scale-100.png b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-100.png
new file mode 100644
index 00000000..9497ffb5
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-100.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/WideLogo.scale-140.png b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-140.png
new file mode 100644
index 00000000..1c6cd7a0
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-140.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/WideLogo.scale-180.png b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-180.png
new file mode 100644
index 00000000..7d3391f8
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-180.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/WideLogo.scale-80.png b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-80.png
new file mode 100644
index 00000000..471efbda
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/WideLogo.scale-80.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/mupdf_smallogo.png b/platform/windows/mupdf_cpp/Assets/mupdf_smallogo.png
new file mode 100644
index 00000000..48746c87
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/mupdf_smallogo.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Assets/mupdf_splash.png b/platform/windows/mupdf_cpp/Assets/mupdf_splash.png
new file mode 100644
index 00000000..624f9ae9
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Assets/mupdf_splash.png
Binary files differ
diff --git a/platform/windows/mupdf_cpp/Common/StandardStyles.xaml b/platform/windows/mupdf_cpp/Common/StandardStyles.xaml
new file mode 100644
index 00000000..ed4b0ec2
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Common/StandardStyles.xaml
@@ -0,0 +1,1889 @@
+<!--
+ This file contains XAML styles that simplify application development.
+
+ These are not merely convenient, but are required by most Visual Studio project and item templates.
+ Removing, renaming, or otherwise modifying the content of these files may result in a project that
+ does not build, or that will not build once additional pages are added. If variations on these
+ styles are desired it is recommended that you copy the content under a new name and modify your
+ private copy.
+-->
+
+<ResourceDictionary
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+ <!-- Non-brush values that vary across themes -->
+
+ <ResourceDictionary.ThemeDictionaries>
+ <ResourceDictionary x:Key="Default">
+ <x:String x:Key="BackButtonGlyph">&#xE071;</x:String>
+ <x:String x:Key="BackButtonSnappedGlyph">&#xE0BA;</x:String>
+ </ResourceDictionary>
+
+ <ResourceDictionary x:Key="HighContrast">
+ <x:String x:Key="BackButtonGlyph">&#xE071;</x:String>
+ <x:String x:Key="BackButtonSnappedGlyph">&#xE0C4;</x:String>
+ </ResourceDictionary>
+ </ResourceDictionary.ThemeDictionaries>
+
+ <x:String x:Key="ChevronGlyph">&#xE26B;</x:String>
+
+ <!-- RichTextBlock styles -->
+
+ <Style x:Key="BasicRichTextStyle" TargetType="RichTextBlock">
+ <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>
+ <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
+ <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
+ <Setter Property="TextTrimming" Value="WordEllipsis"/>
+ <Setter Property="TextWrapping" Value="Wrap"/>
+ <Setter Property="Typography.StylisticSet20" Value="True"/>
+ <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
+ <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
+ </Style>
+
+ <Style x:Key="BaselineRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BasicRichTextStyle}">
+ <Setter Property="LineHeight" Value="20"/>
+ <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
+ <!-- Properly align text along its baseline -->
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="4"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="ItemRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}"/>
+
+ <Style x:Key="BodyRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}">
+ <Setter Property="FontWeight" Value="SemiLight"/>
+ </Style>
+
+ <!-- TextBlock styles -->
+
+ <Style x:Key="BasicTextStyle" TargetType="TextBlock">
+ <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>
+ <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
+ <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
+ <Setter Property="TextTrimming" Value="WordEllipsis"/>
+ <Setter Property="TextWrapping" Value="Wrap"/>
+ <Setter Property="Typography.StylisticSet20" Value="True"/>
+ <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
+ <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
+ </Style>
+
+ <Style x:Key="BaselineTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BasicTextStyle}">
+ <Setter Property="LineHeight" Value="20"/>
+ <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
+ <!-- Properly align text along its baseline -->
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="4"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="HeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontSize" Value="56"/>
+ <Setter Property="FontWeight" Value="Light"/>
+ <Setter Property="LineHeight" Value="40"/>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-2" Y="8"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="SubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontSize" Value="26.667"/>
+ <Setter Property="FontWeight" Value="Light"/>
+ <Setter Property="LineHeight" Value="30"/>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="6"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="TitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontWeight" Value="SemiBold"/>
+ </Style>
+
+ <Style x:Key="SubtitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontWeight" Value="Normal"/>
+ </Style>
+
+ <Style x:Key="ItemTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}"/>
+
+ <Style x:Key="BodyTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontWeight" Value="SemiLight"/>
+ </Style>
+
+ <Style x:Key="CaptionTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
+ <Setter Property="FontSize" Value="12"/>
+ <Setter Property="Foreground" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
+ </Style>
+
+ <Style x:Key="GroupHeaderTextStyle" TargetType="TextBlock">
+ <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
+ <Setter Property="TextTrimming" Value="WordEllipsis"/>
+ <Setter Property="TextWrapping" Value="NoWrap"/>
+ <Setter Property="Typography.StylisticSet20" Value="True"/>
+ <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
+ <Setter Property="Typography.CaseSensitiveForms" Value="True"/>
+ <Setter Property="FontSize" Value="26.667"/>
+ <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
+ <Setter Property="FontWeight" Value="Light"/>
+ <Setter Property="LineHeight" Value="30"/>
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <TranslateTransform X="-1" Y="6"/>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Button styles -->
+
+ <!--
+ TextButtonStyle is used to style a Button using subheader-styled text with no other adornment. There
+ are two styles that are based on TextButtonStyle (TextPrimaryButtonStyle and TextSecondaryButtonStyle)
+ which are used in the GroupedItemsPage as a group header and in the FileOpenPickerPage for triggering
+ commands.
+ -->
+ <Style x:Key="TextButtonStyle" TargetType="ButtonBase">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="MinHeight" Value="0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="ButtonBase">
+ <Grid Background="Transparent">
+ <ContentPresenter x:Name="Text" Content="{TemplateBinding Content}" />
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal"/>
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>
+ <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused"/>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="CheckStates">
+ <VisualState x:Name="Checked"/>
+ <VisualState x:Name="Unchecked">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Indeterminate"/>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style x:Key="TextPrimaryButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource TextButtonStyle}">
+ <Setter Property="Foreground" Value="{StaticResource ApplicationHeaderForegroundThemeBrush}"/>
+ </Style>
+
+ <Style x:Key="TextSecondaryButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource TextButtonStyle}">
+ <Setter Property="Foreground" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
+ </Style>
+
+ <!--
+ TextRadioButtonStyle is used to style a RadioButton using subheader-styled text with no other adornment.
+ This style is used in the SearchResultsPage to allow selection among filters.
+ -->
+ <Style x:Key="TextRadioButtonStyle" TargetType="RadioButton" BasedOn="{StaticResource TextButtonStyle}">
+ <Setter Property="Margin" Value="0,0,30,0"/>
+ </Style>
+
+ <!--
+ AppBarButtonStyle is used to style a Button (or ToggleButton) for use in an App Bar. Content will be centered
+ and should fit within the 40 pixel radius glyph provided. 16-point Segoe UI Symbol is used for content text
+ to simplify the use of glyphs from that font. AutomationProperties.Name is used for the text below the glyph.
+ -->
+ <Style x:Key="AppBarButtonStyle" TargetType="ButtonBase">
+ <Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ <Setter Property="VerticalAlignment" Value="Stretch"/>
+ <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
+ <Setter Property="FontWeight" Value="Normal"/>
+ <Setter Property="FontSize" Value="20"/>
+ <Setter Property="AutomationProperties.ItemType" Value="App Bar Button"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="ButtonBase">
+ <Grid x:Name="RootGrid" Width="100" Background="Transparent">
+ <StackPanel VerticalAlignment="Top" Margin="0,12,0,11">
+ <Grid Width="40" Height="40" Margin="0,0,0,5" HorizontalAlignment="Center">
+ <TextBlock x:Name="BackgroundGlyph" Text="&#xE0A8;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0" Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>
+ <TextBlock x:Name="OutlineGlyph" Text="&#xE0A7;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0"/>
+ <ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="-1,-1,0,0" VerticalAlignment="Center"/>
+ </Grid>
+ <TextBlock
+ x:Name="TextLabel"
+ Text="{TemplateBinding AutomationProperties.Name}"
+ Foreground="{StaticResource AppBarItemForegroundThemeBrush}"
+ Margin="0,0,2,0"
+ FontSize="12"
+ TextAlignment="Center"
+ Width="88"
+ MaxHeight="32"
+ TextTrimming="WordEllipsis"
+ Style="{StaticResource BasicTextStyle}"/>
+ </StackPanel>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="ApplicationViewStates">
+ <VisualState x:Name="FullScreenLandscape"/>
+ <VisualState x:Name="Filled"/>
+ <VisualState x:Name="FullScreenPortrait">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Snapped">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal"/>
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualWhite"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualBlack"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused" />
+ <VisualState x:Name="PointerFocused" />
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="CheckStates">
+ <VisualState x:Name="Checked">
+ <Storyboard>
+ <DoubleAnimation Duration="0" To="0" Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Opacity"/>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundCheckedGlyph" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unchecked"/>
+ <VisualState x:Name="Indeterminate"/>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--
+ Standard AppBarButton Styles for use with Button and ToggleButton
+
+ An AppBarButton Style is provided for each of the glyphs in the Segoe UI Symbol font.
+ Uncomment any style you reference (as not all may be required).
+ -->
+ <Style x:Key="HelpAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HelpAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Help"/>
+ <Setter Property="Content" Value="&#xE11B;"/>
+ </Style>
+ <Style x:Key="SearchAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SearchAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Search"/>
+ <Setter Property="Content" Value="&#xE11A;"/>
+ </Style>
+ <Style x:Key="OpenFileAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OpenFileAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Open File"/>
+ <Setter Property="Content" Value="&#xE1A5;"/>
+ </Style>
+ <Style x:Key="NextAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NextAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Next"/>
+ <Setter Property="Content" Value="&#xE111;"/>
+ </Style>
+ <Style x:Key="PreviousAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PreviousAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Previous"/>
+ <Setter Property="Content" Value="&#xE112;"/>
+ </Style>
+ <Style x:Key="NoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="No"/>
+ <Setter Property="Content" Value="&#xE10A;"/>
+ </Style>
+ <Style x:Key="SettingsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SettingsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Settings"/>
+ <Setter Property="Content" Value="&#xE115;"/>
+ </Style>
+ <Style x:Key="LinksAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="LinksAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Links"/>
+ <Setter Property="Content" Value="&#xE167;"/>
+ </Style>
+ <Style x:Key="ContentsBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AllAppsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Contents"/>
+ <Setter Property="Content" Value="&#xE179;"/>
+ </Style>
+ <Style x:Key="ReflowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ReflowAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="TextExtract"/>
+ <Setter Property="Content" Value="&#xE18B;"/>
+ </Style>
+ <Style x:Key="ZoomInAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ZoomInAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Zoom In"/>
+ <Setter Property="Content" Value="&#xE12E;"/>
+ </Style>
+ <Style x:Key="ZoomOutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ZoomOutAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Zoom Out"/>
+ <Setter Property="Content" Value="&#xE1A4;"/>
+ </Style>
+
+ <!--
+
+ <Style x:Key="SkipBackAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Skip Back"/>
+ <Setter Property="Content" Value="&#xE100;"/>
+ </Style>
+ <Style x:Key="SkipAheadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SkipAheadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Skip Ahead"/>
+ <Setter Property="Content" Value="&#xE101;"/>
+ </Style>
+ <Style x:Key="PlayAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PlayAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Play"/>
+ <Setter Property="Content" Value="&#xE102;"/>
+ </Style>
+ <Style x:Key="PauseAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PauseAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Pause"/>
+ <Setter Property="Content" Value="&#xE103;"/>
+ </Style>
+ <Style x:Key="EditAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="EditAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Edit"/>
+ <Setter Property="Content" Value="&#xE104;"/>
+ </Style>
+ <Style x:Key="SaveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SaveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Save"/>
+ <Setter Property="Content" Value="&#xE105;"/>
+ </Style>
+ <Style x:Key="DeleteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DeleteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Delete"/>
+ <Setter Property="Content" Value="&#xE106;"/>
+ </Style>
+ <Style x:Key="DiscardAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DiscardAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Discard"/>
+ <Setter Property="Content" Value="&#xE107;"/>
+ </Style>
+ <Style x:Key="RemoveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RemoveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Remove"/>
+ <Setter Property="Content" Value="&#xE108;"/>
+ </Style>
+ <Style x:Key="AddAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AddAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Add"/>
+ <Setter Property="Content" Value="&#xE109;"/>
+ </Style>
+ <Style x:Key="NoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="No"/>
+ <Setter Property="Content" Value="&#xE10A;"/>
+ </Style>
+ <Style x:Key="YesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="YesAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Yes"/>
+ <Setter Property="Content" Value="&#xE10B;"/>
+ </Style>
+ <Style x:Key="MoreAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MoreAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="More"/>
+ <Setter Property="Content" Value="&#xE10C;"/>
+ </Style>
+ <Style x:Key="RedoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RedoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Redo"/>
+ <Setter Property="Content" Value="&#xE10D;"/>
+ </Style>
+ <Style x:Key="UndoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UndoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Undo"/>
+ <Setter Property="Content" Value="&#xE10E;"/>
+ </Style>
+ <Style x:Key="HomeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HomeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Home"/>
+ <Setter Property="Content" Value="&#xE10F;"/>
+ </Style>
+ <Style x:Key="OutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OutAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Out"/>
+ <Setter Property="Content" Value="&#xE110;"/>
+ </Style>
+ <Style x:Key="NextAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NextAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Next"/>
+ <Setter Property="Content" Value="&#xE111;"/>
+ </Style>
+ <Style x:Key="PreviousAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PreviousAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Previous"/>
+ <Setter Property="Content" Value="&#xE112;"/>
+ </Style>
+ <Style x:Key="FavoriteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FavoriteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Favorite"/>
+ <Setter Property="Content" Value="&#xE113;"/>
+ </Style>
+ <Style x:Key="PhotoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PhotoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Photo"/>
+ <Setter Property="Content" Value="&#xE114;"/>
+ </Style>
+ <Style x:Key="SettingsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SettingsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Settings"/>
+ <Setter Property="Content" Value="&#xE115;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="VideoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="VideoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Video"/>
+ <Setter Property="Content" Value="&#xE116;"/>
+ </Style>
+ <Style x:Key="RefreshAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RefreshAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Refresh"/>
+ <Setter Property="Content" Value="&#xE117;"/>
+ </Style>
+ <Style x:Key="DownloadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DownloadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Download"/>
+ <Setter Property="Content" Value="&#xE118;"/>
+ </Style>
+ <Style x:Key="MailAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MailAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Mail"/>
+ <Setter Property="Content" Value="&#xE119;"/>
+ </Style>
+ <Style x:Key="SearchAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SearchAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Search"/>
+ <Setter Property="Content" Value="&#xE11A;"/>
+ </Style>
+ <Style x:Key="HelpAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HelpAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Help"/>
+ <Setter Property="Content" Value="&#xE11B;"/>
+ </Style>
+ <Style x:Key="UploadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UploadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Upload"/>
+ <Setter Property="Content" Value="&#xE11C;"/>
+ </Style>
+ <Style x:Key="EmojiAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="EmojiAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Emoji"/>
+ <Setter Property="Content" Value="&#xE11D;"/>
+ </Style>
+ <Style x:Key="TwoPageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="TwoPageAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Two Page"/>
+ <Setter Property="Content" Value="&#xE11E;"/>
+ </Style>
+ <Style x:Key="LeaveChatAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="LeaveChatAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Upload"/>
+ <Setter Property="Content" Value="&#xE11F;"/>
+ </Style>
+ <Style x:Key="MailForwardAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MailForwardAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Forward Mail"/>
+ <Setter Property="Content" Value="&#xE120;"/>
+ </Style>
+ <Style x:Key="ClockAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ClockAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Clock"/>
+ <Setter Property="Content" Value="&#xE121;"/>
+ </Style>
+ <Style x:Key="SendAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SendAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Send"/>
+ <Setter Property="Content" Value="&#xE122;"/>
+ </Style>
+ <Style x:Key="CropAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CropAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Crop"/>
+ <Setter Property="Content" Value="&#xE123;"/>
+ </Style>
+ <Style x:Key="RotateCameraAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RotateCameraAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Rotate Camera"/>
+ <Setter Property="Content" Value="&#xE124;"/>
+ </Style>
+ <Style x:Key="PeopleAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PeopleAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="People"/>
+ <Setter Property="Content" Value="&#xE125;"/>
+ </Style>
+ <Style x:Key="ClosePaneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ClosePaneAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Close Pane"/>
+ <Setter Property="Content" Value="&#xE126;"/>
+ </Style>
+ <Style x:Key="OpenPaneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OpenPaneAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Open Pane"/>
+ <Setter Property="Content" Value="&#xE127;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="WorldAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="WorldAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="World"/>
+ <Setter Property="Content" Value="&#xE128;"/>
+ </Style>
+ <Style x:Key="FlagAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FlagAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Flag"/>
+ <Setter Property="Content" Value="&#xE129;"/>
+ </Style>
+ <Style x:Key="PreviewLinkAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PreviewLinkAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Preview Link"/>
+ <Setter Property="Content" Value="&#xE12A;"/>
+ </Style>
+ <Style x:Key="GlobeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="GlobeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Globe"/>
+ <Setter Property="Content" Value="&#xE12B;"/>
+ </Style>
+ <Style x:Key="TrimAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="TrimAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Trim"/>
+ <Setter Property="Content" Value="&#xE12C;"/>
+ </Style>
+ <Style x:Key="AttachCameraAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AttachCameraAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Attach Camera"/>
+ <Setter Property="Content" Value="&#xE12D;"/>
+ </Style>
+ <Style x:Key="ZoomInAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ZoomInAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Zoom In"/>
+ <Setter Property="Content" Value="&#xE12E;"/>
+ </Style>
+ <Style x:Key="BookmarksAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="BookmarksAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Bookmarks"/>
+ <Setter Property="Content" Value="&#xE12F;"/>
+ </Style>
+ <Style x:Key="DocumentAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DocumentAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Document"/>
+ <Setter Property="Content" Value="&#xE130;"/>
+ </Style>
+ <Style x:Key="ProtectedDocumentAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ProtectedDocumentAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Protected Document"/>
+ <Setter Property="Content" Value="&#xE131;"/>
+ </Style>
+ <Style x:Key="PageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PageAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Page"/>
+ <Setter Property="Content" Value="&#xE132;"/>
+ </Style>
+ <Style x:Key="BulletsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="BulletsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Bullets"/>
+ <Setter Property="Content" Value="&#xE133;"/>
+ </Style>
+ <Style x:Key="CommentAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CommentAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Comment"/>
+ <Setter Property="Content" Value="&#xE134;"/>
+ </Style>
+ <Style x:Key="Mail2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="Mail2AppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Mail2"/>
+ <Setter Property="Content" Value="&#xE135;"/>
+ </Style>
+ <Style x:Key="ContactInfoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ContactInfoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Contact Info"/>
+ <Setter Property="Content" Value="&#xE136;"/>
+ </Style>
+ <Style x:Key="HangUpAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HangUpAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Hang Up"/>
+ <Setter Property="Content" Value="&#xE137;"/>
+ </Style>
+ <Style x:Key="ViewAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ViewAllAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="View All"/>
+ <Setter Property="Content" Value="&#xE138;"/>
+ </Style>
+ <Style x:Key="MapPinAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MapPinAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Map Pin"/>
+ <Setter Property="Content" Value="&#xE139;"/>
+ </Style>
+ <Style x:Key="PhoneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PhoneAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Phone"/>
+ <Setter Property="Content" Value="&#xE13A;"/>
+ </Style>
+ <Style x:Key="VideoChatAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="VideoChatAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Video Chat"/>
+ <Setter Property="Content" Value="&#xE13B;"/>
+ </Style>
+ <Style x:Key="SwitchAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SwitchAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Switch"/>
+ <Setter Property="Content" Value="&#xE13C;"/>
+ </Style>
+ <Style x:Key="ContactAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ContactAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Contact"/>
+ <Setter Property="Content" Value="&#xE13D;"/>
+ </Style>
+
+ -->
+
+ <!--
+
+ <Style x:Key="RenameAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RenameAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Rename"/>
+ <Setter Property="Content" Value="&#xE13E;"/>
+ </Style>
+ <Style x:Key="PinAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PinAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Pin"/>
+ <Setter Property="Content" Value="&#xE141;"/>
+ </Style>
+ <Style x:Key="MusicInfoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MusicInfoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Music Info"/>
+ <Setter Property="Content" Value="&#xE142;"/>
+ </Style>
+ <Style x:Key="GoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="GoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Go"/>
+ <Setter Property="Content" Value="&#xE143;"/>
+ </Style>
+ <Style x:Key="KeyboardAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="KeyboardAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Keyboard"/>
+ <Setter Property="Content" Value="&#xE144;"/>
+ </Style>
+ <Style x:Key="DockLeftAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DockLeftAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Dock Left"/>
+ <Setter Property="Content" Value="&#xE145;"/>
+ </Style>
+ <Style x:Key="DockRightAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DockRightAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Dock Right"/>
+ <Setter Property="Content" Value="&#xE146;"/>
+ </Style>
+ <Style x:Key="DockBottomAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DockBottomAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Dock Bottom"/>
+ <Setter Property="Content" Value="&#xE147;"/>
+ </Style>
+ <Style x:Key="RemoteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RemoteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Remote"/>
+ <Setter Property="Content" Value="&#xE148;"/>
+ </Style>
+ <Style x:Key="SyncAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SyncAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Sync"/>
+ <Setter Property="Content" Value="&#xE149;"/>
+ </Style>
+ <Style x:Key="RotateAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RotateAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Rotate"/>
+ <Setter Property="Content" Value="&#xE14A;"/>
+ </Style>
+ <Style x:Key="ShuffleAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ShuffleAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Shuffle"/>
+ <Setter Property="Content" Value="&#xE14B;"/>
+ </Style>
+ <Style x:Key="ListAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ListAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="List"/>
+ <Setter Property="Content" Value="&#xE14C;"/>
+ </Style>
+ <Style x:Key="ShopAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ShopAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Shop"/>
+ <Setter Property="Content" Value="&#xE14D;"/>
+ </Style>
+ <Style x:Key="SelectAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SelectAllAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Select All"/>
+ <Setter Property="Content" Value="&#xE14E;"/>
+ </Style>
+ <Style x:Key="OrientationAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OrientationAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Orientation"/>
+ <Setter Property="Content" Value="&#xE14F;"/>
+ </Style>
+ <Style x:Key="ImportAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ImportAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Import"/>
+ <Setter Property="Content" Value="&#xE150;"/>
+ </Style>
+ <Style x:Key="ImportAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ImportAllAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Import All"/>
+ <Setter Property="Content" Value="&#xE151;"/>
+ </Style>
+ <Style x:Key="BrowsePhotosAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="BrowsePhotosAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Browse Photos"/>
+ <Setter Property="Content" Value="&#xE155;"/>
+ </Style>
+ <Style x:Key="WebcamAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="WebcamAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Webcam"/>
+ <Setter Property="Content" Value="&#xE156;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="PicturesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PicturesAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Pictures"/>
+ <Setter Property="Content" Value="&#xE158;"/>
+ </Style>
+ <Style x:Key="SaveLocalAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SaveLocalAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Save Local"/>
+ <Setter Property="Content" Value="&#xE159;"/>
+ </Style>
+ <Style x:Key="CaptionAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CaptionAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Caption"/>
+ <Setter Property="Content" Value="&#xE15A;"/>
+ </Style>
+ <Style x:Key="StopAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="StopAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Stop"/>
+ <Setter Property="Content" Value="&#xE15B;"/>
+ </Style>
+ <Style x:Key="ShowResultsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ShowResultsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Show Results"/>
+ <Setter Property="Content" Value="&#xE15C;"/>
+ </Style>
+ <Style x:Key="VolumeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="VolumeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Volume"/>
+ <Setter Property="Content" Value="&#xE15D;"/>
+ </Style>
+ <Style x:Key="RepairAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RepairAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Repair"/>
+ <Setter Property="Content" Value="&#xE15E;"/>
+ </Style>
+ <Style x:Key="MessageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MessageAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Message"/>
+ <Setter Property="Content" Value="&#xE15F;"/>
+ </Style>
+ <Style x:Key="Page2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="Page2AppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Page2"/>
+ <Setter Property="Content" Value="&#xE160;"/>
+ </Style>
+ <Style x:Key="CalendarDayAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CalendarDayAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Day"/>
+ <Setter Property="Content" Value="&#xE161;"/>
+ </Style>
+ <Style x:Key="CalendarWeekAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CalendarWeekAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Week"/>
+ <Setter Property="Content" Value="&#xE162;"/>
+ </Style>
+ <Style x:Key="CalendarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CalendarAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Calendar"/>
+ <Setter Property="Content" Value="&#xE163;"/>
+ </Style>
+ <Style x:Key="CharactersAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CharactersAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Characters"/>
+ <Setter Property="Content" Value="&#xE164;"/>
+ </Style>
+ <Style x:Key="MailReplyAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MailReplyAllAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Reply All"/>
+ <Setter Property="Content" Value="&#xE165;"/>
+ </Style>
+ <Style x:Key="ReadAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ReadAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Read"/>
+ <Setter Property="Content" Value="&#xE166;"/>
+ </Style>
+ <Style x:Key="LinkAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="LinkAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Link"/>
+ <Setter Property="Content" Value="&#xE167;"/>
+ </Style>
+ <Style x:Key="AccountsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AccountsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Accounts"/>
+ <Setter Property="Content" Value="&#xE168;"/>
+ </Style>
+ <Style x:Key="ShowBccAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ShowBccAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Show Bcc"/>
+ <Setter Property="Content" Value="&#xE169;"/>
+ </Style>
+ <Style x:Key="HideBccAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HideBccAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Hide Bcc"/>
+ <Setter Property="Content" Value="&#xE16A;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="CutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CutAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Cut"/>
+ <Setter Property="Content" Value="&#xE16B;"/>
+ </Style>
+ <Style x:Key="AttachAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AttachAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Attach"/>
+ <Setter Property="Content" Value="&#xE16C;"/>
+ </Style>
+ <Style x:Key="PasteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PasteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Paste"/>
+ <Setter Property="Content" Value="&#xE16D;"/>
+ </Style>
+ <Style x:Key="FilterAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FilterAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Filter"/>
+ <Setter Property="Content" Value="&#xE16E;"/>
+ </Style>
+ <Style x:Key="CopyAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CopyAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Copy"/>
+ <Setter Property="Content" Value="&#xE16F;"/>
+ </Style>
+ <Style x:Key="Emoji2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="Emoji2AppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Emoji2"/>
+ <Setter Property="Content" Value="&#xE170;"/>
+ </Style>
+ <Style x:Key="ImportantAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ImportantAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Important"/>
+ <Setter Property="Content" Value="&#xE171;"/>
+ </Style>
+ <Style x:Key="MailReplyAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MailReplyAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Reply"/>
+ <Setter Property="Content" Value="&#xE172;"/>
+ </Style>
+ <Style x:Key="SlideShowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SlideShowAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Slideshow"/>
+ <Setter Property="Content" Value="&#xE173;"/>
+ </Style>
+ <Style x:Key="SortAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SortAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Sort"/>
+ <Setter Property="Content" Value="&#xE174;"/>
+ </Style>
+ <Style x:Key="ManageAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ManageAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Manage"/>
+ <Setter Property="Content" Value="&#xE178;"/>
+ </Style>
+ <Style x:Key="AllAppsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AllAppsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="All Apps"/>
+ <Setter Property="Content" Value="&#xE179;"/>
+ </Style>
+ <Style x:Key="DisconnectDriveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DisconnectDriveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Disconnect Drive"/>
+ <Setter Property="Content" Value="&#xE17A;"/>
+ </Style>
+ <Style x:Key="MapDriveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MapDriveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Map Drive"/>
+ <Setter Property="Content" Value="&#xE17B;"/>
+ </Style>
+ <Style x:Key="NewWindowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NewWindowAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="New Window"/>
+ <Setter Property="Content" Value="&#xE17C;"/>
+ </Style>
+ <Style x:Key="OpenWithAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OpenWithAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Open With"/>
+ <Setter Property="Content" Value="&#xE17D;"/>
+ </Style>
+ <Style x:Key="ContactPresenceAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ContactPresenceAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Presence"/>
+ <Setter Property="Content" Value="&#xE181;"/>
+ </Style>
+ <Style x:Key="PriorityAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PriorityAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Priority"/>
+ <Setter Property="Content" Value="&#xE182;"/>
+ </Style>
+ <Style x:Key="UploadSkyDriveAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UploadSkyDriveAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Skydrive"/>
+ <Setter Property="Content" Value="&#xE183;"/>
+ </Style>
+ <Style x:Key="GoToTodayAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="GoToTodayAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Today"/>
+ <Setter Property="Content" Value="&#xE184;"/>
+ </Style>
+ <Style x:Key="FontAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FontAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Font"/>
+ <Setter Property="Content" Value="&#xE185;"/>
+ </Style>
+
+ -->
+
+ <!--
+
+ <Style x:Key="FontColorAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FontColorAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Font Color"/>
+ <Setter Property="Content" Value="&#xE186;"/>
+ </Style>
+ <Style x:Key="Contact2AppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="Contact2AppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Contact"/>
+ <Setter Property="Content" Value="&#xE187;"/>
+ </Style>
+ <Style x:Key="FolderppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FolderAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Folder"/>
+ <Setter Property="Content" Value="&#xE188;"/>
+ </Style>
+ <Style x:Key="AudioAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AudioAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Audio"/>
+ <Setter Property="Content" Value="&#xE189;"/>
+ </Style>
+ <Style x:Key="PlaceholderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PlaceholderAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Placeholder"/>
+ <Setter Property="Content" Value="&#xE18A;"/>
+ </Style>
+ <Style x:Key="ViewAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ViewAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="View"/>
+ <Setter Property="Content" Value="&#xE18B;"/>
+ </Style>
+ <Style x:Key="SetLockScreenAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SetLockscreenAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Set Lockscreen"/>
+ <Setter Property="Content" Value="&#xE18C;"/>
+ </Style>
+ <Style x:Key="SetTitleAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SetTitleAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Set Title"/>
+ <Setter Property="Content" Value="&#xE18D;"/>
+ </Style>
+ <Style x:Key="CcAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CcAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Cc"/>
+ <Setter Property="Content" Value="&#xE190;"/>
+ </Style>
+ <Style x:Key="StopSlideShowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="StopSlideshowAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Stop Slideshow"/>
+ <Setter Property="Content" Value="&#xE191;"/>
+ </Style>
+ <Style x:Key="PermissionsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PermissionsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Permisions"/>
+ <Setter Property="Content" Value="&#xE192;"/>
+ </Style>
+ <Style x:Key="HighlightAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="HighlightAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Highlight"/>
+ <Setter Property="Content" Value="&#xE193;"/>
+ </Style>
+ <Style x:Key="DisableUpdatesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DisableUpdatesAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Disable Updates"/>
+ <Setter Property="Content" Value="&#xE194;"/>
+ </Style>
+ <Style x:Key="UnfavoriteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UnfavoriteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Unfavorite"/>
+ <Setter Property="Content" Value="&#xE195;"/>
+ </Style>
+ <Style x:Key="UnPinAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UnPinAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Unpin"/>
+ <Setter Property="Content" Value="&#xE196;"/>
+ </Style>
+ <Style x:Key="OpenLocalAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OpenLocalAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Open Loal"/>
+ <Setter Property="Content" Value="&#xE197;"/>
+ </Style>
+ <Style x:Key="MuteAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MuteAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Mute"/>
+ <Setter Property="Content" Value="&#xE198;"/>
+ </Style>
+ <Style x:Key="ItalicAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ItalicAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Italic"/>
+ <Setter Property="Content" Value="&#xE199;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="UnderlineAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UnderlineAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Underline"/>
+ <Setter Property="Content" Value="&#xE19A;"/>
+ </Style>
+ <Style x:Key="BoldAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="BoldAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Bold"/>
+ <Setter Property="Content" Value="&#xE19B;"/>
+ </Style>
+ <Style x:Key="MoveToFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MoveToFolderAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Move to Folder"/>
+ <Setter Property="Content" Value="&#xE19C;"/>
+ </Style>
+ <Style x:Key="LikeDislikeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="LikeDislikeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Like/Dislike"/>
+ <Setter Property="Content" Value="&#xE19D;"/>
+ </Style>
+ <Style x:Key="DislikeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DislikeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Dislike"/>
+ <Setter Property="Content" Value="&#xE19E;"/>
+ </Style>
+ <Style x:Key="LikeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="LikeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Like"/>
+ <Setter Property="Content" Value="&#xE19F;"/>
+ </Style>
+ <Style x:Key="AlignRightAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AlignRightAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Align Right"/>
+ <Setter Property="Content" Value="&#xE1A0;"/>
+ </Style>
+ <Style x:Key="AlignCenterAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AlignCenterAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Align Center"/>
+ <Setter Property="Content" Value="&#xE1A1;"/>
+ </Style>
+ <Style x:Key="AlignLeftAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AlignLeftAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Align Left"/>
+ <Setter Property="Content" Value="&#xE1A2;"/>
+ </Style>
+ <Style x:Key="ZoomAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ZoomAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Zoom"/>
+ <Setter Property="Content" Value="&#xE1A3;"/>
+ </Style>
+ <Style x:Key="ZoomOutAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ZoomOutAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Zoom Out"/>
+ <Setter Property="Content" Value="&#xE1A4;"/>
+ </Style>
+ <Style x:Key="OpenFileAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OpenFileAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Open File"/>
+ <Setter Property="Content" Value="&#xE1A5;"/>
+ </Style>
+ <Style x:Key="OtherUserAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OtherUserAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Other User"/>
+ <Setter Property="Content" Value="&#xE1A6;"/>
+ </Style>
+ <Style x:Key="AdminAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AdminAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Admin"/>
+ <Setter Property="Content" Value="&#xE1A7;"/>
+ </Style>
+ <Style x:Key="StreetAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="StreetAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Street"/>
+ <Setter Property="Content" Value="&#xE1C3;"/>
+ </Style>
+ <Style x:Key="MapAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MapAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Map"/>
+ <Setter Property="Content" Value="&#xE1C4;"/>
+ </Style>
+ <Style x:Key="ClearSelectionAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ClearSelectionAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Clear Selection"/>
+ <Setter Property="Content" Value="&#xE1C5;"/>
+ </Style>
+ <Style x:Key="FontDecreaseAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FontDecreaseAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Decrease Font"/>
+ <Setter Property="Content" Value="&#xE1C6;"/>
+ </Style>
+ <Style x:Key="FontIncreaseAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FontIncreaseAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Increase Font"/>
+ <Setter Property="Content" Value="&#xE1C7;"/>
+ </Style>
+ <Style x:Key="FontSizeAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FontSizeAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Font Size"/>
+ <Setter Property="Content" Value="&#xE1C8;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="CellphoneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CellphoneAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Cellphone"/>
+ <Setter Property="Content" Value="&#xE1C9;"/>
+ </Style>
+ <Style x:Key="ReshareAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ReshareAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Reshare"/>
+ <Setter Property="Content" Value="&#xE1CA;"/>
+ </Style>
+ <Style x:Key="TagAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="TagAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Tag"/>
+ <Setter Property="Content" Value="&#xE1CB;"/>
+ </Style>
+ <Style x:Key="RepeatOneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RepeatOneAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Repeat Once"/>
+ <Setter Property="Content" Value="&#xE1CC;"/>
+ </Style>
+ <Style x:Key="RepeatAllAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="RepeatAllAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Repeat All"/>
+ <Setter Property="Content" Value="&#xE1CD;"/>
+ </Style>
+ <Style x:Key="OutlineStarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OutlineStarAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Outline Star"/>
+ <Setter Property="Content" Value="&#xE1CE;"/>
+ </Style>
+ <Style x:Key="SolidStarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SolidStarAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Solid Star"/>
+ <Setter Property="Content" Value="&#xE1CF;"/>
+ </Style>
+ <Style x:Key="CalculatorAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CalculatorAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Calculator"/>
+ <Setter Property="Content" Value="&#xE1D0;"/>
+ </Style>
+ <Style x:Key="DirectionsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="DirectionsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Directions"/>
+ <Setter Property="Content" Value="&#xE1D1;"/>
+ </Style>
+ <Style x:Key="TargetAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="TargetAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Target"/>
+ <Setter Property="Content" Value="&#xE1D2;"/>
+ </Style>
+ <Style x:Key="LibraryAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="LibraryAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Library"/>
+ <Setter Property="Content" Value="&#xE1D3;"/>
+ </Style>
+ <Style x:Key="PhonebookAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PhonebookAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Phonebook"/>
+ <Setter Property="Content" Value="&#xE1D4;"/>
+ </Style>
+ <Style x:Key="MemoAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MemoAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Memo"/>
+ <Setter Property="Content" Value="&#xE1D5;"/>
+ </Style>
+ <Style x:Key="MicrophoneAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="MicrophoneAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Microphone"/>
+ <Setter Property="Content" Value="&#xE1D6;"/>
+ </Style>
+ <Style x:Key="PostUpdateAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="PostUpdateAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Post Update"/>
+ <Setter Property="Content" Value="&#xE1D7;"/>
+ </Style>
+ <Style x:Key="BackToWindowAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="BackToWindowAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Back to Window"/>
+ <Setter Property="Content" Value="&#xE1D8;"/>
+ </Style>
+ -->
+
+ <!--
+ <Style x:Key="FullScreenAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FullScreenAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Full Screen"/>
+ <Setter Property="Content" Value="&#xE1D9;"/>
+ </Style>
+ <Style x:Key="NewFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="NewFolderAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="New Folder"/>
+ <Setter Property="Content" Value="&#xE1DA;"/>
+ </Style>
+ <Style x:Key="CalendarReplyAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="CalendarReplyAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Calendar Reply"/>
+ <Setter Property="Content" Value="&#xE1DB;"/>
+ </Style>
+ <Style x:Key="UnsyncFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="UnsyncFolderAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Unsync Folder"/>
+ <Setter Property="Content" Value="&#xE1DD;"/>
+ </Style>
+ <Style x:Key="ReportHackedAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ReportHackedAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Report Hacked"/>
+ <Setter Property="Content" Value="&#xE1DE;"/>
+ </Style>
+ <Style x:Key="SyncFolderAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SyncFolderAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Sync Folder"/>
+ <Setter Property="Content" Value="&#xE1DF;"/>
+ </Style>
+ <Style x:Key="BlockContactAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="Block ContactAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="BlockContact"/>
+ <Setter Property="Content" Value="&#xE1E0;"/>
+ </Style>
+ <Style x:Key="SwitchAppsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="SwitchAppsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Switch Apps"/>
+ <Setter Property="Content" Value="&#xE1E1;"/>
+ </Style>
+ <Style x:Key="AddFriendAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="AddFriendAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Add Friend"/>
+ <Setter Property="Content" Value="&#xE1E2;"/>
+ </Style>
+ <Style x:Key="TouchPointerAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="TouchPointerAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Touch Pointer"/>
+ <Setter Property="Content" Value="&#xE1E3;"/>
+ </Style>
+ <Style x:Key="GoToStartAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="GoToStartAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Go to Start"/>
+ <Setter Property="Content" Value="&#xE1E4;"/>
+ </Style>
+ <Style x:Key="ZeroBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ZeroBarsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Zero Bars"/>
+ <Setter Property="Content" Value="&#xE1E5;"/>
+ </Style>
+ <Style x:Key="OneBarAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="OneBarAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="One Bar"/>
+ <Setter Property="Content" Value="&#xE1E6;"/>
+ </Style>
+ <Style x:Key="TwoBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="TwoBarsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Two Bars"/>
+ <Setter Property="Content" Value="&#xE1E7;"/>
+ </Style>
+ <Style x:Key="ThreeBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="ThreeBarsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Three Bars"/>
+ <Setter Property="Content" Value="&#xE1E8;"/>
+ </Style>
+ <Style x:Key="FourBarsAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}">
+ <Setter Property="AutomationProperties.AutomationId" Value="FourBarsAppBarButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Four Bars"/>
+ <Setter Property="Content" Value="&#xE1E9;"/>
+ </Style>
+
+ -->
+
+ <!-- Title area styles -->
+
+ <Style x:Key="PageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource HeaderTextStyle}">
+ <Setter Property="TextWrapping" Value="NoWrap"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="Margin" Value="0,0,30,40"/>
+ </Style>
+
+ <Style x:Key="PageSubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource SubheaderTextStyle}">
+ <Setter Property="TextWrapping" Value="NoWrap"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="Margin" Value="0,0,0,40"/>
+ </Style>
+
+ <Style x:Key="SnappedPageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource PageSubheaderTextStyle}">
+ <Setter Property="Margin" Value="0,0,18,40"/>
+ </Style>
+
+ <!--
+ BackButtonStyle is used to style a Button for use in the title area of a page. Margins appropriate for
+ the conventional page layout are included as part of the style.
+ -->
+ <Style x:Key="BackButtonStyle" TargetType="Button">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="Width" Value="48"/>
+ <Setter Property="Height" Value="48"/>
+ <Setter Property="Margin" Value="36,0,36,36"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
+ <Setter Property="FontWeight" Value="Normal"/>
+ <Setter Property="FontSize" Value="56"/>
+ <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Back"/>
+ <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid x:Name="RootGrid">
+ <Grid Margin="-1,-16,0,0">
+ <TextBlock x:Name="BackgroundGlyph" Text="&#xE0A8;" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
+ <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
+ <TextBlock x:Name="ArrowGlyph" Text="&#xE0A6;" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
+ </Grid>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal" />
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <DoubleAnimation
+ Storyboard.TargetName="ArrowGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="NormalGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="0"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualWhite"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualBlack"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused" />
+ <VisualState x:Name="PointerFocused" />
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--
+ PortraitBackButtonStyle is used to style a Button for use in the title area of a portrait page. Margins appropriate
+ for the conventional page layout are included as part of the style.
+ -->
+ <Style x:Key="PortraitBackButtonStyle" TargetType="Button" BasedOn="{StaticResource BackButtonStyle}">
+ <Setter Property="Margin" Value="26,0,26,36"/>
+ </Style>
+
+ <!--
+ SnappedBackButtonStyle is used to style a Button for use in the title area of a snapped page. Margins appropriate
+ for the conventional page layout are included as part of the style.
+
+ The obvious duplication here is necessary as the glyphs used in snapped are not merely smaller versions of the same
+ glyph but are actually distinct.
+ -->
+ <Style x:Key="SnappedBackButtonStyle" TargetType="Button">
+ <Setter Property="MinWidth" Value="0"/>
+ <Setter Property="Margin" Value="20,0,0,0"/>
+ <Setter Property="VerticalAlignment" Value="Bottom"/>
+ <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
+ <Setter Property="FontWeight" Value="Normal"/>
+ <Setter Property="FontSize" Value="26.66667"/>
+ <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
+ <Setter Property="AutomationProperties.Name" Value="Back"/>
+ <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid x:Name="RootGrid" Width="36" Height="36" Margin="-3,0,7,33">
+ <Grid Margin="-1,-1,0,0">
+ <TextBlock x:Name="BackgroundGlyph" Text="&#xE0D4;" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
+ <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonSnappedGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
+ <TextBlock x:Name="ArrowGlyph" Text="&#xE0C4;" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
+ </Grid>
+ <Rectangle
+ x:Name="FocusVisualWhite"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="1.5"/>
+ <Rectangle
+ x:Name="FocusVisualBlack"
+ IsHitTestVisible="False"
+ Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
+ StrokeEndLineCap="Square"
+ StrokeDashArray="1,1"
+ Opacity="0"
+ StrokeDashOffset="0.5"/>
+
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup x:Name="CommonStates">
+ <VisualState x:Name="Normal" />
+ <VisualState x:Name="PointerOver">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Pressed">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
+ </ObjectAnimationUsingKeyFrames>
+ <DoubleAnimation
+ Storyboard.TargetName="ArrowGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="NormalGlyph"
+ Storyboard.TargetProperty="Opacity"
+ To="0"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Disabled">
+ <Storyboard>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
+ <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
+ </ObjectAnimationUsingKeyFrames>
+ </Storyboard>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="FocusStates">
+ <VisualState x:Name="Focused">
+ <Storyboard>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualWhite"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ <DoubleAnimation
+ Storyboard.TargetName="FocusVisualBlack"
+ Storyboard.TargetProperty="Opacity"
+ To="1"
+ Duration="0"/>
+ </Storyboard>
+ </VisualState>
+ <VisualState x:Name="Unfocused" />
+ <VisualState x:Name="PointerFocused" />
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!-- Item templates -->
+
+ <!-- Grid-appropriate 250 pixel square item template as seen in the GroupedItemsPage and ItemsPage -->
+ <DataTemplate x:Key="Standard250x250ItemTemplate">
+ <Grid HorizontalAlignment="Left" Width="250" Height="250">
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
+ <Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
+ </Border>
+ <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">
+ <TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/>
+ <TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- Grid-appropriate 500 by 130 pixel item template as seen in the GroupDetailPage -->
+ <DataTemplate x:Key="Standard500x130ItemTemplate">
+ <Grid Height="110" Width="480" Margin="10">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
+ <Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
+ </Border>
+ <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- List-appropriate 130 pixel high item template as seen in the SplitPage -->
+ <DataTemplate x:Key="Standard130ItemTemplate">
+ <Grid Height="110" Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
+ <Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
+ </Border>
+ <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!--
+ List-appropriate 80 pixel high item template as seen in the SplitPage when Filled, and
+ the following pages when snapped: GroupedItemsPage, GroupDetailPage, and ItemsPage
+ -->
+ <DataTemplate x:Key="Standard80ItemTemplate">
+ <Grid Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="60" Height="60">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" Margin="10,0,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource ItemTextStyle}" MaxHeight="40"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- Grid-appropriate 300 by 70 pixel item template as seen in the SearchResultsPage -->
+ <DataTemplate x:Key="StandardSmallIcon300x70ItemTemplate">
+ <Grid Width="294" Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" Margin="10,-10,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!-- List-appropriate 70 pixel high item template as seen in the SearchResultsPage when Snapped -->
+ <DataTemplate x:Key="StandardSmallIcon70ItemTemplate">
+ <Grid Margin="6">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">
+ <Image Source="{Binding Image}" Stretch="UniformToFill"/>
+ </Border>
+ <StackPanel Grid.Column="1" Margin="10,-10,0,0">
+ <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" TextWrapping="NoWrap"/>
+ </StackPanel>
+ </Grid>
+ </DataTemplate>
+
+ <!--
+ 190x130 pixel item template for displaying file previews as seen in the FileOpenPickerPage
+ Includes an elaborate tooltip to display title and description text
+ -->
+ <DataTemplate x:Key="StandardFileWithTooltip190x130ItemTemplate">
+ <Grid>
+ <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
+ <Image
+ Source="{Binding Image}"
+ Width="190"
+ Height="130"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ Stretch="Uniform"/>
+ </Grid>
+ <ToolTipService.Placement>Mouse</ToolTipService.Placement>
+ <ToolTipService.ToolTip>
+ <ToolTip>
+ <ToolTip.Style>
+ <Style TargetType="ToolTip">
+ <Setter Property="BorderBrush" Value="{StaticResource ToolTipBackgroundThemeBrush}" />
+ <Setter Property="Padding" Value="0" />
+ </Style>
+ </ToolTip.Style>
+
+ <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+
+ <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="20">
+ <Image
+ Source="{Binding Image}"
+ Width="160"
+ Height="160"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ Stretch="Uniform"/>
+ </Grid>
+ <StackPanel Width="200" Grid.Column="1" Margin="0,20,20,20">
+ <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource BodyTextStyle}"/>
+ <TextBlock Text="{Binding Description}" MaxHeight="140" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Style="{StaticResource BodyTextStyle}"/>
+ </StackPanel>
+ </Grid>
+ </ToolTip>
+ </ToolTipService.ToolTip>
+ </Grid>
+ </DataTemplate>
+
+ <!-- ScrollViewer styles -->
+
+ <Style x:Key="HorizontalScrollViewerStyle" TargetType="ScrollViewer">
+ <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
+ <Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled" />
+ <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled" />
+ <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
+ </Style>
+
+ <Style x:Key="VerticalScrollViewerStyle" TargetType="ScrollViewer">
+ <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
+ <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
+ <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled" />
+ <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
+ </Style>
+
+ <!-- Page layout roots typically use entrance animations and a theme-appropriate background color -->
+
+ <Style x:Key="LayoutRootStyle" TargetType="Panel">
+ <Setter Property="Background" Value="{StaticResource ApplicationPageBackgroundThemeBrush}"/>
+ <Setter Property="ChildrenTransitions">
+ <Setter.Value>
+ <TransitionCollection>
+ <EntranceThemeTransition/>
+ </TransitionCollection>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
diff --git a/platform/windows/mupdf_cpp/DocumentPage.cpp b/platform/windows/mupdf_cpp/DocumentPage.cpp
new file mode 100644
index 00000000..39a22aa9
--- /dev/null
+++ b/platform/windows/mupdf_cpp/DocumentPage.cpp
@@ -0,0 +1,15 @@
+#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/windows/mupdf_cpp/DocumentPage.h b/platform/windows/mupdf_cpp/DocumentPage.h
new file mode 100644
index 00000000..383d63d1
--- /dev/null
+++ b/platform/windows/mupdf_cpp/DocumentPage.h
@@ -0,0 +1,231 @@
+#pragma once
+
+#include "RectList.h"
+#include <collection.h>
+
+/* 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<RectList^>^ textbox;
+ IVector<RectList^>^ linkbox;
+ public:
+ DocumentPage(void);
+
+ /* Note IVector needed for WinRT interface */
+ property IVector<RectList^>^ TextBox
+ {
+ IVector<RectList^>^ get()
+ {
+ return (textbox);
+ }
+
+ void set(IVector<RectList^>^ value)
+ {
+ textbox = value;
+ DocumentPage::OnPropertyChanged("TextBox");
+ }
+ }
+
+ property IVector<RectList^>^ LinkBox
+ {
+ IVector<RectList^>^ get()
+ {
+ return (linkbox);
+ }
+
+ void set(IVector<RectList^>^ 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:
+ /// <summary>
+ /// Notifies listeners that a property value has changed.
+ /// </summary>
+ /// <param name="propertyName">Name of the property used to notify listeners.</param>
+ 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/windows/mupdf_cpp/MainPage.xaml b/platform/windows/mupdf_cpp/MainPage.xaml
new file mode 100644
index 00000000..42296f6a
--- /dev/null
+++ b/platform/windows/mupdf_cpp/MainPage.xaml
@@ -0,0 +1,299 @@
+<Page
+ x:Class="mupdf_cpp.MainPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:local="using:winapp"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d">
+
+ <Page.BottomAppBar>
+ <AppBar>
+ <Grid Margin="38,0,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <Slider x:Name="xaml_PageSlider" Minimum="0" Maximum="10" PointerCaptureLost="Slider_ValueChanged" KeyUp="Slider_Key" Grid.Column="0" Margin="10,0" VerticalAlignment="Center" />
+ <Button x:Name="Find_File" Style="{StaticResource OpenFileAppBarButtonStyle}" Tag="OpenFile" HorizontalAlignment="Right" Grid.Column="1" Click="Picker"/>
+ </Grid>
+ </AppBar>
+ </Page.BottomAppBar>
+ <Page.TopAppBar>
+ <AppBar x:Name="TopAppBar1" AutomationProperties.Name="Top App Bar" Loaded="topAppBar_Loaded">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <StackPanel x:Name="LeftPanel" Orientation="Horizontal" HorizontalAlignment="Left" >
+ <TextBox x:Name="FindBox" Width="200" Height="20" Margin="2"/>
+ <Button x:Name="PrevSearch" Style="{StaticResource PreviousAppBarButtonStyle}" Click="SearchPrev"/>
+ <Button x:Name="NextSearch" Style="{StaticResource NextAppBarButtonStyle}" Click="SearchNext"/>
+
+ </StackPanel>
+ <StackPanel x:Name="RightPanel" Orientation="Horizontal" HorizontalAlignment="Right">
+ <Button x:Name="Search" Style="{StaticResource SearchAppBarButtonStyle}" Tag="Search" Click="Searcher"/>
+ <Button x:Name="ZoomIn" Style="{StaticResource ZoomInAppBarButtonStyle}" Tag="ZoomIn" Click="ZoomInPress"/>
+ <Button x:Name="ZoomOut" Style="{StaticResource ZoomOutAppBarButtonStyle}" Tag="ZoomOut" Click="ZoomOutPress"/>
+ <Button x:Name="Contents" Style="{StaticResource ContentsBarButtonStyle}" Tag="Contents" Click="ContentDisplay"/>
+ <Button x:Name="Links" Style="{StaticResource LinksAppBarButtonStyle}" Tag="Links" Click="Linker"/>
+ <Button x:Name="Reflow" Style="{StaticResource ReflowAppBarButtonStyle}" Tag="Reflow" Click="Reflower"/>
+ </StackPanel>
+ </Grid>
+ </AppBar>
+ </Page.TopAppBar>
+
+ <Grid x:Name="xaml_OutsideGrid">
+ <Grid.Background>
+ <LinearGradientBrush EndPoint="-0.074,-0.068" StartPoint="1.027,1.024">
+ <GradientStop Color="Black"/>
+ <GradientStop Color="White"/>
+ <GradientStop Color="White" Offset="0.919"/>
+ <GradientStop Color="#FFCDCDCD" Offset="0.741"/>
+ <GradientStop Color="#FF909090" Offset="0.524"/>
+ <GradientStop Color="#FF737373" Offset="0.421"/>
+ <GradientStop Color="#FF2A2A2A" Offset="0.155"/>
+ <GradientStop Color="#FF1A1A1A" Offset="0.097"/>
+ <GradientStop Color="#FF040404" Offset="0.018"/>
+ <GradientStop Color="#FFB3B3B3" Offset="0.651"/>
+ <GradientStop Color="#FF989898" Offset="0.556"/>
+ <GradientStop Color="#FF666666" Offset="0.375"/>
+ <GradientStop Color="#FF4B4B4B" Offset="0.278"/>
+ <GradientStop Color="#FF3A3A3A" Offset="0.215"/>
+ </LinearGradientBrush>
+ </Grid.Background>
+
+ <Grid x:Name="xaml_MainGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SizeChanged="GridSizeChanged">
+ <Canvas x:Name="xaml_zoomCanvas" HorizontalAlignment="Center" VerticalAlignment="Center" ManipulationMode="All" >
+ <!-- Horizontal flip view -->
+ <FlipView x:Name="xaml_horiz_flipView" SelectionChanged="FlipView_SelectionChanged" VerticalAlignment="Center"
+ HorizontalAlignment="Center" UseTouchAnimationsForAllNavigation="False">
+ <FlipView.ItemsPanel>
+ <ItemsPanelTemplate>
+ <VirtualizingStackPanel Orientation="Horizontal"/>
+ </ItemsPanelTemplate>
+ </FlipView.ItemsPanel>
+ <FlipView.ItemTemplate>
+ <DataTemplate>
+ <ScrollViewer
+ Name="xaml_ScrollView_h"
+ ZoomMode="Enabled"
+ ViewChanged="ScrollChanged"
+ HorizontalScrollMode="Auto"
+ VerticalScrollMode="Auto"
+ VerticalSnapPointsType="None"
+ HorizontalSnapPointsType="None"
+ HorizontalScrollBarVisibility="Auto"
+ VerticalScrollBarVisibility="Auto"
+ MinZoomFactor="0.25"
+ MaxZoomFactor="4" IsZoomChainingEnabled="true">
+ <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="{Binding Height}" Width="{Binding Width}">
+ <Image Source="{Binding Image}" Width="{Binding Width}" Height="{Binding Height}"
+ Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/>
+ <!-- After much work, figured out how to have a binding for the rectangles. TextBox and LinkBox are
+ a collection that is in the other main collection used for the scroll viewer. It works
+ nicely and cleanly once you figure out how to set up all the templates and the bindings -->
+ <ItemsControl ItemsSource="{Binding Path=TextBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemContainerStyle>
+ <Style TargetType="ContentPresenter">
+ <Setter Property="Canvas.Left" Value="{Binding Left}"/>
+ <Setter Property="Canvas.Top" Value="{Binding Top}"/>
+ </Style>
+ </ItemsControl.ItemContainerStyle>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Tag="{Binding Path=Index}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <ItemsControl ItemsSource="{Binding Path=LinkBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemContainerStyle>
+ <Style TargetType="ContentPresenter">
+ <Setter Property="Canvas.Left" Value="{Binding Left}"/>
+ <Setter Property="Canvas.Top" Value="{Binding Top}"/>
+ </Style>
+ </ItemsControl.ItemContainerStyle>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Tag="{Binding Path=Index}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}" IsTapEnabled="True" Tapped="LinkTapped">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ </Canvas>
+ </ScrollViewer>
+ </DataTemplate>
+ </FlipView.ItemTemplate>
+ </FlipView>
+ <!-- Vertical flip view -->
+ <FlipView x:Name="xaml_vert_flipView" SelectionChanged="FlipView_SelectionChanged" VerticalAlignment="Center"
+ HorizontalAlignment="Center" IsEnabled="False" Opacity="0" UseTouchAnimationsForAllNavigation="False">
+ <FlipView.ItemsPanel>
+ <ItemsPanelTemplate>
+ <VirtualizingStackPanel Orientation="Vertical"/>
+ </ItemsPanelTemplate>
+ </FlipView.ItemsPanel>
+ <FlipView.ItemTemplate>
+ <DataTemplate>
+ <ScrollViewer
+ Name="xaml_ScrollView_v"
+ ZoomMode="Enabled"
+ ViewChanged="ScrollChanged"
+ HorizontalScrollMode="Auto"
+ VerticalScrollMode="Auto"
+ VerticalSnapPointsType="None"
+ HorizontalSnapPointsType="None"
+ HorizontalScrollBarVisibility="Auto"
+ VerticalScrollBarVisibility="Auto"
+ MinZoomFactor="0.25"
+ MaxZoomFactor="4">
+ <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="{Binding Height}" Width="{Binding Width}">
+ <Image Source="{Binding Image}" Width="{Binding Width}" Height="{Binding Height}"
+ Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/>
+ <ItemsControl ItemsSource="{Binding Path=TextBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemContainerStyle>
+ <Style TargetType="ContentPresenter">
+ <Setter Property="Canvas.Left" Value="{Binding Left}"/>
+ <Setter Property="Canvas.Top" Value="{Binding Top}"/>
+ </Style>
+ </ItemsControl.ItemContainerStyle>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Tag="{Binding Path=Index}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}" IsTapEnabled="True" Tapped="LinkTapped">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+
+ <ItemsControl ItemsSource="{Binding Path=LinkBox}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <Canvas/>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemContainerStyle>
+ <Style TargetType="ContentPresenter">
+ <Setter Property="Canvas.Left" Value="{Binding Left}"/>
+ <Setter Property="Canvas.Top" Value="{Binding Top}"/>
+ </Style>
+ </ItemsControl.ItemContainerStyle>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <Rectangle Tag="{Binding Path=Index}" Width="{Binding Path=Width}" Height="{Binding Path=Height}" Fill="{Binding Path=Color}" IsTapEnabled="True" Tapped="LinkTapped">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="{Binding Path=X}" Y="{Binding Path=Y}"/>
+ </Rectangle.RenderTransform>
+ </Rectangle>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Canvas>
+ </ScrollViewer>
+ </DataTemplate>
+ </FlipView.ItemTemplate>
+ </FlipView>
+ </Canvas>
+ <ListView x:Name="xaml_ListView" Foreground="Black" HorizontalAlignment="Stretch"
+ VerticalAlignment="Stretch" Opacity="0" IsItemClickEnabled="True"
+ ItemClick="ContentSelected" SelectionMode="Single" IsEnabled="False">
+
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="5,5,0,0" HorizontalAlignment="Left">
+ <TextBlock TextWrapping="Wrap" Text="{Binding StringMargin}" FontFamily="Segoe UI" FontSize="20" />
+ </StackPanel>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+
+ <ListView.Background>
+ <SolidColorBrush Color="LightGray"></SolidColorBrush>
+ </ListView.Background>
+ </ListView>
+ </Grid>
+
+ <!-- Note that windows webview does not reflow when we scale. It
+ will only do this with a size change. Unfortunately, the webview
+ object is special in that it intercepts all actions and passes
+ nothing to the application for these manipulations. I tried
+ various things including the use of a webview brush to
+ capture the current webview but that is a complex issue since
+ it is a static image in that case. The other option would
+ be to go to a Rich Text type of view. -->
+ <WebView x:Name="xaml_WebView" HorizontalAlignment="Stretch" Width="Auto" Height="Auto"
+ VerticalAlignment="Stretch" Visibility="Collapsed"
+ ScrollViewer.HorizontalScrollBarVisibility="Visible"
+ ScrollViewer.VerticalScrollBarVisibility="Visible"
+ ScrollViewer.VerticalScrollMode="Enabled"
+ ScrollViewer.HorizontalScrollMode="Enabled"
+ ScrollViewer.ZoomMode="Enabled"/>
+
+ <StackPanel x:Name="xaml_ProgressStack" Opacity="1" VerticalAlignment="Center" Margin="0,15" HorizontalAlignment="Center" Visibility="Collapsed">
+ <Border BorderThickness="5" BorderBrush="Black" >
+ <StackPanel Background="LightGray" HorizontalAlignment="Left" Width="756" >
+ <TextBlock HorizontalAlignment="Center" Margin="10"
+ Text="Text Search Progress" FontSize="20"/>
+ <ProgressBar x:Name="xaml_Progress" Margin="5" Height="15"
+ IsIndeterminate="False" Maximum="100" VerticalAlignment="Stretch" />
+ <Button HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10" Click="CancelSearch" Height="39">
+ <TextBlock HorizontalAlignment="Center" Text="Cancel"/>
+ </Button>
+ </StackPanel>
+ </Border>
+ </StackPanel>
+
+ <StackPanel x:Name="xaml_PrintStack" Opacity="1" VerticalAlignment="Center" Margin="0,15" HorizontalAlignment="Center" Visibility="Collapsed">
+ <Border BorderThickness="5" BorderBrush="Black" >
+ <StackPanel Background="LightGray" HorizontalAlignment="Left" Width="756" >
+ <TextBlock HorizontalAlignment="Center" Margin="10"
+ Text="Print Progress" FontSize="20"/>
+ <ProgressBar x:Name="xaml_PrintProgress" Margin="5" Height="15"
+ IsIndeterminate="False" Maximum="100" VerticalAlignment="Stretch" />
+ <Button HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10" Click="HideProgress" Height="39">
+ <TextBlock HorizontalAlignment="Center" Text="Hide"/>
+ </Button>
+ </StackPanel>
+ </Border>
+ </StackPanel>
+
+ <StackPanel x:Name="xaml_PasswordStack" Opacity="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed">
+ <Border BorderThickness="5" BorderBrush="Black" >
+ <StackPanel Background="LightGray" >
+ <TextBlock HorizontalAlignment="Center" Margin="10"
+ Text="Password Required" FontSize="20"/>
+ <PasswordBox x:Name="xaml_password" Height="35" Width="400" Margin="20"/>
+ <Button HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10" Click="PasswordOK" Height="39">
+ <TextBlock HorizontalAlignment="Center" Text="OK"/>
+ </Button>
+ </StackPanel>
+ </Border>
+ </StackPanel>
+ </Grid>
+</Page>
diff --git a/platform/windows/mupdf_cpp/MainPage.xaml.cpp b/platform/windows/mupdf_cpp/MainPage.xaml.cpp
new file mode 100644
index 00000000..a57a7a23
--- /dev/null
+++ b/platform/windows/mupdf_cpp/MainPage.xaml.cpp
@@ -0,0 +1,2394 @@
+//
+// MainPage.xaml.cpp
+// Implementation of the MainPage class.
+//
+
+#include "pch.h"
+#include "MainPage.xaml.h"
+#include <regex>
+#include <sstream>
+#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<DocumentPage^>();
+ m_thumbnails = ref new Platform::Collections::Vector<DocumentPage^>();
+ m_page_link_list = ref new Platform::Collections::Vector<IVector<RectList^>^>();
+ m_text_list = ref new Platform::Collections::Vector<RectList^>();
+ m_linkset = ref new Platform::Collections::Vector<int>();
+ 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<IDXGIDevice> 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<ID3D11Device> device;
+ ComPtr<ID3D11DeviceContext> 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<MainPage^>(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<StorageFile^>(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<StorageFile^>(file);
+
+ OpenDocumentPrep(sfile);
+ }
+ }
+}
+
+/// <summary>
+/// Invoked when this page is about to be displayed in a Frame.
+/// </summary>
+/// <param name="e">Event data that describes how this page was reached. The Parameter
+/// property is typically used to configure the page.</param>
+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<IDXGIDevice3> 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<unsigned char>^ bmp_data = ref new Array<unsigned char>(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<unsigned char>^ 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<int> 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<int> the_task)
+ {
+ CleanUp();
+ return 0;
+ }, task_continuation_context::use_current()).then([this, file](task<int> 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<RectList^>^ temp_link = ref new Vector<RectList^>();
+ 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<int, double>^ 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<int, double>(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<RectList^>();
+ 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<Rectangle^>(e->OriginalSource);
+ String^ str_index = safe_cast<String^>(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<bool> 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<ContentItem^>(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<ScrollViewer^> (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<FrameworkElement^>(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<FlipViewItem^>
+ (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<ScrollViewer^> (FindVisualChildByName(item2, "xaml_ScrollView_v"));
+ ScrollViewer^ t2 =
+ safe_cast<ScrollViewer^> (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<float>^ box_zoom;
+ box_zoom = safe_cast<Platform::IBox<float>^>(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<FlipViewItem^>
+ (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<ScrollViewer^> (FindVisualChildByName(item2, "xaml_ScrollView_v"));
+ ScrollViewer^ t2 =
+ safe_cast<ScrollViewer^> (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<float>^ box_zoom;
+ box_zoom = safe_cast<Platform::IBox<float>^>(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<PrintManager^, PrintTaskRequestedEventArgs^>(this, &MainPage::SetPrintTask);
+}
+
+void MainPage::SetPrintTask(PrintManager^ sender, PrintTaskRequestedEventArgs^ args)
+{
+ PrintTaskSourceRequestedHandler^ source_handler =
+ ref new PrintTaskSourceRequestedHandler([this](PrintTaskSourceRequestedArgs^ args)-> void{
+ Microsoft::WRL::ComPtr<PrintPages> document_source;
+ ThrowIfFailed(Microsoft::WRL::MakeAndInitialize<PrintPages>(&document_source, reinterpret_cast<IUnknown*>(this)));
+ IPrintDocumentSource^ objSource(reinterpret_cast<IPrintDocumentSource^>(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<PrintTask^, PrintTaskProgressingEventArgs^>(this, &MainPage::PrintProgress);
+ print_task->Completed +=
+ ref new TypedEventHandler<PrintTask^, PrintTaskCompletedEventArgs^>(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<PrintTaskOptionDetails^, PrintTaskOptionChangedEventArgs^>(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<String^>(args->OptionId);
+
+ if (optionId == "resolution")
+ {
+ IPrintOptionDetails^ resolution = sender->Options->Lookup(optionId);
+ String^ resolutionValue = safe_cast<String^>(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<String^>(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<std::wstring>& 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<std::wstring> vector_range;
+ SplitString(pagerange, ',', vector_range);
+
+ m_ppage_num_list.clear();
+ for(std::vector<std::wstring>::iterator it = vector_range.begin(); it != vector_range.end(); ++ it)
+ {
+ int intervalPos = static_cast<int>((*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<int>(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<int>(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<int>());
+ 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<uint32>(ceil(width * dpi / 96)),
+ static_cast<uint32>(ceil(height * dpi / 96)),
+ 1, 1, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE);
+ ComPtr<ID3D11Texture2D> texture;
+ ThrowIfFailed(m_d3d_device->CreateTexture2D(&textureDesc, nullptr, &texture));
+ ComPtr<IDXGISurface> dxgi_surface;
+ ThrowIfFailed(texture.As<IDXGISurface>(&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<ID2D1DeviceContext> 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<ID2D1Bitmap1> 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<unsigned char>^ 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<unsigned char>^ 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<ID2D1DeviceContext> 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<ID2D1CommandList> 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/windows/mupdf_cpp/MainPage.xaml.h b/platform/windows/mupdf_cpp/MainPage.xaml.h
new file mode 100644
index 00000000..1cf8dd97
--- /dev/null
+++ b/platform/windows/mupdf_cpp/MainPage.xaml.h
@@ -0,0 +1,319 @@
+//
+// MainPage.xaml.h
+// Declaration of the MainPage class.
+//
+
+#pragma once
+
+#include "MainPage.g.h"
+#include "ppl.h"
+#include "ppltasks.h"
+#include <collection.h>
+#include <algorithm>
+#include <assert.h>
+#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<DocumentPage^>^ m_docPages;
+ Vector<DocumentPage^>^ m_thumbnails;
+ Vector<IVector<RectList^>^>^ m_page_link_list;
+ Vector<int>^ m_linkset;
+ Vector<RectList^>^ 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<int> m_ppage_num_list;
+ int m_curr_print_count;
+ PrintStatus_t m_print_active;
+
+ /* DirectX Print Control */
+ PrintManager ^m_print_manager;
+ Microsoft::WRL::ComPtr<ID3D11Device> m_d3d_device;
+ Microsoft::WRL::ComPtr<ID3D11DeviceContext> m_d3d_context;
+ Microsoft::WRL::ComPtr<ID2D1PrintControl> m_d2d_printcontrol;
+ Microsoft::WRL::ComPtr<ID2D1Device> m_d2d_device;
+ Microsoft::WRL::ComPtr<IWICImagingFactory2> m_wic_factory;
+ Microsoft::WRL::ComPtr<ID2D1Factory1> 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<int, double>^ 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<std::wstring>& 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/windows/mupdf_cpp/Package.StoreAssociation.xml b/platform/windows/mupdf_cpp/Package.StoreAssociation.xml
new file mode 100644
index 00000000..099c2431
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Package.StoreAssociation.xml
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="utf-8"?>
+<StoreAssociation xmlns="http://schemas.microsoft.com/appx/2010/storeassociation">
+ <Publisher>CN=B93265AA-82AD-458A-A08E-7069B8ED88B5</Publisher>
+ <NamespacePrefix>ArtifexSoftware</NamespacePrefix>
+ <PublisherDisplayName>Artifex Software</PublisherDisplayName>
+ <GeneratePackageHash>http://www.w3.org/2001/04/xmlenc#sha256</GeneratePackageHash>
+ <SupportedLocales>
+ <Language Code="af" InMinimumRequirementSet="false" />
+ <Language Code="af-za" InMinimumRequirementSet="false" />
+ <Language Code="am" InMinimumRequirementSet="false" />
+ <Language Code="am-et" InMinimumRequirementSet="false" />
+ <Language Code="ar" InMinimumRequirementSet="true" />
+ <Language Code="ar-ae" InMinimumRequirementSet="true" />
+ <Language Code="ar-bh" InMinimumRequirementSet="true" />
+ <Language Code="ar-dz" InMinimumRequirementSet="true" />
+ <Language Code="ar-eg" InMinimumRequirementSet="true" />
+ <Language Code="ar-iq" InMinimumRequirementSet="true" />
+ <Language Code="ar-jo" InMinimumRequirementSet="true" />
+ <Language Code="ar-kw" InMinimumRequirementSet="true" />
+ <Language Code="ar-lb" InMinimumRequirementSet="true" />
+ <Language Code="ar-ly" InMinimumRequirementSet="true" />
+ <Language Code="ar-ma" InMinimumRequirementSet="true" />
+ <Language Code="ar-om" InMinimumRequirementSet="true" />
+ <Language Code="ar-qa" InMinimumRequirementSet="true" />
+ <Language Code="ar-sa" InMinimumRequirementSet="true" />
+ <Language Code="ar-sy" InMinimumRequirementSet="true" />
+ <Language Code="ar-tn" InMinimumRequirementSet="true" />
+ <Language Code="ar-ye" InMinimumRequirementSet="true" />
+ <Language Code="as" InMinimumRequirementSet="false" />
+ <Language Code="as-in" InMinimumRequirementSet="false" />
+ <Language Code="az-arab" InMinimumRequirementSet="false" />
+ <Language Code="az-arab-az" InMinimumRequirementSet="false" />
+ <Language Code="az-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="az-cyrl-az" InMinimumRequirementSet="false" />
+ <Language Code="az-latn" InMinimumRequirementSet="false" />
+ <Language Code="az-latn-az" InMinimumRequirementSet="false" />
+ <Language Code="be" InMinimumRequirementSet="false" />
+ <Language Code="be-by" InMinimumRequirementSet="false" />
+ <Language Code="bg" InMinimumRequirementSet="true" />
+ <Language Code="bg-bg" InMinimumRequirementSet="true" />
+ <Language Code="bn" InMinimumRequirementSet="false" />
+ <Language Code="bn-bd" InMinimumRequirementSet="false" />
+ <Language Code="bn-in" InMinimumRequirementSet="false" />
+ <Language Code="bs" InMinimumRequirementSet="false" />
+ <Language Code="bs-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="bs-cyrl-ba" InMinimumRequirementSet="false" />
+ <Language Code="bs-latn" InMinimumRequirementSet="false" />
+ <Language Code="bs-latn-ba" InMinimumRequirementSet="false" />
+ <Language Code="ca" InMinimumRequirementSet="false" />
+ <Language Code="ca-es" InMinimumRequirementSet="false" />
+ <Language Code="ca-es-valencia" InMinimumRequirementSet="false" />
+ <Language Code="chr-cher" InMinimumRequirementSet="false" />
+ <Language Code="chr-cher-us" InMinimumRequirementSet="false" />
+ <Language Code="chr-latn" InMinimumRequirementSet="false" />
+ <Language Code="cs" InMinimumRequirementSet="true" />
+ <Language Code="cs-cz" InMinimumRequirementSet="true" />
+ <Language Code="cy" InMinimumRequirementSet="false" />
+ <Language Code="cy-gb" InMinimumRequirementSet="false" />
+ <Language Code="da" InMinimumRequirementSet="true" />
+ <Language Code="da-dk" InMinimumRequirementSet="true" />
+ <Language Code="de" InMinimumRequirementSet="true" />
+ <Language Code="de-at" InMinimumRequirementSet="true" />
+ <Language Code="de-ch" InMinimumRequirementSet="true" />
+ <Language Code="de-de" InMinimumRequirementSet="true" />
+ <Language Code="de-li" InMinimumRequirementSet="true" />
+ <Language Code="de-lu" InMinimumRequirementSet="true" />
+ <Language Code="el" InMinimumRequirementSet="true" />
+ <Language Code="el-gr" InMinimumRequirementSet="true" />
+ <Language Code="en" InMinimumRequirementSet="true" />
+ <Language Code="en-011" InMinimumRequirementSet="true" />
+ <Language Code="en-014" InMinimumRequirementSet="true" />
+ <Language Code="en-018" InMinimumRequirementSet="true" />
+ <Language Code="en-021" InMinimumRequirementSet="true" />
+ <Language Code="en-029" InMinimumRequirementSet="true" />
+ <Language Code="en-053" InMinimumRequirementSet="true" />
+ <Language Code="en-au" InMinimumRequirementSet="true" />
+ <Language Code="en-bz" InMinimumRequirementSet="true" />
+ <Language Code="en-ca" InMinimumRequirementSet="true" />
+ <Language Code="en-gb" InMinimumRequirementSet="true" />
+ <Language Code="en-hk" InMinimumRequirementSet="true" />
+ <Language Code="en-id" InMinimumRequirementSet="true" />
+ <Language Code="en-ie" InMinimumRequirementSet="true" />
+ <Language Code="en-in" InMinimumRequirementSet="true" />
+ <Language Code="en-jm" InMinimumRequirementSet="true" />
+ <Language Code="en-kz" InMinimumRequirementSet="true" />
+ <Language Code="en-mt" InMinimumRequirementSet="true" />
+ <Language Code="en-my" InMinimumRequirementSet="true" />
+ <Language Code="en-nz" InMinimumRequirementSet="true" />
+ <Language Code="en-ph" InMinimumRequirementSet="true" />
+ <Language Code="en-pk" InMinimumRequirementSet="true" />
+ <Language Code="en-sg" InMinimumRequirementSet="true" />
+ <Language Code="en-tt" InMinimumRequirementSet="true" />
+ <Language Code="en-us" InMinimumRequirementSet="true" />
+ <Language Code="en-vn" InMinimumRequirementSet="true" />
+ <Language Code="en-za" InMinimumRequirementSet="true" />
+ <Language Code="es" InMinimumRequirementSet="true" />
+ <Language Code="es-019" InMinimumRequirementSet="true" />
+ <Language Code="es-419" InMinimumRequirementSet="true" />
+ <Language Code="es-ar" InMinimumRequirementSet="true" />
+ <Language Code="es-bo" InMinimumRequirementSet="true" />
+ <Language Code="es-cl" InMinimumRequirementSet="true" />
+ <Language Code="es-co" InMinimumRequirementSet="true" />
+ <Language Code="es-cr" InMinimumRequirementSet="true" />
+ <Language Code="es-do" InMinimumRequirementSet="true" />
+ <Language Code="es-ec" InMinimumRequirementSet="true" />
+ <Language Code="es-es" InMinimumRequirementSet="true" />
+ <Language Code="es-gt" InMinimumRequirementSet="true" />
+ <Language Code="es-hn" InMinimumRequirementSet="true" />
+ <Language Code="es-mx" InMinimumRequirementSet="true" />
+ <Language Code="es-ni" InMinimumRequirementSet="true" />
+ <Language Code="es-pa" InMinimumRequirementSet="true" />
+ <Language Code="es-pe" InMinimumRequirementSet="true" />
+ <Language Code="es-pr" InMinimumRequirementSet="true" />
+ <Language Code="es-py" InMinimumRequirementSet="true" />
+ <Language Code="es-sv" InMinimumRequirementSet="true" />
+ <Language Code="es-us" InMinimumRequirementSet="true" />
+ <Language Code="es-uy" InMinimumRequirementSet="true" />
+ <Language Code="es-ve" InMinimumRequirementSet="true" />
+ <Language Code="et" InMinimumRequirementSet="true" />
+ <Language Code="et-ee" InMinimumRequirementSet="true" />
+ <Language Code="eu" InMinimumRequirementSet="false" />
+ <Language Code="eu-es" InMinimumRequirementSet="false" />
+ <Language Code="fa" InMinimumRequirementSet="false" />
+ <Language Code="fa-ir" InMinimumRequirementSet="false" />
+ <Language Code="fi" InMinimumRequirementSet="true" />
+ <Language Code="fi-fi" InMinimumRequirementSet="true" />
+ <Language Code="fil" InMinimumRequirementSet="false" />
+ <Language Code="fil-latn" InMinimumRequirementSet="false" />
+ <Language Code="fil-ph" InMinimumRequirementSet="false" />
+ <Language Code="fr" InMinimumRequirementSet="true" />
+ <Language Code="fr-011" InMinimumRequirementSet="true" />
+ <Language Code="fr-015" InMinimumRequirementSet="true" />
+ <Language Code="fr-021" InMinimumRequirementSet="true" />
+ <Language Code="fr-029" InMinimumRequirementSet="true" />
+ <Language Code="fr-155" InMinimumRequirementSet="true" />
+ <Language Code="fr-be" InMinimumRequirementSet="true" />
+ <Language Code="fr-ca" InMinimumRequirementSet="true" />
+ <Language Code="fr-cd" InMinimumRequirementSet="true" />
+ <Language Code="fr-ch" InMinimumRequirementSet="true" />
+ <Language Code="fr-ci" InMinimumRequirementSet="true" />
+ <Language Code="fr-cm" InMinimumRequirementSet="true" />
+ <Language Code="fr-fr" InMinimumRequirementSet="true" />
+ <Language Code="fr-ht" InMinimumRequirementSet="true" />
+ <Language Code="fr-lu" InMinimumRequirementSet="true" />
+ <Language Code="fr-ma" InMinimumRequirementSet="true" />
+ <Language Code="fr-mc" InMinimumRequirementSet="true" />
+ <Language Code="fr-ml" InMinimumRequirementSet="true" />
+ <Language Code="fr-re" InMinimumRequirementSet="true" />
+ <Language Code="frc-latn" InMinimumRequirementSet="true" />
+ <Language Code="frp-latn" InMinimumRequirementSet="true" />
+ <Language Code="ga" InMinimumRequirementSet="false" />
+ <Language Code="ga-ie" InMinimumRequirementSet="false" />
+ <Language Code="gd-gb" InMinimumRequirementSet="false" />
+ <Language Code="gd-latn" InMinimumRequirementSet="false" />
+ <Language Code="gl" InMinimumRequirementSet="false" />
+ <Language Code="gl-es" InMinimumRequirementSet="false" />
+ <Language Code="gu" InMinimumRequirementSet="false" />
+ <Language Code="gu-in" InMinimumRequirementSet="false" />
+ <Language Code="ha-latn" InMinimumRequirementSet="false" />
+ <Language Code="ha-latn-ng" InMinimumRequirementSet="false" />
+ <Language Code="he" InMinimumRequirementSet="true" />
+ <Language Code="he-il" InMinimumRequirementSet="true" />
+ <Language Code="hi" InMinimumRequirementSet="true" />
+ <Language Code="hi-in" InMinimumRequirementSet="true" />
+ <Language Code="hr" InMinimumRequirementSet="true" />
+ <Language Code="hr-ba" InMinimumRequirementSet="true" />
+ <Language Code="hr-hr" InMinimumRequirementSet="true" />
+ <Language Code="hu" InMinimumRequirementSet="true" />
+ <Language Code="hu-hu" InMinimumRequirementSet="true" />
+ <Language Code="hy" InMinimumRequirementSet="false" />
+ <Language Code="hy-am" InMinimumRequirementSet="false" />
+ <Language Code="id" InMinimumRequirementSet="true" />
+ <Language Code="id-id" InMinimumRequirementSet="true" />
+ <Language Code="ig-latn" InMinimumRequirementSet="false" />
+ <Language Code="ig-ng" InMinimumRequirementSet="false" />
+ <Language Code="is" InMinimumRequirementSet="false" />
+ <Language Code="is-is" InMinimumRequirementSet="false" />
+ <Language Code="it" InMinimumRequirementSet="true" />
+ <Language Code="it-ch" InMinimumRequirementSet="true" />
+ <Language Code="it-it" InMinimumRequirementSet="true" />
+ <Language Code="iu-cans" InMinimumRequirementSet="false" />
+ <Language Code="iu-latn" InMinimumRequirementSet="false" />
+ <Language Code="iu-latn-ca" InMinimumRequirementSet="false" />
+ <Language Code="ja" InMinimumRequirementSet="true" />
+ <Language Code="ja-jp" InMinimumRequirementSet="true" />
+ <Language Code="ka" InMinimumRequirementSet="false" />
+ <Language Code="ka-ge" InMinimumRequirementSet="false" />
+ <Language Code="kk" InMinimumRequirementSet="false" />
+ <Language Code="kk-kz" InMinimumRequirementSet="false" />
+ <Language Code="km" InMinimumRequirementSet="false" />
+ <Language Code="km-kh" InMinimumRequirementSet="false" />
+ <Language Code="kn" InMinimumRequirementSet="false" />
+ <Language Code="kn-in" InMinimumRequirementSet="false" />
+ <Language Code="ko" InMinimumRequirementSet="true" />
+ <Language Code="ko-kr" InMinimumRequirementSet="true" />
+ <Language Code="kok" InMinimumRequirementSet="false" />
+ <Language Code="kok-in" InMinimumRequirementSet="false" />
+ <Language Code="ku-arab" InMinimumRequirementSet="false" />
+ <Language Code="ku-arab-iq" InMinimumRequirementSet="false" />
+ <Language Code="ky-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="ky-kg" InMinimumRequirementSet="false" />
+ <Language Code="lb" InMinimumRequirementSet="false" />
+ <Language Code="lb-lu" InMinimumRequirementSet="false" />
+ <Language Code="lt" InMinimumRequirementSet="true" />
+ <Language Code="lt-lt" InMinimumRequirementSet="true" />
+ <Language Code="lv" InMinimumRequirementSet="true" />
+ <Language Code="lv-lv" InMinimumRequirementSet="true" />
+ <Language Code="mi" InMinimumRequirementSet="false" />
+ <Language Code="mi-latn" InMinimumRequirementSet="false" />
+ <Language Code="mi-nz" InMinimumRequirementSet="false" />
+ <Language Code="mk" InMinimumRequirementSet="false" />
+ <Language Code="mk-mk" InMinimumRequirementSet="false" />
+ <Language Code="ml" InMinimumRequirementSet="false" />
+ <Language Code="ml-in" InMinimumRequirementSet="false" />
+ <Language Code="mn-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="mn-mn" InMinimumRequirementSet="false" />
+ <Language Code="mn-mong" InMinimumRequirementSet="false" />
+ <Language Code="mn-phag" InMinimumRequirementSet="false" />
+ <Language Code="mr" InMinimumRequirementSet="false" />
+ <Language Code="mr-in" InMinimumRequirementSet="false" />
+ <Language Code="ms" InMinimumRequirementSet="false" />
+ <Language Code="ms-bn" InMinimumRequirementSet="false" />
+ <Language Code="ms-my" InMinimumRequirementSet="false" />
+ <Language Code="mt" InMinimumRequirementSet="false" />
+ <Language Code="mt-mt" InMinimumRequirementSet="false" />
+ <Language Code="nb" InMinimumRequirementSet="true" />
+ <Language Code="nb-no" InMinimumRequirementSet="true" />
+ <Language Code="ne" InMinimumRequirementSet="false" />
+ <Language Code="ne-np" InMinimumRequirementSet="false" />
+ <Language Code="nl" InMinimumRequirementSet="true" />
+ <Language Code="nl-be" InMinimumRequirementSet="true" />
+ <Language Code="nl-nl" InMinimumRequirementSet="true" />
+ <Language Code="nn" InMinimumRequirementSet="false" />
+ <Language Code="nn-no" InMinimumRequirementSet="false" />
+ <Language Code="no" InMinimumRequirementSet="true" />
+ <Language Code="no-no" InMinimumRequirementSet="true" />
+ <Language Code="nso" InMinimumRequirementSet="false" />
+ <Language Code="nso-za" InMinimumRequirementSet="false" />
+ <Language Code="or" InMinimumRequirementSet="false" />
+ <Language Code="or-in" InMinimumRequirementSet="false" />
+ <Language Code="pa" InMinimumRequirementSet="false" />
+ <Language Code="pa-arab" InMinimumRequirementSet="false" />
+ <Language Code="pa-arab-pk" InMinimumRequirementSet="false" />
+ <Language Code="pa-deva" InMinimumRequirementSet="false" />
+ <Language Code="pa-in" InMinimumRequirementSet="false" />
+ <Language Code="pl" InMinimumRequirementSet="true" />
+ <Language Code="pl-pl" InMinimumRequirementSet="true" />
+ <Language Code="prs" InMinimumRequirementSet="false" />
+ <Language Code="prs-af" InMinimumRequirementSet="false" />
+ <Language Code="prs-arab" InMinimumRequirementSet="false" />
+ <Language Code="pt" InMinimumRequirementSet="true" />
+ <Language Code="pt-br" InMinimumRequirementSet="true" />
+ <Language Code="pt-pt" InMinimumRequirementSet="true" />
+ <Language Code="quc-latn" InMinimumRequirementSet="false" />
+ <Language Code="qut-gt" InMinimumRequirementSet="false" />
+ <Language Code="qut-latn" InMinimumRequirementSet="false" />
+ <Language Code="quz" InMinimumRequirementSet="false" />
+ <Language Code="quz-bo" InMinimumRequirementSet="false" />
+ <Language Code="quz-ec" InMinimumRequirementSet="false" />
+ <Language Code="quz-pe" InMinimumRequirementSet="false" />
+ <Language Code="ro" InMinimumRequirementSet="true" />
+ <Language Code="ro-ro" InMinimumRequirementSet="true" />
+ <Language Code="ru" InMinimumRequirementSet="true" />
+ <Language Code="ru-ru" InMinimumRequirementSet="true" />
+ <Language Code="rw" InMinimumRequirementSet="false" />
+ <Language Code="rw-rw" InMinimumRequirementSet="false" />
+ <Language Code="sd-arab" InMinimumRequirementSet="false" />
+ <Language Code="sd-arab-pk" InMinimumRequirementSet="false" />
+ <Language Code="sd-deva" InMinimumRequirementSet="false" />
+ <Language Code="si" InMinimumRequirementSet="false" />
+ <Language Code="si-lk" InMinimumRequirementSet="false" />
+ <Language Code="sk" InMinimumRequirementSet="true" />
+ <Language Code="sk-sk" InMinimumRequirementSet="true" />
+ <Language Code="sl" InMinimumRequirementSet="true" />
+ <Language Code="sl-si" InMinimumRequirementSet="true" />
+ <Language Code="sq" InMinimumRequirementSet="false" />
+ <Language Code="sq-al" InMinimumRequirementSet="false" />
+ <Language Code="sr-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="sr-cyrl-ba" InMinimumRequirementSet="false" />
+ <Language Code="sr-cyrl-cs" InMinimumRequirementSet="false" />
+ <Language Code="sr-cyrl-me" InMinimumRequirementSet="false" />
+ <Language Code="sr-cyrl-rs" InMinimumRequirementSet="false" />
+ <Language Code="sr-latn" InMinimumRequirementSet="true" />
+ <Language Code="sr-latn-ba" InMinimumRequirementSet="true" />
+ <Language Code="sr-latn-cs" InMinimumRequirementSet="true" />
+ <Language Code="sr-latn-me" InMinimumRequirementSet="true" />
+ <Language Code="sr-latn-rs" InMinimumRequirementSet="true" />
+ <Language Code="sv" InMinimumRequirementSet="true" />
+ <Language Code="sv-fi" InMinimumRequirementSet="true" />
+ <Language Code="sv-se" InMinimumRequirementSet="true" />
+ <Language Code="sw" InMinimumRequirementSet="false" />
+ <Language Code="sw-ke" InMinimumRequirementSet="false" />
+ <Language Code="ta" InMinimumRequirementSet="false" />
+ <Language Code="ta-in" InMinimumRequirementSet="false" />
+ <Language Code="te" InMinimumRequirementSet="false" />
+ <Language Code="te-in" InMinimumRequirementSet="false" />
+ <Language Code="tg-arab" InMinimumRequirementSet="false" />
+ <Language Code="tg-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="tg-cyrl-tj" InMinimumRequirementSet="false" />
+ <Language Code="tg-latn" InMinimumRequirementSet="false" />
+ <Language Code="th" InMinimumRequirementSet="true" />
+ <Language Code="th-th" InMinimumRequirementSet="true" />
+ <Language Code="ti" InMinimumRequirementSet="false" />
+ <Language Code="ti-et" InMinimumRequirementSet="false" />
+ <Language Code="tk-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="tk-cyrl-tr" InMinimumRequirementSet="false" />
+ <Language Code="tk-latn" InMinimumRequirementSet="false" />
+ <Language Code="tk-latn-tr" InMinimumRequirementSet="false" />
+ <Language Code="tk-tm" InMinimumRequirementSet="false" />
+ <Language Code="tn" InMinimumRequirementSet="false" />
+ <Language Code="tn-bw" InMinimumRequirementSet="false" />
+ <Language Code="tn-za" InMinimumRequirementSet="false" />
+ <Language Code="tr" InMinimumRequirementSet="true" />
+ <Language Code="tr-tr" InMinimumRequirementSet="true" />
+ <Language Code="tt-arab" InMinimumRequirementSet="false" />
+ <Language Code="tt-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="tt-latn" InMinimumRequirementSet="false" />
+ <Language Code="tt-ru" InMinimumRequirementSet="false" />
+ <Language Code="ug-arab" InMinimumRequirementSet="false" />
+ <Language Code="ug-cn" InMinimumRequirementSet="false" />
+ <Language Code="ug-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="ug-latn" InMinimumRequirementSet="false" />
+ <Language Code="uk" InMinimumRequirementSet="true" />
+ <Language Code="uk-ua" InMinimumRequirementSet="true" />
+ <Language Code="ur" InMinimumRequirementSet="false" />
+ <Language Code="ur-pk" InMinimumRequirementSet="false" />
+ <Language Code="uz-cyrl" InMinimumRequirementSet="false" />
+ <Language Code="uz-latn" InMinimumRequirementSet="false" />
+ <Language Code="uz-latn-uz" InMinimumRequirementSet="false" />
+ <Language Code="vi" InMinimumRequirementSet="false" />
+ <Language Code="vi-vn" InMinimumRequirementSet="false" />
+ <Language Code="wo" InMinimumRequirementSet="false" />
+ <Language Code="wo-sn" InMinimumRequirementSet="false" />
+ <Language Code="xh" InMinimumRequirementSet="false" />
+ <Language Code="xh-za" InMinimumRequirementSet="false" />
+ <Language Code="yo-latn" InMinimumRequirementSet="false" />
+ <Language Code="yo-ng" InMinimumRequirementSet="false" />
+ <Language Code="zh-cn" InMinimumRequirementSet="true" />
+ <Language Code="zh-hans" InMinimumRequirementSet="true" />
+ <Language Code="zh-hans-cn" InMinimumRequirementSet="true" />
+ <Language Code="zh-hans-sg" InMinimumRequirementSet="true" />
+ <Language Code="zh-hant" InMinimumRequirementSet="true" />
+ <Language Code="zh-hant-hk" InMinimumRequirementSet="true" />
+ <Language Code="zh-hant-mo" InMinimumRequirementSet="true" />
+ <Language Code="zh-hant-tw" InMinimumRequirementSet="true" />
+ <Language Code="zh-hk" InMinimumRequirementSet="true" />
+ <Language Code="zh-tw" InMinimumRequirementSet="true" />
+ <Language Code="zu" InMinimumRequirementSet="false" />
+ <Language Code="zu-za" InMinimumRequirementSet="false" />
+ </SupportedLocales>
+ <ProductReservedInfo>
+ <MainPackageIdentityName>ArtifexSoftware.MuPDF</MainPackageIdentityName>
+ <ReservedNames>
+ <ReservedName>MuPDF</ReservedName>
+ </ReservedNames>
+ </ProductReservedInfo>
+ <AccountPackageIdentityNames />
+ <PackageInfoList LandingUrl="https://appdev.microsoft.com:443/StorePortals/Developer/Catalog/ReleaseAnchor/52099d67-4c8e-45dc-812e-205317d5804a">
+ <PackageInfo>
+ <OsMinVersion>6.2.1.0</OsMinVersion>
+ <PackageArchitecture>arm</PackageArchitecture>
+ <PackageMaxArchitectureVersion>1.0.0.10</PackageMaxArchitectureVersion>
+ </PackageInfo>
+ <PackageInfo>
+ <OsMinVersion>6.2.1.0</OsMinVersion>
+ <PackageArchitecture>x86</PackageArchitecture>
+ <PackageMaxArchitectureVersion>1.0.0.10</PackageMaxArchitectureVersion>
+ </PackageInfo>
+ <PackageInfo>
+ <OsMinVersion>6.2.1.0</OsMinVersion>
+ <PackageArchitecture>x64</PackageArchitecture>
+ <PackageMaxArchitectureVersion>1.0.0.10</PackageMaxArchitectureVersion>
+ </PackageInfo>
+ </PackageInfoList>
+</StoreAssociation> \ No newline at end of file
diff --git a/platform/windows/mupdf_cpp/Package.appxmanifest b/platform/windows/mupdf_cpp/Package.appxmanifest
new file mode 100644
index 00000000..ce62ba5f
--- /dev/null
+++ b/platform/windows/mupdf_cpp/Package.appxmanifest
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
+ <Identity Name="ArtifexSoftware.MuPDF" Publisher="CN=B93265AA-82AD-458A-A08E-7069B8ED88B5" Version="1.2.0.19" />
+ <Properties>
+ <DisplayName>MuPDF</DisplayName>
+ <PublisherDisplayName>Artifex Software</PublisherDisplayName>
+ <Logo>Assets\StoreLogo.png</Logo>
+ </Properties>
+ <Prerequisites>
+ <OSMinVersion>6.3</OSMinVersion>
+ <OSMaxVersionTested>6.3</OSMaxVersionTested>
+ </Prerequisites>
+ <Resources>
+ <Resource Language="x-generate" />
+ </Resources>
+ <Applications>
+ <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="mupdf_cpp.App">
+ <Extensions>
+ <Extension Category="windows.fileTypeAssociation">
+ <FileTypeAssociation Name=".pdf">
+ <EditFlags OpenIsSafe="true" />
+ <SupportedFileTypes>
+ <FileType>.pdf</FileType>
+ <FileType>.xps</FileType>
+ <FileType>.cbz</FileType>
+ <FileType>.oxps</FileType>
+ </SupportedFileTypes>
+ </FileTypeAssociation>
+ </Extension>
+ </Extensions>
+ <m2:VisualElements DisplayName="MuPDF" Description="A lightweight, high quality PDF/XPS/CBZ viewer/print driver for Windows 8.1 devices." BackgroundColor="#464646" ForegroundText="light" Square150x150Logo="Assets\Logo.png" Square30x30Logo="assets/mupdf_smallogo.png">
+ <m2:DefaultTile>
+ <m2:ShowNameOnTiles>
+ <m2:ShowOn Tile="square150x150Logo" />
+ </m2:ShowNameOnTiles>
+ </m2:DefaultTile>
+ <m2:SplashScreen Image="Assets\mupdf_splash.png" />
+ </m2:VisualElements>
+ </Application>
+ </Applications>
+</Package> \ No newline at end of file
diff --git a/platform/windows/mupdf_cpp/PrintPage.cpp b/platform/windows/mupdf_cpp/PrintPage.cpp
new file mode 100644
index 00000000..83d31791
--- /dev/null
+++ b/platform/windows/mupdf_cpp/PrintPage.cpp
@@ -0,0 +1,165 @@
+#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<IPrintPreviewPageCollection> page_collection;
+ if (SUCCEEDED(hr))
+ {
+ ComPtr<PrintPages> docSource(this);
+ hr = docSource.As<IPrintPreviewPageCollection>(&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<PrintTaskOptions^>(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<PrintTaskOptions^>(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/windows/mupdf_cpp/PrintPage.h b/platform/windows/mupdf_cpp/PrintPage.h
new file mode 100644
index 00000000..725a5a43
--- /dev/null
+++ b/platform/windows/mupdf_cpp/PrintPage.h
@@ -0,0 +1,57 @@
+#pragma once
+#include <windows.graphics.printing.h>
+#include <printpreview.h>
+#include <documentsource.h>
+#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<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::WinRtClassicComMix>,
+ 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<MainPage^>(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<IPrintPreviewDxgiPackageTarget> 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/windows/mupdf_cpp/RectList.cpp b/platform/windows/mupdf_cpp/RectList.cpp
new file mode 100644
index 00000000..b9c1560d
--- /dev/null
+++ b/platform/windows/mupdf_cpp/RectList.cpp
@@ -0,0 +1,9 @@
+#include "pch.h"
+#include "RectList.h"
+
+namespace mupdf_cpp
+{
+ RectList::RectList(void)
+ {
+ }
+}
diff --git a/platform/windows/mupdf_cpp/RectList.h b/platform/windows/mupdf_cpp/RectList.h
new file mode 100644
index 00000000..999fe3d2
--- /dev/null
+++ b/platform/windows/mupdf_cpp/RectList.h
@@ -0,0 +1,153 @@
+#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/windows/mupdf_cpp/mupdf_cpp.rc b/platform/windows/mupdf_cpp/mupdf_cpp.rc
new file mode 100644
index 00000000..0d7c7a75
--- /dev/null
+++ b/platform/windows/mupdf_cpp/mupdf_cpp.rc
Binary files differ
diff --git a/platform/windows/mupdf_cpp/mupdf_cpp.vcxproj b/platform/windows/mupdf_cpp/mupdf_cpp.vcxproj
new file mode 100644
index 00000000..eee0eb95
--- /dev/null
+++ b/platform/windows/mupdf_cpp/mupdf_cpp.vcxproj
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{0204a4e7-f1b8-4268-a67c-a2c674b4742d}</ProjectGuid>
+ <RootNamespace>mupdf_cpp</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ <ApplicationType>Windows Store</ApplicationType>
+ <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <PackageCertificateThumbprint>03074CFDB8E2AB0CD384A1FFA139F7959DC8A656</PackageCertificateThumbprint>
+ <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
+ <PackageCertificateKeyFile>mupdf_cpp_StoreKey.pfx</PackageCertificateKeyFile>
+ <AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ <OutDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutDir>
+ <IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>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</AdditionalDependencies>
+ <AdditionalOptions>/APPCONTAINER %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_UNICODE;NDEBUG;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>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</AdditionalDependencies>
+ <SectionAlignment>
+ </SectionAlignment>
+ <AdditionalOptions>/APPCONTAINER %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <AdditionalOptions>/APPCONTAINER /SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_UNICODE;NDEBUG;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <SectionAlignment>
+ </SectionAlignment>
+ <AdditionalOptions>/APPCONTAINER /SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <AdditionalOptions>/APPCONTAINER %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <DisableSpecificWarnings>4453</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_UNICODE;NDEBUG;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>D3D11.lib;D2d1.lib;kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <SectionAlignment>
+ </SectionAlignment>
+ <AdditionalOptions>/APPCONTAINER %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\mupdfwinrt\Links.h" />
+ <ClInclude Include="..\mupdfwinrt\status.h" />
+ <ClInclude Include="PrintPage.h" />
+ <ClInclude Include="DocumentPage.h" />
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="App.xaml.h">
+ <DependentUpon>App.xaml</DependentUpon>
+ </ClInclude>
+ <ClInclude Include="MainPage.xaml.h">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </ClInclude>
+ <ClInclude Include="RectList.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Page Include="Common\StandardStyles.xaml">
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="MainPage.xaml">
+ <SubType>Designer</SubType>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ <None Include="mupdf_cpp_StoreKey.pfx" />
+ <None Include="mupdf_cpp_TemporaryKey.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="App.xaml.cpp">
+ <DependentUpon>App.xaml</DependentUpon>
+ </ClCompile>
+ <ClCompile Include="PrintPage.cpp" />
+ <ClCompile Include="DocumentPage.cpp" />
+ <ClCompile Include="MainPage.xaml.cpp">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </ClCompile>
+ <ClCompile Include="pch.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="RectList.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="Assets\Logo.Scale-100.png" />
+ <Image Include="Assets\Logo.Scale-140.png" />
+ <Image Include="Assets\Logo.Scale-180.png" />
+ <Image Include="Assets\Logo.Scale-80.png">
+ <DeploymentContent>true</DeploymentContent>
+ </Image>
+ <Image Include="Assets\mupdf_smallogo.png" />
+ <Image Include="Assets\mupdf_splash.png" />
+ <Image Include="Assets\StoreLogo.scale-100.png">
+ <DeploymentContent>true</DeploymentContent>
+ </Image>
+ <Image Include="Assets\StoreLogo.scale-140.png">
+ <DeploymentContent>true</DeploymentContent>
+ </Image>
+ <Image Include="Assets\StoreLogo.scale-180.png">
+ <DeploymentContent>true</DeploymentContent>
+ </Image>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Package.StoreAssociation.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\mupdfwinrt\mupdfwinrt.vcxproj">
+ <Project>{9e6ab41d-09a7-45a6-a53b-1e4bf3ac5b33}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdf_cpp/mupdf_cpp.vcxproj.filters b/platform/windows/mupdf_cpp/mupdf_cpp.vcxproj.filters
new file mode 100644
index 00000000..5d7615b2
--- /dev/null
+++ b/platform/windows/mupdf_cpp/mupdf_cpp.vcxproj.filters
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Common">
+ <UniqueIdentifier>0204a4e7-f1b8-4268-a67c-a2c674b4742d</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Assets">
+ <UniqueIdentifier>a297f943-f0d7-4847-867e-a7aa1ef7f484</UniqueIdentifier>
+ </Filter>
+ <Page Include="Common\StandardStyles.xaml">
+ <Filter>Common</Filter>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="App.xaml.cpp" />
+ <ClCompile Include="MainPage.xaml.cpp" />
+ <ClCompile Include="pch.cpp" />
+ <ClCompile Include="DocumentPage.cpp" />
+ <ClCompile Include="RectList.cpp" />
+ <ClCompile Include="PrintPage.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="App.xaml.h" />
+ <ClInclude Include="MainPage.xaml.h" />
+ <ClInclude Include="DocumentPage.h" />
+ <ClInclude Include="RectList.h" />
+ <ClInclude Include="..\mupdfwinrt\status.h" />
+ <ClInclude Include="PrintPage.h" />
+ <ClInclude Include="..\mupdfwinrt\Links.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <AppxManifest Include="Package.appxmanifest" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="mupdf_cpp_TemporaryKey.pfx" />
+ <None Include="Package.StoreAssociation.xml" />
+ <None Include="mupdf_cpp_StoreKey.pfx" />
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="MainPage.xaml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Image Include="Assets\mupdf_smallogo.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\Logo.Scale-80.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\Logo.Scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\Logo.Scale-140.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\Logo.Scale-180.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\mupdf_splash.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\StoreLogo.scale-100.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\StoreLogo.scale-140.png">
+ <Filter>Assets</Filter>
+ </Image>
+ <Image Include="Assets\StoreLogo.scale-180.png">
+ <Filter>Assets</Filter>
+ </Image>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdf_cpp/pch.cpp b/platform/windows/mupdf_cpp/pch.cpp
new file mode 100644
index 00000000..01484ff5
--- /dev/null
+++ b/platform/windows/mupdf_cpp/pch.cpp
@@ -0,0 +1,6 @@
+//
+// pch.cpp
+// Include the standard header and generate the precompiled header.
+//
+
+#include "pch.h"
diff --git a/platform/windows/mupdf_cpp/pch.h b/platform/windows/mupdf_cpp/pch.h
new file mode 100644
index 00000000..b23c6b70
--- /dev/null
+++ b/platform/windows/mupdf_cpp/pch.h
@@ -0,0 +1,18 @@
+//
+// pch.h
+// Header for standard system include files.
+//
+
+#pragma once
+
+#include <collection.h>
+#include "App.xaml.h"
+/* DirectX requirements */
+#include <wrl.h>
+#include <wrl\client.h>
+#include <dxgi.h>
+#include <dxgi1_2.h>
+#include <D2d1_1.h>
+#include <D3D11.h>
+#include <PrintPreview.h>
+#include <Wincodec.h>
diff --git a/platform/windows/mupdfnet/mupdfnet.cpp b/platform/windows/mupdfnet/mupdfnet.cpp
new file mode 100644
index 00000000..6a59aec9
--- /dev/null
+++ b/platform/windows/mupdfnet/mupdfnet.cpp
@@ -0,0 +1,471 @@
+#include "mupdfnet.h"
+#include <strsafe.h>
+#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<std::vector<sh_content>> gContents;
+std::shared_ptr<std::vector<sh_text>> gTextResults;
+std::shared_ptr<std::vector<sh_link>> 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<void*>(mu_ctx);
+ else
+ return nullptr;
+}
+
+SYMBOL_DECLSPEC int __stdcall mOpenDocument(void *ctx, PCWSTR filename)
+{
+ muctx *mu_ctx = static_cast<muctx*>(ctx);
+
+ mReleaseContents();
+ return mu_ctx->OpenDocument(String_to_char(filename));
+}
+
+SYMBOL_DECLSPEC void __stdcall mCleanUp(void *ctx)
+{
+ muctx *mu_ctx = static_cast<muctx*>(ctx);
+
+ mReleaseContents();
+ mu_ctx->CleanUp();
+}
+
+SYMBOL_DECLSPEC int __stdcall mGetPageCount(void *ctx)
+{
+ muctx *mu_ctx = static_cast<muctx*>(ctx);
+ return mu_ctx->GetPageCount();
+}
+
+SYMBOL_DECLSPEC bool __stdcall mRequiresPassword(void *ctx)
+{
+ muctx *mu_ctx = static_cast<muctx*>(ctx);
+ return mu_ctx->RequiresPassword();
+}
+
+SYMBOL_DECLSPEC bool __stdcall mApplyPassword(void *ctx, PCWSTR password)
+{
+ muctx *mu_ctx = static_cast<muctx*>(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<muctx*>(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<muctx*>(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<muctx*>(ctx);
+ int has_content;
+ sh_vector_content content_smart_ptr_vec(new std::vector<sh_content>());
+ 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<muctx*>(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<muctx*>(ctx);
+
+ sh_vector_text text_smart_ptr_vec(new std::vector<sh_text>());
+ 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<muctx*>(ctx);
+
+ sh_vector_link link_smart_ptr_vec(new std::vector<sh_link>());
+ 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<muctx*>(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<muctx*>(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<muctx*>(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<muctx*>(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<muctx*>(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<muctx*>(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<muctx*>(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/windows/mupdfnet/mupdfnet.h b/platform/windows/mupdfnet/mupdfnet.h
new file mode 100644
index 00000000..99d23062
--- /dev/null
+++ b/platform/windows/mupdfnet/mupdfnet.h
@@ -0,0 +1,77 @@
+
+#pragma once
+
+#include <windows.h>
+#include<string>
+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/windows/mupdfnet/mupdfnet.vcxproj b/platform/windows/mupdfnet/mupdfnet.vcxproj
new file mode 100644
index 00000000..2db67449
--- /dev/null
+++ b/platform/windows/mupdfnet/mupdfnet.vcxproj
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{4468C2E0-6C90-4FA5-8A48-0A9629776167}</ProjectGuid>
+ <RootNamespace>CppDynamicLinkLibrary</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\gsview\bin\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\gsview\bin\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\gsview\bin\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\gsview\bin\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>$(ProjectName)64</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>$(ProjectName)64</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>$(ProjectName)32</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>$(ProjectName)32</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../../include/;../mupdfwinrt;</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../../include/;../mupdfwinrt;</AdditionalIncludeDirectories>
+ <CompileAsManaged>false</CompileAsManaged>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalDependencies>../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../../include/;../mupdfwinrt;</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPDYNAMICLINKLIBRARY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>../../../include/;../mupdfwinrt;</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalDependencies>../$(Platform)/$(Configuration)/libmupdf.lib;../$(Platform)/$(Configuration)/libthirdparty.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="Documentation\ReadMe.htm">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\mupdfwinrt\Cache.cpp" />
+ <ClCompile Include="..\mupdfwinrt\muctx.cpp" />
+ <ClCompile Include="mupdfnet.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\mupdfwinrt\Cache.h" />
+ <ClInclude Include="..\mupdfwinrt\muctx.h" />
+ <ClInclude Include="mupdfnet.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdfnet/mupdfnet.vcxproj.filters b/platform/windows/mupdfnet/mupdfnet.vcxproj.filters
new file mode 100644
index 00000000..e06c17d7
--- /dev/null
+++ b/platform/windows/mupdfnet/mupdfnet.vcxproj.filters
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Documentation\ReadMe.htm" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\mupdfwinrt\Cache.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\mupdfwinrt\muctx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mupdfnet.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\mupdfwinrt\Cache.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\mupdfwinrt\muctx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="mupdfnet.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdfwinrt/Cache.cpp b/platform/windows/mupdfwinrt/Cache.cpp
new file mode 100644
index 00000000..b129710f
--- /dev/null
+++ b/platform/windows/mupdfwinrt/Cache.cpp
@@ -0,0 +1,120 @@
+#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<std::mutex> 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<std::mutex> 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/windows/mupdfwinrt/Cache.h b/platform/windows/mupdfwinrt/Cache.h
new file mode 100644
index 00000000..e8c9801d
--- /dev/null
+++ b/platform/windows/mupdfwinrt/Cache.h
@@ -0,0 +1,38 @@
+#pragma once
+
+#include <mutex>
+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/windows/mupdfwinrt/ContentItem.cpp b/platform/windows/mupdfwinrt/ContentItem.cpp
new file mode 100644
index 00000000..eff1f58b
--- /dev/null
+++ b/platform/windows/mupdfwinrt/ContentItem.cpp
@@ -0,0 +1,11 @@
+#include "pch.h"
+#include "ContentItem.h"
+
+using namespace mupdfwinrt;
+
+ContentItem::ContentItem(void)
+{
+ StringOrig = nullptr;
+ StringMargin = nullptr;
+ Page = 0;
+}
diff --git a/platform/windows/mupdfwinrt/ContentItem.h b/platform/windows/mupdfwinrt/ContentItem.h
new file mode 100644
index 00000000..7077127d
--- /dev/null
+++ b/platform/windows/mupdfwinrt/ContentItem.h
@@ -0,0 +1,58 @@
+#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/windows/mupdfwinrt/Links.cpp b/platform/windows/mupdfwinrt/Links.cpp
new file mode 100644
index 00000000..50db8ff2
--- /dev/null
+++ b/platform/windows/mupdfwinrt/Links.cpp
@@ -0,0 +1,12 @@
+#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/windows/mupdfwinrt/Links.h b/platform/windows/mupdfwinrt/Links.h
new file mode 100644
index 00000000..39ebfc0b
--- /dev/null
+++ b/platform/windows/mupdfwinrt/Links.h
@@ -0,0 +1,88 @@
+#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/windows/mupdfwinrt/muctx.cpp b/platform/windows/mupdfwinrt/muctx.cpp
new file mode 100644
index 00000000..d5c34c80
--- /dev/null
+++ b/platform/windows/mupdfwinrt/muctx.cpp
@@ -0,0 +1,895 @@
+#pragma once
+
+#include "pch.h"
+#include "muctx.h"
+#include "Cache.h"
+#include <mutex>
+
+/* 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 <ppltasks.h>
+//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 <win_stream_struct*> (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<unsigned char>^ arrByte = ref new Platform::Array<unsigned char>(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 <win_stream_struct*> (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 <win_stream_struct*> (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 <void*> (&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<char[]> 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/windows/mupdfwinrt/muctx.h b/platform/windows/mupdfwinrt/muctx.h
new file mode 100644
index 00000000..16c44cd1
--- /dev/null
+++ b/platform/windows/mupdfwinrt/muctx.h
@@ -0,0 +1,123 @@
+#pragma once
+
+#include <memory>
+#include <functional>
+#include <vector>
+#include <windows.h>
+#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<char[]> uri;
+ int page_num;
+} document_link_t;
+#define sh_link std::shared_ptr<document_link_t>
+#define sh_vector_link std::shared_ptr<std::vector<sh_link>>
+
+/* Text Search */
+typedef struct text_search_s
+{
+ point_t upper_left;
+ point_t lower_right;
+} text_search_t;
+#define sh_text std::shared_ptr<text_search_t>
+#define sh_vector_text std::shared_ptr<std::vector<sh_text>>
+
+/* Content Results */
+typedef struct content_s
+{
+ int page;
+ std::string string_orig;
+ std::string string_margin;
+} content_t;
+#define sh_content std::shared_ptr<content_t>
+#define sh_vector_content std::shared_ptr<std::vector<sh_content>>
+
+#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/windows/mupdfwinrt/mudocument.cpp b/platform/windows/mupdfwinrt/mudocument.cpp
new file mode 100644
index 00000000..060144b3
--- /dev/null
+++ b/platform/windows/mupdfwinrt/mudocument.cpp
@@ -0,0 +1,470 @@
+// 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<int>^ 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<IRandomAccessStream^> 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<int, double>^
+ mudocument::SearchDocumentWithProgressAsync(String^ textToFind, int dir,
+ int start_page, int num_pages)
+{
+ return create_async([this, textToFind, dir, start_page, num_pages]
+ (progress_reporter<double> 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<unsigned char>^* bit_map)
+{
+ status_t code;
+ /* Allocate space for bmp */
+ Array<unsigned char>^ bmp_data =
+ ref new Array<unsigned char>(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<InMemoryRandomAccessStream^>^
+ 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<unsigned char>^ bmp_data =
+ ref new Array<unsigned char>(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<sh_link>());
+ 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<Links^>();
+ 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<sh_text>());
+ 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<Links^>();
+ 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<sh_content>());
+ 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<ContentItem^>();
+ 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/windows/mupdfwinrt/mudocument.h b/platform/windows/mupdfwinrt/mudocument.h
new file mode 100644
index 00000000..9ab37ed7
--- /dev/null
+++ b/platform/windows/mupdfwinrt/mudocument.h
@@ -0,0 +1,55 @@
+#pragma once
+
+/* This file contains the interface between the muctx class, which
+ implements the mupdf calls and the WinRT objects enabling calling from
+ C#, C++, and JavaScript applications */
+
+#include "muctx.h"
+#include "Links.h"
+#include "ppltasks.h"
+#include "ContentItem.h"
+#include <winnt.h>
+#include <collection.h>
+
+using namespace Windows::Storage;
+using namespace Platform;
+using namespace Concurrency;
+using namespace Platform::Collections;
+
+namespace mupdfwinrt
+{
+ public ref class mudocument sealed
+ {
+ private:
+ muctx mu_object;
+ std::mutex mutex_lock;
+ Platform::Collections::Vector<Links^>^ links;
+ Platform::Collections::Vector<Links^>^ textsearch;
+ Platform::Collections::Vector<ContentItem^>^ contents;
+ public:
+ mudocument();
+ void CleanUp();
+ Windows::Foundation::IAsyncOperation<int>^ OpenFileAsync(StorageFile^ file);
+ int GetNumPages(void);
+ Point GetPageSize(int page_num);
+ Windows::Foundation::IAsyncOperation<InMemoryRandomAccessStream^>^
+ RenderPageAsync(int page_num, int width, int height,
+ bool use_dlist, 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<unsigned char>^* bit_map);
+ Windows::Foundation::IAsyncOperationWithProgress<int, double>^
+ 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/windows/mupdfwinrt/mupdfwinrt.vcxproj b/platform/windows/mupdfwinrt/mupdfwinrt.vcxproj
new file mode 100644
index 00000000..fa162f0e
--- /dev/null
+++ b/platform/windows/mupdfwinrt/mupdfwinrt.vcxproj
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9e6ab41d-09a7-45a6-a53b-1e4bf3ac5b33}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>mupdfwinrt</ProjectName>
+ <RootNamespace>mupdfwinrt</RootNamespace>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+ <AppContainerApplication>true</AppContainerApplication>
+ <ApplicationType>Windows Store</ApplicationType>
+ <ApplicationTypeRevision>8.1</ApplicationTypeRevision>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <GenerateManifest>false</GenerateManifest>
+ <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
+ <IntDir>..\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>../../../include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>../../../include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>../../../include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>../../../include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>../../../include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
+ <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalIncludeDirectories>../../../include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>runtimeobject.lib;../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="Cache.h" />
+ <ClInclude Include="ContentItem.h" />
+ <ClInclude Include="muctx.h" />
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="mudocument.h" />
+ <ClInclude Include="status.h" />
+ <ClInclude Include="utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Cache.cpp" />
+ <ClCompile Include="Links.cpp" />
+ <ClCompile Include="ContentItem.cpp" />
+ <ClCompile Include="muctx.cpp" />
+ <ClCompile Include="pch.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="mudocument.cpp" />
+ <ClCompile Include="utils.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdfwinrt/mupdfwinrt.vcxproj.filters b/platform/windows/mupdfwinrt/mupdfwinrt.vcxproj.filters
new file mode 100644
index 00000000..99e37356
--- /dev/null
+++ b/platform/windows/mupdfwinrt/mupdfwinrt.vcxproj.filters
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Resources">
+ <UniqueIdentifier>16ec6626-1276-4cf1-b7af-8d28de2c8f75</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="pch.cpp" />
+ <ClCompile Include="mudocument.cpp" />
+ <ClCompile Include="muctx.cpp" />
+ <ClCompile Include="Links.cpp" />
+ <ClCompile Include="ContentItem.cpp" />
+ <ClCompile Include="utils.cpp" />
+ <ClCompile Include="Cache.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="mudocument.h" />
+ <ClInclude Include="muctx.h" />
+ <ClInclude Include="utils.h" />
+ <ClInclude Include="ContentItem.h" />
+ <ClInclude Include="Cache.h" />
+ <ClInclude Include="status.h" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/platform/windows/mupdfwinrt/pch.cpp b/platform/windows/mupdfwinrt/pch.cpp
new file mode 100644
index 00000000..01484ff5
--- /dev/null
+++ b/platform/windows/mupdfwinrt/pch.cpp
@@ -0,0 +1,6 @@
+//
+// pch.cpp
+// Include the standard header and generate the precompiled header.
+//
+
+#include "pch.h"
diff --git a/platform/windows/mupdfwinrt/pch.h b/platform/windows/mupdfwinrt/pch.h
new file mode 100644
index 00000000..f815ac97
--- /dev/null
+++ b/platform/windows/mupdfwinrt/pch.h
@@ -0,0 +1,6 @@
+//
+// pch.h
+// Header for standard system include files.
+//
+
+#pragma once
diff --git a/platform/windows/mupdfwinrt/status.h b/platform/windows/mupdfwinrt/status.h
new file mode 100644
index 00000000..9eea09aa
--- /dev/null
+++ b/platform/windows/mupdfwinrt/status.h
@@ -0,0 +1,19 @@
+#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/windows/mupdfwinrt/utils.cpp b/platform/windows/mupdfwinrt/utils.cpp
new file mode 100644
index 00000000..9c20c620
--- /dev/null
+++ b/platform/windows/mupdfwinrt/utils.cpp
@@ -0,0 +1,28 @@
+#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/windows/mupdfwinrt/utils.h b/platform/windows/mupdfwinrt/utils.h
new file mode 100644
index 00000000..78f4dbc4
--- /dev/null
+++ b/platform/windows/mupdfwinrt/utils.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#include "Windows.h"
+using namespace Platform;
+
+String^ char_to_String(const char *char_in);
+char* String_to_char(String^ text);