26#if WINAPI_FAMILY == WINAPI_FAMILY_APP
27#include <windows.ui.xaml.media.dxinterop.h>
32#include "../../SDL_internal.h"
34#include "../../video/winrt/SDL_winrtevents_c.h"
35#include "../../video/winrt/SDL_winrtvideo_cpp.h"
44#if WINAPI_FAMILY == WINAPI_FAMILY_APP
54#if WINAPI_FAMILY == WINAPI_FAMILY_APP
86#if WINAPI_FAMILY == WINAPI_FAMILY_APP
91 WINRT_CycleXAMLThread();
104#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
105 return SDL_SetError(
"XAML support is not yet available in Windows Phone.");
108 using namespace Platform;
109 using namespace Windows::Foundation;
110 using namespace Windows::UI::Core;
111 using namespace Windows::UI::Xaml;
112 using namespace Windows::UI::Xaml::Controls;
113 using namespace Windows::UI::Xaml::Input;
114 using namespace Windows::UI::Xaml::Media;
117 if ( ! backgroundPanelAsIInspectable) {
118 return SDL_SetError(
"'backgroundPanelAsIInspectable' can't be NULL");
121 Platform::Object ^ backgroundPanel =
reinterpret_cast<Object ^
>((IInspectable *) backgroundPanelAsIInspectable);
122 SwapChainBackgroundPanel ^swapChainBackgroundPanel =
dynamic_cast<SwapChainBackgroundPanel ^
>(backgroundPanel);
123 if ( ! swapChainBackgroundPanel) {
124 return SDL_SetError(
"An unknown or unsupported type of XAML control was specified.");
134 IInspectable *panelInspectable = (IInspectable*)
reinterpret_cast<IInspectable*
>(swapChainBackgroundPanel);
#define SDL_InitSubSystem
int(* WINRT_SDLAppEntryPoint)(int, char **)
ISwapChainBackgroundPanelNative * WINRT_GlobalSwapChainBackgroundPanelNative
static void WINRT_OnPointerPressedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
static void WINRT_OnPointerMovedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
int SDL_WinRTInitXAMLApp(int(*mainFunction)(int, char **), void *backgroundPanelAsIInspectable)
static void WINRT_OnPointerReleasedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
static Windows::Foundation::EventRegistrationToken WINRT_XAMLAppEventToken
static void WINRT_OnPointerWheelChangedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
static void WINRT_OnRenderViaXAML(_In_ Platform::Object^ sender, _In_ Platform::Object^ args)
SDL_bool WINRT_XAMLWasEnabled
SDL_Window * WINRT_GlobalSDLWindow