include: Removed SDL_quit.h

It only had one (sort of scary) macro in it.

Fixes #9534.
pull/9545/head
Ryan C. Gordon 2024-04-15 11:35:39 -04:00
parent 0397d23ed8
commit 9c8c254af2
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
10 changed files with 13 additions and 72 deletions

View File

@ -360,7 +360,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
<ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
<ClInclude Include="..\..\include\SDL3\SDL_revision.h" />

View File

@ -270,7 +270,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_platform.h" />
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
<ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
<ClInclude Include="..\..\include\SDL3\SDL_revision.h" />

View File

@ -74,7 +74,6 @@
<ClInclude Include="..\include\SDL3\SDL_platform_defines.h" />
<ClInclude Include="..\include\SDL3\SDL_power.h" />
<ClInclude Include="..\include\SDL3\SDL_properties.h" />
<ClInclude Include="..\include\SDL3\SDL_quit.h" />
<ClInclude Include="..\include\SDL3\SDL_rect.h" />
<ClInclude Include="..\include\SDL3\SDL_render.h" />
<ClInclude Include="..\include\SDL3\SDL_revision.h" />

View File

@ -144,9 +144,6 @@
<ClInclude Include="..\include\SDL3\SDL_power.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_quit.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\SDL3\SDL_rect.h">
<Filter>Header Files</Filter>
</ClInclude>

View File

@ -283,7 +283,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_platform_defines.h" />
<ClInclude Include="..\..\include\SDL3\SDL_power.h" />
<ClInclude Include="..\..\include\SDL3\SDL_properties.h" />
<ClInclude Include="..\..\include\SDL3\SDL_quit.h" />
<ClInclude Include="..\..\include\SDL3\SDL_rect.h" />
<ClInclude Include="..\..\include\SDL3\SDL_render.h" />
<ClInclude Include="..\..\include\SDL3\SDL_revision.h" />

View File

@ -339,9 +339,6 @@
<ClInclude Include="..\..\include\SDL3\SDL_properties.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_quit.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL3\SDL_rect.h">
<Filter>API Headers</Filter>
</ClInclude>

View File

@ -493,7 +493,6 @@
F3F7D9B12933074E00816151 /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DB2933074D00816151 /* SDL_power.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9B92933074E00816151 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DD2933074D00816151 /* SDL_cpuinfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9BD2933074E00816151 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DE2933074D00816151 /* SDL_render.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9C12933074E00816151 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8DF2933074D00816151 /* SDL_quit.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9C52933074E00816151 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E02933074D00816151 /* SDL_assert.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9C92933074E00816151 /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E12933074D00816151 /* SDL_opengl.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3F7D9CD2933074E00816151 /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = F3F7D8E22933074D00816151 /* SDL_rect.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -1032,7 +1031,6 @@
F3F7D8DB2933074D00816151 /* SDL_power.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_power.h; path = SDL3/SDL_power.h; sourceTree = "<group>"; };
F3F7D8DD2933074D00816151 /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = SDL3/SDL_cpuinfo.h; sourceTree = "<group>"; };
F3F7D8DE2933074D00816151 /* SDL_render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_render.h; path = SDL3/SDL_render.h; sourceTree = "<group>"; };
F3F7D8DF2933074D00816151 /* SDL_quit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_quit.h; path = SDL3/SDL_quit.h; sourceTree = "<group>"; };
F3F7D8E02933074D00816151 /* SDL_assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_assert.h; path = SDL3/SDL_assert.h; sourceTree = "<group>"; };
F3F7D8E12933074D00816151 /* SDL_opengl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_opengl.h; path = SDL3/SDL_opengl.h; sourceTree = "<group>"; };
F3F7D8E22933074D00816151 /* SDL_rect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_rect.h; path = SDL3/SDL_rect.h; sourceTree = "<group>"; };
@ -1211,7 +1209,6 @@
F3F7D8AB2933074900816151 /* SDL_platform.h */,
F3F7D8DB2933074D00816151 /* SDL_power.h */,
F3E5A6EC2AD5E10800293D83 /* SDL_properties.h */,
F3F7D8DF2933074D00816151 /* SDL_quit.h */,
F3F7D8E22933074D00816151 /* SDL_rect.h */,
F3F7D8DE2933074D00816151 /* SDL_render.h */,
F3F7D8B42933074900816151 /* SDL_revision.h */,
@ -2421,7 +2418,6 @@
F3B38CD3296E2E52005DA6D3 /* SDL_platform_defines.h in Headers */,
F3F7D9B12933074E00816151 /* SDL_power.h in Headers */,
F3E5A6ED2AD5E10800293D83 /* SDL_properties.h in Headers */,
F3F7D9C12933074E00816151 /* SDL_quit.h in Headers */,
F37E18622BAA40090098C111 /* SDL_sysfilesystem.h in Headers */,
F3F7D9CD2933074E00816151 /* SDL_rect.h in Headers */,
A7D8AC0323E2514100DCD162 /* SDL_rect_c.h in Headers */,

View File

@ -1033,6 +1033,19 @@ The following platform preprocessor macros have been removed:
* `__PNACL__`
* `__WINDOWS__`
## SDL_quit.h
SDL_quit.h has been completely removed. It only had one symbol in it--SDL_QuitRequested--and if you want it, you can just add this to your app...
```c
#define SDL_QuitRequested() (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_EVENT_QUIT,SDL_EVENT_QUIT) > 0))
```
...but this macro is sort of messy, calling two functions in sequence in an expression.
The following macros have been removed:
* SDL_QuitRequested - call SDL_PumpEvents() then SDL_PeepEvents() directly, instead.
## SDL_rect.h
The following functions have been renamed:

View File

@ -35,7 +35,6 @@
#include <SDL3/SDL_keyboard.h>
#include <SDL3/SDL_mouse.h>
#include <SDL3/SDL_pen.h>
#include <SDL3/SDL_quit.h>
#include <SDL3/SDL_stdinc.h>
#include <SDL3/SDL_touch.h>
#include <SDL3/SDL_video.h>

View File

@ -1,57 +0,0 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/**
* \file SDL_quit.h
*
* Include file for SDL quit event handling.
*/
#ifndef SDL_quit_h_
#define SDL_quit_h_
#include <SDL3/SDL_stdinc.h>
/**
* \file SDL_quit.h
*
* ::SDL_EVENT_QUIT is generated when the user tries to close the application
* window. If it is ignored or filtered out, the window will remain open.
* If it is not ignored or filtered, it is queued normally and the window
* is allowed to close. When the window is closed, screen updates will
* complete, but have no effect.
*
* SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)
* and SIGTERM (system termination request), if handlers do not already
* exist, that generate ::SDL_EVENT_QUIT as well. There is no way
* to determine the cause of an ::SDL_EVENT_QUIT, but setting a signal
* handler in your application will override the default generation of
* quit events for that signal.
*
* \sa SDL_Quit()
*/
/* There are no functions directly affecting the quit event */
#define SDL_QuitRequested() \
(SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_EVENT_QUIT,SDL_EVENT_QUIT) > 0))
#endif /* SDL_quit_h_ */