src/core/winrt/SDL_winrtapp_direct3d.h
author David Ludwig <dludwig@pobox.com>
Sun, 22 Sep 2013 23:17:25 -0400
changeset 8532 0f4be71aa156
parent 8531 d481485a1b85
child 8576 8dd593afe2d7
permissions -rw-r--r--
WinRT: added missing files
     1 #pragma once
     2 
     3 #include <Windows.h>
     4 
     5 extern int SDL_WinRTInitNonXAMLApp(int (*mainFunction)(int, char **));
     6 
     7 ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFrameworkView
     8 {
     9 public:
    10     SDL_WinRTApp();
    11     
    12     // IFrameworkView Methods.
    13     virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
    14     virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
    15     virtual void Load(Platform::String^ entryPoint);
    16     virtual void Run();
    17     virtual void Uninitialize();
    18 
    19 internal:
    20     // SDL-specific methods
    21     void PumpEvents();
    22 
    23 protected:
    24     // Event Handlers.
    25     void OnOrientationChanged(Platform::Object^ sender);
    26     void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
    27     void OnLogicalDpiChanged(Platform::Object^ sender);
    28     void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
    29     void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args);
    30     void OnResuming(Platform::Object^ sender, Platform::Object^ args);
    31     void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args);
    32     void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
    33     void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
    34     void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
    35     void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
    36     void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
    37     void OnMouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args);
    38     void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
    39     void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
    40 
    41 private:
    42     bool m_windowClosed;
    43     bool m_windowVisible;
    44 };
    45 
    46 extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;