HatchitGame
ht_uwawindow.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_window.h>
19 
20 typedef ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::ApplicationModel::Core::CoreApplicationView *,
21  ABI::Windows::ApplicationModel::Activation::IActivatedEventArgs*>
22  IActivatedEventHandler;
23 
24 namespace Hatchit
25 {
26  namespace Game
27  {
28  class HT_API UWAWindow : public ABI::Windows::ApplicationModel::Core::IFrameworkView,
29  public ABI::Windows::ApplicationModel::Core::IFrameworkViewSource,
30  IActivatedEventHandler
31  {
32  public:
33  UWAWindow();
34 
35  ~UWAWindow();
36 
37  // Inherited via IFrameworkView
38  virtual HRESULT Initialize(ABI::Windows::ApplicationModel::Core::ICoreApplicationView * applicationView) override;
39  virtual HRESULT SetWindow(ABI::Windows::UI::Core::ICoreWindow * window) override;
40  virtual HRESULT Load(HSTRING entryPoint) override;
41  virtual HRESULT Run(void) override;
42  virtual HRESULT Uninitialize(void) override;
43 
44  virtual HRESULT Invoke(ABI::Windows::ApplicationModel::Core::ICoreApplicationView* view,
45  ABI::Windows::ApplicationModel::Activation::IActivatedEventArgs* args) override;
46 
47  virtual HRESULT QueryInterface(REFIID riid, void ** ppvObject) override;
48  virtual ULONG AddRef(void) override;
49  virtual ULONG Release(void) override;
50  virtual HRESULT GetIids(ULONG * iidCount, IID ** iids) override;
51  virtual HRESULT GetRuntimeClassName(HSTRING * className) override;
52  virtual HRESULT GetTrustLevel(TrustLevel * trustLevel) override;
53 
54  // Inherited via IFrameworkViewSource
55  virtual HRESULT CreateView(ABI::Windows::ApplicationModel::Core::IFrameworkView ** viewProvider) override;
56 
57  protected:
58  // Application lifecycle event handlers.
59  void OnActivated(ABI::Windows::ApplicationModel::Core::CoreApplicationView* applicationView, ABI::Windows::ApplicationModel::Activation::IActivatedEventArgs* args);
60  void OnSuspending(void* sender, ABI::Windows::ApplicationModel::SuspendingEventArgs* args);
61  void OnResuming(void* sender, void* args);
62 
63  // Window event handlers.
64  void OnWindowSizeChanged(ABI::Windows::UI::Core::CoreWindow* sender, ABI::Windows::UI::Core::WindowSizeChangedEventArgs* args);
65  void OnVisibilityChanged(ABI::Windows::UI::Core::CoreWindow* sender, ABI::Windows::UI::Core::VisibilityChangedEventArgs* args);
66  void OnWindowClosed(ABI::Windows::UI::Core::CoreWindow* sender, ABI::Windows::UI::Core::CoreWindowEventArgs* args);
67 
68  // DisplayInformation event handlers.
69  void OnDpiChanged(ABI::Windows::Graphics::Display::DisplayInformation* sender, void* args);
70  void OnOrientationChanged(ABI::Windows::Graphics::Display::DisplayInformation* sender, void* args);
71  void OnDisplayContentsInvalidated(ABI::Windows::Graphics::Display::DisplayInformation* sender, void* args);
72 
73  private:
74  bool m_closed;
75  bool m_visible;
76  uint32_t m_refCnt;
77  ABI::Windows::UI::Core::ICoreWindow* m_window;
78  ABI::Windows::UI::Core::ICoreDispatcher* m_dispatcher;
79 
80 
81  };
82 
83 
84  }
85 }
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_glfwkeyboard.h:21
Definition: ht_uwawindow.h:28