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 80 #endif // WINAPI_FAMILY == WINAPI_FAMILY_APP 86 #if WINAPI_FAMILY == WINAPI_FAMILY_APP 91 WINRT_CycleXAMLThread();
94 #endif // WINAPI_FAMILY == WINAPI_FAMILY_APP 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;
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);
159 #endif // WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP / else
#define SDL_InitSubSystem
static void WINRT_OnPointerReleasedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
static void WINRT_OnPointerWheelChangedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
static Windows::Foundation::EventRegistrationToken WINRT_XAMLAppEventToken
int SDL_WinRTInitXAMLApp(int(*mainFunction)(int, char **), void *backgroundPanelAsIInspectable)
static void WINRT_OnPointerMovedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)
SDL_Window * WINRT_GlobalSDLWindow
ISwapChainBackgroundPanelNative * WINRT_GlobalSwapChainBackgroundPanelNative
static void WINRT_OnRenderViaXAML(_In_ Platform::Object^ sender, _In_ Platform::Object^ args)
SDL_bool WINRT_XAMLWasEnabled
int(* WINRT_SDLAppEntryPoint)(int, char **)
static void WINRT_OnPointerPressedViaXAML(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ args)