summaryrefslogtreecommitdiff
path: root/platform/winrt
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2013-11-13 22:55:18 -0800
committerMichael Vrhel <michael.vrhel@artifex.com>2013-11-14 14:07:14 -0800
commit5b61463377d8049cead03c0dd4b4fc76388bca9e (patch)
treef949fd284b783b5e0e8c63fe38e833847b1c5f39 /platform/winrt
parent40b897cd22fb42f4496aa7b88e6301a0bf35f213 (diff)
downloadmupdf-5b61463377d8049cead03c0dd4b4fc76388bca9e.tar.xz
Update WinRT project to Windows 8.1 / VS 2013. Fix several issues with zooming.
Diffstat (limited to 'platform/winrt')
-rw-r--r--platform/winrt/libmupdf-nov8_winRT.vcxproj24
-rw-r--r--platform/winrt/libmupdf_winRT.vcxproj24
-rw-r--r--platform/winrt/libthirdparty_winRT.vcxproj26
-rw-r--r--platform/winrt/mupdf_cpp/DocumentPage.cpp2
-rw-r--r--platform/winrt/mupdf_cpp/DocumentPage.h10
-rw-r--r--platform/winrt/mupdf_cpp/MainPage.xaml6
-rw-r--r--platform/winrt/mupdf_cpp/MainPage.xaml.cpp217
-rw-r--r--platform/winrt/mupdf_cpp/MainPage.xaml.h4
-rw-r--r--platform/winrt/mupdf_cpp/Package.appxmanifest20
-rw-r--r--platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj28
-rw-r--r--platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj18
11 files changed, 207 insertions, 172 deletions
diff --git a/platform/winrt/libmupdf-nov8_winRT.vcxproj b/platform/winrt/libmupdf-nov8_winRT.vcxproj
index 2119e3e4..6cb6b4d6 100644
--- a/platform/winrt/libmupdf-nov8_winRT.vcxproj
+++ b/platform/winrt/libmupdf-nov8_winRT.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@@ -47,57 +47,59 @@
<ProjectName>libmupdf-nov8_winRT</ProjectName>
<RootNamespace>libmupdf_nov8_winRT</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
- <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+ <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>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
diff --git a/platform/winrt/libmupdf_winRT.vcxproj b/platform/winrt/libmupdf_winRT.vcxproj
index 944323d4..76fa65a7 100644
--- a/platform/winrt/libmupdf_winRT.vcxproj
+++ b/platform/winrt/libmupdf_winRT.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@@ -232,57 +232,59 @@
<ProjectName>libmupdf_winRT</ProjectName>
<RootNamespace>libmupdf_winRT</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
- <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+ <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>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
diff --git a/platform/winrt/libthirdparty_winRT.vcxproj b/platform/winrt/libthirdparty_winRT.vcxproj
index aa131220..1def5f1b 100644
--- a/platform/winrt/libthirdparty_winRT.vcxproj
+++ b/platform/winrt/libthirdparty_winRT.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@@ -263,57 +263,59 @@
<ProjectName>libthirdparty_winRT</ProjectName>
<RootNamespace>libthirdparty_winRT</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
- <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+ <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>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Memento|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -484,7 +486,7 @@
<CompileAsWinRT>false</CompileAsWinRT>
<SDLCheck>false</SDLCheck>
<AdditionalIncludeDirectories>..\..\scripts;..\..\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>
+ <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>
diff --git a/platform/winrt/mupdf_cpp/DocumentPage.cpp b/platform/winrt/mupdf_cpp/DocumentPage.cpp
index 3ee99dcd..39a22aa9 100644
--- a/platform/winrt/mupdf_cpp/DocumentPage.cpp
+++ b/platform/winrt/mupdf_cpp/DocumentPage.cpp
@@ -8,7 +8,7 @@ namespace mupdf_cpp
this->Image = nullptr;
this->Height = 0;
this->Width = 0;
- this->Zoom = 1.0;
+ this->PageZoom = 1.0;
this->Content = NOTSET;
_isPropertyChangedObserved = false;
}
diff --git a/platform/winrt/mupdf_cpp/DocumentPage.h b/platform/winrt/mupdf_cpp/DocumentPage.h
index 89bf6674..383d63d1 100644
--- a/platform/winrt/mupdf_cpp/DocumentPage.h
+++ b/platform/winrt/mupdf_cpp/DocumentPage.h
@@ -27,7 +27,7 @@ namespace mupdf_cpp
private:
int height;
int width;
- double zoom;
+ double page_zoom;
int native_height;
int native_width;
WriteableBitmap^ image;
@@ -97,7 +97,6 @@ namespace mupdf_cpp
throw ref new Platform::InvalidArgumentException();
}
height = value;
- DocumentPage::OnPropertyChanged("Height");
}
}
@@ -115,7 +114,6 @@ namespace mupdf_cpp
throw ref new Platform::InvalidArgumentException();
}
width = value;
- DocumentPage::OnPropertyChanged("Width");
}
}
property int NativeHeight
@@ -152,11 +150,11 @@ namespace mupdf_cpp
}
}
- property double Zoom
+ property double PageZoom
{
double get()
{
- return zoom;
+ return page_zoom;
}
void set(double value)
@@ -165,7 +163,7 @@ namespace mupdf_cpp
{
throw ref new Platform::InvalidArgumentException();
}
- zoom = value;
+ page_zoom = value;
}
}
diff --git a/platform/winrt/mupdf_cpp/MainPage.xaml b/platform/winrt/mupdf_cpp/MainPage.xaml
index a38ba136..30403229 100644
--- a/platform/winrt/mupdf_cpp/MainPage.xaml
+++ b/platform/winrt/mupdf_cpp/MainPage.xaml
@@ -68,7 +68,7 @@
<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">
+ HorizontalAlignment="Center" UseTouchAnimationsForAllNavigation="False">
<FlipView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Horizontal"/>
@@ -87,7 +87,7 @@
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
MinZoomFactor="0.25"
- MaxZoomFactor="4">
+ 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"/>
@@ -147,7 +147,7 @@
</FlipView>
<!-- Vertical flip view -->
<FlipView x:Name="xaml_vert_flipView" SelectionChanged="FlipView_SelectionChanged" VerticalAlignment="Center"
- HorizontalAlignment="Center" IsEnabled="False" Opacity="0">
+ HorizontalAlignment="Center" IsEnabled="False" Opacity="0" UseTouchAnimationsForAllNavigation="False">
<FlipView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Vertical"/>
diff --git a/platform/winrt/mupdf_cpp/MainPage.xaml.cpp b/platform/winrt/mupdf_cpp/MainPage.xaml.cpp
index 9ef47e76..3a2fbdc3 100644
--- a/platform/winrt/mupdf_cpp/MainPage.xaml.cpp
+++ b/platform/winrt/mupdf_cpp/MainPage.xaml.cpp
@@ -9,7 +9,6 @@
#include <sstream>
#define LOOK_AHEAD 1 /* A +/- count on the pages to pre-render */
-#define LOOK_AHEAD_SCALE 2 /* A +/- count on the pages to adjust for scale change */
#define THUMB_PREADD 10
#define MIN_SCALE 0.5
@@ -183,7 +182,7 @@ void MainPage::ExceptionHandler(Object^ sender, UnhandledExceptionEventArgs^ e)
else
{
e->Handled = true;
- NotifyUser("A error was encountered", ErrorMessage);
+ NotifyUser("An error was encountered", ErrorMessage);
}
}
@@ -309,7 +308,7 @@ void MainPage::UpdatePage(int page_num, InMemoryRandomAccessStream^ ras,
doc_page->Width = ras_size.X;
}
doc_page->Content = content_type;
- doc_page->Zoom = zoom_in;
+ doc_page->PageZoom = zoom_in;
/* We do not want flipview change notification to occur for ourselves */
m_page_update = true;
@@ -331,7 +330,7 @@ void MainPage::ReplaceImage(int page_num, InMemoryRandomAccessStream^ ras,
doc_page->Height = ras_size.Y;
doc_page->Width = ras_size.X;
- doc_page->Zoom = page_zoom;
+ doc_page->PageZoom = page_zoom;
}
Point MainPage::ComputePageSize(spatial_info_t spatial_info, int page_num)
@@ -772,7 +771,6 @@ void MainPage::InitialRender()
this->m_init_done = true;
}
-
void MainPage::RenderRange(int curr_page)
{
/* Render +/- the look ahead from where we are if blank page is present */
@@ -790,16 +788,25 @@ void MainPage::RenderRange(int curr_page)
/* Check if page is already rendered */
auto doc = this->m_docPages->GetAt(k);
if (doc->Content != FULL_RESOLUTION ||
- doc->Zoom != m_doczoom)
+ doc->PageZoom != m_doczoom)
{
Point ras_size = ComputePageSize(spatial_info, k);
double zoom = m_doczoom;
auto render_task =
create_task(mu_doc->RenderPageAsync(k, ras_size.X, ras_size.Y, true));
- render_task.then([this, k, ras_size, zoom] (InMemoryRandomAccessStream^ ras)
+ render_task.then([this, k, ras_size, zoom, curr_page](InMemoryRandomAccessStream^ ras)
{
- UpdatePage(k, ras, ras_size, FULL_RESOLUTION, zoom);
+ 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 scroll viewer. It make 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 = new_ras_size.X / zoom;
+ new_ras_size.Y = 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)
@@ -810,6 +817,11 @@ void MainPage::RenderRange(int curr_page)
AddTextCanvas();
m_flip_from_searchlink = false;
}
+ if (k == curr_page)
+ {
+ m_curr_flipView->UpdateLayout();
+ UpdateZoom();
+ }
},task_continuation_context::use_current());
}
else
@@ -818,7 +830,10 @@ void MainPage::RenderRange(int curr_page)
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();
+ }
}
}
}
@@ -851,13 +866,13 @@ void MainPage::FlipView_SelectionChanged(Object^ sender, SelectionChangedEventAr
}
else
{
- /* Make sure to clear any text search */
+ /* 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;
- UpdateZoom(pos, false);
+ this->m_currpage = pos;
this->RenderRange(pos);
this->ReleasePages(curr_page, pos);
}
@@ -878,41 +893,16 @@ void MainPage::Slider_Key(Platform::Object^ sender, Windows::UI::Xaml::Input::Ke
void MainPage::Slider_Common()
{
- if (IsNotStandardView())
+ 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)
{
- /* Make sure to clear any text search */
- auto doc_old = this->m_docPages->GetAt(m_currpage);
- doc_old->TextBox = nullptr;
-
- auto doc = this->m_docPages->GetAt(newValue);
- if (doc->Content != FULL_RESOLUTION || doc->Zoom != m_doczoom)
- {
- spatial_info_t spatial_info = InitSpatial(m_doczoom);
- Point ras_size = ComputePageSize(spatial_info, newValue);
- auto render_task =
- create_task(mu_doc->RenderPageAsync(newValue, ras_size.X, ras_size.Y, true));
- double zoom = m_doczoom;
-
- render_task.then([this, newValue, ras_size, zoom] (InMemoryRandomAccessStream^ ras)
- {
- UpdatePage(newValue, ras, ras_size, FULL_RESOLUTION, zoom);
- this->m_currpage = newValue;
- m_sliderchange = true;
- this->m_curr_flipView->SelectedIndex = newValue;
- }, task_continuation_context::use_current());
- }
- else
- {
- m_sliderchange = true;
- this->m_curr_flipView->SelectedIndex = newValue;
- }
- UpdateZoom(newValue, false);
+ this->m_curr_flipView->SelectedIndex = this->xaml_PageSlider->Value - 1;
}
+ return;
}
/* Search Related Code */
@@ -986,8 +976,8 @@ void MainPage::ShowSearchResults(int page_num, int box_count)
rect_item->Width = curr_box->LowerRight.X - curr_box->UpperLeft.X;
rect_item->X = curr_box->UpperLeft.X * scale.X;
rect_item->Y = curr_box->UpperLeft.Y * scale.Y;
- rect_item->Width *= (scale.X * doc_page->Zoom);
- rect_item->Height *= (scale.Y * doc_page->Zoom);
+ rect_item->Width *= (scale.X);
+ rect_item->Height *= (scale.Y);
rect_item->Index = k.ToString();
m_text_list->Append(rect_item);
}
@@ -1155,21 +1145,29 @@ void MainPage::GridSizeChanged()
xaml_WebView->Height = height - height_app;
}
- UpDatePageSizes();
+ 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();
- auto doc = this->m_docPages->GetAt(m_currpage);
- doc->Content = OLD_RESOLUTION; /* To force a rerender */
+
+ /* 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::UpDatePageSizes()
+void MainPage::UpDateThumbSizes()
{
/* Reset the thumb view scaling value */
if (m_num_pages > 0)
@@ -1183,14 +1181,12 @@ void MainPage::UpDatePageSizes()
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 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 = curr_height * m_doczoom / min_scale;
thumb_page->Width = curr_width * m_doczoom / min_scale;
- thumb_page->NativeHeight = thumb_page->NativeHeight / min_scale;
- thumb_page->NativeWidth = thumb_page->NativeWidth / min_scale;
}
}
}
@@ -1270,8 +1266,8 @@ void MainPage::AddLinkCanvas()
rect_item->Width = curr_link->LowerRight.X - curr_link->UpperLeft.X;
rect_item->X = curr_link->UpperLeft.X * scale.X;
rect_item->Y = curr_link->UpperLeft.Y * scale.Y;
- rect_item->Width *= (scale.X * doc_page->Zoom);
- rect_item->Height *= (scale.Y * doc_page->Zoom);
+ rect_item->Width *= scale.X;
+ rect_item->Height *= scale.Y;
rect_item->Type = curr_link->Type;
rect_item->Urilink = curr_link->Uri;
rect_item->PageNum = curr_link->PageNum;
@@ -1410,8 +1406,6 @@ void MainPage::Reflower(Platform::Object^ sender, Windows::UI::Xaml::RoutedEvent
this->m_curr_flipView->IsEnabled = true;
this->xaml_PageSlider->IsEnabled = true;
xaml_WebView->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
- xaml_WebView->Opacity = 0.0;
-
}
else if (this->m_curr_flipView->IsEnabled)
{
@@ -1422,7 +1416,6 @@ void MainPage::Reflower(Platform::Object^ sender, Windows::UI::Xaml::RoutedEvent
this->xaml_PageSlider->IsEnabled = false;
this->xaml_WebView->NavigateToString(html_string);
this->xaml_WebView->Height = this->ActualHeight - 2 * this->BottomAppBar->ActualHeight;
- /* Check if thumb rendering is done. If not then restart */
}
}
@@ -1448,36 +1441,44 @@ void MainPage::UpdateAppBarButtonViewState()
VisualStateManager::GoToState(NextSearch, viewState, true);
}
-/* Manipulation zooming with touch input */
+/* 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_zoom = scrollviewer->ZoomFactor;
+ double new_scroll_zoom = scrollviewer->ZoomFactor;
- if (new_zoom == 1.0)
+ /* 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_zoom * m_doczoom;
- new_zoom = m_doczoom;
- /* Render at new resolution */
- spatial_info_t spatial_info = InitSpatial(new_zoom);
+ 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 = ComputePageSize(spatial_info, page);
+ doc_page->PageZoom = m_doczoom;
- /* Go ahead and create display list if we dont have one for this page */
auto render_task =
create_task(mu_doc->RenderPageAsync(page, ras_size.X, ras_size.Y, true));
- render_task.then([this, page, ras_size, new_zoom, scrollviewer] (InMemoryRandomAccessStream^ ras)
- {
- scrollviewer->ZoomToFactor(1.0);
- ReplaceImage(page, ras, ras_size, new_zoom);
+ render_task.then([this, page, ras_size, scrollviewer](InMemoryRandomAccessStream^ ras)
+ {
+ ReplaceImage(page, ras, ras_size, m_doczoom);
}, task_continuation_context::use_current());
- UpdateZoom(m_currpage, false);
+ UpDateThumbSizes();
}
}
@@ -1518,8 +1519,27 @@ void MainPage::ZoomOutPress(Platform::Object^ sender, Windows::UI::Xaml::RoutedE
void MainPage::NonTouchZoom(int zoom)
{
- double curr_zoom = m_doczoom;
- int page = m_currpage;
+ 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->ItemContainerGenerator->ContainerFromIndex(m_currpage));
+ auto item2 = m_curr_flipView->ItemContainerGenerator->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)
{
@@ -1533,39 +1553,42 @@ void MainPage::NonTouchZoom(int zoom)
} else
return;
- auto doc_page = this->m_docPages->GetAt(page);
-
- /* Render at new resolution */
- spatial_info_t spatial_info = InitSpatial(curr_zoom);
- Point ras_size = ComputePageSize(spatial_info, page);
+ /* 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);
- /* Render and replace */
- auto render_task =
- create_task(mu_doc->RenderPageAsync(page, ras_size.X, ras_size.Y, true));
- render_task.then([this, page, ras_size, curr_zoom] (InMemoryRandomAccessStream^ ras)
- {
- ReplaceImage(page, ras, ras_size, curr_zoom);
- }, task_continuation_context::use_current());
- m_doczoom = curr_zoom;
- UpdateZoom(page, false);
+ scrollviewer->ChangeView(nullptr, nullptr, box_zoom, false);
}
-/* Get adjacent pages properly scaled when zoom changed */
-void MainPage::UpdateZoom(int page_num, bool ignore_curr)
+/* Adjust the page scrollviewer to the current zoom level */
+void MainPage::UpdateZoom()
{
- for (int k = page_num - LOOK_AHEAD_SCALE; k <= page_num + LOOK_AHEAD_SCALE; k++)
- {
- bool skip = !(k == page_num && ignore_curr);
- if (k >= 0 && k < m_num_pages)
- {
- auto page = this->m_docPages->GetAt(k);
- if (page->Zoom != m_doczoom && skip)
- {
- page->Height = (int) ((double) page->NativeHeight * m_doczoom);
- page->Width = (int) ((double) page->NativeWidth * m_doczoom);
- }
- }
- }
+ ScrollViewer^ scrollviewer;
+ FlipViewItem^ item = safe_cast<FlipViewItem^>
+ (m_curr_flipView->ItemContainerGenerator->ContainerFromIndex(m_currpage));
+ auto item2 = m_curr_flipView->ItemContainerGenerator->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. */
diff --git a/platform/winrt/mupdf_cpp/MainPage.xaml.h b/platform/winrt/mupdf_cpp/MainPage.xaml.h
index f229123e..37d5227c 100644
--- a/platform/winrt/mupdf_cpp/MainPage.xaml.h
+++ b/platform/winrt/mupdf_cpp/MainPage.xaml.h
@@ -230,7 +230,7 @@ namespace mupdf_cpp
void ClearTextSearch();
void AddTextCanvas();
void GridSizeChanged();
- void UpDatePageSizes();
+ void UpDateThumbSizes();
void ShowThumbnail();
void Canvas_ManipulationCompleted(Platform::Object^ sender, Windows::UI::Xaml::Input::ManipulationCompletedRoutedEventArgs^ e);
void AddThumbNail(int page_num, FlipView^ flip_view);
@@ -271,7 +271,7 @@ namespace mupdf_cpp
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(int page_num, bool ignore_curr);
+ void UpdateZoom();
/* Print Related */
void RegisterForPrinting();
diff --git a/platform/winrt/mupdf_cpp/Package.appxmanifest b/platform/winrt/mupdf_cpp/Package.appxmanifest
index 2eb9d462..08e2b538 100644
--- a/platform/winrt/mupdf_cpp/Package.appxmanifest
+++ b/platform/winrt/mupdf_cpp/Package.appxmanifest
@@ -1,24 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
-<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
- <Identity Name="ArtifexSoftware.MuPDF" Publisher="CN=B93265AA-82AD-458A-A08E-7069B8ED88B5" Version="1.0.0.10" />
+<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.1.0.10" />
<Properties>
<DisplayName>MuPDF</DisplayName>
<PublisherDisplayName>Artifex Software</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
- <OSMinVersion>6.2.1</OSMinVersion>
- <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
+ <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">
- <VisualElements DisplayName="MuPDF" Logo="Assets\Logo.png" SmallLogo="assets/mupdf_smallogo.png" Description="A lightweight, high quality PDF/XPS/CBZ viewer for Windows 8 devices." ForegroundText="light" BackgroundColor="#464646">
- <DefaultTile ShowName="allLogos" />
- <SplashScreen Image="Assets\mupdf_splash.png" />
- </VisualElements>
<Extensions>
<Extension Category="windows.fileTypeAssociation">
<FileTypeAssociation Name=".pdf">
@@ -32,6 +28,14 @@
</FileTypeAssociation>
</Extension>
</Extensions>
+ <m2:VisualElements DisplayName="MuPDF" Description="A lightweight, high quality PDF/XPS/CBZ viewer for Windows 8 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/winrt/mupdf_cpp/mupdf_cpp.vcxproj b/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj
index baa51c03..2827fa75 100644
--- a/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj
+++ b/platform/winrt/mupdf_cpp/mupdf_cpp.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@@ -30,42 +30,44 @@
<ProjectGuid>{0204a4e7-f1b8-4268-a67c-a2c674b4742d}</ProjectGuid>
<RootNamespace>mupdf_cpp</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
- <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+ <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>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -125,7 +127,7 @@
<AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <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>
@@ -136,7 +138,7 @@
<AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <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>
@@ -149,7 +151,7 @@
<AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <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 /SAFESEH %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
@@ -160,7 +162,7 @@
<AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <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 /SAFESEH %(AdditionalOptions)</AdditionalOptions>
@@ -184,7 +186,7 @@
<AdditionalIncludeDirectories>../../include/;../mupdfwinrt/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
- <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies);../$(Platform)/$(Configuration)/libmupdf_winRT.lib;../$(Platform)/$(Configuration)/libthirdparty_winRT.lib;../$(Platform)/$(Configuration)/libmupdf-nov8_winRT.lib;../$(Platform)/$(Configuration)/mupdfwinrt.lib</AdditionalDependencies>
+ <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>
diff --git a/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj b/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj
index 9df0ab18..5917a638 100644
--- a/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj
+++ b/platform/winrt/mupdfwinrt/mupdfwinrt.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
@@ -32,42 +32,44 @@
<ProjectName>mupdfwinrt</ProjectName>
<RootNamespace>mupdfwinrt</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
- <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+ <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>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">