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)
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF lsl PF PF lsl PF PF PF else PF lsl PF add
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)