Commit Graph

485 Commits

Author SHA1 Message Date
Anonymous Maarten
31b3f5ea79 ci: add GDK 2024-08-04 13:07:32 +00:00
Sam Lantinga
cea71fbfcc SDL_cocoakeyboard: Fix errant semicolons in sendPendingKey and clearPendingKey definitions
- These are ignored by Clang but produce a warning: "semicolon before method body is ignored"
2024-08-02 18:55:30 -07:00
Anonymous Maarten
349540f73f Document the new SDL3 Android archive artifact 2024-08-01 17:48:49 +00:00
Anonymous Maarten
a1c6f99877 android: add script in Android archive to create a SDK
Also,
- Move mingw's pkg-support into build-scripts
- Add type annotations to python scripts for mypy
- ci: use v4 tag of actions/cache
- cmake: use PYTHON3_EXECUTABLE for running xxd.py
  (Python3::Interpreter is not always recognized.)
2024-08-01 05:07:08 +02:00
Ryan C. Gordon
afabccd4d0
examples: Split up description text by line breaks. 2024-07-30 15:37:46 -04:00
Ryan C. Gordon
883576beb8
examples: Improve source code output when there are multiple files. 2024-07-30 13:40:09 -04:00
Ryan C. Gordon
69a2d7960c
examples: first shot at description text at top of page. Not working yet. 2024-07-30 13:18:58 -04:00
Ryan C. Gordon
6a25e94472
examples: Print a description of the program to the console on startup. 2024-07-30 12:23:07 -04:00
Sam Lantinga
5e513ecc7f Don't automatically free temporary memory, let the application call SDL_FreeTemporaryMemory() when it's ready.
Also mark up all functions that return temporary memory with SDL_DECLSPEC_TEMP, to help people implementing language bindings.

Fixes https://github.com/libsdl-org/SDL/issues/10378
2024-07-26 10:05:03 -07:00
Frank Praznik
66eb2ea443 mouse: Make pointer warp emulation via relative mode available to all platforms
Move the Wayland pointer warp emulation code up to the SDL mouse layer, and activate it when a client attempts to warp a hidden mouse cursor when the hint is set.

testrelative adds the ability to test the warp emulation activation/deactivation with the --warp parameter and 'c' key for toggling cursor visibility.
2024-07-25 19:57:39 -04:00
Ryan C. Gordon
53022aeb5e
examples: Use the existing CMake infrastructure instead of rolling our own. 2024-07-25 11:56:19 -04:00
Ryan C. Gordon
195c26a50a
examples: Add a way to add datafiles to an example, and add audio/load-wav 2024-07-24 17:30:55 -04:00
Sam Lantinga
a7c0192017 Renamed SDL_PostSemaphore() to SDL_SignalSemphore() 2024-07-24 13:37:40 -07:00
Sam Lantinga
fa0918a686 Renamed SDL life cycle functions
This maps better to how SDL delivers the events, and the iOS delegate methods are in the documentation for reference.
2024-07-24 05:11:13 -07:00
Sam Lantinga
57dcd7993f Update the package name in the app build.gradle
Also only change the name of the activity in AndroidManifest.xml, not all of the descriptive text saying to change the name of the activity.
2024-07-23 17:06:04 -07:00
Sam Lantinga
a432221db5 Specify that this script uses python3
Fixes running on macOS
2024-07-23 17:06:04 -07:00
Sam Lantinga
5c00e54073 Updated SDL_migration.cocci for SDL_GUIDFromString rename (thanks @sezero!) 2024-07-23 08:14:13 -07:00
Ryan C. Gordon
15562564ad
build-web-examples: Run highlight with --enclose-pre option. 2024-07-22 23:23:53 -04:00
Ryan C. Gordon
549317e0e4
build-web-examples: Minor tweaks. 2024-07-22 23:05:59 -04:00
Ryan C. Gordon
2de83359ba
build-web-examples: Fix CMake dir. 2024-07-22 22:55:41 -04:00
Ryan C. Gordon
70348d77e1
build-web-examples: It's usually /bin/bash on Linux, not /usr/bin/bash. 2024-07-22 22:42:32 -04:00
Ryan C. Gordon
5339b4458d
examples: Added initial examples infrastructure. 2024-07-22 22:39:09 -04:00
Ryan C. Gordon
2f6e34d2d0
wikiheaders: Added copyright comment to the top of file. 2024-07-22 22:39:09 -04:00
Sam Lantinga
ef21e31a9a SDL_GUIDFromString() renamed SDL_StringToGUID() 2024-07-22 12:39:15 -07:00
Sam Lantinga
61a7a0e579 SDL_GUIDToString() follows the SDL_GetStringRule
Also removed the distinction between SDL_GUID and SDL_JoystickGUID
2024-07-19 12:22:03 -07:00
Sam Lantinga
ec3bb4c029 Removed the need for SDL_CreateTLS()
This eliminates the tap dancing needed for allocating TLS slots, we'll automatically allocate them as needed, in a thread-safe way.
2024-07-16 12:01:51 -07:00
Sam Lantinga
58270ef3f2 Finished renaming functions in SDL_system.h 2024-07-16 09:35:49 -07:00
Sam Lantinga
54366181c3 Rename functions in SDL_system.h to match SDL 3.0 naming convention
Fixes https://github.com/libsdl-org/SDL/issues/10277
2024-07-15 16:27:48 -07:00
Sam Lantinga
dd08c279e2 Fixed coccinelle patching
Fixes https://github.com/libsdl-org/SDL/issues/10260
2024-07-14 07:15:48 -07:00
Ryan C. Gordon
af2dbf3ff3 video: Rename SDL_GL_DeleteContext to SDL_GL_DestroyContext.
Turns out that there isn't a strong OpenGL naming convention for "Delete" ...
WGL offers "wglDeleteContext" but the GLX equivalent is "glxDestroyContext"
and then EGL sealed the deal by going with Destroy as well! Since it matches
SDL3 naming conventions (Create/Destroy), we're renaming it.

