33 Commits (main)

Author SHA1 Message Date
Sam Lantinga 927d297161 Updated to version 3.1.7 for development
Sam Lantinga 78cc5c1734 Updated to version 3.1.6 for the preview release
SDL Wiki Bot 370521363a Sync SDL3 wiki -> header
[ci skip]
Ryan C. Gordon 1c1706a00b
fnsince: update `\since` policy for documentation.
Everything in SDL3 up to the ABI lock is reported as available since 3.1.3.
Everything else will be reported as since 3.2.0 (what will be the first
official release).

Also ran a Perl script over the headers to change everything to 3.1.3 that
wasn't an API function, since fnsince.pl can't manage those. If there's a
macro or datatype that has snuck in that needs to be 3.2.0 instead, we'll
have to manually fix it up, but it shouldn't be a big deal in any case.

Reference PR .
Sam Lantinga ee9b6204cf Updated to version 3.1.5 for development
We should bump the version immediately before and after release so the release version corresponds to a fixed snapshot of code.
Sam Lantinga 43e7ce7dfc Updated to version 3.1.3 for the preview release
Maia 0da2bd49c8 Remove unused includes. This only removes includes that aren't used at all, not even in comments.
Sam Lantinga 68322ac851 Ensure that all functions that follow the SDL_GetStringRule return temporary memory
Sam Lantinga 637e9700dd Standardize placement of '*' in function declarations
Implemented using these sed commands on the headers:
sed -E -i'' '/SDLCALL|;/ s,([a-z])\* ,\1 *,g' *
sed -E -i'' 's,(\(.*[^\*])\* ([a-z])(.*\)),\1*\2\3,g' *
sed -E -i'' 's,\*const,* const,g' *
sed -E -i'' 's,\*SDLCALL,* SDLCALL,g' *
sed -E -i'' 's,void\(,void (,g' *
git checkout *gl*
Sam Lantinga d73c7311d5 Clarify that the SDL_GetStringRule means that SDL will automatically free the memory later.
Ryan C. Gordon 6110405c07
include: Fill in some documentation gaps.
Ryan C. Gordon e23257307e Introduce formal policy for APIs that return strings.
This declares that any `const char *` returned from SDL is owned by SDL, and
promises to be valid _at least_ until the next time the event queue runs, or
SDL_Quit() is called, even if the thing that owns the string gets destroyed
or changed before then.

This is noted in the headers as "the SDL_GetStringRule", so this will both be
greppable to find a detailed explaination in docs/README-strings.md and
wikiheaders will automatically turn it into a link we can point at the
appropriate documentation.

Fixes .

(and several FIXMEs, both known and yet-undocumented.)
Sam Lantinga 6f2621438a Renamed DECLSPEC to SDL_DECLSPEC
Ryan C. Gordon 5e6d85b8f0
wikiheaders: bridge wiki Category docs to the headers!
Did an initial cleanup on the headers and wrote a few pieces of documentation,
but this needs more work to fill out the documentation.
Sam Lantinga fbe7e2e6d3 Moved the SDL version back to SDL_version.h
Added a comment at the top of SDL.h with the current version, for informational purposes
Sam Lantinga 661f2fc1fc Removed the SDL_Version structure, moved SDL version to SDL.h
Inspired by https://github.com/libsdl-org/SDL/issues/9788
Sam Lantinga d95f5bad24 Updated to version 3.1.2 for the preview release
Ryan C. Gordon f01b34fd8d
include: Removed some SDL2 references in the documentation.
Ryan C. Gordon e044318a8e
Sync SDL3 wiki -> headers
Ryan C. Gordon ad090d2444
include: A ton of little documentation tweaks, fixes, and improvements.
This is just stuff I noticed while working on the wikiheaders updates. A
thorough pass over all the docs would not be terrible, and maybe a simple
script to check for consistency (does everything have a `\since` on it? etc)
might be nice, too.
Ryan C. Gordon 5c9dbf65a3
SDL_version.h: Fix some whitespace.
Petar Popovic 3f8dba3713 Including SD_error.h into headers with error-returning functions
Sam Lantinga 17d4f8d699 Updated to version 3.1.1 for the preview release
Sam Lantinga 36e73bdda4 Updated to version 3.1.0 for the preview release
Sam Lantinga cacac6cc34 Updated structure and field names for consistency
Type names are camel case and field names are snake case except for fields ending in id, which are capitalized.

Fixes https://github.com/libsdl-org/SDL/issues/6955
Sam Lantinga 5b3ee51c6c Updated copyright for 2024
Ryan C. Gordon c53843a961
docs: Remove Doxygen `\brief` tags.
Doxygen and the wiki bridge don't need them; they'll both just use the first
line/sentence instead.

Fixes .
Anonymous Maarten 549cedfa88 include: add \brief to includes
Linus Probert 3bd737d44c Add error returns to void functions that can fail/set errors.
This takes care of the last set of void functions that could
potentially be shifted to instead return an int indicating success and
setting an error in case of an error.
Sam Lantinga fde78d12f2 Updated copyright for 2023
Sam Lantinga 63724c113b Removed the vi format comments from the source
Vim users can use the [editorconfig plugin](https://github.com/editorconfig/editorconfig-vim) to automatically set tab spacing for the SDL coding style.

Fixes https://github.com/libsdl-org/SDL/issues/6903
Ryan C. Gordon 3197632347
include: Renamed begin_code.h and close_code.h to have SDL_ prefixes.
Fixes .
Sam Lantinga 0a48abc860 Switch header convention from `#include "SDL.h"` to `#include <SDL3/SDLh>`
I ran this script in the include directory:
```sh
sed -i '' -e 's,#include "\(SDL.*\)",#include <SDL3/\1>,' *.h
```

I ran this script in the src directory:
```sh
for i in ../include/SDL3/SDL*.h
do hdr=$(basename $i)
   if [ x"$(echo $hdr | egrep 'SDL_main|SDL_name|SDL_test|SDL_syswm|SDL_opengl|SDL_egl|SDL_vulkan')" != x ]; then
        find . -type f -exec sed -i '' -e 's,#include "\('$hdr'\)",#include <SDL3/\1>,' {} \;
    else
        find . -type f -exec sed -i '' -e '/#include "'$hdr'"/d' {} \;
    fi
done
```

Fixes https://github.com/libsdl-org/SDL/issues/6575