mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-13 09:55:42 +00:00
Add the Windows notification driver
Notifications are supported on Win10 and above.
This commit is contained in:
parent
8275f6e90d
commit
984b03680f
6 changed files with 1202 additions and 2 deletions
|
|
@ -4,6 +4,9 @@
|
|||
<ClCompile Include="..\..\src\core\gdk\SDL_gdk.cpp" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch.c" />
|
||||
<ClCompile Include="..\..\src\core\windows\pch_cpp.cpp" />
|
||||
<ClCompile Include="..\..\src\events\SDL_notificationevents.c" />
|
||||
<ClCompile Include="..\..\src\notification\dummy\SDL_dummynotification.c" />
|
||||
<ClCompile Include="..\..\src\notification\SDL_notification.c" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_render_d3d12_xbox.cpp" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxone.cpp" />
|
||||
<ClCompile Include="..\..\src\render\direct3d12\SDL_shaders_d3d12_xboxseries.cpp" />
|
||||
|
|
@ -54,6 +57,7 @@
|
|||
<ClCompile Include="..\..\src\gpu\vulkan\SDL_gpu_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\gpu\xr\SDL_gpu_openxr.c" />
|
||||
<ClCompile Include="..\..\src\gpu\xr\SDL_openxrdyn.c" />
|
||||
<ClInclude Include="..\..\src\events\SDL_notificationevents_c.h" />
|
||||
<ClInclude Include="..\..\src\gpu\xr\SDL_openxr_internal.h" />
|
||||
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
|
||||
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
|
||||
|
|
@ -241,6 +245,7 @@
|
|||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_lsx.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_sse.c" />
|
||||
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb_std.c" />
|
||||
<ClInclude Include="..\..\src\notification\SDL_notification_c.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL.h" />
|
||||
|
|
@ -513,4 +518,4 @@
|
|||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\core\windows\version.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -466,6 +466,7 @@
|
|||
<ClInclude Include="..\..\src\events\SDL_keysym_to_keycode_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_keysym_to_scancode_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_mouse_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_notificationevents_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_pen_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_scancode_tables_c.h" />
|
||||
<ClInclude Include="..\..\src\events\SDL_touch_c.h" />
|
||||
|
|
@ -522,6 +523,7 @@
|
|||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_libusb.h" />
|
||||
<ClInclude Include="..\..\src\misc\SDL_sysurl.h" />
|
||||
<ClInclude Include="..\..\src\notification\SDL_notification_c.h" />
|
||||
<ClInclude Include="..\..\src\power\SDL_syspower.h" />
|
||||
<ClInclude Include="..\..\src\process\SDL_sysprocess.h" />
|
||||
<ClInclude Include="..\..\src\render\direct3d11\D3D11_PixelShader_Advanced.h" />
|
||||
|
|
@ -624,6 +626,7 @@
|
|||
<ClCompile Include="..\..\src\events\imKStoUCS.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keysym_to_keycode.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_keysym_to_scancode.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_notificationevents.c" />
|
||||
<ClCompile Include="..\..\src\events\SDL_scancode_tables.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
|
||||
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
|
||||
|
|
@ -639,6 +642,8 @@
|
|||
<ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
|
||||
<ClCompile Include="..\..\src\main\SDL_runapp.c" />
|
||||
<ClCompile Include="..\..\src\main\windows\SDL_sysmain_runapp.c" />
|
||||
<ClCompile Include="..\..\src\notification\SDL_notification.c" />
|
||||
<ClCompile Include="..\..\src\notification\windows\SDL_windowsnotification.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c" />
|
||||
<ClCompile Include="..\..\src\SDL_guid.c" />
|
||||
|
|
@ -1000,4 +1005,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -262,6 +262,12 @@
|
|||
<Filter Include="render\gpu\shaders">
|
||||
<UniqueIdentifier>{107d41e6-7c7e-4d9a-a3b3-b6f4abfde0c1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="notification">
|
||||
<UniqueIdentifier>{0000b1b2d12877646f6147a5a7510000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="notification\windows">
|
||||
<UniqueIdentifier>{0000b6590eb19c11945581d0479b0000}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\SDL3\SDL.h">
|
||||
|
|
@ -489,6 +495,9 @@
|
|||
<ClInclude Include="..\..\src\camera\SDL_syscamera.h">
|
||||
<Filter>camera</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\events\SDL_notificationevents_c.h">
|
||||
<Filter>events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\filesystem\SDL_sysfilesystem.h">
|
||||
<Filter>filesystem</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -501,6 +510,9 @@
|
|||
<ClInclude Include="..\..\src\main\SDL_main_callbacks.h">
|
||||
<Filter>main</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\notification\SDL_notification_c.h">
|
||||
<Filter>notification</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\SDL_error_c.h" />
|
||||
<ClInclude Include="..\..\src\SDL_hashtable.h" />
|
||||
<ClInclude Include="..\..\src\SDL_list.h" />
|
||||
|
|
@ -1351,6 +1363,9 @@
|
|||
<ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c">
|
||||
<Filter>dialog</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\events\SDL_notificationevents.c">
|
||||
<Filter>events</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\filesystem\SDL_filesystem.c">
|
||||
<Filter>filesystem</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -1378,6 +1393,12 @@
|
|||
<ClCompile Include="..\..\src\main\windows\SDL_sysmain_runapp.c">
|
||||
<Filter>main\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\notification\SDL_notification.c">
|
||||
<Filter>notification</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\notification\windows\SDL_windowsnotification.c">
|
||||
<Filter>notification\windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\SDL.c" />
|
||||
<ClCompile Include="..\..\src\SDL_assert.c" />
|
||||
<ClCompile Include="..\..\src\SDL_error.c" />
|
||||
|
|
|
|||
|
|
@ -379,6 +379,11 @@ BOOL WIN_IsWindows81OrGreater(void)
|
|||
CHECKWINVER(TRUE, IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(_WIN32_WINNT_WINBLUE), 0));
|
||||
}
|
||||
|
||||
BOOL WIN_IsWindows10OrGreater(void)
|
||||
{
|
||||
CHECKWINVER(TRUE, IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN10), LOBYTE(_WIN32_WINNT_WIN10), 0));
|
||||
}
|
||||
|
||||
BOOL WIN_IsWindows11OrGreater(void)
|
||||
{
|
||||
return IsWindowsBuildVersionAtLeast(22000);
|
||||
|
|
|
|||
|
|
@ -196,6 +196,9 @@ extern BOOL WIN_IsWindows8OrGreater(void);
|
|||
// Returns true if we're running on Windows 8.1 and newer
|
||||
extern BOOL WIN_IsWindows81OrGreater(void);
|
||||
|
||||
// Returns true if we're running on Windows 10 and newer
|
||||
extern BOOL WIN_IsWindows10OrGreater(void);
|
||||
|
||||
// Returns true if we're running on Windows 11 and newer
|
||||
extern BOOL WIN_IsWindows11OrGreater(void);
|
||||
|
||||
|
|
|
|||
1161
src/notification/windows/SDL_windowsnotification.c
Normal file
1161
src/notification/windows/SDL_windowsnotification.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue