diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-08-20 19:40:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 19:40:00 -0400 |
commit | 6af82582ebaa8135a436cda463779d9a0fe6c5b6 (patch) | |
tree | 8bb659cb2a4e4ddc530356db493ef95316a2f6a6 /support/hololens/ServoApp/Content/SpatialInputHandler.cpp | |
parent | 4275420a562cd7c936010a791138554ea2a33fe9 (diff) | |
parent | 42f2c472f724edfb31119a7c354e63f7a7f30ede (diff) | |
download | servo-6af82582ebaa8135a436cda463779d9a0fe6c5b6.tar.gz servo-6af82582ebaa8135a436cda463779d9a0fe6c5b6.zip |
Auto merge of #23982 - paulrouget:rmimmersivedemo, r=manishearth
Remove HoloLens immersivemode demo
Depends on #23981
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23982)
<!-- Reviewable:end -->
Diffstat (limited to 'support/hololens/ServoApp/Content/SpatialInputHandler.cpp')
-rw-r--r-- | support/hololens/ServoApp/Content/SpatialInputHandler.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/support/hololens/ServoApp/Content/SpatialInputHandler.cpp b/support/hololens/ServoApp/Content/SpatialInputHandler.cpp deleted file mode 100644 index 753e8a7efd6..00000000000 --- a/support/hololens/ServoApp/Content/SpatialInputHandler.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "pch.h" -#include "SpatialInputHandler.h" -#include <functional> - -using namespace Immersive; - -using namespace std::placeholders; -using namespace winrt::Windows::Foundation; -using namespace winrt::Windows::UI::Input::Spatial; - -// Creates and initializes a GestureRecognizer that listens to a Person. -SpatialInputHandler::SpatialInputHandler() { - // The interaction manager provides an event that informs the app when - // spatial interactions are detected. - m_interactionManager = SpatialInteractionManager::GetForCurrentView(); - - // Bind a handler to the SourcePressed event. - m_sourcePressedEventToken = m_interactionManager.SourcePressed( - bind(&SpatialInputHandler::OnSourcePressed, this, _1, _2)); - - // - // TODO: Expand this class to use other gesture-based input events as - // applicable to - // your app. - // -} - -SpatialInputHandler::~SpatialInputHandler() { - // Unregister our handler for the OnSourcePressed event. - m_interactionManager.SourcePressed(m_sourcePressedEventToken); -} - -// Checks if the user performed an input gesture since the last call to this -// method. Allows the main update loop to check for asynchronous changes to the -// user input state. -SpatialInteractionSourceState SpatialInputHandler::CheckForInput() { - SpatialInteractionSourceState sourceState = m_sourceState; - m_sourceState = nullptr; - return sourceState; -} - -void SpatialInputHandler::OnSourcePressed( - SpatialInteractionManager const &, - SpatialInteractionSourceEventArgs const &args) { - m_sourceState = args.State(); - - // - // TODO: In your app or game engine, rewrite this method to queue - // input events in your input class or event handler. - // -} |