Added WinRT Universal Apps samples
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
87
samples/winrt_universal/.gitignore
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# Ignore thumbnails created by windows
|
||||
Thumbs.db
|
||||
|
||||
#ignore winrt copies of opencv files
|
||||
opencl_kernels.cpp
|
||||
opencl_kernels.hpp
|
||||
|
||||
# Ignore files build by Visual Studio
|
||||
*.obj
|
||||
*.exe
|
||||
*.pdb
|
||||
*.aps
|
||||
*.vcproj.*.user
|
||||
*.vcxproj.user
|
||||
*.vspscc
|
||||
*_i.c
|
||||
*.i
|
||||
*.icf
|
||||
*_p.c
|
||||
*.ncb
|
||||
*.suo
|
||||
*.tlb
|
||||
*.tlh
|
||||
*.bak
|
||||
*.cache
|
||||
*.ilk
|
||||
*.log
|
||||
*.winmd
|
||||
[Bb]in
|
||||
[Dd]ebug*/
|
||||
*.sbr
|
||||
*.sdf
|
||||
obj/
|
||||
[Rr]elease*/
|
||||
_ReSharper*/
|
||||
[Tt]est[Rr]esult*
|
||||
ipch/
|
||||
*.opensdf
|
||||
Generated Files
|
||||
AppPackages
|
||||
SubmissionInfo
|
||||
*.hps
|
||||
|
||||
# Ignore files build by ndk and eclipse
|
||||
libs/
|
||||
bin/
|
||||
obj/
|
||||
gen/
|
||||
local.properties
|
||||
|
||||
# Ignore python compiled files
|
||||
*.pyc
|
||||
|
||||
# Ignore files build by airplay and marmalade
|
||||
build_*_xcode/
|
||||
build_*_vc10/
|
||||
|
||||
# Ignore files built by xcode
|
||||
*.mode*v*
|
||||
*.pbxuser
|
||||
*.xcbkptlist
|
||||
*.xcscheme
|
||||
*.xcworkspacedata
|
||||
*.xcuserstate
|
||||
xcschememanagement.plist
|
||||
build/
|
||||
.DS_Store
|
||||
._.*
|
||||
xcuserdata/
|
||||
DerivedData/
|
||||
*.xccheckout
|
||||
|
||||
# Ignore files built by bada
|
||||
.Simulator-Debug/
|
||||
.Target-Debug/
|
||||
.Target-Release/
|
||||
|
||||
# Ignore files built by blackberry
|
||||
Simulator/
|
||||
Device-Debug/
|
||||
Device-Release/
|
||||
|
||||
# Ignore vim swaps
|
||||
*.swp
|
||||
|
||||
# CTags
|
||||
tags
|
7
samples/winrt_universal/PhoneTutorial/App.xaml
Normal file
@ -0,0 +1,7 @@
|
||||
<Application
|
||||
x:Class="PhoneTutorial.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:PhoneTutorial">
|
||||
|
||||
</Application>
|
137
samples/winrt_universal/PhoneTutorial/App.xaml.cpp
Normal file
@ -0,0 +1,137 @@
|
||||
//
|
||||
// App.xaml.cpp
|
||||
// Implementation of the App class.
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "MainPage.xaml.h"
|
||||
|
||||
using namespace PhoneTutorial;
|
||||
|
||||
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::Media::Animation;
|
||||
using namespace Windows::UI::Xaml::Navigation;
|
||||
|
||||
// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkID=391641
|
||||
|
||||
/// <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="e">Details about the launch request and process.</param>
|
||||
void App::OnLaunched(LaunchActivatedEventArgs^ e)
|
||||
{
|
||||
#if _DEBUG
|
||||
if (IsDebuggerPresent())
|
||||
{
|
||||
DebugSettings->EnableFrameRateCounter = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
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();
|
||||
|
||||
// TODO: Change this value to a cache size that is appropriate for your application.
|
||||
rootFrame->CacheSize = 1;
|
||||
|
||||
if (e->PreviousExecutionState == ApplicationExecutionState::Terminated)
|
||||
{
|
||||
// TODO: Restore the saved session state only when appropriate, scheduling the
|
||||
// final launch steps after the restore is complete.
|
||||
}
|
||||
|
||||
// Place the frame in the current Window
|
||||
Window::Current->Content = rootFrame;
|
||||
}
|
||||
|
||||
if (rootFrame->Content == nullptr)
|
||||
{
|
||||
// Removes the turnstile navigation for startup.
|
||||
if (rootFrame->ContentTransitions != nullptr)
|
||||
{
|
||||
_transitions = ref new TransitionCollection();
|
||||
for (auto transition : rootFrame->ContentTransitions)
|
||||
{
|
||||
_transitions->Append(transition);
|
||||
}
|
||||
}
|
||||
|
||||
rootFrame->ContentTransitions = nullptr;
|
||||
_firstNavigatedToken = rootFrame->Navigated += ref new NavigatedEventHandler(this, &App::RootFrame_FirstNavigated);
|
||||
|
||||
// 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(MainPage::typeid, e->Arguments))
|
||||
{
|
||||
throw ref new FailureException("Failed to create initial page");
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the current window is active
|
||||
Window::Current->Activate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restores the content transitions after the app has launched.
|
||||
/// </summary>
|
||||
void App::RootFrame_FirstNavigated(Object^ sender, NavigationEventArgs^ e)
|
||||
{
|
||||
auto rootFrame = safe_cast<Frame^>(sender);
|
||||
|
||||
TransitionCollection^ newTransitions;
|
||||
if (_transitions == nullptr)
|
||||
{
|
||||
newTransitions = ref new TransitionCollection();
|
||||
newTransitions->Append(ref new NavigationThemeTransition());
|
||||
}
|
||||
else
|
||||
{
|
||||
newTransitions = _transitions;
|
||||
}
|
||||
|
||||
rootFrame->ContentTransitions = newTransitions;
|
||||
rootFrame->Navigated -= _firstNavigatedToken;
|
||||
}
|
||||
|
||||
/// <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>
|
||||
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
|
||||
{
|
||||
(void) sender; // Unused parameter
|
||||
(void) e; // Unused parameter
|
||||
|
||||
// TODO: Save application state and stop any background activity
|
||||
}
|
29
samples/winrt_universal/PhoneTutorial/App.xaml.h
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// App.xaml.h
|
||||
// Declaration of the App class.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "App.g.h"
|
||||
|
||||
namespace PhoneTutorial
|
||||
{
|
||||
/// <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^ e) override;
|
||||
|
||||
private:
|
||||
Windows::UI::Xaml::Media::Animation::TransitionCollection^ _transitions;
|
||||
Windows::Foundation::EventRegistrationToken _firstNavigatedToken;
|
||||
|
||||
void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
|
||||
void RootFrame_FirstNavigated(Platform::Object^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs^ e);
|
||||
};
|
||||
}
|
BIN
samples/winrt_universal/PhoneTutorial/Assets/Logo.scale-240.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 753 B |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
BIN
samples/winrt_universal/PhoneTutorial/Lena.png
Normal file
After Width: | Height: | Size: 483 KiB |
17
samples/winrt_universal/PhoneTutorial/MainPage.xaml
Normal file
@ -0,0 +1,17 @@
|
||||
<Page
|
||||
x:Class="PhoneTutorial.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:PhoneTutorial"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<Image x:Name="image" />
|
||||
<Button x:Name="Process" Content="Process" HorizontalAlignment="Center" Click="Process_Click"/>
|
||||
<Button x:Name="Reset" Content="Reset" HorizontalAlignment="Center" Click="Reset_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
122
samples/winrt_universal/PhoneTutorial/MainPage.xaml.cpp
Normal file
@ -0,0 +1,122 @@
|
||||
//
|
||||
// MainPage.xaml.cpp
|
||||
// Implementation of the MainPage class.
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "MainPage.xaml.h"
|
||||
|
||||
#include <opencv2\imgproc\types_c.h>
|
||||
#include <opencv2\core\core.hpp>
|
||||
#include <opencv2\imgproc\imgproc.hpp>
|
||||
#include <Robuffer.h>
|
||||
#include <ppl.h>
|
||||
#include <ppltasks.h>
|
||||
|
||||
using namespace PhoneTutorial;
|
||||
using namespace Platform;
|
||||
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::Media;
|
||||
using namespace Windows::UI::Xaml::Navigation;
|
||||
using namespace Windows::UI::Xaml::Media::Imaging;
|
||||
using namespace Windows::Storage::Streams;
|
||||
using namespace Microsoft::WRL;
|
||||
using namespace Windows::ApplicationModel;
|
||||
|
||||
MainPage::MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <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) e; // Unused parameter
|
||||
LoadImage();
|
||||
}
|
||||
|
||||
inline void ThrowIfFailed(HRESULT hr)
|
||||
{
|
||||
if (FAILED(hr))
|
||||
{
|
||||
throw Exception::CreateException(hr);
|
||||
}
|
||||
}
|
||||
|
||||
byte* GetPointerToPixelData(IBuffer^ buffer)
|
||||
{
|
||||
// Cast to Object^, then to its underlying IInspectable interface.
|
||||
Object^ obj = buffer;
|
||||
ComPtr<IInspectable> insp(reinterpret_cast<IInspectable*>(obj));
|
||||
|
||||
// Query the IBufferByteAccess interface.
|
||||
ComPtr<IBufferByteAccess> bufferByteAccess;
|
||||
ThrowIfFailed(insp.As(&bufferByteAccess));
|
||||
|
||||
// Retrieve the buffer data.
|
||||
byte* pixels = nullptr;
|
||||
ThrowIfFailed(bufferByteAccess->Buffer(&pixels));
|
||||
return pixels;
|
||||
}
|
||||
|
||||
void PhoneTutorial::MainPage::Process_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
|
||||
{
|
||||
(void) e; // Unused parameter
|
||||
|
||||
// get the pixels from the WriteableBitmap
|
||||
byte* pPixels = GetPointerToPixelData(m_bitmap->PixelBuffer);
|
||||
int height = m_bitmap->PixelHeight;
|
||||
int width = m_bitmap->PixelWidth;
|
||||
|
||||
// create a matrix the size and type of the image
|
||||
cv::Mat mat(width, height, CV_8UC4);
|
||||
memcpy(mat.data, pPixels, 4 * height*width);
|
||||
|
||||
// convert to grayscale
|
||||
cv::Mat intermediateMat;
|
||||
cv::cvtColor(mat, intermediateMat, CV_RGB2GRAY);
|
||||
|
||||
// convert to BGRA
|
||||
cv::cvtColor(intermediateMat, mat, CV_GRAY2BGRA);
|
||||
|
||||
// copy processed image back to the WriteableBitmap
|
||||
memcpy(pPixels, mat.data, 4 * height*width);
|
||||
|
||||
// update the WriteableBitmap
|
||||
m_bitmap->Invalidate();
|
||||
}
|
||||
|
||||
void PhoneTutorial::MainPage::LoadImage()
|
||||
{
|
||||
Concurrency::task<Windows::Storage::StorageFile^> getFileTask(Package::Current->InstalledLocation->GetFileAsync(L"Lena.png"));
|
||||
|
||||
auto getStreamTask = getFileTask.then(
|
||||
[](Windows::Storage::StorageFile ^storageFile)
|
||||
{
|
||||
return storageFile->OpenReadAsync();
|
||||
});
|
||||
|
||||
getStreamTask.then(
|
||||
[this](Windows::Storage::Streams::IRandomAccessStreamWithContentType^ stream)
|
||||
{
|
||||
m_bitmap = ref new Windows::UI::Xaml::Media::Imaging::WriteableBitmap(1, 1);
|
||||
m_bitmap->SetSource(stream);
|
||||
image->Source = m_bitmap;
|
||||
});
|
||||
}
|
||||
|
||||
void PhoneTutorial::MainPage::Reset_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
|
||||
{
|
||||
(void) e; // Unused parameter
|
||||
LoadImage();
|
||||
}
|
29
samples/winrt_universal/PhoneTutorial/MainPage.xaml.h
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// MainPage.xaml.h
|
||||
// Declaration of the MainPage class.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MainPage.g.h"
|
||||
|
||||
namespace PhoneTutorial
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public ref class MainPage sealed
|
||||
{
|
||||
public:
|
||||
MainPage();
|
||||
|
||||
protected:
|
||||
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
|
||||
private:
|
||||
|
||||
Windows::UI::Xaml::Media::Imaging::WriteableBitmap^ m_bitmap;
|
||||
void Process_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void Reset_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
|
||||
void LoadImage();
|
||||
};
|
||||
}
|
34
samples/winrt_universal/PhoneTutorial/Package.appxmanifest
Normal file
@ -0,0 +1,34 @@
|
||||
<?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" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
|
||||
<Identity Name="0a7cc91b-c995-40cf-adf4-b7ac4ba969c6" Publisher="CN=dalestam" Version="1.0.0.0" />
|
||||
<mp:PhoneIdentity PhoneProductId="0a7cc91b-c995-40cf-adf4-b7ac4ba969c6" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
<Properties>
|
||||
<DisplayName>PhoneTutorial</DisplayName>
|
||||
<PublisherDisplayName>dalestam</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
<Prerequisites>
|
||||
<OSMinVersion>6.3.1</OSMinVersion>
|
||||
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
|
||||
</Prerequisites>
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="PhoneTutorial.App">
|
||||
<m3:VisualElements DisplayName="PhoneTutorial" Square150x150Logo="Assets\Logo.png" Square44x44Logo="Assets\SmallLogo.png" Description="PhoneTutorial" ForegroundText="light" BackgroundColor="transparent">
|
||||
<m3:DefaultTile Wide310x150Logo="Assets\WideLogo.png" Square71x71Logo="Assets\Square71x71Logo.png">
|
||||
</m3:DefaultTile>
|
||||
<m3:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
<m3:ApplicationView MinWidth="width320" />
|
||||
<!--Used in XAML Designer. DO NOT REMOVE-->
|
||||
<m3:InitialRotationPreference>
|
||||
<m3:Rotation Preference="portrait" />
|
||||
</m3:InitialRotationPreference>
|
||||
</m3:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClientServer" />
|
||||
</Capabilities>
|
||||
</Package>
|
32
samples/winrt_universal/PhoneTutorial/PhoneTutorial.sln
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PhoneTutorial", "PhoneTutorial.vcxproj", "{8BEFFBBF-DF41-4539-86BC-A84722831035}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|ARM = Release|ARM
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Release|ARM.Build.0 = Release|ARM
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Release|Win32.Build.0 = Release|Win32
|
||||
{8BEFFBBF-DF41-4539-86BC-A84722831035}.Release|Win32.Deploy.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
159
samples/winrt_universal/PhoneTutorial/PhoneTutorial.vcxproj
Normal file
@ -0,0 +1,159 @@
|
||||
<?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="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>{8beffbbf-df41-4539-86bc-a84722831035}</ProjectGuid>
|
||||
<RootNamespace>PhoneTutorial</RootNamespace>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||
<AppContainerApplication>true</AppContainerApplication>
|
||||
<ApplicationType>Windows Phone</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_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120_wp81</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v120_wp81</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>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LibraryPath>$(ProjectDir)..\..\..\bin\WP\8.1\x86\lib\Debug;$(ProjectDir)..\..\..\bin\WP\8.1\x86\3rdparty\lib\Debug;$(VC_LibraryPath_x86);$(WindowsPhoneSDK_LibraryPath_x86)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\binWP8_1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\binWP8_1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\modules\core\include;$(ProjectDir)..\..\..\modules\imgproc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opencv_core300d.lib;opencv_imgproc300d.lib;zlibd.lib;WindowsPhoneCore.lib;RuntimeObject.lib;PhoneAppModelHost.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\binWP8_1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="App.xaml.h">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MainPage.xaml.h">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Assets\Logo.scale-240.png" />
|
||||
<Image Include="Assets\SmallLogo.scale-240.png" />
|
||||
<Image Include="Assets\SplashScreen.scale-240.png" />
|
||||
<Image Include="Assets\Square71x71Logo.scale-240.png" />
|
||||
<Image Include="Assets\StoreLogo.scale-240.png" />
|
||||
<Image Include="Assets\WideLogo.scale-240.png" />
|
||||
<Image Include="Lena.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="App.xaml.cpp">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</ClCompile>
|
||||
<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>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\bin\WP\8.1\x86\bin\Debug\opencv_core300d.dll">
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="..\..\..\bin\WP\8.1\x86\bin\Debug\opencv_imgproc300d.dll">
|
||||
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Assets">
|
||||
<UniqueIdentifier>8beffbbf-df41-4539-86bc-a84722831035</UniqueIdentifier>
|
||||
<Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions>
|
||||
</Filter>
|
||||
<Image Include="Assets\Logo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SmallLogo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\SplashScreen.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\Square71x71Logo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\StoreLogo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
<Image Include="Assets\WideLogo.scale-240.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="App.xaml.cpp" />
|
||||
<ClCompile Include="MainPage.xaml.cpp" />
|
||||
<ClCompile Include="pch.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="App.xaml.h" />
|
||||
<ClInclude Include="MainPage.xaml.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="MainPage.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Lena.png">
|
||||
<Filter>Assets</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\..\bin\WP\8.1\x86\bin\Debug\opencv_core300d.dll" />
|
||||
<None Include="..\..\..\bin\WP\8.1\x86\bin\Debug\opencv_imgproc300d.dll" />
|
||||
</ItemGroup>
|
||||
</Project>
|
31
samples/winrt_universal/PhoneTutorial/opencv.props
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<OpenCV_Bin>$(OPENCV_DIR)WP\8.1\$(PlatformTarget)\$(PlatformTarget)\vc12\bin\</OpenCV_Bin>
|
||||
<OpenCV_Lib>$(OPENCV_DIR)WP\8.1\$(PlatformTarget)\$(PlatformTarget)\vc12\lib\</OpenCV_Lib>
|
||||
<OpenCV_Include>$(OPENCV_DIR)WP\8.1\$(PlatformTarget)\include\</OpenCV_Include>
|
||||
<!--debug suffix for OpenCV dlls and libs -->
|
||||
<DebugSuffix Condition="'$(Configuration)'=='Debug'">d</DebugSuffix>
|
||||
<DebugSuffix Condition="'$(Configuration)'!='Debug'"></DebugSuffix>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!--Add required OpenCV dlls here-->
|
||||
<None Include="$(OpenCV_Bin)opencv_core300$(DebugSuffix).dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
<None Include="$(OpenCV_Bin)opencv_imgproc300$(DebugSuffix).dll">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(OpenCV_Include);%(AdditionalIncludeDirectories);</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<!--Add required OpenCV libs here-->
|
||||
<AdditionalDependencies>opencv_core300$(DebugSuffix).lib;opencv_imgproc300$(DebugSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OpenCV_Lib);%(AdditionalLibraryDirectories);</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
6
samples/winrt_universal/PhoneTutorial/pch.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
//
|
||||
// pch.cpp
|
||||
// Include the standard header and generate the precompiled header.
|
||||
//
|
||||
|
||||
#include "pch.h"
|
10
samples/winrt_universal/PhoneTutorial/pch.h
Normal file
@ -0,0 +1,10 @@
|
||||
//
|
||||
// pch.h
|
||||
// Header for standard system include files.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <collection.h>
|
||||
#include <ppltasks.h>
|
||||
#include "App.xaml.h"
|
6
samples/winrt_universal/readme.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Building OpenCV WinRT Universal Samples
|
||||
=======================================
|
||||
|
||||
Samples are created to run against x86 architecture OpenCV binaries.
|
||||
|
||||
Please follow the instructions in "platforms/winrt/readme.txt" to generate and build OpenCV for WinRT.
|