WinPhone8.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. #pragma once
  11. #include "pch.h"
  12. #include "CubeRenderer.h"
  13. ref class WinPhone8 sealed : public Windows::ApplicationModel::Core::IFrameworkView
  14. {
  15. public:
  16. WinPhone8();
  17. // IFrameworkView Methods.
  18. virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
  19. virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
  20. virtual void Load(Platform::String^ entryPoint);
  21. virtual void Run();
  22. virtual void Uninitialize();
  23. protected:
  24. // Event Handlers.
  25. void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
  26. void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args);
  27. void OnResuming(Platform::Object^ sender, Platform::Object^ args);
  28. void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args);
  29. void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
  30. void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  31. void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  32. void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  33. private:
  34. CubeRenderer^ m_renderer;
  35. bool m_windowClosed;
  36. bool m_windowVisible;
  37. };
  38. ref class Direct3DApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
  39. {
  40. public:
  41. virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView();
  42. };
粤ICP备19079148号