Fixes #10197.
2024-07-10 15:54:08 -04:00
Anonymous Maarten
d1eab18de2 cmake: build ci and and release with static runtime library
(The Visual Studio projects do this as well)
2024-07-10 19:47:27 +02:00
Sam Lantinga
2ba76dbe80 Simplified SDL_Surface
SDL_Surface has been simplified and internal details are no longer in the public structure.

The `format` member of SDL_Surface is now an enumerated pixel format value. You can get the full details of the pixel format by calling `SDL_GetPixelFormatDetails(surface->format)`. You can get the palette associated with the surface by calling SDL_GetSurfacePalette(). You can get the clip rectangle by calling SDL_GetSurfaceClipRect().

SDL_PixelFormat has been renamed SDL_PixelFormatDetails and just describes the pixel format, it does not include a palette for indexed pixel types.

SDL_PixelFormatEnum has been renamed SDL_PixelFormat and is used instead of Uint32 for API functions that refer to pixel format by enumerated value.

SDL_MapRGB(), SDL_MapRGBA(), SDL_GetRGB(), and SDL_GetRGBA() take an optional palette parameter for indexed color lookups.
2024-07-10 00:48:18 -07:00
Anonymous Maarten
50ae47af5e android: create android project in create-android-project.py python script
This script supersedes androidbuild.sh, and also supports using a SDL3 prefab archive
2024-07-05 21:12:26 +02:00
Sam Lantinga
e8dbbf8380 Renamed SDLK_a-z to SDLK_A-Z
Made the symbols uppercase for consistency with the other SDLK_* constants, but the values are still lowercase.
2024-07-01 13:56:49 -07:00
Sam Lantinga
9d816c72ef Updated SDL3 scancode list
This adds more app editing and audio control keys and removes keys that launch applications

Work in progress on https://github.com/libsdl-org/SDL/issues/6390
2024-06-21 22:06:08 -07:00
Anonymous Maarten
1a68d846de Create a functional CMake project using androidbuild.sh 2024-06-18 00:11:44 +02:00
Ryan C. Gordon
7c2329cd78
wikiheaders: Fix C typedef parsing.
Before, it was treating `typedef struct x x;` as a struct typedef instead of
a datatype typedef. Worse, it was treating `typedef struct x *x` the same!

This might require us to manually clean out some incorrect CategoryAPIStruct
tags that have accumulated in various pages.
2024-06-15 11:31:17 -04:00
Ryan C. Gordon
c0c0c64a1d
wikiheaders: Some quick scripting to make params/return info consistent.
- Lowercase the first letter of \param and \returns data; in the former case,
  it looks better in the table and Doxyggen (imho), in the latter it's because
  it's inserted after the word "Returns" to make an english sentence on the
  wiki. This is disabled in this commit, but it was useful to turn it on to
  fix up the headers manually.

- Make sure everything ends with punctuation. Inserts a period if there's
  no existing period or exclamation point at the end of the text. This is
  enabled going forward, so we won't have to manage it ourselves.
2024-06-14 02:08:50 -04:00
Ryan C. Gordon
2ad7c70ac6
documentation: clean up a minor syntax issue. 2024-06-13 18:10:28 -04:00
Ryan C. Gordon
a9d0eaf34a
wikiheaders: Warn if a function returns non-void but has no \returns line. 2024-06-13 16:45:59 -04:00
Ryan C. Gordon
97ec4b0937
wikiheaders: fixed to work with not-SDL3 projects.
(SDL2 still uses DECLSPEC, not SDL_DECLSPEC.)
2024-06-12 19:30:10 -04:00
Ryan C. Gordon
fe620f0345
wikiheaders: List parameter and return value datatypes.
This lets them be clickable on the wikipages when they are SDL symbols.

Reference Issue #9236 (the "Missing links" checklist).
Reference Issue #9995.
2024-06-12 19:30:10 -04:00
Anonymous Maarten
32907a9606 Rename SDL_Swap(16|32|64)(LE|BE) to SDL_Swap(LE|BE)(16|32|64) 2024-06-12 02:29:39 +02:00
Ryan C. Gordon
96bb06d9c7
wikiheaders: Clean out extra blank lines in function declarations on wiki.
This has been driving me nuts for awhile now.  :)
2024-06-11 12:37:41 -04:00
Ryan C. Gordon
386aa56711
wikiheaders: Make cleaning out function attributes more generic.
Changes the wiki page's "Syntax" section from things like...

```c
void SDL_LockMutex(SDL_Mutex *mutex) SDL_ACQUIRE(mutex);
```

...to...

```c
void SDL_LockMutex(SDL_Mutex *mutex);
```
2024-06-11 12:30:32 -04:00
Ryan C. Gordon
b53f6cf77a
wikiheaders: Removed a FIXME comment. 2024-06-11 11:37:45 -04:00
Ryan C. Gordon
8e782602de
wikiheaders: Fixes and cleanups to fix SDL_ReportAssertion's wiki page. 2024-06-11 11:29:44 -04:00
Ryan C. Gordon
c3a4b15a74
wikiheaders: Don't present printf-support compiler metadata in wiki. 2024-06-11 10:58:02 -04:00
Anonymous Maarten
657c0135b1 android: android release binary should only contain a shared SDL3 library 2024-06-10 18:04:18 +02:00
Anonymous Maarten
dd0bb25f66 cmake: remove SDL_STATIC_PIC cmake option.
Use CMAKE_POSITION_INDEPENDENT_CODE instead
2024-06-10 18:04:18 +02:00