You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.1 KiB

  1. #pragma once
  2. #include <string>
  3. #include "pch.h"
  4. namespace raylibUWP
  5. {
  6. ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
  7. {
  8. public:
  9. App();
  10. // IFrameworkView Methods.
  11. virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
  12. virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
  13. virtual void Load(Platform::String^ entryPoint);
  14. virtual void Run();
  15. virtual void Uninitialize();
  16. protected:
  17. // Application lifecycle event handlers.
  18. void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
  19. void OnResuming(Platform::Object^ sender, Platform::Object^ args);
  20. // Window event handlers.
  21. void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
  22. void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
  23. void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args);
  24. // DisplayInformation event handlers.
  25. void OnDpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
  26. void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args);
  27. // Input event handlers
  28. void PointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
  29. void PointerReleased(Windows::UI::Core::CoreWindow ^sender, Windows::UI::Core::PointerEventArgs^ args);
  30. void PointerWheelChanged(Windows::UI::Core::CoreWindow ^sender, Windows::UI::Core::PointerEventArgs^ args);
  31. void MouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args);
  32. void OnKeyDown(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args);
  33. void OnKeyUp(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::KeyEventArgs ^ args);
  34. private:
  35. bool mWindowClosed;
  36. bool mWindowVisible;
  37. };
  38. }