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
dludwig@8322
     1
#pragma once
dludwig@8322
     2
dludwig@8531
     3
#include <Windows.h>
dludwig@8531
     4
dludwig@8531
     5
extern int SDL_WinRTInitNonXAMLApp(int (*mainFunction)(int, char **));
dludwig@8531
     6
dludwig@8322
     7
ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFrameworkView
dludwig@8322
     8
{
dludwig@8322
     9
public:
dludwig@8384
    10
    SDL_WinRTApp();
dludwig@8384
    11
    
dludwig@8384
    12
    // IFrameworkView Methods.
dludwig@8384
    13
    virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView);
dludwig@8384
    14
    virtual void SetWindow(Windows::UI::Core::CoreWindow^ window);
dludwig@8384
    15
    virtual void Load(Platform::String^ entryPoint);
dludwig@8384
    16
    virtual void Run();
dludwig@8384
    17
    virtual void Uninitialize();
dludwig@8322
    18
dludwig@8329
    19
internal:
dludwig@8329
    20
    // SDL-specific methods
dludwig@8331
    21
    void PumpEvents();
dludwig@8329
    22
dludwig@8322
    23
protected:
dludwig@8384
    24
    // Event Handlers.
dludwig@8474
    25
    void OnOrientationChanged(Platform::Object^ sender);
dludwig@8384
    26
    void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args);
dludwig@8384
    27
    void OnLogicalDpiChanged(Platform::Object^ sender);
dludwig@8384
    28
    void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args);
dludwig@8384
    29
    void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args);
dludwig@8384
    30
    void OnResuming(Platform::Object^ sender, Platform::Object^ args);
dludwig@8384
    31
    void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args);
dludwig@8384
    32
    void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args);
dludwig@8384
    33
    void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
dludwig@8384
    34
    void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
dludwig@8422
    35
    void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
dludwig@8384
    36
    void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args);
dludwig@8378
    37
    void OnMouseMoved(Windows::Devices::Input::MouseDevice^ mouseDevice, Windows::Devices::Input::MouseEventArgs^ args);
dludwig@8336
    38
    void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
dludwig@8336
    39
    void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args);
dludwig@8322
    40
dludwig@8322
    41
private:
dludwig@8384
    42
    bool m_windowClosed;
dludwig@8384
    43
    bool m_windowVisible;
dludwig@8322
    44
};
dludwig@8515
    45
dludwig@8515
    46
extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;