From 2b99334b3e160bb193d32f51bbcc567e01ec6430 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Tue, 27 May 2025 18:11:14 -0700 Subject: [PATCH 01/16] Update license metadata and copyright year New metadata fixes deprecation warnings from setuptools Packaging module required by setuptools for license metadata, older versions of cibuildwheel pinned an old version of it. --- .github/workflows/python-package.yml | 4 ++-- LICENSE.txt | 2 +- docs/conf.py | 2 +- pyproject.toml | 11 ++++++++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b7337eb0..e20f2a30 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -235,7 +235,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install cibuildwheel==2.19.2 + pip install cibuildwheel==2.23.3 - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse @@ -290,7 +290,7 @@ jobs: # Downloads SDL2 for the later step. run: python build_sdl.py - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.23.3 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS_MACOS: x86_64 arm64 universal2 diff --git a/LICENSE.txt b/LICENSE.txt index d91bf759..ed980457 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2009-2023, Kyle Benesch and the python-tcod contributors. +Copyright (c) 2009-2025, Kyle Benesch and the python-tcod contributors. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/docs/conf.py b/docs/conf.py index 81c2d205..0fda406a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,7 +65,7 @@ # General information about the project. project = "python-tcod" -copyright = "2009-2023, Kyle Benesch" +copyright = "2009-2025, Kyle Benesch" author = "Kyle Benesch" # The version info for the project you're documenting, acts as replacement for diff --git a/pyproject.toml b/pyproject.toml index 37ca4d41..eac81af3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,9 @@ requires = [ # setuptools >=64.0.0 might break editable installs # https://github.com/pypa/setuptools/issues/3548 - "setuptools >=61.0.0", + "setuptools >=77.0.3", "setuptools_scm[toml]>=6.2", + "packaging>=24.2", "wheel>=0.37.1", "cffi>=1.15", "pycparser>=2.14", @@ -19,7 +20,12 @@ description = "The official Python port of libtcod." authors = [{ name = "Kyle Benesch", email = "4b796c65+tcod@gmail.com" }] readme = "README.rst" requires-python = ">=3.10" -license = { text = "Simplified BSD License" } +license = "BSD-2-Clause" +license-files = [ + "LICENSE.txt", + "libtcod/LICENSE.txt", + "libtcod/LIBTCOD-CREDITS.txt", +] dependencies = [ "cffi>=1.15", 'numpy>=1.21.4; implementation_name != "pypy"', @@ -39,7 +45,6 @@ classifiers = [ "Environment :: MacOS X", "Environment :: X11 Applications", "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: POSIX", "Operating System :: MacOS :: MacOS X", From 414a2dd0df5c8e461087ac0e6d4b183042bd92c6 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Sat, 31 May 2025 14:11:09 -0700 Subject: [PATCH 02/16] Use arm64 runner for arm64 wheels Should improve performance of the vitalized build step --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e20f2a30..c025e115 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -211,7 +211,7 @@ jobs: linux-wheels: needs: [ruff, mypy] - runs-on: "ubuntu-latest" + runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest'}} strategy: matrix: arch: ["x86_64", "aarch64"] From 8c25d37bd7b278466703227dfe71ef9938b0b28c Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Sat, 31 May 2025 14:17:07 -0700 Subject: [PATCH 03/16] Removed unused Mypy ignores Changed with Mypy update --- tcod/path.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcod/path.py b/tcod/path.py index 1668487a..92980b85 100644 --- a/tcod/path.py +++ b/tcod/path.py @@ -183,11 +183,11 @@ def __init__(self, cost: tcod.map.Map | ArrayLike | _EdgeCostFunc, diagonal: flo self._callback, self._userdata, self.shape, - ) = self.cost.get_tcod_path_ffi() # type: ignore[union-attr] + ) = self.cost.get_tcod_path_ffi() self._path_c = ffi.gc( self._path_new_using_function( - self.cost.shape[0], # type: ignore[union-attr] - self.cost.shape[1], # type: ignore[union-attr] + self.cost.shape[0], + self.cost.shape[1], self._callback, self._userdata, diagonal, From 597871e0670416207540496ac9f614462c62c08d Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Tue, 8 Apr 2025 19:36:16 -0700 Subject: [PATCH 04/16] Upgrade to use SDL3 version of libtcod Reconfigure CFFI porting scripts for SDL3, add _libtcod.pyi Many SDL functions were renamed and I'd have to port them blind without this new `_libtcod.py` file. Update type ignores for newest Numpy Enable more strict Mypy settings SDL_CommonEvent and others needed to be marked as packed/flexible Remove outdated Sphinx directives Check if audio devices work before testing them Update Linux wheel build workflows for SDL3 --- .github/workflows/python-package.yml | 67 +- .gitignore | 4 +- .readthedocs.yaml | 4 +- .vscode/settings.json | 11 + CHANGELOG.md | 36 + README.rst | 2 +- build_libtcod.py | 253 +- build_sdl.py | 287 +- docs/sdl/joystick.rst | 6 - docs/tcod/event.rst | 2 +- examples/audio_tone.py | 60 +- examples/samples_tcod.py | 59 +- examples/sdl-hello-world.py | 2 +- libtcod | 2 +- pyproject.toml | 3 + setup.py | 28 +- tcod/_libtcod.pyi | 9729 ++++++++++++++++++++++++++ tcod/cffi.py | 28 +- tcod/color.py | 2 +- tcod/console.py | 4 +- tcod/context.py | 26 +- tcod/event.py | 337 +- tcod/event_constants.py | 202 +- tcod/libtcodpy.py | 2 +- tcod/noise.py | 9 +- tcod/path.c | 4 +- tcod/path.h | 18 +- tcod/path.py | 30 +- tcod/sdl/_internal.py | 120 +- tcod/sdl/audio.py | 851 ++- tcod/sdl/constants.py | 489 ++ tcod/sdl/joystick.py | 189 +- tcod/sdl/mouse.py | 27 +- tcod/sdl/render.py | 216 +- tcod/sdl/sys.py | 8 +- tcod/sdl/video.py | 126 +- tcod/tcod.c | 2 +- tcod/tileset.py | 9 +- tests/test_sdl.py | 12 +- tests/test_sdl_audio.py | 41 +- tests/test_tcod.py | 1 - 41 files changed, 12233 insertions(+), 1075 deletions(-) create mode 100644 tcod/_libtcod.pyi create mode 100644 tcod/sdl/constants.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c025e115..714520ec 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -44,10 +44,11 @@ jobs: sdist: runs-on: ubuntu-latest steps: - - name: APT update - run: sudo apt-get update - - name: Install APT dependencies - run: sudo apt-get install libsdl2-dev + - uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee + with: + install-linux-dependencies: true + build-type: "Debug" + version: "3.2.14" - uses: actions/checkout@v4 with: fetch-depth: ${{ env.git-depth }} @@ -71,7 +72,7 @@ jobs: strategy: matrix: os: ["windows-latest", "macos-latest"] - sdl-version: ["2.0.14", "2.0.16", "2.30.0"] + sdl-version: ["3.2.10"] fail-fast: true steps: - uses: actions/checkout@v4 @@ -90,7 +91,7 @@ jobs: SDL_VERSION: ${{ matrix.sdl-version }} build: - needs: [ruff, mypy] + needs: [ruff, mypy, sdist] runs-on: ${{ matrix.os }} strategy: matrix: @@ -122,7 +123,13 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install libsdl2-dev xvfb + sudo apt-get install xvfb + - uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee + if: runner.os == 'Linux' + with: + install-linux-dependencies: true + build-type: "Release" + version: "3.2.14" - name: Install Python dependencies run: | python -m pip install --upgrade pip @@ -157,13 +164,15 @@ jobs: compression-level: 0 test-docs: - needs: [ruff, mypy] + needs: [ruff, mypy, sdist] runs-on: ubuntu-latest steps: - - name: Install APT dependencies - run: | - sudo apt-get update - sudo apt-get install libsdl2-dev + - uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee + if: runner.os == 'Linux' + with: + install-linux-dependencies: true + build-type: "Debug" + version: "3.2.14" - uses: actions/checkout@v4 with: fetch-depth: ${{ env.git-depth }} @@ -182,11 +191,11 @@ jobs: run: python -m sphinx -T -E -W --keep-going . _build/html tox: - needs: [ruff] + needs: [ruff, sdist] runs-on: ${{ matrix.os }} strategy: matrix: - os: ["ubuntu-latest", "windows-latest"] + os: ["ubuntu-latest"] # "windows-latest" disabled due to free-threaded build issues steps: - uses: actions/checkout@v4 with: @@ -200,17 +209,18 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip tox - - name: Install APT dependencies + - uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install libsdl2-dev + with: + install-linux-dependencies: true + build-type: "Debug" + version: "3.2.14" - name: Run tox run: | tox -vv linux-wheels: - needs: [ruff, mypy] + needs: [ruff, mypy, sdist] runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest'}} strategy: matrix: @@ -248,7 +258,18 @@ jobs: CIBW_BEFORE_ALL_LINUX: > yum install -y epel-release && yum-config-manager --enable epel && - yum install -y SDL2-devel + yum install -y gcc git-core make cmake \ + alsa-lib-devel pulseaudio-libs-devel \ + libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \ + libXi-devel libXScrnSaver-devel dbus-devel ibus-devel \ + systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \ + mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \ + libdrm-devel mesa-libgbm-devel libusb-devel + git clone --depth 1 --branch release-3.2.10 https://github.com/libsdl-org/SDL.git sdl_repo && + cmake -S sdl_repo -B sdl_build && + cmake --build sdl_build --config Release && + cmake --install sdl_build --config Release --prefix /usr/local && + cp --verbose /usr/local/lib64/pkgconfig/sdl3.pc /lib64/pkgconfig/sdl3.pc CIBW_BEFORE_TEST: pip install numpy CIBW_TEST_COMMAND: python -c "import tcod.context" # Skip test on emulated architectures @@ -267,7 +288,7 @@ jobs: compression-level: 0 build-macos: - needs: [ruff, mypy] + needs: [ruff, mypy, sdist] runs-on: "macos-14" strategy: fail-fast: true @@ -287,7 +308,7 @@ jobs: - name: Install Python dependencies run: pip install -r requirements.txt - name: Prepare package - # Downloads SDL2 for the later step. + # Downloads SDL for the later step. run: python build_sdl.py - name: Build wheels uses: pypa/cibuildwheel@v2.23.3 @@ -298,7 +319,7 @@ jobs: CIBW_BEFORE_TEST: pip install numpy CIBW_TEST_COMMAND: python -c "import tcod.context" CIBW_TEST_SKIP: "pp* *-macosx_arm64 *-macosx_universal2:arm64" - MACOSX_DEPLOYMENT_TARGET: "10.11" + MACOSX_DEPLOYMENT_TARGET: "10.13" - name: Remove asterisk from label run: | PYTHON_DESC=${{ matrix.python }} diff --git a/.gitignore b/.gitignore index 6ec1f7fb..28aabdcd 100644 --- a/.gitignore +++ b/.gitignore @@ -69,10 +69,10 @@ Release/ tcod/_*.c tcod/_*.pyd .benchmarks -dependencies/SDL2* +dependencies/SDL* tcod/x86 tcod/x64 -tcod/SDL2.framework +tcod/SDL?.framework deb_dist/ *.tar.gz tcod/version.py diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 81bb11ae..8d733f5e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,11 +5,11 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.11" apt_packages: - - libsdl2-dev + - libsdl3-dev submodules: include: all diff --git a/.vscode/settings.json b/.vscode/settings.json index e3434adc..446a6363 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -96,6 +96,7 @@ "condlist", "consolas", "contextdata", + "contextlib", "CONTROLLERAXISMOTION", "CONTROLLERBUTTONDOWN", "CONTROLLERBUTTONUP", @@ -112,6 +113,7 @@ "dataclasses", "datas", "DBLAMPERSAND", + "DBLAPOSTROPHE", "DBLVERTICALBAR", "dcost", "DCROSS", @@ -139,6 +141,7 @@ "dunder", "DVLINE", "elif", + "ENDCALL", "endianness", "epel", "epub", @@ -250,6 +253,7 @@ "lerp", "letterpaper", "LGUI", + "LHYPER", "libsdl", "libtcod", "libtcodpy", @@ -305,6 +309,7 @@ "neww", "noarchive", "NODISCARD", + "NOMESSAGE", "Nonrepresentable", "NONUSBACKSLASH", "NONUSHASH", @@ -315,10 +320,12 @@ "numpy", "ogrid", "ogrids", + "oldnames", "onefile", "OPENGL", "opensearch", "OPER", + "OVERSCAN", "packbits", "PAGEDOWN", "pagerefs", @@ -365,6 +372,7 @@ "repr", "rgba", "RGUI", + "RHYPER", "RIGHTBRACE", "RIGHTBRACKET", "RIGHTDOWN", @@ -406,6 +414,8 @@ "SIZEWE", "SMILIE", "snprintf", + "SOFTLEFT", + "SOFTRIGHT", "soundfile", "sourcelink", "sphinxstrong", @@ -444,6 +454,7 @@ "typestr", "undoc", "Unifont", + "UNISTD", "unraisable", "unraisablehook", "unraiseable", diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce0d62c..0a3495f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,45 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version ## [Unreleased] +### Changed + +- Switched to SDL3. + This will cause several breaking changes such as the names of keyboard constants and other SDL enums. +- `tcod.sdl.video.Window.grab` has been split into `.mouse_grab` and `.keyboard_grab` attributes. +- `tcod.event.KeySym` single letter symbols are now all uppercase. +- Relative mouse mode is set via `tcod.sdl.video.Window.relative_mouse_mode` instead of `tcod.sdl.mouse.set_relative_mode`. +- `tcod.sdl.render.new_renderer`: Removed `software` and `target_textures` parameters, `vsync` takes `int`, `driver` takes `str` instead of `int`. +- SDL renderer logical +- `tcod.sdl.render.Renderer`: `integer_scaling` and `logical_size` are now set with `set_logical_presentation` method. +- `tcod.sdl.render.Renderer.geometry` now takes float values for `color` instead of 8-bit integers. +- `tcod.event.Point` and other mouse/tile coordinate types now use `float` instead of `int`. + SDL3 has decided that mouse events have subpixel precision. + If you see any usual `float` types in your code then this is why. +- `tcod.sdl.audio` has been affected by major changes to SDL3. + - `tcod.sdl.audio.open` has new behavior due to SDL3 and should be avoided. + - Callbacks which were assigned to `AudioDevice`'s must now be applied to `AudioStream`'s instead. + - `AudioDevice`'s are now opened using references to existing devices. + - Sound queueing methods were moved from `AudioDevice` to a new `AudioStream` class. + - `BasicMixer` may require manually specifying `frequency` and `channels` to replicate old behavior. + - `get_devices` and `get_capture_devices` now return `dict[str, AudioDevice]`. + +### Deprecated + +- `tcod.sdl.audio.open` was replaced with a newer API, get a default device with `tcod.sdl.audio.get_default_playback().open()`. +- `tcod.sdl.audio.BasicMixer` should be replaced with `AudioStream`'s. +- Should no longer use `tcod.sdl.audio.AudioDevice` in a context, use `contextlib.closing` for the old behavior. + ### Removed - Support dropped for Python 3.8 and 3.9. +- Removed `Joystick.get_current_power` due to SDL3 changes. +- `WindowFlags.FULLSCREEN_DESKTOP` is now just `WindowFlags.FULLSCREEN` +- `tcod.sdl.render.Renderer.integer_scaling` removed. +- Removed `callback`, `spec`, `queued_samples`, `queue_audio`, and `dequeue_audio` attributes from `tcod.sdl.audio.AudioDevice`. + +### Fixed + +- `Joystick.get_ball` was broken. ## [18.1.0] - 2025-05-05 diff --git a/README.rst b/README.rst index 515c90a7..32e9164c 100755 --- a/README.rst +++ b/README.rst @@ -48,7 +48,7 @@ For the most part it's just:: ============== * Python 3.10+ * Windows, Linux, or MacOS X 10.9+. -* On Linux, requires libsdl2 (2.0.10+). +* On Linux, requires libsdl3 =========== Changelog diff --git a/build_libtcod.py b/build_libtcod.py index 974904cc..f9a5e3dd 100755 --- a/build_libtcod.py +++ b/build_libtcod.py @@ -3,16 +3,22 @@ from __future__ import annotations +import ast import contextlib import glob import os import platform import re +import subprocess import sys from collections.abc import Iterable, Iterator from pathlib import Path from typing import Any, ClassVar +import attrs +import pycparser # type: ignore[import-untyped] +import pycparser.c_ast # type: ignore[import-untyped] +import pycparser.c_generator # type: ignore[import-untyped] from cffi import FFI # ruff: noqa: T201 @@ -204,15 +210,16 @@ def walk_sources(directory: str) -> Iterator[str]: extra_link_args.extend(GCC_CFLAGS[tdl_build]) ffi = FFI() -ffi.cdef(build_sdl.get_cdef()) +sdl_cdef, sdl_strings = build_sdl.get_cdef() +ffi.cdef(sdl_cdef) for include in includes: try: ffi.cdef(include.header) - except Exception: + except Exception: # noqa: PERF203 # Print the source, for debugging. print(f"Error with: {include.path}") for i, line in enumerate(include.header.split("\n"), 1): - print("%03i %s" % (i, line)) + print(f"{i:03i} {line}") raise ffi.cdef( """ @@ -221,7 +228,10 @@ def walk_sources(directory: str) -> Iterator[str]: ) ffi.set_source( module_name, - "#include \n#include ", + """\ +#include +#define SDL_oldnames_h_ +#include """, include_dirs=include_dirs, library_dirs=library_dirs, sources=sources, @@ -380,10 +390,10 @@ def write_library_constants() -> None: f.write(f"""{parse_sdl_attrs("SDL_SCANCODE", None)[0]}\n""") f.write("\n# --- SDL keyboard symbols ---\n") - f.write(f"""{parse_sdl_attrs("SDLK", None)[0]}\n""") + f.write(f"""{parse_sdl_attrs("SDLK_", None)[0]}\n""") f.write("\n# --- SDL keyboard modifiers ---\n") - f.write("{}\n_REVERSE_MOD_TABLE = {}\n".format(*parse_sdl_attrs("KMOD", None))) + f.write("{}\n_REVERSE_MOD_TABLE = {}\n".format(*parse_sdl_attrs("SDL_KMOD", None))) f.write("\n# --- SDL wheel ---\n") f.write("{}\n_REVERSE_WHEEL_TABLE = {}\n".format(*parse_sdl_attrs("SDL_MOUSEWHEEL", all_names))) @@ -407,6 +417,237 @@ def write_library_constants() -> None: Path("tcod/event.py").write_text(event_py, encoding="utf-8") + with Path("tcod/sdl/constants.py").open("w", encoding="utf-8") as f: + f.write('"""SDL private constants."""\n\n') + for name, value in sdl_strings.items(): + f.write(f"{name} = {ast.literal_eval(value)!r}\n") + + subprocess.run(["ruff", "format", "--silent", Path("tcod/sdl/constants.py")], check=True) # noqa: S603, S607 + + +def _fix_reserved_name(name: str) -> str: + """Add underscores to reserved Python keywords.""" + assert isinstance(name, str) + if name in ("def", "in"): + return name + "_" + return name + + +@attrs.define(frozen=True) +class ConvertedParam: + name: str = attrs.field(converter=_fix_reserved_name) + hint: str + original: str + + +def _type_from_names(names: list[str]) -> str: + if not names: + return "" + if names[-1] == "void": + return "None" + if names in (["unsigned", "char"], ["bool"]): + return "bool" + if names[-1] in ("size_t", "int", "ptrdiff_t"): + return "int" + if names[-1] in ("float", "double"): + return "float" + return "Any" + + +def _param_as_hint(node: pycparser.c_ast.Node, default_name: str) -> ConvertedParam: + original = pycparser.c_generator.CGenerator().visit(node) + name: str + names: list[str] + match node: + case pycparser.c_ast.Typename(type=pycparser.c_ast.TypeDecl(type=pycparser.c_ast.IdentifierType(names=names))): + # Unnamed type + return ConvertedParam(default_name, _type_from_names(names), original) + case pycparser.c_ast.Decl( + name=name, type=pycparser.c_ast.TypeDecl(type=pycparser.c_ast.IdentifierType(names=names)) + ): + # Named type + return ConvertedParam(name, _type_from_names(names), original) + case pycparser.c_ast.Decl( + name=name, + type=pycparser.c_ast.ArrayDecl( + type=pycparser.c_ast.TypeDecl(type=pycparser.c_ast.IdentifierType(names=names)) + ), + ): + # Named array + return ConvertedParam(name, "Any", original) + case pycparser.c_ast.Decl(name=name, type=pycparser.c_ast.PtrDecl()): + # Named pointer + return ConvertedParam(name, "Any", original) + case pycparser.c_ast.Typename(name=name, type=pycparser.c_ast.PtrDecl()): + # Forwarded struct + return ConvertedParam(name or default_name, "Any", original) + case pycparser.c_ast.TypeDecl(type=pycparser.c_ast.IdentifierType(names=names)): + # Return type + return ConvertedParam(default_name, _type_from_names(names), original) + case pycparser.c_ast.PtrDecl(): + # Return pointer + return ConvertedParam(default_name, "Any", original) + case pycparser.c_ast.EllipsisParam(): + # C variable args + return ConvertedParam("*__args", "Any", original) + case _: + raise AssertionError + + +class DefinitionCollector(pycparser.c_ast.NodeVisitor): # type: ignore[misc] + """Gathers functions and names from C headers.""" + + def __init__(self) -> None: + """Initialize the object with empty values.""" + self.functions: list[str] = [] + """Indented Python function definitions.""" + self.variables: set[str] = set() + """Python variable definitions.""" + + def parse_defines(self, string: str, /) -> None: + """Parse C define directives into hinted names.""" + for match in re.finditer(r"#define\s+(\S+)\s+(\S+)\s*", string): + name, value = match.groups() + if value == "...": + self.variables.add(f"{name}: Final[int]") + else: + self.variables.add(f"{name}: Final[Literal[{value}]] = {value}") + + def visit_Decl(self, node: pycparser.c_ast.Decl) -> None: # noqa: N802 + """Parse C FFI functions into type hinted Python functions.""" + match node: + case pycparser.c_ast.Decl( + type=pycparser.c_ast.FuncDecl(), + ): + assert isinstance(node.type.args, pycparser.c_ast.ParamList), type(node.type.args) + arg_hints = [_param_as_hint(param, f"arg{i}") for i, param in enumerate(node.type.args.params)] + return_hint = _param_as_hint(node.type.type, "") + if len(arg_hints) == 1 and arg_hints[0].hint == "None": # Remove void parameter + arg_hints = [] + + python_params = [f"{p.name}: {p.hint}" for p in arg_hints] + if python_params: + if arg_hints[-1].name.startswith("*"): + python_params.insert(-1, "/") + else: + python_params.append("/") + c_def = pycparser.c_generator.CGenerator().visit(node) + python_def = f"""def {node.name}({", ".join(python_params)}) -> {return_hint.hint}:""" + self.functions.append(f''' {python_def}\n """{c_def}"""''') + + def visit_Enumerator(self, node: pycparser.c_ast.Enumerator) -> None: # noqa: N802 + """Parse C enums into hinted names.""" + name: str | None + value: str | int + match node: + case pycparser.c_ast.Enumerator(name=name, value=None): + self.variables.add(f"{name}: Final[int]") + case pycparser.c_ast.Enumerator(name=name, value=pycparser.c_ast.ID()): + self.variables.add(f"{name}: Final[int]") + case pycparser.c_ast.Enumerator(name=name, value=pycparser.c_ast.Constant(value=value)): + value = int(str(value).removesuffix("u"), base=0) + self.variables.add(f"{name}: Final[Literal[{value}]] = {value}") + case pycparser.c_ast.Enumerator( + name=name, value=pycparser.c_ast.UnaryOp(op="-", expr=pycparser.c_ast.Constant(value=value)) + ): + value = -int(str(value).removesuffix("u"), base=0) + self.variables.add(f"{name}: Final[Literal[{value}]] = {value}") + case pycparser.c_ast.Enumerator(name=name): + self.variables.add(f"{name}: Final[int]") + case _: + raise AssertionError + + +def write_hints() -> None: + """Write a custom _libtcod.pyi file from C definitions.""" + function_collector = DefinitionCollector() + c = pycparser.CParser() + + # Parse SDL headers + cdef = sdl_cdef + cdef = cdef.replace("int...", "int") + cdef = ( + """ +typedef int bool; +typedef int int8_t; +typedef int uint8_t; +typedef int int16_t; +typedef int uint16_t; +typedef int int32_t; +typedef int uint32_t; +typedef int int64_t; +typedef int uint64_t; +typedef int wchar_t; +typedef int intptr_t; +""" + + cdef + ) + for match in re.finditer(r"SDL_PIXELFORMAT_\w+", cdef): + function_collector.variables.add(f"{match.group()}: int") + cdef = re.sub(r"(typedef enum SDL_PixelFormat).*(SDL_PixelFormat;)", r"\1 \2", cdef, flags=re.DOTALL) + cdef = cdef.replace("padding[...]", "padding[]") + cdef = cdef.replace("...;} SDL_TouchFingerEvent;", "} SDL_TouchFingerEvent;") + function_collector.parse_defines(cdef) + cdef = re.sub(r"\n#define .*", "", cdef) + cdef = re.sub(r"""extern "Python" \{(.*?)\}""", r"\1", cdef, flags=re.DOTALL) + cdef = re.sub(r"//.*", "", cdef) + cdef = cdef.replace("...;", ";") + ast = c.parse(cdef) + function_collector.visit(ast) + + # Parse libtcod headers + cdef = "\n".join(include.header for include in includes) + function_collector.parse_defines(cdef) + cdef = re.sub(r"\n?#define .*", "", cdef) + cdef = re.sub(r"//.*", "", cdef) + cdef = ( + """ +typedef int int8_t; +typedef int uint8_t; +typedef int int16_t; +typedef int uint16_t; +typedef int int32_t; +typedef int uint32_t; +typedef int int64_t; +typedef int uint64_t; +typedef int wchar_t; +typedef int intptr_t; +typedef int ptrdiff_t; +typedef int size_t; +typedef unsigned char bool; +typedef void* SDL_PropertiesID; +""" + + cdef + ) + cdef = re.sub(r"""extern "Python" \{(.*?)\}""", r"\1", cdef, flags=re.DOTALL) + function_collector.visit(c.parse(cdef)) + function_collector.variables.add("TCOD_ctx: Any") + function_collector.variables.add("TCOD_COMPILEDVERSION: Final[int]") + + # Write PYI file + out_functions = """\n\n @staticmethod\n""".join(sorted(function_collector.functions)) + out_variables = "\n ".join(sorted(function_collector.variables)) + + pyi = f"""\ +# Autogenerated with build_libtcod.py +from typing import Any, Final, Literal + +# pyi files for CFFI ports are not standard +# ruff: noqa: A002, ANN401, D402, D403, D415, N801, N802, N803, N815, PLW0211, PYI021 + +class _lib: + @staticmethod +{out_functions} + + {out_variables} + +lib: _lib +ffi: Any +""" + Path("tcod/_libtcod.pyi").write_text(pyi) + subprocess.run(["ruff", "format", "--silent", Path("tcod/_libtcod.pyi")], check=True) # noqa: S603, S607 + if __name__ == "__main__": + write_hints() write_library_constants() diff --git a/build_sdl.py b/build_sdl.py index e395c4d4..08a6f667 100755 --- a/build_sdl.py +++ b/build_sdl.py @@ -4,6 +4,7 @@ from __future__ import annotations import io +import logging import os import platform import re @@ -12,6 +13,7 @@ import sys import zipfile from pathlib import Path +from tempfile import TemporaryDirectory from typing import Any import pcpp # type: ignore[import-untyped] @@ -20,14 +22,20 @@ # This script calls a lot of programs. # ruff: noqa: S603, S607, T201 +# Ignore f-strings in logging, these will eventually be replaced with t-strings. +# ruff: noqa: G004 + +logger = logging.getLogger(__name__) + + BIT_SIZE, LINKAGE = platform.architecture() # Reject versions of SDL older than this, update the requirements in the readme if you change this. -SDL_MIN_VERSION = (2, 0, 10) -# The SDL2 version to parse and export symbols from. -SDL2_PARSE_VERSION = os.environ.get("SDL_VERSION", "2.0.20") -# The SDL2 version to include in binary distributions. -SDL2_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "2.28.1") +SDL_MIN_VERSION = (3, 2, 0) +# The SDL version to parse and export symbols from. +SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.2.10") +# The SDL version to include in binary distributions. +SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.2.10") # Used to remove excessive newlines in debug outputs. @@ -41,16 +49,49 @@ # Most SDLK names need their values scrubbed. RE_SDLK = re.compile(r"(?PSDLK_\w+) =.*?(?=,\n|}\n)") # Remove compile time assertions from the cdef. -RE_ASSERT = re.compile(r"^.*SDL_compile_time_assert.*$", re.MULTILINE) +RE_ASSERT = re.compile(r"^.*SDL_COMPILE_TIME_ASSERT.*$", re.MULTILINE) # Padding values need to be scrubbed. RE_PADDING = re.compile(r"padding\[[^;]*\];") # These structs have an unusual size when packed by SDL on 32-bit platforms. FLEXIBLE_STRUCTS = ( - "SDL_AudioCVT", + "SDL_CommonEvent", + "SDL_DisplayEvent", + "SDL_WindowEvent", + "SDL_KeyboardDeviceEvent", + "SDL_KeyboardEvent", + "SDL_TextEditingEvent", + "SDL_TextEditingCandidatesEvent", + "SDL_TextInputEvent", + "SDL_MouseDeviceEvent", + "SDL_MouseMotionEvent", + "SDL_MouseButtonEvent", + "SDL_MouseWheelEvent", + "SDL_JoyAxisEvent", + "SDL_JoyBallEvent", + "SDL_JoyHatEvent", + "SDL_JoyButtonEvent", + "SDL_JoyDeviceEvent", + "SDL_JoyBatteryEvent", + "SDL_GamepadAxisEvent", + "SDL_GamepadButtonEvent", + "SDL_GamepadDeviceEvent", + "SDL_GamepadTouchpadEvent", + "SDL_GamepadSensorEvent", + "SDL_AudioDeviceEvent", + "SDL_CameraDeviceEvent", + "SDL_RenderEvent", "SDL_TouchFingerEvent", - "SDL_MultiGestureEvent", - "SDL_DollarGestureEvent", + "SDL_PenProximityEvent", + "SDL_PenMotionEvent", + "SDL_PenTouchEvent", + "SDL_PenButtonEvent", + "SDL_PenAxisEvent", + "SDL_DropEvent", + "SDL_ClipboardEvent", + "SDL_SensorEvent", + "SDL_QuitEvent", + "SDL_UserEvent", ) # Other defined names which sometimes cause issues when parsed. @@ -63,6 +104,9 @@ "SDL_HAS_FALLTHROUGH", "SDL_NO_THREAD_SAFETY_ANALYSIS", "SDL_SCOPED_CAPABILITY", + "SDL_NODISCARD", + "SDL_NOLONGLONG", + "SDL_WINAPI_FAMILY_PHONE", # Might show up in parsing and not in source. "SDL_ANDROID_EXTERNAL_STORAGE_READ", "SDL_ANDROID_EXTERNAL_STORAGE_WRITE", @@ -82,63 +126,65 @@ def check_sdl_version() -> None: - """Check the local SDL version on Linux distributions.""" + """Check the local SDL3 version on Linux distributions.""" if not sys.platform.startswith("linux"): return needed_version = f"{SDL_MIN_VERSION[0]}.{SDL_MIN_VERSION[1]}.{SDL_MIN_VERSION[2]}" try: - sdl_version_str = subprocess.check_output(["sdl2-config", "--version"], universal_newlines=True).strip() + sdl_version_str = subprocess.check_output( + ["pkg-config", "sdl3", "--modversion"], universal_newlines=True + ).strip() except FileNotFoundError as exc: msg = ( - "libsdl2-dev or equivalent must be installed on your system and must be at least version" - f" {needed_version}.\nsdl2-config must be on PATH." + "libsdl3-dev or equivalent must be installed on your system and must be at least version" + f" {needed_version}.\nsdl3-config must be on PATH." ) raise RuntimeError(msg) from exc - print(f"Found SDL {sdl_version_str}.") + logger.info(f"Found SDL {sdl_version_str}.") sdl_version = tuple(int(s) for s in sdl_version_str.split(".")) if sdl_version < SDL_MIN_VERSION: msg = f"SDL version must be at least {needed_version}, (found {sdl_version_str})" raise RuntimeError(msg) -def get_sdl2_file(version: str) -> Path: - """Return a path to an SDL2 archive for the current platform. The archive is downloaded if missing.""" +def get_sdl_file(version: str) -> Path: + """Return a path to an SDL3 archive for the current platform. The archive is downloaded if missing.""" if sys.platform == "win32": - sdl2_file = f"SDL2-devel-{version}-VC.zip" + sdl_archive = f"SDL3-devel-{version}-VC.zip" else: assert sys.platform == "darwin" - sdl2_file = f"SDL2-{version}.dmg" - sdl2_local_file = Path("dependencies", sdl2_file) - sdl2_remote_file = f"https://www.libsdl.org/release/{sdl2_file}" - if not sdl2_local_file.exists(): - print(f"Downloading {sdl2_remote_file}") + sdl_archive = f"SDL3-{version}.dmg" + sdl_local_file = Path("dependencies", sdl_archive) + sdl_remote_url = f"https://www.libsdl.org/release/{sdl_archive}" + if not sdl_local_file.exists(): + logger.info(f"Downloading {sdl_remote_url}") Path("dependencies/").mkdir(parents=True, exist_ok=True) - with requests.get(sdl2_remote_file) as response: # noqa: S113 + with requests.get(sdl_remote_url) as response: # noqa: S113 response.raise_for_status() - sdl2_local_file.write_bytes(response.content) - return sdl2_local_file + sdl_local_file.write_bytes(response.content) + return sdl_local_file -def unpack_sdl2(version: str) -> Path: +def unpack_sdl(version: str) -> Path: """Return the path to an extracted SDL distribution. Creates it if missing.""" - sdl2_path = Path(f"dependencies/SDL2-{version}") + sdl_path = Path(f"dependencies/SDL3-{version}") if sys.platform == "darwin": - sdl2_dir = sdl2_path - sdl2_path /= "SDL2.framework" - if sdl2_path.exists(): - return sdl2_path - sdl2_arc = get_sdl2_file(version) - print(f"Extracting {sdl2_arc}") - if sdl2_arc.suffix == ".zip": - with zipfile.ZipFile(sdl2_arc) as zf: + sdl_dir = sdl_path + sdl_path /= "SDL3.framework" + if sdl_path.exists(): + return sdl_path + sdl_archive = get_sdl_file(version) + logger.info(f"Extracting {sdl_archive}") + if sdl_archive.suffix == ".zip": + with zipfile.ZipFile(sdl_archive) as zf: zf.extractall("dependencies/") elif sys.platform == "darwin": - assert sdl2_arc.suffix == ".dmg" - subprocess.check_call(["hdiutil", "mount", sdl2_arc]) - subprocess.check_call(["mkdir", "-p", sdl2_dir]) - subprocess.check_call(["cp", "-r", "/Volumes/SDL2/SDL2.framework", sdl2_dir]) - subprocess.check_call(["hdiutil", "unmount", "/Volumes/SDL2"]) - return sdl2_path + assert sdl_archive.suffix == ".dmg" + subprocess.check_call(["hdiutil", "mount", sdl_archive]) + subprocess.check_call(["mkdir", "-p", sdl_dir]) + subprocess.check_call(["cp", "-r", "/Volumes/SDL3/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework", sdl_dir]) + subprocess.check_call(["hdiutil", "unmount", "/Volumes/SDL3"]) + return sdl_path class SDLParser(pcpp.Preprocessor): # type: ignore[misc] @@ -161,6 +207,7 @@ def get_output(self) -> str: def on_include_not_found(self, is_malformed: bool, is_system_include: bool, curdir: str, includepath: str) -> None: # noqa: ARG002, FBT001 """Remove bad includes such as stddef.h and stdarg.h.""" + assert "SDL3/SDL" not in includepath, (includepath, curdir) raise pcpp.OutputDirective(pcpp.Action.IgnoreAndRemove) def _should_track_define(self, tokens: list[Any]) -> bool: @@ -180,11 +227,9 @@ def _should_track_define(self, tokens: list[Any]) -> bool: return False # Value is a floating point number. if tokens[0].value.startswith("SDL_PR") and (tokens[0].value.endswith("32") or tokens[0].value.endswith("64")): return False # Data type for printing, which is not needed. - return bool( - tokens[0].value.startswith("KMOD_") - or tokens[0].value.startswith("SDL_") - or tokens[0].value.startswith("AUDIO_") - ) + if tokens[0].value.startswith("SDL_PLATFORM_"): + return False # Ignore platform definitions + return bool(str(tokens[0].value).startswith(("SDL_", "SDLK_"))) def on_directive_handle( self, @@ -197,6 +242,8 @@ def on_directive_handle( if directive.value == "define" and self._should_track_define(tokens): if tokens[2].type == "CPP_STRING": self.known_string_defines[tokens[0].value] = tokens[2].value + elif tokens[2].value in self.known_string_defines: + self.known_string_defines[tokens[0].value] = "..." else: self.known_defines.add(tokens[0].value) return super().on_directive_handle(directive, tokens, if_passthru, preceding_tokens) @@ -205,25 +252,28 @@ def on_directive_handle( check_sdl_version() if sys.platform == "win32" or sys.platform == "darwin": - SDL2_PARSE_PATH = unpack_sdl2(SDL2_PARSE_VERSION) - SDL2_BUNDLE_PATH = unpack_sdl2(SDL2_BUNDLE_VERSION) + SDL_PARSE_PATH = unpack_sdl(SDL_PARSE_VERSION) + SDL_BUNDLE_PATH = unpack_sdl(SDL_BUNDLE_VERSION) -SDL2_INCLUDE: Path +SDL_INCLUDE: Path if sys.platform == "win32": - SDL2_INCLUDE = SDL2_PARSE_PATH / "include" + SDL_INCLUDE = SDL_PARSE_PATH / "include" elif sys.platform == "darwin": - SDL2_INCLUDE = SDL2_PARSE_PATH / "Versions/A/Headers" + SDL_INCLUDE = SDL_PARSE_PATH / "Versions/A/Headers" else: # Unix matches = re.findall( r"-I(\S+)", - subprocess.check_output(["sdl2-config", "--cflags"], universal_newlines=True), + subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True), ) assert matches for match in matches: - if Path(match, "SDL_stdinc.h").is_file(): - SDL2_INCLUDE = match - assert SDL2_INCLUDE + if Path(match, "SDL3/SDL.h").is_file(): + SDL_INCLUDE = Path(match) + break + else: + raise AssertionError(matches) + assert SDL_INCLUDE EXTRA_CDEF = """ @@ -231,7 +281,7 @@ def on_directive_handle( extern "Python" { // SDL_AudioCallback callback. -void _sdl_audio_callback(void* userdata, Uint8* stream, int len); +void _sdl_audio_stream_callback(void* userdata, SDL_AudioStream *stream, int additional_amount, int total_amount); // SDL to Python log function. void _sdl_log_output_function(void *userdata, int category, SDL_LogPriority priority, const char *message); // Generic event watcher callback. @@ -240,43 +290,57 @@ def on_directive_handle( """ -def get_cdef() -> str: +def get_cdef() -> tuple[str, dict[str, str]]: """Return the parsed code of SDL for CFFI.""" - parser = SDLParser() - parser.add_path(SDL2_INCLUDE) - parser.parse( + with TemporaryDirectory() as temp_dir: + # Add a false SDL_oldnames.h to prevent old symbols from being collected + fake_header_dir = Path(temp_dir, "SDL3") + fake_header_dir.mkdir() + (fake_header_dir / "SDL_oldnames.h").write_text("") + + parser = SDLParser() + parser.add_path(temp_dir) + parser.add_path(SDL_INCLUDE) + if Path(SDL_INCLUDE, "../Headers/SDL.h").exists(): # Using MacOS dmg archive + fake_sdl_dir = Path(SDL_INCLUDE, "SDL3") + if not fake_sdl_dir.exists(): + fake_sdl_dir.mkdir(exist_ok=False) + for file in SDL_INCLUDE.glob("SDL*.h"): + shutil.copyfile(file, fake_sdl_dir / file.name) + else: # Regular path + assert Path(SDL_INCLUDE, "SDL3/SDL.h").exists(), SDL_INCLUDE + parser.parse( + """ + // Remove extern keyword. + #define extern + // Ignore some SDL assert statements. + #define DOXYGEN_SHOULD_IGNORE_THIS + #define SDL_COMPILE_TIME_ASSERT(x, y) + + #define _SIZE_T_DEFINED_ + typedef int... size_t; + #define bool _Bool + + #define SDL_oldnames_h_ + + #include """ - // Remove extern keyword. - #define extern - // Ignore some SDL assert statements. - #define DOXYGEN_SHOULD_IGNORE_THIS - - #define _SIZE_T_DEFINED_ - typedef int... size_t; - - // Skip these headers. - #define SDL_atomic_h_ - #define SDL_thread_h_ - - #include - """ - ) - sdl2_cdef = parser.get_output() - sdl2_cdef = RE_VAFUNC.sub("", sdl2_cdef) - sdl2_cdef = RE_INLINE.sub("", sdl2_cdef) - sdl2_cdef = RE_PIXELFORMAT.sub(r"\g = ...", sdl2_cdef) - sdl2_cdef = RE_SDLK.sub(r"\g = ...", sdl2_cdef) - sdl2_cdef = RE_NEWLINES.sub("\n", sdl2_cdef) - sdl2_cdef = RE_ASSERT.sub("", sdl2_cdef) - sdl2_cdef = RE_PADDING.sub("padding[...];", sdl2_cdef) - sdl2_cdef = ( - sdl2_cdef.replace("int SDL_main(int argc, char *argv[]);", "") - .replace("typedef unsigned int uintptr_t;", "typedef int... uintptr_t;") - .replace("typedef unsigned int size_t;", "typedef int... size_t;") + ) + sdl_cdef = parser.get_output() + + sdl_cdef = sdl_cdef.replace("_Bool", "bool") + sdl_cdef = RE_VAFUNC.sub("", sdl_cdef) + sdl_cdef = RE_INLINE.sub("", sdl_cdef) + sdl_cdef = RE_PIXELFORMAT.sub(r"\g = ...", sdl_cdef) + sdl_cdef = RE_SDLK.sub(r"\g = ...", sdl_cdef) + sdl_cdef = RE_NEWLINES.sub("\n", sdl_cdef) + sdl_cdef = RE_PADDING.sub("padding[...];", sdl_cdef) + sdl_cdef = sdl_cdef.replace("typedef unsigned int uintptr_t;", "typedef int... uintptr_t;").replace( + "typedef unsigned int size_t;", "typedef int... size_t;" ) for name in FLEXIBLE_STRUCTS: - sdl2_cdef = sdl2_cdef.replace(f"}} {name};", f"...;}} {name};") - return sdl2_cdef + EXTRA_CDEF + sdl_cdef = sdl_cdef.replace(f"}} {name};", f"...;}} {name};") + return sdl_cdef + EXTRA_CDEF, parser.known_string_defines include_dirs: list[str] = [] @@ -288,33 +352,36 @@ def get_cdef() -> str: if sys.platform == "darwin": - extra_link_args += ["-framework", "SDL2"] + extra_link_args += ["-framework", "SDL3"] else: - libraries += ["SDL2"] + libraries += ["SDL3"] -# Bundle the Windows SDL2 DLL. +# Bundle the Windows SDL DLL. if sys.platform == "win32": - include_dirs.append(str(SDL2_INCLUDE)) + include_dirs.append(str(SDL_INCLUDE)) ARCH_MAPPING = {"32bit": "x86", "64bit": "x64"} - SDL2_LIB_DIR = Path(SDL2_BUNDLE_PATH, "lib/", ARCH_MAPPING[BIT_SIZE]) - library_dirs.append(str(SDL2_LIB_DIR)) - SDL2_LIB_DEST = Path("tcod", ARCH_MAPPING[BIT_SIZE]) - SDL2_LIB_DEST.mkdir(exist_ok=True) - SDL2_LIB_DEST_FILE = SDL2_LIB_DEST / "SDL2.dll" - SDL2_LIB_FILE = SDL2_LIB_DIR / "SDL2.dll" - if not SDL2_LIB_DEST_FILE.exists() or SDL2_LIB_FILE.read_bytes() != SDL2_LIB_DEST_FILE.read_bytes(): - shutil.copy(SDL2_LIB_FILE, SDL2_LIB_DEST_FILE) - -# Link to the SDL2 framework on MacOS. + SDL_LIB_DIR = Path(SDL_BUNDLE_PATH, "lib/", ARCH_MAPPING[BIT_SIZE]) + library_dirs.append(str(SDL_LIB_DIR)) + SDL_LIB_DEST = Path("tcod", ARCH_MAPPING[BIT_SIZE]) + SDL_LIB_DEST.mkdir(exist_ok=True) + SDL_LIB_DEST_FILE = SDL_LIB_DEST / "SDL3.dll" + SDL_LIB_FILE = SDL_LIB_DIR / "SDL3.dll" + if not SDL_LIB_DEST_FILE.exists() or SDL_LIB_FILE.read_bytes() != SDL_LIB_DEST_FILE.read_bytes(): + shutil.copy(SDL_LIB_FILE, SDL_LIB_DEST_FILE) + +# Link to the SDL framework on MacOS. # Delocate will bundle the binaries in a later step. if sys.platform == "darwin": - HEADER_DIR = Path(SDL2_PARSE_PATH, "Headers") - include_dirs.append(HEADER_DIR) - extra_link_args += [f"-F{SDL2_BUNDLE_PATH}/.."] - extra_link_args += ["-rpath", f"{SDL2_BUNDLE_PATH}/.."] + include_dirs.append(SDL_INCLUDE) + extra_link_args += [f"-F{SDL_BUNDLE_PATH}/.."] + extra_link_args += ["-rpath", f"{SDL_BUNDLE_PATH}/.."] extra_link_args += ["-rpath", "/usr/local/opt/llvm/lib/"] -# Use sdl2-config to link to SDL2 on Linux. +# Use sdl-config to link to SDL on Linux. if sys.platform not in ["win32", "darwin"]: - extra_compile_args += subprocess.check_output(["sdl2-config", "--cflags"], universal_newlines=True).strip().split() - extra_link_args += subprocess.check_output(["sdl2-config", "--libs"], universal_newlines=True).strip().split() + extra_compile_args += ( + subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True).strip().split() + ) + extra_link_args += ( + subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split() + ) diff --git a/docs/sdl/joystick.rst b/docs/sdl/joystick.rst index 60c7c26e..397cd1e2 100644 --- a/docs/sdl/joystick.rst +++ b/docs/sdl/joystick.rst @@ -3,9 +3,3 @@ SDL Joystick Support ``tcod.sdl.joystick`` .. automodule:: tcod.sdl.joystick :members: - :exclude-members: - Power - -.. autoclass:: tcod.sdl.joystick.Power - :members: - :member-order: bysource diff --git a/docs/tcod/event.rst b/docs/tcod/event.rst index 10aed249..7f2f059e 100644 --- a/docs/tcod/event.rst +++ b/docs/tcod/event.rst @@ -1,4 +1,4 @@ -SDL2 Event Handling ``tcod.event`` +SDL Event Handling ``tcod.event`` ================================== .. automodule:: tcod.event diff --git a/examples/audio_tone.py b/examples/audio_tone.py index 22f21133..b65bb732 100755 --- a/examples/audio_tone.py +++ b/examples/audio_tone.py @@ -1,17 +1,15 @@ #!/usr/bin/env python -"""Shows how to use tcod.sdl.audio to play a custom-made audio stream. +"""Shows how to use tcod.sdl.audio to play audio. -Opens an audio device using SDL and plays a square wave for 1 second. +Opens an audio device using SDL then plays tones using various methods. """ import math import time -from typing import Any import attrs import numpy as np -from numpy.typing import NDArray -from scipy import signal # type: ignore +from scipy import signal # type: ignore[import-untyped] import tcod.sdl.audio @@ -22,28 +20,56 @@ class PullWave: """Square wave stream generator for an SDL audio device in pull mode.""" + frequency: float time: float = 0.0 - def __call__(self, device: tcod.sdl.audio.AudioDevice, stream: NDArray[Any]) -> None: + def __call__(self, stream: tcod.sdl.audio.AudioStream, request: tcod.sdl.audio.AudioStreamCallbackData) -> None: """Stream a square wave to SDL on demand. This function must run faster than the stream duration. Numpy is used to keep performance within these limits. """ - sample_rate = device.frequency - n_samples = device.buffer_samples - duration = n_samples / sample_rate - print(f"{duration=} {self.time=}") + duration = request.additional_samples / self.frequency - t = np.linspace(self.time, self.time + duration, n_samples, endpoint=False) + t = np.linspace(self.time, self.time + duration, request.additional_samples, endpoint=False) self.time += duration wave = signal.square(t * (math.tau * 440)).astype(np.float32) - wave *= VOLUME - - stream[:] = device.convert(wave) + stream.queue_audio(wave) if __name__ == "__main__": - with tcod.sdl.audio.open(callback=PullWave()) as device: - print(device) - time.sleep(1) + device = tcod.sdl.audio.get_default_playback().open(channels=1, frequency=44100) + print(f"{device.name=}") + device.gain = VOLUME + print(device) + + print("Sawtooth wave queued with AudioStream.queue_audio") + stream = device.new_stream(format=np.float32, channels=1, frequency=44100) + t = np.linspace(0, 1.0, 44100, endpoint=False) + wave = signal.sawtooth(t * (math.tau * 440)).astype(np.float32) + stream.queue_audio(wave) + stream.flush() + while stream.queued_samples: + time.sleep(0.01) + + print("---") + time.sleep(0.5) + + print("Square wave attached to AudioStream.getter_callback") + stream = device.new_stream(format=np.float32, channels=1, frequency=44100) + stream.getter_callback = PullWave(device.frequency) + + time.sleep(1) + stream.getter_callback = None + + print("---") + time.sleep(0.5) + + print("Sawtooth wave played with BasicMixer.play") + mixer = tcod.sdl.audio.BasicMixer(device, frequency=44100, channels=2) + channel = mixer.play(wave) + while channel.busy: + time.sleep(0.01) + + print("---") + device.close() diff --git a/examples/samples_tcod.py b/examples/samples_tcod.py index 6c0e6a1c..7c08906a 100755 --- a/examples/samples_tcod.py +++ b/examples/samples_tcod.py @@ -33,7 +33,6 @@ import tcod.sdl.render import tcod.tileset from tcod import libtcodpy -from tcod.sdl.video import WindowFlags if TYPE_CHECKING: from numpy.typing import NDArray @@ -101,8 +100,8 @@ def ev_keydown(self, event: tcod.event.KeyDown) -> None: elif event.sym == tcod.event.KeySym.RETURN and event.mod & tcod.event.Modifier.ALT: sdl_window = context.sdl_window if sdl_window: - sdl_window.fullscreen = False if sdl_window.fullscreen else WindowFlags.FULLSCREEN_DESKTOP - elif event.sym in (tcod.event.KeySym.PRINTSCREEN, tcod.event.KeySym.p): + sdl_window.fullscreen = not sdl_window.fullscreen + elif event.sym in (tcod.event.KeySym.PRINTSCREEN, tcod.event.KeySym.P): print("screenshot") if event.mod & tcod.event.Modifier.ALT: libtcodpy.console_save_apf(root_console, "samples.apf") @@ -469,27 +468,27 @@ def ev_keydown(self, event: tcod.event.KeyDown) -> None: if tcod.event.KeySym.N9 >= event.sym >= tcod.event.KeySym.N1: self.func = event.sym - tcod.event.KeySym.N1 self.noise = self.get_noise() - elif event.sym == tcod.event.KeySym.e: + elif event.sym == tcod.event.KeySym.E: self.hurst += 0.1 self.noise = self.get_noise() - elif event.sym == tcod.event.KeySym.d: + elif event.sym == tcod.event.KeySym.D: self.hurst -= 0.1 self.noise = self.get_noise() - elif event.sym == tcod.event.KeySym.r: + elif event.sym == tcod.event.KeySym.R: self.lacunarity += 0.5 self.noise = self.get_noise() - elif event.sym == tcod.event.KeySym.f: + elif event.sym == tcod.event.KeySym.F: self.lacunarity -= 0.5 self.noise = self.get_noise() - elif event.sym == tcod.event.KeySym.t: + elif event.sym == tcod.event.KeySym.T: self.octaves += 0.5 self.noise.octaves = self.octaves - elif event.sym == tcod.event.KeySym.g: + elif event.sym == tcod.event.KeySym.G: self.octaves -= 0.5 self.noise.octaves = self.octaves - elif event.sym == tcod.event.KeySym.y: + elif event.sym == tcod.event.KeySym.Y: self.zoom += 0.2 - elif event.sym == tcod.event.KeySym.h: + elif event.sym == tcod.event.KeySym.H: self.zoom -= 0.2 else: super().ev_keydown(event) @@ -648,10 +647,10 @@ def on_draw(self) -> None: def ev_keydown(self, event: tcod.event.KeyDown) -> None: MOVE_KEYS = { # noqa: N806 - tcod.event.KeySym.i: (0, -1), - tcod.event.KeySym.j: (-1, 0), - tcod.event.KeySym.k: (0, 1), - tcod.event.KeySym.l: (1, 0), + tcod.event.KeySym.I: (0, -1), + tcod.event.KeySym.J: (-1, 0), + tcod.event.KeySym.K: (0, 1), + tcod.event.KeySym.L: (1, 0), } FOV_SELECT_KEYS = { # noqa: N806 tcod.event.KeySym.MINUS: -1, @@ -664,9 +663,9 @@ def ev_keydown(self, event: tcod.event.KeyDown) -> None: if self.walkable[self.player_x + x, self.player_y + y]: self.player_x += x self.player_y += y - elif event.sym == tcod.event.KeySym.t: + elif event.sym == tcod.event.KeySym.T: self.torch = not self.torch - elif event.sym == tcod.event.KeySym.w: + elif event.sym == tcod.event.KeySym.W: self.light_walls = not self.light_walls elif event.sym in FOV_SELECT_KEYS: self.algo_num += FOV_SELECT_KEYS[event.sym] @@ -740,13 +739,13 @@ def on_draw(self) -> None: def ev_keydown(self, event: tcod.event.KeyDown) -> None: """Handle movement and UI.""" - if event.sym == tcod.event.KeySym.i and self.dest_y > 0: # destination move north + if event.sym == tcod.event.KeySym.I and self.dest_y > 0: # destination move north self.dest_y -= 1 - elif event.sym == tcod.event.KeySym.k and self.dest_y < SAMPLE_SCREEN_HEIGHT - 1: # destination move south + elif event.sym == tcod.event.KeySym.K and self.dest_y < SAMPLE_SCREEN_HEIGHT - 1: # destination move south self.dest_y += 1 - elif event.sym == tcod.event.KeySym.j and self.dest_x > 0: # destination move west + elif event.sym == tcod.event.KeySym.J and self.dest_x > 0: # destination move west self.dest_x -= 1 - elif event.sym == tcod.event.KeySym.l and self.dest_x < SAMPLE_SCREEN_WIDTH - 1: # destination move east + elif event.sym == tcod.event.KeySym.L and self.dest_x < SAMPLE_SCREEN_WIDTH - 1: # destination move east self.dest_x += 1 elif event.sym == tcod.event.KeySym.TAB: self.using_astar = not self.using_astar @@ -758,8 +757,8 @@ def ev_mousemotion(self, event: tcod.event.MouseMotion) -> None: mx = event.tile.x - SAMPLE_SCREEN_X my = event.tile.y - SAMPLE_SCREEN_Y if 0 <= mx < SAMPLE_SCREEN_WIDTH and 0 <= my < SAMPLE_SCREEN_HEIGHT: - self.dest_x = mx - self.dest_y = my + self.dest_x = int(mx) + self.dest_y = int(my) ############################################# @@ -1029,9 +1028,9 @@ def on_draw(self) -> None: sample_console.print( 1, 1, - f"Pixel position : {self.motion.position.x:4d}x{self.motion.position.y:4d}\n" - f"Tile position : {self.motion.tile.x:4d}x{self.motion.tile.y:4d}\n" - f"Tile movement : {self.motion.tile_motion.x:4d}x{self.motion.tile_motion.y:4d}\n" + f"Pixel position : {self.motion.position.x:4.0f}x{self.motion.position.y:4.0f}\n" + f"Tile position : {self.motion.tile.x:4.0f}x{self.motion.tile.y:4.0f}\n" + f"Tile movement : {self.motion.tile_motion.x:4.0f}x{self.motion.tile_motion.y:4.0f}\n" f"Left button : {'ON' if self.mouse_left else 'OFF'}\n" f"Right button : {'ON' if self.mouse_right else 'OFF'}\n" f"Middle button : {'ON' if self.mouse_middle else 'OFF'}\n", @@ -1209,7 +1208,7 @@ def on_draw(self) -> None: # new pixels are based on absolute elapsed time int_abs_t = int(self.abs_t) - texture = np.roll(texture, -int_t, 1) # type: ignore[assignment] + texture = np.roll(texture, -int_t, 1) # replace new stretch of texture with new values for v in range(RES_V - int_t, RES_V): for u in range(RES_U): @@ -1334,9 +1333,9 @@ def init_context(renderer: int) -> None: ) if context.sdl_renderer: # If this context supports SDL rendering. # Start by setting the logical size so that window resizing doesn't break anything. - context.sdl_renderer.logical_size = ( - tileset.tile_width * root_console.width, - tileset.tile_height * root_console.height, + context.sdl_renderer.set_logical_presentation( + resolution=(tileset.tile_width * root_console.width, tileset.tile_height * root_console.height), + mode=tcod.sdl.render.LogicalPresentation.STRETCH, ) assert context.sdl_atlas # Generate the console renderer and minimap. diff --git a/examples/sdl-hello-world.py b/examples/sdl-hello-world.py index 67b0fa01..02017f12 100644 --- a/examples/sdl-hello-world.py +++ b/examples/sdl-hello-world.py @@ -31,7 +31,7 @@ def main() -> None: """Show hello world until the window is closed.""" # Open an SDL window and renderer. window = tcod.sdl.video.new_window(720, 480, flags=tcod.sdl.video.WindowFlags.RESIZABLE) - renderer = tcod.sdl.render.new_renderer(window, target_textures=True) + renderer = tcod.sdl.render.new_renderer(window) # Render the text once, then reuse the texture. hello_world = render_text(renderer, "Hello World") hello_world.color_mod = (64, 255, 64) # Set the color when copied. diff --git a/libtcod b/libtcod index 747b2e9d..ffa44720 160000 --- a/libtcod +++ b/libtcod @@ -1 +1 @@ -Subproject commit 747b2e9db06fca0f1281ba0ca6de173fbcb32eec +Subproject commit ffa447202e9b354691386e91f1288fd69dc1eaba diff --git a/pyproject.toml b/pyproject.toml index eac81af3..27a3dc16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ requires = [ "pycparser>=2.14", "pcpp==1.30", "requests>=2.28.1", + "attrs", ] build-backend = "setuptools.build_meta" @@ -116,6 +117,8 @@ warn_unused_ignores = true warn_return_any = true implicit_reexport = false strict_equality = true +strict_bytes = true +extra_checks = true exclude = [ "build/", "venv/", diff --git a/setup.py b/setup.py index a98b64b3..6a835e5b 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ # ruff: noqa: T201 -SDL_VERSION_NEEDED = (2, 0, 5) +SDL_VERSION_NEEDED = (3, 2, 0) SETUP_DIR = Path(__file__).parent # setup.py current directory @@ -28,11 +28,11 @@ def get_package_data() -> list[str]: ] if "win32" in sys.platform: if bit_size == "32bit": - files += ["x86/SDL2.dll"] + files += ["x86/SDL3.dll"] else: - files += ["x64/SDL2.dll"] + files += ["x64/SDL3.dll"] if sys.platform == "darwin": - files += ["SDL2.framework/Versions/A/SDL2"] + files += ["SDL3.framework/Versions/A/SDL3"] return files @@ -42,13 +42,19 @@ def check_sdl_version() -> None: return needed_version = "{}.{}.{}".format(*SDL_VERSION_NEEDED) try: - sdl_version_str = subprocess.check_output(["sdl2-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607 - except FileNotFoundError as exc: - msg = ( - f"libsdl2-dev or equivalent must be installed on your system and must be at least version {needed_version}." - "\nsdl2-config must be on PATH." - ) - raise RuntimeError(msg) from exc + sdl_version_str = subprocess.check_output( + ["pkg-config", "sdl3", "--modversion"], # noqa: S607 + universal_newlines=True, + ).strip() + except FileNotFoundError: + try: + sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607 + except FileNotFoundError as exc: + msg = ( + f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}." + "\nsdl3-config must be on PATH." + ) + raise RuntimeError(msg) from exc print(f"Found SDL {sdl_version_str}.") sdl_version = tuple(int(s) for s in sdl_version_str.split(".")) if sdl_version < SDL_VERSION_NEEDED: diff --git a/tcod/_libtcod.pyi b/tcod/_libtcod.pyi new file mode 100644 index 00000000..4b8ed0fe --- /dev/null +++ b/tcod/_libtcod.pyi @@ -0,0 +1,9729 @@ +# Autogenerated with build_libtcod.py +from typing import Any, Final, Literal + +# pyi files for CFFI ports are not standard +# ruff: noqa: A002, ANN401, D402, D403, D415, N801, N802, N803, N815, PLW0211, PYI021 + +class _lib: + @staticmethod + def NoiseGetSample(noise: Any, xyzw: Any, /) -> float: + """float NoiseGetSample(TDLNoise *noise, float *xyzw)""" + + @staticmethod + def NoiseSampleMeshGrid(noise: Any, len: Any, in_: Any, out: Any, /) -> None: + """void NoiseSampleMeshGrid(TDLNoise *noise, const long len, const float *in, float *out)""" + + @staticmethod + def NoiseSampleOpenMeshGrid(noise: Any, ndim: int, shape: Any, ogrid_in: Any, out: Any, /) -> None: + """void NoiseSampleOpenMeshGrid(TDLNoise *noise, const int ndim, const long *shape, const float **ogrid_in, float *out)""" + + @staticmethod + def PathCostArrayFloat32(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayFloat32(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def PathCostArrayInt16(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayInt16(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def PathCostArrayInt32(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayInt32(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def PathCostArrayInt8(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayInt8(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def PathCostArrayUInt16(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayUInt16(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def PathCostArrayUInt32(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayUInt32(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def PathCostArrayUInt8(x1: int, y1: int, x2: int, y2: int, map: Any, /) -> float: + """float PathCostArrayUInt8(int x1, int y1, int x2, int y2, const struct PathCostArray *map)""" + + @staticmethod + def SDL_AcquireCameraFrame(camera: Any, timestampNS: Any, /) -> Any: + """SDL_Surface *SDL_AcquireCameraFrame(SDL_Camera *camera, Uint64 *timestampNS)""" + + @staticmethod + def SDL_AcquireGPUCommandBuffer(device: Any, /) -> Any: + """SDL_GPUCommandBuffer *SDL_AcquireGPUCommandBuffer(SDL_GPUDevice *device)""" + + @staticmethod + def SDL_AcquireGPUSwapchainTexture( + command_buffer: Any, + window: Any, + swapchain_texture: Any, + swapchain_texture_width: Any, + swapchain_texture_height: Any, + /, + ) -> bool: + """bool SDL_AcquireGPUSwapchainTexture(SDL_GPUCommandBuffer *command_buffer, SDL_Window *window, SDL_GPUTexture **swapchain_texture, Uint32 *swapchain_texture_width, Uint32 *swapchain_texture_height)""" + + @staticmethod + def SDL_AddAtomicInt(a: Any, v: int, /) -> int: + """int SDL_AddAtomicInt(SDL_AtomicInt *a, int v)""" + + @staticmethod + def SDL_AddEventWatch(filter: Any, userdata: Any, /) -> bool: + """bool SDL_AddEventWatch(SDL_EventFilter filter, void *userdata)""" + + @staticmethod + def SDL_AddGamepadMapping(mapping: Any, /) -> int: + """int SDL_AddGamepadMapping(const char *mapping)""" + + @staticmethod + def SDL_AddGamepadMappingsFromFile(file: Any, /) -> int: + """int SDL_AddGamepadMappingsFromFile(const char *file)""" + + @staticmethod + def SDL_AddGamepadMappingsFromIO(src: Any, closeio: bool, /) -> int: + """int SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, bool closeio)""" + + @staticmethod + def SDL_AddHintCallback(name: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)""" + + @staticmethod + def SDL_AddSurfaceAlternateImage(surface: Any, image: Any, /) -> bool: + """bool SDL_AddSurfaceAlternateImage(SDL_Surface *surface, SDL_Surface *image)""" + + @staticmethod + def SDL_AddTimer(interval: Any, callback: Any, userdata: Any, /) -> Any: + """SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *userdata)""" + + @staticmethod + def SDL_AddTimerNS(interval: Any, callback: Any, userdata: Any, /) -> Any: + """SDL_TimerID SDL_AddTimerNS(Uint64 interval, SDL_NSTimerCallback callback, void *userdata)""" + + @staticmethod + def SDL_AddVulkanRenderSemaphores( + renderer: Any, wait_stage_mask: Any, wait_semaphore: Any, signal_semaphore: Any, / + ) -> bool: + """bool SDL_AddVulkanRenderSemaphores(SDL_Renderer *renderer, Uint32 wait_stage_mask, Sint64 wait_semaphore, Sint64 signal_semaphore)""" + + @staticmethod + def SDL_AsyncIOFromFile(file: Any, mode: Any, /) -> Any: + """SDL_AsyncIO *SDL_AsyncIOFromFile(const char *file, const char *mode)""" + + @staticmethod + def SDL_AttachVirtualJoystick(desc: Any, /) -> Any: + """SDL_JoystickID SDL_AttachVirtualJoystick(const SDL_VirtualJoystickDesc *desc)""" + + @staticmethod + def SDL_AudioDevicePaused(devid: Any, /) -> bool: + """bool SDL_AudioDevicePaused(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_AudioStreamDevicePaused(stream: Any, /) -> bool: + """bool SDL_AudioStreamDevicePaused(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_BeginGPUComputePass( + command_buffer: Any, + storage_texture_bindings: Any, + num_storage_texture_bindings: Any, + storage_buffer_bindings: Any, + num_storage_buffer_bindings: Any, + /, + ) -> Any: + """SDL_GPUComputePass *SDL_BeginGPUComputePass(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUStorageTextureReadWriteBinding *storage_texture_bindings, Uint32 num_storage_texture_bindings, const SDL_GPUStorageBufferReadWriteBinding *storage_buffer_bindings, Uint32 num_storage_buffer_bindings)""" + + @staticmethod + def SDL_BeginGPUCopyPass(command_buffer: Any, /) -> Any: + """SDL_GPUCopyPass *SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer *command_buffer)""" + + @staticmethod + def SDL_BeginGPURenderPass( + command_buffer: Any, color_target_infos: Any, num_color_targets: Any, depth_stencil_target_info: Any, / + ) -> Any: + """SDL_GPURenderPass *SDL_BeginGPURenderPass(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUColorTargetInfo *color_target_infos, Uint32 num_color_targets, const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info)""" + + @staticmethod + def SDL_BindAudioStream(devid: Any, stream: Any, /) -> bool: + """bool SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream *stream)""" + + @staticmethod + def SDL_BindAudioStreams(devid: Any, streams: Any, num_streams: int, /) -> bool: + """bool SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream * const *streams, int num_streams)""" + + @staticmethod + def SDL_BindGPUComputePipeline(compute_pass: Any, compute_pipeline: Any, /) -> None: + """void SDL_BindGPUComputePipeline(SDL_GPUComputePass *compute_pass, SDL_GPUComputePipeline *compute_pipeline)""" + + @staticmethod + def SDL_BindGPUComputeSamplers( + compute_pass: Any, first_slot: Any, texture_sampler_bindings: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUComputeSamplers(SDL_GPUComputePass *compute_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUComputeStorageBuffers( + compute_pass: Any, first_slot: Any, storage_buffers: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUComputeStorageBuffers(SDL_GPUComputePass *compute_pass, Uint32 first_slot, SDL_GPUBuffer * const *storage_buffers, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUComputeStorageTextures( + compute_pass: Any, first_slot: Any, storage_textures: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUComputeStorageTextures(SDL_GPUComputePass *compute_pass, Uint32 first_slot, SDL_GPUTexture * const *storage_textures, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUFragmentSamplers( + render_pass: Any, first_slot: Any, texture_sampler_bindings: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUFragmentSamplers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUFragmentStorageBuffers( + render_pass: Any, first_slot: Any, storage_buffers: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUFragmentStorageBuffers(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUBuffer * const *storage_buffers, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUFragmentStorageTextures( + render_pass: Any, first_slot: Any, storage_textures: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUFragmentStorageTextures(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUTexture * const *storage_textures, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUGraphicsPipeline(render_pass: Any, graphics_pipeline: Any, /) -> None: + """void SDL_BindGPUGraphicsPipeline(SDL_GPURenderPass *render_pass, SDL_GPUGraphicsPipeline *graphics_pipeline)""" + + @staticmethod + def SDL_BindGPUIndexBuffer(render_pass: Any, binding: Any, index_element_size: Any, /) -> None: + """void SDL_BindGPUIndexBuffer(SDL_GPURenderPass *render_pass, const SDL_GPUBufferBinding *binding, SDL_GPUIndexElementSize index_element_size)""" + + @staticmethod + def SDL_BindGPUVertexBuffers(render_pass: Any, first_slot: Any, bindings: Any, num_bindings: Any, /) -> None: + """void SDL_BindGPUVertexBuffers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUBufferBinding *bindings, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUVertexSamplers( + render_pass: Any, first_slot: Any, texture_sampler_bindings: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUVertexSamplers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUVertexStorageBuffers( + render_pass: Any, first_slot: Any, storage_buffers: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUVertexStorageBuffers(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUBuffer * const *storage_buffers, Uint32 num_bindings)""" + + @staticmethod + def SDL_BindGPUVertexStorageTextures( + render_pass: Any, first_slot: Any, storage_textures: Any, num_bindings: Any, / + ) -> None: + """void SDL_BindGPUVertexStorageTextures(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUTexture * const *storage_textures, Uint32 num_bindings)""" + + @staticmethod + def SDL_BlitGPUTexture(command_buffer: Any, info: Any, /) -> None: + """void SDL_BlitGPUTexture(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUBlitInfo *info)""" + + @staticmethod + def SDL_BlitSurface(src: Any, srcrect: Any, dst: Any, dstrect: Any, /) -> bool: + """bool SDL_BlitSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect)""" + + @staticmethod + def SDL_BlitSurface9Grid( + src: Any, + srcrect: Any, + left_width: int, + right_width: int, + top_height: int, + bottom_height: int, + scale: float, + scaleMode: Any, + dst: Any, + dstrect: Any, + /, + ) -> bool: + """bool SDL_BlitSurface9Grid(SDL_Surface *src, const SDL_Rect *srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface *dst, const SDL_Rect *dstrect)""" + + @staticmethod + def SDL_BlitSurfaceScaled(src: Any, srcrect: Any, dst: Any, dstrect: Any, scaleMode: Any, /) -> bool: + """bool SDL_BlitSurfaceScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode)""" + + @staticmethod + def SDL_BlitSurfaceTiled(src: Any, srcrect: Any, dst: Any, dstrect: Any, /) -> bool: + """bool SDL_BlitSurfaceTiled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect)""" + + @staticmethod + def SDL_BlitSurfaceTiledWithScale( + src: Any, srcrect: Any, scale: float, scaleMode: Any, dst: Any, dstrect: Any, / + ) -> bool: + """bool SDL_BlitSurfaceTiledWithScale(SDL_Surface *src, const SDL_Rect *srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface *dst, const SDL_Rect *dstrect)""" + + @staticmethod + def SDL_BlitSurfaceUnchecked(src: Any, srcrect: Any, dst: Any, dstrect: Any, /) -> bool: + """bool SDL_BlitSurfaceUnchecked(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect)""" + + @staticmethod + def SDL_BlitSurfaceUncheckedScaled(src: Any, srcrect: Any, dst: Any, dstrect: Any, scaleMode: Any, /) -> bool: + """bool SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode)""" + + @staticmethod + def SDL_BroadcastCondition(cond: Any, /) -> None: + """void SDL_BroadcastCondition(SDL_Condition *cond)""" + + @staticmethod + def SDL_CalculateGPUTextureFormatSize(format: Any, width: Any, height: Any, depth_or_layer_count: Any, /) -> Any: + """Uint32 SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count)""" + + @staticmethod + def SDL_CancelGPUCommandBuffer(command_buffer: Any, /) -> bool: + """bool SDL_CancelGPUCommandBuffer(SDL_GPUCommandBuffer *command_buffer)""" + + @staticmethod + def SDL_CaptureMouse(enabled: bool, /) -> bool: + """bool SDL_CaptureMouse(bool enabled)""" + + @staticmethod + def SDL_ClaimWindowForGPUDevice(device: Any, window: Any, /) -> bool: + """bool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice *device, SDL_Window *window)""" + + @staticmethod + def SDL_CleanupTLS() -> None: + """void SDL_CleanupTLS(void)""" + + @staticmethod + def SDL_ClearAudioStream(stream: Any, /) -> bool: + """bool SDL_ClearAudioStream(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_ClearClipboardData() -> bool: + """bool SDL_ClearClipboardData(void)""" + + @staticmethod + def SDL_ClearComposition(window: Any, /) -> bool: + """bool SDL_ClearComposition(SDL_Window *window)""" + + @staticmethod + def SDL_ClearError() -> bool: + """bool SDL_ClearError(void)""" + + @staticmethod + def SDL_ClearProperty(props: Any, name: Any, /) -> bool: + """bool SDL_ClearProperty(SDL_PropertiesID props, const char *name)""" + + @staticmethod + def SDL_ClearSurface(surface: Any, r: float, g: float, b: float, a: float, /) -> bool: + """bool SDL_ClearSurface(SDL_Surface *surface, float r, float g, float b, float a)""" + + @staticmethod + def SDL_ClickTrayEntry(entry: Any, /) -> None: + """void SDL_ClickTrayEntry(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_CloseAsyncIO(asyncio: Any, flush: bool, queue: Any, userdata: Any, /) -> bool: + """bool SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flush, SDL_AsyncIOQueue *queue, void *userdata)""" + + @staticmethod + def SDL_CloseAudioDevice(devid: Any, /) -> None: + """void SDL_CloseAudioDevice(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_CloseCamera(camera: Any, /) -> None: + """void SDL_CloseCamera(SDL_Camera *camera)""" + + @staticmethod + def SDL_CloseGamepad(gamepad: Any, /) -> None: + """void SDL_CloseGamepad(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_CloseHaptic(haptic: Any, /) -> None: + """void SDL_CloseHaptic(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_CloseIO(context: Any, /) -> bool: + """bool SDL_CloseIO(SDL_IOStream *context)""" + + @staticmethod + def SDL_CloseJoystick(joystick: Any, /) -> None: + """void SDL_CloseJoystick(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_CloseSensor(sensor: Any, /) -> None: + """void SDL_CloseSensor(SDL_Sensor *sensor)""" + + @staticmethod + def SDL_CloseStorage(storage: Any, /) -> bool: + """bool SDL_CloseStorage(SDL_Storage *storage)""" + + @staticmethod + def SDL_CompareAndSwapAtomicInt(a: Any, oldval: int, newval: int, /) -> bool: + """bool SDL_CompareAndSwapAtomicInt(SDL_AtomicInt *a, int oldval, int newval)""" + + @staticmethod + def SDL_CompareAndSwapAtomicPointer(a: Any, oldval: Any, newval: Any, /) -> bool: + """bool SDL_CompareAndSwapAtomicPointer(void **a, void *oldval, void *newval)""" + + @staticmethod + def SDL_CompareAndSwapAtomicU32(a: Any, oldval: Any, newval: Any, /) -> bool: + """bool SDL_CompareAndSwapAtomicU32(SDL_AtomicU32 *a, Uint32 oldval, Uint32 newval)""" + + @staticmethod + def SDL_ComposeCustomBlendMode( + srcColorFactor: Any, + dstColorFactor: Any, + colorOperation: Any, + srcAlphaFactor: Any, + dstAlphaFactor: Any, + alphaOperation: Any, + /, + ) -> Any: + """SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation)""" + + @staticmethod + def SDL_ConvertAudioSamples( + src_spec: Any, src_data: Any, src_len: int, dst_spec: Any, dst_data: Any, dst_len: Any, / + ) -> bool: + """bool SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data, int src_len, const SDL_AudioSpec *dst_spec, Uint8 **dst_data, int *dst_len)""" + + @staticmethod + def SDL_ConvertEventToRenderCoordinates(renderer: Any, event: Any, /) -> bool: + """bool SDL_ConvertEventToRenderCoordinates(SDL_Renderer *renderer, SDL_Event *event)""" + + @staticmethod + def SDL_ConvertPixels( + width: int, height: int, src_format: Any, src: Any, src_pitch: int, dst_format: Any, dst: Any, dst_pitch: int, / + ) -> bool: + """bool SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch)""" + + @staticmethod + def SDL_ConvertPixelsAndColorspace( + width: int, + height: int, + src_format: Any, + src_colorspace: Any, + src_properties: Any, + src: Any, + src_pitch: int, + dst_format: Any, + dst_colorspace: Any, + dst_properties: Any, + dst: Any, + dst_pitch: int, + /, + ) -> bool: + """bool SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, const void *src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, void *dst, int dst_pitch)""" + + @staticmethod + def SDL_ConvertSurface(surface: Any, format: Any, /) -> Any: + """SDL_Surface *SDL_ConvertSurface(SDL_Surface *surface, SDL_PixelFormat format)""" + + @staticmethod + def SDL_ConvertSurfaceAndColorspace(surface: Any, format: Any, palette: Any, colorspace: Any, props: Any, /) -> Any: + """SDL_Surface *SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelFormat format, SDL_Palette *palette, SDL_Colorspace colorspace, SDL_PropertiesID props)""" + + @staticmethod + def SDL_CopyFile(oldpath: Any, newpath: Any, /) -> bool: + """bool SDL_CopyFile(const char *oldpath, const char *newpath)""" + + @staticmethod + def SDL_CopyGPUBufferToBuffer(copy_pass: Any, source: Any, destination: Any, size: Any, cycle: bool, /) -> None: + """void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass *copy_pass, const SDL_GPUBufferLocation *source, const SDL_GPUBufferLocation *destination, Uint32 size, bool cycle)""" + + @staticmethod + def SDL_CopyGPUTextureToTexture( + copy_pass: Any, source: Any, destination: Any, w: Any, h: Any, d: Any, cycle: bool, / + ) -> None: + """void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureLocation *source, const SDL_GPUTextureLocation *destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)""" + + @staticmethod + def SDL_CopyProperties(src: Any, dst: Any, /) -> bool: + """bool SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst)""" + + @staticmethod + def SDL_CopyStorageFile(storage: Any, oldpath: Any, newpath: Any, /) -> bool: + """bool SDL_CopyStorageFile(SDL_Storage *storage, const char *oldpath, const char *newpath)""" + + @staticmethod + def SDL_CreateAsyncIOQueue() -> Any: + """SDL_AsyncIOQueue *SDL_CreateAsyncIOQueue(void)""" + + @staticmethod + def SDL_CreateAudioStream(src_spec: Any, dst_spec: Any, /) -> Any: + """SDL_AudioStream *SDL_CreateAudioStream(const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec)""" + + @staticmethod + def SDL_CreateColorCursor(surface: Any, hot_x: int, hot_y: int, /) -> Any: + """SDL_Cursor *SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)""" + + @staticmethod + def SDL_CreateCondition() -> Any: + """SDL_Condition *SDL_CreateCondition(void)""" + + @staticmethod + def SDL_CreateCursor(data: Any, mask: Any, w: int, h: int, hot_x: int, hot_y: int, /) -> Any: + """SDL_Cursor *SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y)""" + + @staticmethod + def SDL_CreateDirectory(path: Any, /) -> bool: + """bool SDL_CreateDirectory(const char *path)""" + + @staticmethod + def SDL_CreateEnvironment(populated: bool, /) -> Any: + """SDL_Environment *SDL_CreateEnvironment(bool populated)""" + + @staticmethod + def SDL_CreateGPUBuffer(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUBuffer *SDL_CreateGPUBuffer(SDL_GPUDevice *device, const SDL_GPUBufferCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateGPUComputePipeline(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUComputePipeline *SDL_CreateGPUComputePipeline(SDL_GPUDevice *device, const SDL_GPUComputePipelineCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateGPUDevice(format_flags: Any, debug_mode: bool, name: Any, /) -> Any: + """SDL_GPUDevice *SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, bool debug_mode, const char *name)""" + + @staticmethod + def SDL_CreateGPUDeviceWithProperties(props: Any, /) -> Any: + """SDL_GPUDevice *SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_CreateGPUGraphicsPipeline(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUGraphicsPipeline *SDL_CreateGPUGraphicsPipeline(SDL_GPUDevice *device, const SDL_GPUGraphicsPipelineCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateGPUSampler(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUSampler *SDL_CreateGPUSampler(SDL_GPUDevice *device, const SDL_GPUSamplerCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateGPUShader(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUShader *SDL_CreateGPUShader(SDL_GPUDevice *device, const SDL_GPUShaderCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateGPUTexture(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUTexture *SDL_CreateGPUTexture(SDL_GPUDevice *device, const SDL_GPUTextureCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateGPUTransferBuffer(device: Any, createinfo: Any, /) -> Any: + """SDL_GPUTransferBuffer *SDL_CreateGPUTransferBuffer(SDL_GPUDevice *device, const SDL_GPUTransferBufferCreateInfo *createinfo)""" + + @staticmethod + def SDL_CreateHapticEffect(haptic: Any, effect: Any, /) -> int: + """int SDL_CreateHapticEffect(SDL_Haptic *haptic, const SDL_HapticEffect *effect)""" + + @staticmethod + def SDL_CreateMutex() -> Any: + """SDL_Mutex *SDL_CreateMutex(void)""" + + @staticmethod + def SDL_CreatePalette(ncolors: int, /) -> Any: + """SDL_Palette *SDL_CreatePalette(int ncolors)""" + + @staticmethod + def SDL_CreatePopupWindow(parent: Any, offset_x: int, offset_y: int, w: int, h: int, flags: Any, /) -> Any: + """SDL_Window *SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y, int w, int h, SDL_WindowFlags flags)""" + + @staticmethod + def SDL_CreateProcess(args: Any, pipe_stdio: bool, /) -> Any: + """SDL_Process *SDL_CreateProcess(const char * const *args, bool pipe_stdio)""" + + @staticmethod + def SDL_CreateProcessWithProperties(props: Any, /) -> Any: + """SDL_Process *SDL_CreateProcessWithProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_CreateProperties() -> Any: + """SDL_PropertiesID SDL_CreateProperties(void)""" + + @staticmethod + def SDL_CreateRWLock() -> Any: + """SDL_RWLock *SDL_CreateRWLock(void)""" + + @staticmethod + def SDL_CreateRenderer(window: Any, name: Any, /) -> Any: + """SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, const char *name)""" + + @staticmethod + def SDL_CreateRendererWithProperties(props: Any, /) -> Any: + """SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_CreateSemaphore(initial_value: Any, /) -> Any: + """SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)""" + + @staticmethod + def SDL_CreateSoftwareRenderer(surface: Any, /) -> Any: + """SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface)""" + + @staticmethod + def SDL_CreateStorageDirectory(storage: Any, path: Any, /) -> bool: + """bool SDL_CreateStorageDirectory(SDL_Storage *storage, const char *path)""" + + @staticmethod + def SDL_CreateSurface(width: int, height: int, format: Any, /) -> Any: + """SDL_Surface *SDL_CreateSurface(int width, int height, SDL_PixelFormat format)""" + + @staticmethod + def SDL_CreateSurfaceFrom(width: int, height: int, format: Any, pixels: Any, pitch: int, /) -> Any: + """SDL_Surface *SDL_CreateSurfaceFrom(int width, int height, SDL_PixelFormat format, void *pixels, int pitch)""" + + @staticmethod + def SDL_CreateSurfacePalette(surface: Any, /) -> Any: + """SDL_Palette *SDL_CreateSurfacePalette(SDL_Surface *surface)""" + + @staticmethod + def SDL_CreateSystemCursor(id: Any, /) -> Any: + """SDL_Cursor *SDL_CreateSystemCursor(SDL_SystemCursor id)""" + + @staticmethod + def SDL_CreateTexture(renderer: Any, format: Any, access: Any, w: int, h: int, /) -> Any: + """SDL_Texture *SDL_CreateTexture(SDL_Renderer *renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h)""" + + @staticmethod + def SDL_CreateTextureFromSurface(renderer: Any, surface: Any, /) -> Any: + """SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)""" + + @staticmethod + def SDL_CreateTextureWithProperties(renderer: Any, props: Any, /) -> Any: + """SDL_Texture *SDL_CreateTextureWithProperties(SDL_Renderer *renderer, SDL_PropertiesID props)""" + + @staticmethod + def SDL_CreateThreadRuntime(fn: Any, name: Any, data: Any, pfnBeginThread: Any, pfnEndThread: Any, /) -> Any: + """SDL_Thread *SDL_CreateThreadRuntime(SDL_ThreadFunction fn, const char *name, void *data, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread)""" + + @staticmethod + def SDL_CreateThreadWithPropertiesRuntime(props: Any, pfnBeginThread: Any, pfnEndThread: Any, /) -> Any: + """SDL_Thread *SDL_CreateThreadWithPropertiesRuntime(SDL_PropertiesID props, SDL_FunctionPointer pfnBeginThread, SDL_FunctionPointer pfnEndThread)""" + + @staticmethod + def SDL_CreateTray(icon: Any, tooltip: Any, /) -> Any: + """SDL_Tray *SDL_CreateTray(SDL_Surface *icon, const char *tooltip)""" + + @staticmethod + def SDL_CreateTrayMenu(tray: Any, /) -> Any: + """SDL_TrayMenu *SDL_CreateTrayMenu(SDL_Tray *tray)""" + + @staticmethod + def SDL_CreateTraySubmenu(entry: Any, /) -> Any: + """SDL_TrayMenu *SDL_CreateTraySubmenu(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_CreateWindow(title: Any, w: int, h: int, flags: Any, /) -> Any: + """SDL_Window *SDL_CreateWindow(const char *title, int w, int h, SDL_WindowFlags flags)""" + + @staticmethod + def SDL_CreateWindowAndRenderer( + title: Any, width: int, height: int, window_flags: Any, window: Any, renderer: Any, / + ) -> bool: + """bool SDL_CreateWindowAndRenderer(const char *title, int width, int height, SDL_WindowFlags window_flags, SDL_Window **window, SDL_Renderer **renderer)""" + + @staticmethod + def SDL_CreateWindowWithProperties(props: Any, /) -> Any: + """SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_CursorVisible() -> bool: + """bool SDL_CursorVisible(void)""" + + @staticmethod + def SDL_DateTimeToTime(dt: Any, ticks: Any, /) -> bool: + """bool SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks)""" + + @staticmethod + def SDL_Delay(ms: Any, /) -> None: + """void SDL_Delay(Uint32 ms)""" + + @staticmethod + def SDL_DelayNS(ns: Any, /) -> None: + """void SDL_DelayNS(Uint64 ns)""" + + @staticmethod + def SDL_DelayPrecise(ns: Any, /) -> None: + """void SDL_DelayPrecise(Uint64 ns)""" + + @staticmethod + def SDL_DestroyAsyncIOQueue(queue: Any, /) -> None: + """void SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue)""" + + @staticmethod + def SDL_DestroyAudioStream(stream: Any, /) -> None: + """void SDL_DestroyAudioStream(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_DestroyCondition(cond: Any, /) -> None: + """void SDL_DestroyCondition(SDL_Condition *cond)""" + + @staticmethod + def SDL_DestroyCursor(cursor: Any, /) -> None: + """void SDL_DestroyCursor(SDL_Cursor *cursor)""" + + @staticmethod + def SDL_DestroyEnvironment(env: Any, /) -> None: + """void SDL_DestroyEnvironment(SDL_Environment *env)""" + + @staticmethod + def SDL_DestroyGPUDevice(device: Any, /) -> None: + """void SDL_DestroyGPUDevice(SDL_GPUDevice *device)""" + + @staticmethod + def SDL_DestroyHapticEffect(haptic: Any, effect: int, /) -> None: + """void SDL_DestroyHapticEffect(SDL_Haptic *haptic, int effect)""" + + @staticmethod + def SDL_DestroyMutex(mutex: Any, /) -> None: + """void SDL_DestroyMutex(SDL_Mutex *mutex)""" + + @staticmethod + def SDL_DestroyPalette(palette: Any, /) -> None: + """void SDL_DestroyPalette(SDL_Palette *palette)""" + + @staticmethod + def SDL_DestroyProcess(process: Any, /) -> None: + """void SDL_DestroyProcess(SDL_Process *process)""" + + @staticmethod + def SDL_DestroyProperties(props: Any, /) -> None: + """void SDL_DestroyProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_DestroyRWLock(rwlock: Any, /) -> None: + """void SDL_DestroyRWLock(SDL_RWLock *rwlock)""" + + @staticmethod + def SDL_DestroyRenderer(renderer: Any, /) -> None: + """void SDL_DestroyRenderer(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_DestroySemaphore(sem: Any, /) -> None: + """void SDL_DestroySemaphore(SDL_Semaphore *sem)""" + + @staticmethod + def SDL_DestroySurface(surface: Any, /) -> None: + """void SDL_DestroySurface(SDL_Surface *surface)""" + + @staticmethod + def SDL_DestroyTexture(texture: Any, /) -> None: + """void SDL_DestroyTexture(SDL_Texture *texture)""" + + @staticmethod + def SDL_DestroyTray(tray: Any, /) -> None: + """void SDL_DestroyTray(SDL_Tray *tray)""" + + @staticmethod + def SDL_DestroyWindow(window: Any, /) -> None: + """void SDL_DestroyWindow(SDL_Window *window)""" + + @staticmethod + def SDL_DestroyWindowSurface(window: Any, /) -> bool: + """bool SDL_DestroyWindowSurface(SDL_Window *window)""" + + @staticmethod + def SDL_DetachThread(thread: Any, /) -> None: + """void SDL_DetachThread(SDL_Thread *thread)""" + + @staticmethod + def SDL_DetachVirtualJoystick(instance_id: Any, /) -> bool: + """bool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_DisableScreenSaver() -> bool: + """bool SDL_DisableScreenSaver(void)""" + + @staticmethod + def SDL_DispatchGPUCompute(compute_pass: Any, groupcount_x: Any, groupcount_y: Any, groupcount_z: Any, /) -> None: + """void SDL_DispatchGPUCompute(SDL_GPUComputePass *compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)""" + + @staticmethod + def SDL_DispatchGPUComputeIndirect(compute_pass: Any, buffer: Any, offset: Any, /) -> None: + """void SDL_DispatchGPUComputeIndirect(SDL_GPUComputePass *compute_pass, SDL_GPUBuffer *buffer, Uint32 offset)""" + + @staticmethod + def SDL_DownloadFromGPUBuffer(copy_pass: Any, source: Any, destination: Any, /) -> None: + """void SDL_DownloadFromGPUBuffer(SDL_GPUCopyPass *copy_pass, const SDL_GPUBufferRegion *source, const SDL_GPUTransferBufferLocation *destination)""" + + @staticmethod + def SDL_DownloadFromGPUTexture(copy_pass: Any, source: Any, destination: Any, /) -> None: + """void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureRegion *source, const SDL_GPUTextureTransferInfo *destination)""" + + @staticmethod + def SDL_DrawGPUIndexedPrimitives( + render_pass: Any, + num_indices: Any, + num_instances: Any, + first_index: Any, + vertex_offset: Any, + first_instance: Any, + /, + ) -> None: + """void SDL_DrawGPUIndexedPrimitives(SDL_GPURenderPass *render_pass, Uint32 num_indices, Uint32 num_instances, Uint32 first_index, Sint32 vertex_offset, Uint32 first_instance)""" + + @staticmethod + def SDL_DrawGPUIndexedPrimitivesIndirect(render_pass: Any, buffer: Any, offset: Any, draw_count: Any, /) -> None: + """void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass *render_pass, SDL_GPUBuffer *buffer, Uint32 offset, Uint32 draw_count)""" + + @staticmethod + def SDL_DrawGPUPrimitives( + render_pass: Any, num_vertices: Any, num_instances: Any, first_vertex: Any, first_instance: Any, / + ) -> None: + """void SDL_DrawGPUPrimitives(SDL_GPURenderPass *render_pass, Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)""" + + @staticmethod + def SDL_DrawGPUPrimitivesIndirect(render_pass: Any, buffer: Any, offset: Any, draw_count: Any, /) -> None: + """void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass *render_pass, SDL_GPUBuffer *buffer, Uint32 offset, Uint32 draw_count)""" + + @staticmethod + def SDL_DuplicateSurface(surface: Any, /) -> Any: + """SDL_Surface *SDL_DuplicateSurface(SDL_Surface *surface)""" + + @staticmethod + def SDL_EGL_GetCurrentConfig() -> Any: + """SDL_EGLConfig SDL_EGL_GetCurrentConfig(void)""" + + @staticmethod + def SDL_EGL_GetCurrentDisplay() -> Any: + """SDL_EGLDisplay SDL_EGL_GetCurrentDisplay(void)""" + + @staticmethod + def SDL_EGL_GetProcAddress(proc: Any, /) -> Any: + """SDL_FunctionPointer SDL_EGL_GetProcAddress(const char *proc)""" + + @staticmethod + def SDL_EGL_GetWindowSurface(window: Any, /) -> Any: + """SDL_EGLSurface SDL_EGL_GetWindowSurface(SDL_Window *window)""" + + @staticmethod + def SDL_EGL_SetAttributeCallbacks( + platformAttribCallback: Any, surfaceAttribCallback: Any, contextAttribCallback: Any, userdata: Any, / + ) -> None: + """void SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribCallback, SDL_EGLIntArrayCallback surfaceAttribCallback, SDL_EGLIntArrayCallback contextAttribCallback, void *userdata)""" + + @staticmethod + def SDL_EnableScreenSaver() -> bool: + """bool SDL_EnableScreenSaver(void)""" + + @staticmethod + def SDL_EndGPUComputePass(compute_pass: Any, /) -> None: + """void SDL_EndGPUComputePass(SDL_GPUComputePass *compute_pass)""" + + @staticmethod + def SDL_EndGPUCopyPass(copy_pass: Any, /) -> None: + """void SDL_EndGPUCopyPass(SDL_GPUCopyPass *copy_pass)""" + + @staticmethod + def SDL_EndGPURenderPass(render_pass: Any, /) -> None: + """void SDL_EndGPURenderPass(SDL_GPURenderPass *render_pass)""" + + @staticmethod + def SDL_EnumerateDirectory(path: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata)""" + + @staticmethod + def SDL_EnumerateProperties(props: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_EnumerateProperties(SDL_PropertiesID props, SDL_EnumeratePropertiesCallback callback, void *userdata)""" + + @staticmethod + def SDL_EnumerateStorageDirectory(storage: Any, path: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_EnumerateStorageDirectory(SDL_Storage *storage, const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata)""" + + @staticmethod + def SDL_EventEnabled(type: Any, /) -> bool: + """bool SDL_EventEnabled(Uint32 type)""" + + @staticmethod + def SDL_FillSurfaceRect(dst: Any, rect: Any, color: Any, /) -> bool: + """bool SDL_FillSurfaceRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color)""" + + @staticmethod + def SDL_FillSurfaceRects(dst: Any, rects: Any, count: int, color: Any, /) -> bool: + """bool SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color)""" + + @staticmethod + def SDL_FilterEvents(filter: Any, userdata: Any, /) -> None: + """void SDL_FilterEvents(SDL_EventFilter filter, void *userdata)""" + + @staticmethod + def SDL_FlashWindow(window: Any, operation: Any, /) -> bool: + """bool SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation)""" + + @staticmethod + def SDL_FlipSurface(surface: Any, flip: Any, /) -> bool: + """bool SDL_FlipSurface(SDL_Surface *surface, SDL_FlipMode flip)""" + + @staticmethod + def SDL_FlushAudioStream(stream: Any, /) -> bool: + """bool SDL_FlushAudioStream(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_FlushEvent(type: Any, /) -> None: + """void SDL_FlushEvent(Uint32 type)""" + + @staticmethod + def SDL_FlushEvents(minType: Any, maxType: Any, /) -> None: + """void SDL_FlushEvents(Uint32 minType, Uint32 maxType)""" + + @staticmethod + def SDL_FlushIO(context: Any, /) -> bool: + """bool SDL_FlushIO(SDL_IOStream *context)""" + + @staticmethod + def SDL_FlushRenderer(renderer: Any, /) -> bool: + """bool SDL_FlushRenderer(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GL_CreateContext(window: Any, /) -> Any: + """SDL_GLContext SDL_GL_CreateContext(SDL_Window *window)""" + + @staticmethod + def SDL_GL_DestroyContext(context: Any, /) -> bool: + """bool SDL_GL_DestroyContext(SDL_GLContext context)""" + + @staticmethod + def SDL_GL_ExtensionSupported(extension: Any, /) -> bool: + """bool SDL_GL_ExtensionSupported(const char *extension)""" + + @staticmethod + def SDL_GL_GetAttribute(attr: Any, value: Any, /) -> bool: + """bool SDL_GL_GetAttribute(SDL_GLAttr attr, int *value)""" + + @staticmethod + def SDL_GL_GetCurrentContext() -> Any: + """SDL_GLContext SDL_GL_GetCurrentContext(void)""" + + @staticmethod + def SDL_GL_GetCurrentWindow() -> Any: + """SDL_Window *SDL_GL_GetCurrentWindow(void)""" + + @staticmethod + def SDL_GL_GetProcAddress(proc: Any, /) -> Any: + """SDL_FunctionPointer SDL_GL_GetProcAddress(const char *proc)""" + + @staticmethod + def SDL_GL_GetSwapInterval(interval: Any, /) -> bool: + """bool SDL_GL_GetSwapInterval(int *interval)""" + + @staticmethod + def SDL_GL_LoadLibrary(path: Any, /) -> bool: + """bool SDL_GL_LoadLibrary(const char *path)""" + + @staticmethod + def SDL_GL_MakeCurrent(window: Any, context: Any, /) -> bool: + """bool SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context)""" + + @staticmethod + def SDL_GL_ResetAttributes() -> None: + """void SDL_GL_ResetAttributes(void)""" + + @staticmethod + def SDL_GL_SetAttribute(attr: Any, value: int, /) -> bool: + """bool SDL_GL_SetAttribute(SDL_GLAttr attr, int value)""" + + @staticmethod + def SDL_GL_SetSwapInterval(interval: int, /) -> bool: + """bool SDL_GL_SetSwapInterval(int interval)""" + + @staticmethod + def SDL_GL_SwapWindow(window: Any, /) -> bool: + """bool SDL_GL_SwapWindow(SDL_Window *window)""" + + @staticmethod + def SDL_GL_UnloadLibrary() -> None: + """void SDL_GL_UnloadLibrary(void)""" + + @staticmethod + def SDL_GPUSupportsProperties(props: Any, /) -> bool: + """bool SDL_GPUSupportsProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_GPUSupportsShaderFormats(format_flags: Any, name: Any, /) -> bool: + """bool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, const char *name)""" + + @staticmethod + def SDL_GPUTextureFormatTexelBlockSize(format: Any, /) -> Any: + """Uint32 SDL_GPUTextureFormatTexelBlockSize(SDL_GPUTextureFormat format)""" + + @staticmethod + def SDL_GPUTextureSupportsFormat(device: Any, format: Any, type: Any, usage: Any, /) -> bool: + """bool SDL_GPUTextureSupportsFormat(SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage)""" + + @staticmethod + def SDL_GPUTextureSupportsSampleCount(device: Any, format: Any, sample_count: Any, /) -> bool: + """bool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count)""" + + @staticmethod + def SDL_GUIDToString(guid: Any, pszGUID: Any, cbGUID: int, /) -> None: + """void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)""" + + @staticmethod + def SDL_GamepadConnected(gamepad: Any, /) -> bool: + """bool SDL_GamepadConnected(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GamepadEventsEnabled() -> bool: + """bool SDL_GamepadEventsEnabled(void)""" + + @staticmethod + def SDL_GamepadHasAxis(gamepad: Any, axis: Any, /) -> bool: + """bool SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis)""" + + @staticmethod + def SDL_GamepadHasButton(gamepad: Any, button: Any, /) -> bool: + """bool SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_GamepadButton button)""" + + @staticmethod + def SDL_GamepadHasSensor(gamepad: Any, type: Any, /) -> bool: + """bool SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type)""" + + @staticmethod + def SDL_GamepadSensorEnabled(gamepad: Any, type: Any, /) -> bool: + """bool SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type)""" + + @staticmethod + def SDL_GenerateMipmapsForGPUTexture(command_buffer: Any, texture: Any, /) -> None: + """void SDL_GenerateMipmapsForGPUTexture(SDL_GPUCommandBuffer *command_buffer, SDL_GPUTexture *texture)""" + + @staticmethod + def SDL_GetAppMetadataProperty(name: Any, /) -> Any: + """const char *SDL_GetAppMetadataProperty(const char *name)""" + + @staticmethod + def SDL_GetAssertionHandler(puserdata: Any, /) -> Any: + """SDL_AssertionHandler SDL_GetAssertionHandler(void **puserdata)""" + + @staticmethod + def SDL_GetAssertionReport() -> Any: + """const SDL_AssertData *SDL_GetAssertionReport(void)""" + + @staticmethod + def SDL_GetAsyncIOResult(queue: Any, outcome: Any, /) -> bool: + """bool SDL_GetAsyncIOResult(SDL_AsyncIOQueue *queue, SDL_AsyncIOOutcome *outcome)""" + + @staticmethod + def SDL_GetAsyncIOSize(asyncio: Any, /) -> Any: + """Sint64 SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio)""" + + @staticmethod + def SDL_GetAtomicInt(a: Any, /) -> int: + """int SDL_GetAtomicInt(SDL_AtomicInt *a)""" + + @staticmethod + def SDL_GetAtomicPointer(a: Any, /) -> Any: + """void *SDL_GetAtomicPointer(void **a)""" + + @staticmethod + def SDL_GetAtomicU32(a: Any, /) -> Any: + """Uint32 SDL_GetAtomicU32(SDL_AtomicU32 *a)""" + + @staticmethod + def SDL_GetAudioDeviceChannelMap(devid: Any, count: Any, /) -> Any: + """int *SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int *count)""" + + @staticmethod + def SDL_GetAudioDeviceFormat(devid: Any, spec: Any, sample_frames: Any, /) -> bool: + """bool SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec, int *sample_frames)""" + + @staticmethod + def SDL_GetAudioDeviceGain(devid: Any, /) -> float: + """float SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_GetAudioDeviceName(devid: Any, /) -> Any: + """const char *SDL_GetAudioDeviceName(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_GetAudioDriver(index: int, /) -> Any: + """const char *SDL_GetAudioDriver(int index)""" + + @staticmethod + def SDL_GetAudioFormatName(format: Any, /) -> Any: + """const char *SDL_GetAudioFormatName(SDL_AudioFormat format)""" + + @staticmethod + def SDL_GetAudioPlaybackDevices(count: Any, /) -> Any: + """SDL_AudioDeviceID *SDL_GetAudioPlaybackDevices(int *count)""" + + @staticmethod + def SDL_GetAudioRecordingDevices(count: Any, /) -> Any: + """SDL_AudioDeviceID *SDL_GetAudioRecordingDevices(int *count)""" + + @staticmethod + def SDL_GetAudioStreamAvailable(stream: Any, /) -> int: + """int SDL_GetAudioStreamAvailable(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_GetAudioStreamData(stream: Any, buf: Any, len: int, /) -> int: + """int SDL_GetAudioStreamData(SDL_AudioStream *stream, void *buf, int len)""" + + @staticmethod + def SDL_GetAudioStreamDevice(stream: Any, /) -> Any: + """SDL_AudioDeviceID SDL_GetAudioStreamDevice(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_GetAudioStreamFormat(stream: Any, src_spec: Any, dst_spec: Any, /) -> bool: + """bool SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec)""" + + @staticmethod + def SDL_GetAudioStreamFrequencyRatio(stream: Any, /) -> float: + """float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_GetAudioStreamGain(stream: Any, /) -> float: + """float SDL_GetAudioStreamGain(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_GetAudioStreamInputChannelMap(stream: Any, count: Any, /) -> Any: + """int *SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *stream, int *count)""" + + @staticmethod + def SDL_GetAudioStreamOutputChannelMap(stream: Any, count: Any, /) -> Any: + """int *SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream *stream, int *count)""" + + @staticmethod + def SDL_GetAudioStreamProperties(stream: Any, /) -> Any: + """SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_GetAudioStreamQueued(stream: Any, /) -> int: + """int SDL_GetAudioStreamQueued(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_GetBasePath() -> Any: + """const char *SDL_GetBasePath(void)""" + + @staticmethod + def SDL_GetBooleanProperty(props: Any, name: Any, default_value: bool, /) -> bool: + """bool SDL_GetBooleanProperty(SDL_PropertiesID props, const char *name, bool default_value)""" + + @staticmethod + def SDL_GetCPUCacheLineSize() -> int: + """int SDL_GetCPUCacheLineSize(void)""" + + @staticmethod + def SDL_GetCameraDriver(index: int, /) -> Any: + """const char *SDL_GetCameraDriver(int index)""" + + @staticmethod + def SDL_GetCameraFormat(camera: Any, spec: Any, /) -> bool: + """bool SDL_GetCameraFormat(SDL_Camera *camera, SDL_CameraSpec *spec)""" + + @staticmethod + def SDL_GetCameraID(camera: Any, /) -> Any: + """SDL_CameraID SDL_GetCameraID(SDL_Camera *camera)""" + + @staticmethod + def SDL_GetCameraName(instance_id: Any, /) -> Any: + """const char *SDL_GetCameraName(SDL_CameraID instance_id)""" + + @staticmethod + def SDL_GetCameraPermissionState(camera: Any, /) -> int: + """int SDL_GetCameraPermissionState(SDL_Camera *camera)""" + + @staticmethod + def SDL_GetCameraPosition(instance_id: Any, /) -> Any: + """SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id)""" + + @staticmethod + def SDL_GetCameraProperties(camera: Any, /) -> Any: + """SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera *camera)""" + + @staticmethod + def SDL_GetCameraSupportedFormats(instance_id: Any, count: Any, /) -> Any: + """SDL_CameraSpec **SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int *count)""" + + @staticmethod + def SDL_GetCameras(count: Any, /) -> Any: + """SDL_CameraID *SDL_GetCameras(int *count)""" + + @staticmethod + def SDL_GetClipboardData(mime_type: Any, size: Any, /) -> Any: + """void *SDL_GetClipboardData(const char *mime_type, size_t *size)""" + + @staticmethod + def SDL_GetClipboardMimeTypes(num_mime_types: Any, /) -> Any: + """char **SDL_GetClipboardMimeTypes(size_t *num_mime_types)""" + + @staticmethod + def SDL_GetClipboardText() -> Any: + """char *SDL_GetClipboardText(void)""" + + @staticmethod + def SDL_GetClosestFullscreenDisplayMode( + displayID: Any, w: int, h: int, refresh_rate: float, include_high_density_modes: bool, closest: Any, / + ) -> bool: + """bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *closest)""" + + @staticmethod + def SDL_GetCurrentAudioDriver() -> Any: + """const char *SDL_GetCurrentAudioDriver(void)""" + + @staticmethod + def SDL_GetCurrentCameraDriver() -> Any: + """const char *SDL_GetCurrentCameraDriver(void)""" + + @staticmethod + def SDL_GetCurrentDirectory() -> Any: + """char *SDL_GetCurrentDirectory(void)""" + + @staticmethod + def SDL_GetCurrentDisplayMode(displayID: Any, /) -> Any: + """const SDL_DisplayMode *SDL_GetCurrentDisplayMode(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetCurrentDisplayOrientation(displayID: Any, /) -> Any: + """SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetCurrentRenderOutputSize(renderer: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetCurrentRenderOutputSize(SDL_Renderer *renderer, int *w, int *h)""" + + @staticmethod + def SDL_GetCurrentThreadID() -> Any: + """SDL_ThreadID SDL_GetCurrentThreadID(void)""" + + @staticmethod + def SDL_GetCurrentTime(ticks: Any, /) -> bool: + """bool SDL_GetCurrentTime(SDL_Time *ticks)""" + + @staticmethod + def SDL_GetCurrentVideoDriver() -> Any: + """const char *SDL_GetCurrentVideoDriver(void)""" + + @staticmethod + def SDL_GetCursor() -> Any: + """SDL_Cursor *SDL_GetCursor(void)""" + + @staticmethod + def SDL_GetDateTimeLocalePreferences(dateFormat: Any, timeFormat: Any, /) -> bool: + """bool SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat)""" + + @staticmethod + def SDL_GetDayOfWeek(year: int, month: int, day: int, /) -> int: + """int SDL_GetDayOfWeek(int year, int month, int day)""" + + @staticmethod + def SDL_GetDayOfYear(year: int, month: int, day: int, /) -> int: + """int SDL_GetDayOfYear(int year, int month, int day)""" + + @staticmethod + def SDL_GetDaysInMonth(year: int, month: int, /) -> int: + """int SDL_GetDaysInMonth(int year, int month)""" + + @staticmethod + def SDL_GetDefaultAssertionHandler() -> Any: + """SDL_AssertionHandler SDL_GetDefaultAssertionHandler(void)""" + + @staticmethod + def SDL_GetDefaultCursor() -> Any: + """SDL_Cursor *SDL_GetDefaultCursor(void)""" + + @staticmethod + def SDL_GetDefaultLogOutputFunction() -> Any: + """SDL_LogOutputFunction SDL_GetDefaultLogOutputFunction(void)""" + + @staticmethod + def SDL_GetDesktopDisplayMode(displayID: Any, /) -> Any: + """const SDL_DisplayMode *SDL_GetDesktopDisplayMode(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetDisplayBounds(displayID: Any, rect: Any, /) -> bool: + """bool SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetDisplayContentScale(displayID: Any, /) -> float: + """float SDL_GetDisplayContentScale(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetDisplayForPoint(point: Any, /) -> Any: + """SDL_DisplayID SDL_GetDisplayForPoint(const SDL_Point *point)""" + + @staticmethod + def SDL_GetDisplayForRect(rect: Any, /) -> Any: + """SDL_DisplayID SDL_GetDisplayForRect(const SDL_Rect *rect)""" + + @staticmethod + def SDL_GetDisplayForWindow(window: Any, /) -> Any: + """SDL_DisplayID SDL_GetDisplayForWindow(SDL_Window *window)""" + + @staticmethod + def SDL_GetDisplayName(displayID: Any, /) -> Any: + """const char *SDL_GetDisplayName(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetDisplayProperties(displayID: Any, /) -> Any: + """SDL_PropertiesID SDL_GetDisplayProperties(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetDisplayUsableBounds(displayID: Any, rect: Any, /) -> bool: + """bool SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetDisplays(count: Any, /) -> Any: + """SDL_DisplayID *SDL_GetDisplays(int *count)""" + + @staticmethod + def SDL_GetEnvironment() -> Any: + """SDL_Environment *SDL_GetEnvironment(void)""" + + @staticmethod + def SDL_GetEnvironmentVariable(env: Any, name: Any, /) -> Any: + """const char *SDL_GetEnvironmentVariable(SDL_Environment *env, const char *name)""" + + @staticmethod + def SDL_GetEnvironmentVariables(env: Any, /) -> Any: + """char **SDL_GetEnvironmentVariables(SDL_Environment *env)""" + + @staticmethod + def SDL_GetError() -> Any: + """const char *SDL_GetError(void)""" + + @staticmethod + def SDL_GetEventFilter(filter: Any, userdata: Any, /) -> bool: + """bool SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata)""" + + @staticmethod + def SDL_GetFloatProperty(props: Any, name: Any, default_value: float, /) -> float: + """float SDL_GetFloatProperty(SDL_PropertiesID props, const char *name, float default_value)""" + + @staticmethod + def SDL_GetFullscreenDisplayModes(displayID: Any, count: Any, /) -> Any: + """SDL_DisplayMode **SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int *count)""" + + @staticmethod + def SDL_GetGPUDeviceDriver(device: Any, /) -> Any: + """const char *SDL_GetGPUDeviceDriver(SDL_GPUDevice *device)""" + + @staticmethod + def SDL_GetGPUDriver(index: int, /) -> Any: + """const char *SDL_GetGPUDriver(int index)""" + + @staticmethod + def SDL_GetGPUShaderFormats(device: Any, /) -> Any: + """SDL_GPUShaderFormat SDL_GetGPUShaderFormats(SDL_GPUDevice *device)""" + + @staticmethod + def SDL_GetGPUSwapchainTextureFormat(device: Any, window: Any, /) -> Any: + """SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice *device, SDL_Window *window)""" + + @staticmethod + def SDL_GetGamepadAppleSFSymbolsNameForAxis(gamepad: Any, axis: Any, /) -> Any: + """const char *SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis)""" + + @staticmethod + def SDL_GetGamepadAppleSFSymbolsNameForButton(gamepad: Any, button: Any, /) -> Any: + """const char *SDL_GetGamepadAppleSFSymbolsNameForButton(SDL_Gamepad *gamepad, SDL_GamepadButton button)""" + + @staticmethod + def SDL_GetGamepadAxis(gamepad: Any, axis: Any, /) -> Any: + """Sint16 SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis)""" + + @staticmethod + def SDL_GetGamepadAxisFromString(str: Any, /) -> Any: + """SDL_GamepadAxis SDL_GetGamepadAxisFromString(const char *str)""" + + @staticmethod + def SDL_GetGamepadBindings(gamepad: Any, count: Any, /) -> Any: + """SDL_GamepadBinding **SDL_GetGamepadBindings(SDL_Gamepad *gamepad, int *count)""" + + @staticmethod + def SDL_GetGamepadButton(gamepad: Any, button: Any, /) -> bool: + """bool SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button)""" + + @staticmethod + def SDL_GetGamepadButtonFromString(str: Any, /) -> Any: + """SDL_GamepadButton SDL_GetGamepadButtonFromString(const char *str)""" + + @staticmethod + def SDL_GetGamepadButtonLabel(gamepad: Any, button: Any, /) -> Any: + """SDL_GamepadButtonLabel SDL_GetGamepadButtonLabel(SDL_Gamepad *gamepad, SDL_GamepadButton button)""" + + @staticmethod + def SDL_GetGamepadButtonLabelForType(type: Any, button: Any, /) -> Any: + """SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button)""" + + @staticmethod + def SDL_GetGamepadConnectionState(gamepad: Any, /) -> Any: + """SDL_JoystickConnectionState SDL_GetGamepadConnectionState(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadFirmwareVersion(gamepad: Any, /) -> Any: + """Uint16 SDL_GetGamepadFirmwareVersion(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadFromID(instance_id: Any, /) -> Any: + """SDL_Gamepad *SDL_GetGamepadFromID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadFromPlayerIndex(player_index: int, /) -> Any: + """SDL_Gamepad *SDL_GetGamepadFromPlayerIndex(int player_index)""" + + @staticmethod + def SDL_GetGamepadGUIDForID(instance_id: Any, /) -> Any: + """SDL_GUID SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadID(gamepad: Any, /) -> Any: + """SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadJoystick(gamepad: Any, /) -> Any: + """SDL_Joystick *SDL_GetGamepadJoystick(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadMapping(gamepad: Any, /) -> Any: + """char *SDL_GetGamepadMapping(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadMappingForGUID(guid: Any, /) -> Any: + """char *SDL_GetGamepadMappingForGUID(SDL_GUID guid)""" + + @staticmethod + def SDL_GetGamepadMappingForID(instance_id: Any, /) -> Any: + """char *SDL_GetGamepadMappingForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadMappings(count: Any, /) -> Any: + """char **SDL_GetGamepadMappings(int *count)""" + + @staticmethod + def SDL_GetGamepadName(gamepad: Any, /) -> Any: + """const char *SDL_GetGamepadName(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadNameForID(instance_id: Any, /) -> Any: + """const char *SDL_GetGamepadNameForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadPath(gamepad: Any, /) -> Any: + """const char *SDL_GetGamepadPath(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadPathForID(instance_id: Any, /) -> Any: + """const char *SDL_GetGamepadPathForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadPlayerIndex(gamepad: Any, /) -> int: + """int SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadPlayerIndexForID(instance_id: Any, /) -> int: + """int SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadPowerInfo(gamepad: Any, percent: Any, /) -> Any: + """SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad *gamepad, int *percent)""" + + @staticmethod + def SDL_GetGamepadProduct(gamepad: Any, /) -> Any: + """Uint16 SDL_GetGamepadProduct(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadProductForID(instance_id: Any, /) -> Any: + """Uint16 SDL_GetGamepadProductForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadProductVersion(gamepad: Any, /) -> Any: + """Uint16 SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadProductVersionForID(instance_id: Any, /) -> Any: + """Uint16 SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadProperties(gamepad: Any, /) -> Any: + """SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadSensorData(gamepad: Any, type: Any, data: Any, num_values: int, /) -> bool: + """bool SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_SensorType type, float *data, int num_values)""" + + @staticmethod + def SDL_GetGamepadSensorDataRate(gamepad: Any, type: Any, /) -> float: + """float SDL_GetGamepadSensorDataRate(SDL_Gamepad *gamepad, SDL_SensorType type)""" + + @staticmethod + def SDL_GetGamepadSerial(gamepad: Any, /) -> Any: + """const char *SDL_GetGamepadSerial(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadSteamHandle(gamepad: Any, /) -> Any: + """Uint64 SDL_GetGamepadSteamHandle(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadStringForAxis(axis: Any, /) -> Any: + """const char *SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis)""" + + @staticmethod + def SDL_GetGamepadStringForButton(button: Any, /) -> Any: + """const char *SDL_GetGamepadStringForButton(SDL_GamepadButton button)""" + + @staticmethod + def SDL_GetGamepadStringForType(type: Any, /) -> Any: + """const char *SDL_GetGamepadStringForType(SDL_GamepadType type)""" + + @staticmethod + def SDL_GetGamepadTouchpadFinger( + gamepad: Any, touchpad: int, finger: int, down: Any, x: Any, y: Any, pressure: Any, / + ) -> bool: + """bool SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamepad, int touchpad, int finger, bool *down, float *x, float *y, float *pressure)""" + + @staticmethod + def SDL_GetGamepadType(gamepad: Any, /) -> Any: + """SDL_GamepadType SDL_GetGamepadType(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadTypeForID(instance_id: Any, /) -> Any: + """SDL_GamepadType SDL_GetGamepadTypeForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepadTypeFromString(str: Any, /) -> Any: + """SDL_GamepadType SDL_GetGamepadTypeFromString(const char *str)""" + + @staticmethod + def SDL_GetGamepadVendor(gamepad: Any, /) -> Any: + """Uint16 SDL_GetGamepadVendor(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetGamepadVendorForID(instance_id: Any, /) -> Any: + """Uint16 SDL_GetGamepadVendorForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetGamepads(count: Any, /) -> Any: + """SDL_JoystickID *SDL_GetGamepads(int *count)""" + + @staticmethod + def SDL_GetGlobalMouseState(x: Any, y: Any, /) -> Any: + """SDL_MouseButtonFlags SDL_GetGlobalMouseState(float *x, float *y)""" + + @staticmethod + def SDL_GetGlobalProperties() -> Any: + """SDL_PropertiesID SDL_GetGlobalProperties(void)""" + + @staticmethod + def SDL_GetGrabbedWindow() -> Any: + """SDL_Window *SDL_GetGrabbedWindow(void)""" + + @staticmethod + def SDL_GetHapticEffectStatus(haptic: Any, effect: int, /) -> bool: + """bool SDL_GetHapticEffectStatus(SDL_Haptic *haptic, int effect)""" + + @staticmethod + def SDL_GetHapticFeatures(haptic: Any, /) -> Any: + """Uint32 SDL_GetHapticFeatures(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_GetHapticFromID(instance_id: Any, /) -> Any: + """SDL_Haptic *SDL_GetHapticFromID(SDL_HapticID instance_id)""" + + @staticmethod + def SDL_GetHapticID(haptic: Any, /) -> Any: + """SDL_HapticID SDL_GetHapticID(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_GetHapticName(haptic: Any, /) -> Any: + """const char *SDL_GetHapticName(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_GetHapticNameForID(instance_id: Any, /) -> Any: + """const char *SDL_GetHapticNameForID(SDL_HapticID instance_id)""" + + @staticmethod + def SDL_GetHaptics(count: Any, /) -> Any: + """SDL_HapticID *SDL_GetHaptics(int *count)""" + + @staticmethod + def SDL_GetHint(name: Any, /) -> Any: + """const char *SDL_GetHint(const char *name)""" + + @staticmethod + def SDL_GetHintBoolean(name: Any, default_value: bool, /) -> bool: + """bool SDL_GetHintBoolean(const char *name, bool default_value)""" + + @staticmethod + def SDL_GetIOProperties(context: Any, /) -> Any: + """SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream *context)""" + + @staticmethod + def SDL_GetIOSize(context: Any, /) -> Any: + """Sint64 SDL_GetIOSize(SDL_IOStream *context)""" + + @staticmethod + def SDL_GetIOStatus(context: Any, /) -> Any: + """SDL_IOStatus SDL_GetIOStatus(SDL_IOStream *context)""" + + @staticmethod + def SDL_GetJoystickAxis(joystick: Any, axis: int, /) -> Any: + """Sint16 SDL_GetJoystickAxis(SDL_Joystick *joystick, int axis)""" + + @staticmethod + def SDL_GetJoystickAxisInitialState(joystick: Any, axis: int, state: Any, /) -> bool: + """bool SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)""" + + @staticmethod + def SDL_GetJoystickBall(joystick: Any, ball: int, dx: Any, dy: Any, /) -> bool: + """bool SDL_GetJoystickBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)""" + + @staticmethod + def SDL_GetJoystickButton(joystick: Any, button: int, /) -> bool: + """bool SDL_GetJoystickButton(SDL_Joystick *joystick, int button)""" + + @staticmethod + def SDL_GetJoystickConnectionState(joystick: Any, /) -> Any: + """SDL_JoystickConnectionState SDL_GetJoystickConnectionState(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickFirmwareVersion(joystick: Any, /) -> Any: + """Uint16 SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickFromID(instance_id: Any, /) -> Any: + """SDL_Joystick *SDL_GetJoystickFromID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickFromPlayerIndex(player_index: int, /) -> Any: + """SDL_Joystick *SDL_GetJoystickFromPlayerIndex(int player_index)""" + + @staticmethod + def SDL_GetJoystickGUID(joystick: Any, /) -> Any: + """SDL_GUID SDL_GetJoystickGUID(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickGUIDForID(instance_id: Any, /) -> Any: + """SDL_GUID SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickGUIDInfo(guid: Any, vendor: Any, product: Any, version: Any, crc16: Any, /) -> None: + """void SDL_GetJoystickGUIDInfo(SDL_GUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)""" + + @staticmethod + def SDL_GetJoystickHat(joystick: Any, hat: int, /) -> Any: + """Uint8 SDL_GetJoystickHat(SDL_Joystick *joystick, int hat)""" + + @staticmethod + def SDL_GetJoystickID(joystick: Any, /) -> Any: + """SDL_JoystickID SDL_GetJoystickID(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickName(joystick: Any, /) -> Any: + """const char *SDL_GetJoystickName(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickNameForID(instance_id: Any, /) -> Any: + """const char *SDL_GetJoystickNameForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickPath(joystick: Any, /) -> Any: + """const char *SDL_GetJoystickPath(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickPathForID(instance_id: Any, /) -> Any: + """const char *SDL_GetJoystickPathForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickPlayerIndex(joystick: Any, /) -> int: + """int SDL_GetJoystickPlayerIndex(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickPlayerIndexForID(instance_id: Any, /) -> int: + """int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickPowerInfo(joystick: Any, percent: Any, /) -> Any: + """SDL_PowerState SDL_GetJoystickPowerInfo(SDL_Joystick *joystick, int *percent)""" + + @staticmethod + def SDL_GetJoystickProduct(joystick: Any, /) -> Any: + """Uint16 SDL_GetJoystickProduct(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickProductForID(instance_id: Any, /) -> Any: + """Uint16 SDL_GetJoystickProductForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickProductVersion(joystick: Any, /) -> Any: + """Uint16 SDL_GetJoystickProductVersion(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickProductVersionForID(instance_id: Any, /) -> Any: + """Uint16 SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickProperties(joystick: Any, /) -> Any: + """SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickSerial(joystick: Any, /) -> Any: + """const char *SDL_GetJoystickSerial(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickType(joystick: Any, /) -> Any: + """SDL_JoystickType SDL_GetJoystickType(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickTypeForID(instance_id: Any, /) -> Any: + """SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoystickVendor(joystick: Any, /) -> Any: + """Uint16 SDL_GetJoystickVendor(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetJoystickVendorForID(instance_id: Any, /) -> Any: + """Uint16 SDL_GetJoystickVendorForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetJoysticks(count: Any, /) -> Any: + """SDL_JoystickID *SDL_GetJoysticks(int *count)""" + + @staticmethod + def SDL_GetKeyFromName(name: Any, /) -> Any: + """SDL_Keycode SDL_GetKeyFromName(const char *name)""" + + @staticmethod + def SDL_GetKeyFromScancode(scancode: Any, modstate: Any, key_event: bool, /) -> Any: + """SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, bool key_event)""" + + @staticmethod + def SDL_GetKeyName(key: Any, /) -> Any: + """const char *SDL_GetKeyName(SDL_Keycode key)""" + + @staticmethod + def SDL_GetKeyboardFocus() -> Any: + """SDL_Window *SDL_GetKeyboardFocus(void)""" + + @staticmethod + def SDL_GetKeyboardNameForID(instance_id: Any, /) -> Any: + """const char *SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id)""" + + @staticmethod + def SDL_GetKeyboardState(numkeys: Any, /) -> Any: + """const bool *SDL_GetKeyboardState(int *numkeys)""" + + @staticmethod + def SDL_GetKeyboards(count: Any, /) -> Any: + """SDL_KeyboardID *SDL_GetKeyboards(int *count)""" + + @staticmethod + def SDL_GetLogOutputFunction(callback: Any, userdata: Any, /) -> None: + """void SDL_GetLogOutputFunction(SDL_LogOutputFunction *callback, void **userdata)""" + + @staticmethod + def SDL_GetLogPriority(category: int, /) -> Any: + """SDL_LogPriority SDL_GetLogPriority(int category)""" + + @staticmethod + def SDL_GetMasksForPixelFormat(format: Any, bpp: Any, Rmask: Any, Gmask: Any, Bmask: Any, Amask: Any, /) -> bool: + """bool SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask)""" + + @staticmethod + def SDL_GetMaxHapticEffects(haptic: Any, /) -> int: + """int SDL_GetMaxHapticEffects(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_GetMaxHapticEffectsPlaying(haptic: Any, /) -> int: + """int SDL_GetMaxHapticEffectsPlaying(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_GetMemoryFunctions(malloc_func: Any, calloc_func: Any, realloc_func: Any, free_func: Any, /) -> None: + """void SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)""" + + @staticmethod + def SDL_GetMice(count: Any, /) -> Any: + """SDL_MouseID *SDL_GetMice(int *count)""" + + @staticmethod + def SDL_GetModState() -> Any: + """SDL_Keymod SDL_GetModState(void)""" + + @staticmethod + def SDL_GetMouseFocus() -> Any: + """SDL_Window *SDL_GetMouseFocus(void)""" + + @staticmethod + def SDL_GetMouseNameForID(instance_id: Any, /) -> Any: + """const char *SDL_GetMouseNameForID(SDL_MouseID instance_id)""" + + @staticmethod + def SDL_GetMouseState(x: Any, y: Any, /) -> Any: + """SDL_MouseButtonFlags SDL_GetMouseState(float *x, float *y)""" + + @staticmethod + def SDL_GetNaturalDisplayOrientation(displayID: Any, /) -> Any: + """SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID)""" + + @staticmethod + def SDL_GetNumAllocations() -> int: + """int SDL_GetNumAllocations(void)""" + + @staticmethod + def SDL_GetNumAudioDrivers() -> int: + """int SDL_GetNumAudioDrivers(void)""" + + @staticmethod + def SDL_GetNumCameraDrivers() -> int: + """int SDL_GetNumCameraDrivers(void)""" + + @staticmethod + def SDL_GetNumGPUDrivers() -> int: + """int SDL_GetNumGPUDrivers(void)""" + + @staticmethod + def SDL_GetNumGamepadTouchpadFingers(gamepad: Any, touchpad: int, /) -> int: + """int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad)""" + + @staticmethod + def SDL_GetNumGamepadTouchpads(gamepad: Any, /) -> int: + """int SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetNumHapticAxes(haptic: Any, /) -> int: + """int SDL_GetNumHapticAxes(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_GetNumJoystickAxes(joystick: Any, /) -> int: + """int SDL_GetNumJoystickAxes(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetNumJoystickBalls(joystick: Any, /) -> int: + """int SDL_GetNumJoystickBalls(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetNumJoystickButtons(joystick: Any, /) -> int: + """int SDL_GetNumJoystickButtons(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetNumJoystickHats(joystick: Any, /) -> int: + """int SDL_GetNumJoystickHats(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_GetNumLogicalCPUCores() -> int: + """int SDL_GetNumLogicalCPUCores(void)""" + + @staticmethod + def SDL_GetNumRenderDrivers() -> int: + """int SDL_GetNumRenderDrivers(void)""" + + @staticmethod + def SDL_GetNumVideoDrivers() -> int: + """int SDL_GetNumVideoDrivers(void)""" + + @staticmethod + def SDL_GetNumberProperty(props: Any, name: Any, default_value: Any, /) -> Any: + """Sint64 SDL_GetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 default_value)""" + + @staticmethod + def SDL_GetOriginalMemoryFunctions( + malloc_func: Any, calloc_func: Any, realloc_func: Any, free_func: Any, / + ) -> None: + """void SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)""" + + @staticmethod + def SDL_GetPathInfo(path: Any, info: Any, /) -> bool: + """bool SDL_GetPathInfo(const char *path, SDL_PathInfo *info)""" + + @staticmethod + def SDL_GetPerformanceCounter() -> Any: + """Uint64 SDL_GetPerformanceCounter(void)""" + + @staticmethod + def SDL_GetPerformanceFrequency() -> Any: + """Uint64 SDL_GetPerformanceFrequency(void)""" + + @staticmethod + def SDL_GetPixelFormatDetails(format: Any, /) -> Any: + """const SDL_PixelFormatDetails *SDL_GetPixelFormatDetails(SDL_PixelFormat format)""" + + @staticmethod + def SDL_GetPixelFormatForMasks(bpp: int, Rmask: Any, Gmask: Any, Bmask: Any, Amask: Any, /) -> Any: + """SDL_PixelFormat SDL_GetPixelFormatForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)""" + + @staticmethod + def SDL_GetPixelFormatName(format: Any, /) -> Any: + """const char *SDL_GetPixelFormatName(SDL_PixelFormat format)""" + + @staticmethod + def SDL_GetPlatform() -> Any: + """const char *SDL_GetPlatform(void)""" + + @staticmethod + def SDL_GetPointerProperty(props: Any, name: Any, default_value: Any, /) -> Any: + """void *SDL_GetPointerProperty(SDL_PropertiesID props, const char *name, void *default_value)""" + + @staticmethod + def SDL_GetPowerInfo(seconds: Any, percent: Any, /) -> Any: + """SDL_PowerState SDL_GetPowerInfo(int *seconds, int *percent)""" + + @staticmethod + def SDL_GetPrefPath(org: Any, app: Any, /) -> Any: + """char *SDL_GetPrefPath(const char *org, const char *app)""" + + @staticmethod + def SDL_GetPreferredLocales(count: Any, /) -> Any: + """SDL_Locale **SDL_GetPreferredLocales(int *count)""" + + @staticmethod + def SDL_GetPrimaryDisplay() -> Any: + """SDL_DisplayID SDL_GetPrimaryDisplay(void)""" + + @staticmethod + def SDL_GetPrimarySelectionText() -> Any: + """char *SDL_GetPrimarySelectionText(void)""" + + @staticmethod + def SDL_GetProcessInput(process: Any, /) -> Any: + """SDL_IOStream *SDL_GetProcessInput(SDL_Process *process)""" + + @staticmethod + def SDL_GetProcessOutput(process: Any, /) -> Any: + """SDL_IOStream *SDL_GetProcessOutput(SDL_Process *process)""" + + @staticmethod + def SDL_GetProcessProperties(process: Any, /) -> Any: + """SDL_PropertiesID SDL_GetProcessProperties(SDL_Process *process)""" + + @staticmethod + def SDL_GetPropertyType(props: Any, name: Any, /) -> Any: + """SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID props, const char *name)""" + + @staticmethod + def SDL_GetRGB(pixel: Any, format: Any, palette: Any, r: Any, g: Any, b: Any, /) -> None: + """void SDL_GetRGB(Uint32 pixel, const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 *r, Uint8 *g, Uint8 *b)""" + + @staticmethod + def SDL_GetRGBA(pixel: Any, format: Any, palette: Any, r: Any, g: Any, b: Any, a: Any, /) -> None: + """void SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)""" + + @staticmethod + def SDL_GetRealGamepadType(gamepad: Any, /) -> Any: + """SDL_GamepadType SDL_GetRealGamepadType(SDL_Gamepad *gamepad)""" + + @staticmethod + def SDL_GetRealGamepadTypeForID(instance_id: Any, /) -> Any: + """SDL_GamepadType SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_GetRectAndLineIntersection(rect: Any, X1: Any, Y1: Any, X2: Any, Y2: Any, /) -> bool: + """bool SDL_GetRectAndLineIntersection(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)""" + + @staticmethod + def SDL_GetRectAndLineIntersectionFloat(rect: Any, X1: Any, Y1: Any, X2: Any, Y2: Any, /) -> bool: + """bool SDL_GetRectAndLineIntersectionFloat(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2)""" + + @staticmethod + def SDL_GetRectEnclosingPoints(points: Any, count: int, clip: Any, result: Any, /) -> bool: + """bool SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result)""" + + @staticmethod + def SDL_GetRectEnclosingPointsFloat(points: Any, count: int, clip: Any, result: Any, /) -> bool: + """bool SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result)""" + + @staticmethod + def SDL_GetRectIntersection(A: Any, B: Any, result: Any, /) -> bool: + """bool SDL_GetRectIntersection(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)""" + + @staticmethod + def SDL_GetRectIntersectionFloat(A: Any, B: Any, result: Any, /) -> bool: + """bool SDL_GetRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result)""" + + @staticmethod + def SDL_GetRectUnion(A: Any, B: Any, result: Any, /) -> bool: + """bool SDL_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)""" + + @staticmethod + def SDL_GetRectUnionFloat(A: Any, B: Any, result: Any, /) -> bool: + """bool SDL_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result)""" + + @staticmethod + def SDL_GetRelativeMouseState(x: Any, y: Any, /) -> Any: + """SDL_MouseButtonFlags SDL_GetRelativeMouseState(float *x, float *y)""" + + @staticmethod + def SDL_GetRenderClipRect(renderer: Any, rect: Any, /) -> bool: + """bool SDL_GetRenderClipRect(SDL_Renderer *renderer, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetRenderColorScale(renderer: Any, scale: Any, /) -> bool: + """bool SDL_GetRenderColorScale(SDL_Renderer *renderer, float *scale)""" + + @staticmethod + def SDL_GetRenderDrawBlendMode(renderer: Any, blendMode: Any, /) -> bool: + """bool SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode)""" + + @staticmethod + def SDL_GetRenderDrawColor(renderer: Any, r: Any, g: Any, b: Any, a: Any, /) -> bool: + """bool SDL_GetRenderDrawColor(SDL_Renderer *renderer, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)""" + + @staticmethod + def SDL_GetRenderDrawColorFloat(renderer: Any, r: Any, g: Any, b: Any, a: Any, /) -> bool: + """bool SDL_GetRenderDrawColorFloat(SDL_Renderer *renderer, float *r, float *g, float *b, float *a)""" + + @staticmethod + def SDL_GetRenderDriver(index: int, /) -> Any: + """const char *SDL_GetRenderDriver(int index)""" + + @staticmethod + def SDL_GetRenderLogicalPresentation(renderer: Any, w: Any, h: Any, mode: Any, /) -> bool: + """bool SDL_GetRenderLogicalPresentation(SDL_Renderer *renderer, int *w, int *h, SDL_RendererLogicalPresentation *mode)""" + + @staticmethod + def SDL_GetRenderLogicalPresentationRect(renderer: Any, rect: Any, /) -> bool: + """bool SDL_GetRenderLogicalPresentationRect(SDL_Renderer *renderer, SDL_FRect *rect)""" + + @staticmethod + def SDL_GetRenderMetalCommandEncoder(renderer: Any, /) -> Any: + """void *SDL_GetRenderMetalCommandEncoder(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GetRenderMetalLayer(renderer: Any, /) -> Any: + """void *SDL_GetRenderMetalLayer(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GetRenderOutputSize(renderer: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetRenderOutputSize(SDL_Renderer *renderer, int *w, int *h)""" + + @staticmethod + def SDL_GetRenderSafeArea(renderer: Any, rect: Any, /) -> bool: + """bool SDL_GetRenderSafeArea(SDL_Renderer *renderer, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetRenderScale(renderer: Any, scaleX: Any, scaleY: Any, /) -> bool: + """bool SDL_GetRenderScale(SDL_Renderer *renderer, float *scaleX, float *scaleY)""" + + @staticmethod + def SDL_GetRenderTarget(renderer: Any, /) -> Any: + """SDL_Texture *SDL_GetRenderTarget(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GetRenderVSync(renderer: Any, vsync: Any, /) -> bool: + """bool SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync)""" + + @staticmethod + def SDL_GetRenderViewport(renderer: Any, rect: Any, /) -> bool: + """bool SDL_GetRenderViewport(SDL_Renderer *renderer, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetRenderWindow(renderer: Any, /) -> Any: + """SDL_Window *SDL_GetRenderWindow(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GetRenderer(window: Any, /) -> Any: + """SDL_Renderer *SDL_GetRenderer(SDL_Window *window)""" + + @staticmethod + def SDL_GetRendererFromTexture(texture: Any, /) -> Any: + """SDL_Renderer *SDL_GetRendererFromTexture(SDL_Texture *texture)""" + + @staticmethod + def SDL_GetRendererName(renderer: Any, /) -> Any: + """const char *SDL_GetRendererName(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GetRendererProperties(renderer: Any, /) -> Any: + """SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_GetRevision() -> Any: + """const char *SDL_GetRevision(void)""" + + @staticmethod + def SDL_GetSIMDAlignment() -> int: + """size_t SDL_GetSIMDAlignment(void)""" + + @staticmethod + def SDL_GetSandbox() -> Any: + """SDL_Sandbox SDL_GetSandbox(void)""" + + @staticmethod + def SDL_GetScancodeFromKey(key: Any, modstate: Any, /) -> Any: + """SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod *modstate)""" + + @staticmethod + def SDL_GetScancodeFromName(name: Any, /) -> Any: + """SDL_Scancode SDL_GetScancodeFromName(const char *name)""" + + @staticmethod + def SDL_GetScancodeName(scancode: Any, /) -> Any: + """const char *SDL_GetScancodeName(SDL_Scancode scancode)""" + + @staticmethod + def SDL_GetSemaphoreValue(sem: Any, /) -> Any: + """Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)""" + + @staticmethod + def SDL_GetSensorData(sensor: Any, data: Any, num_values: int, /) -> bool: + """bool SDL_GetSensorData(SDL_Sensor *sensor, float *data, int num_values)""" + + @staticmethod + def SDL_GetSensorFromID(instance_id: Any, /) -> Any: + """SDL_Sensor *SDL_GetSensorFromID(SDL_SensorID instance_id)""" + + @staticmethod + def SDL_GetSensorID(sensor: Any, /) -> Any: + """SDL_SensorID SDL_GetSensorID(SDL_Sensor *sensor)""" + + @staticmethod + def SDL_GetSensorName(sensor: Any, /) -> Any: + """const char *SDL_GetSensorName(SDL_Sensor *sensor)""" + + @staticmethod + def SDL_GetSensorNameForID(instance_id: Any, /) -> Any: + """const char *SDL_GetSensorNameForID(SDL_SensorID instance_id)""" + + @staticmethod + def SDL_GetSensorNonPortableType(sensor: Any, /) -> int: + """int SDL_GetSensorNonPortableType(SDL_Sensor *sensor)""" + + @staticmethod + def SDL_GetSensorNonPortableTypeForID(instance_id: Any, /) -> int: + """int SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id)""" + + @staticmethod + def SDL_GetSensorProperties(sensor: Any, /) -> Any: + """SDL_PropertiesID SDL_GetSensorProperties(SDL_Sensor *sensor)""" + + @staticmethod + def SDL_GetSensorType(sensor: Any, /) -> Any: + """SDL_SensorType SDL_GetSensorType(SDL_Sensor *sensor)""" + + @staticmethod + def SDL_GetSensorTypeForID(instance_id: Any, /) -> Any: + """SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID instance_id)""" + + @staticmethod + def SDL_GetSensors(count: Any, /) -> Any: + """SDL_SensorID *SDL_GetSensors(int *count)""" + + @staticmethod + def SDL_GetSilenceValueForFormat(format: Any, /) -> int: + """int SDL_GetSilenceValueForFormat(SDL_AudioFormat format)""" + + @staticmethod + def SDL_GetStorageFileSize(storage: Any, path: Any, length: Any, /) -> bool: + """bool SDL_GetStorageFileSize(SDL_Storage *storage, const char *path, Uint64 *length)""" + + @staticmethod + def SDL_GetStoragePathInfo(storage: Any, path: Any, info: Any, /) -> bool: + """bool SDL_GetStoragePathInfo(SDL_Storage *storage, const char *path, SDL_PathInfo *info)""" + + @staticmethod + def SDL_GetStorageSpaceRemaining(storage: Any, /) -> Any: + """Uint64 SDL_GetStorageSpaceRemaining(SDL_Storage *storage)""" + + @staticmethod + def SDL_GetStringProperty(props: Any, name: Any, default_value: Any, /) -> Any: + """const char *SDL_GetStringProperty(SDL_PropertiesID props, const char *name, const char *default_value)""" + + @staticmethod + def SDL_GetSurfaceAlphaMod(surface: Any, alpha: Any, /) -> bool: + """bool SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)""" + + @staticmethod + def SDL_GetSurfaceBlendMode(surface: Any, blendMode: Any, /) -> bool: + """bool SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)""" + + @staticmethod + def SDL_GetSurfaceClipRect(surface: Any, rect: Any, /) -> bool: + """bool SDL_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetSurfaceColorKey(surface: Any, key: Any, /) -> bool: + """bool SDL_GetSurfaceColorKey(SDL_Surface *surface, Uint32 *key)""" + + @staticmethod + def SDL_GetSurfaceColorMod(surface: Any, r: Any, g: Any, b: Any, /) -> bool: + """bool SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)""" + + @staticmethod + def SDL_GetSurfaceColorspace(surface: Any, /) -> Any: + """SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface *surface)""" + + @staticmethod + def SDL_GetSurfaceImages(surface: Any, count: Any, /) -> Any: + """SDL_Surface **SDL_GetSurfaceImages(SDL_Surface *surface, int *count)""" + + @staticmethod + def SDL_GetSurfacePalette(surface: Any, /) -> Any: + """SDL_Palette *SDL_GetSurfacePalette(SDL_Surface *surface)""" + + @staticmethod + def SDL_GetSurfaceProperties(surface: Any, /) -> Any: + """SDL_PropertiesID SDL_GetSurfaceProperties(SDL_Surface *surface)""" + + @staticmethod + def SDL_GetSystemRAM() -> int: + """int SDL_GetSystemRAM(void)""" + + @staticmethod + def SDL_GetSystemTheme() -> Any: + """SDL_SystemTheme SDL_GetSystemTheme(void)""" + + @staticmethod + def SDL_GetTLS(id: Any, /) -> Any: + """void *SDL_GetTLS(SDL_TLSID *id)""" + + @staticmethod + def SDL_GetTextInputArea(window: Any, rect: Any, cursor: Any, /) -> bool: + """bool SDL_GetTextInputArea(SDL_Window *window, SDL_Rect *rect, int *cursor)""" + + @staticmethod + def SDL_GetTextureAlphaMod(texture: Any, alpha: Any, /) -> bool: + """bool SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha)""" + + @staticmethod + def SDL_GetTextureAlphaModFloat(texture: Any, alpha: Any, /) -> bool: + """bool SDL_GetTextureAlphaModFloat(SDL_Texture *texture, float *alpha)""" + + @staticmethod + def SDL_GetTextureBlendMode(texture: Any, blendMode: Any, /) -> bool: + """bool SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode)""" + + @staticmethod + def SDL_GetTextureColorMod(texture: Any, r: Any, g: Any, b: Any, /) -> bool: + """bool SDL_GetTextureColorMod(SDL_Texture *texture, Uint8 *r, Uint8 *g, Uint8 *b)""" + + @staticmethod + def SDL_GetTextureColorModFloat(texture: Any, r: Any, g: Any, b: Any, /) -> bool: + """bool SDL_GetTextureColorModFloat(SDL_Texture *texture, float *r, float *g, float *b)""" + + @staticmethod + def SDL_GetTextureProperties(texture: Any, /) -> Any: + """SDL_PropertiesID SDL_GetTextureProperties(SDL_Texture *texture)""" + + @staticmethod + def SDL_GetTextureScaleMode(texture: Any, scaleMode: Any, /) -> bool: + """bool SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode)""" + + @staticmethod + def SDL_GetTextureSize(texture: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetTextureSize(SDL_Texture *texture, float *w, float *h)""" + + @staticmethod + def SDL_GetThreadID(thread: Any, /) -> Any: + """SDL_ThreadID SDL_GetThreadID(SDL_Thread *thread)""" + + @staticmethod + def SDL_GetThreadName(thread: Any, /) -> Any: + """const char *SDL_GetThreadName(SDL_Thread *thread)""" + + @staticmethod + def SDL_GetThreadState(thread: Any, /) -> Any: + """SDL_ThreadState SDL_GetThreadState(SDL_Thread *thread)""" + + @staticmethod + def SDL_GetTicks() -> Any: + """Uint64 SDL_GetTicks(void)""" + + @staticmethod + def SDL_GetTicksNS() -> Any: + """Uint64 SDL_GetTicksNS(void)""" + + @staticmethod + def SDL_GetTouchDeviceName(touchID: Any, /) -> Any: + """const char *SDL_GetTouchDeviceName(SDL_TouchID touchID)""" + + @staticmethod + def SDL_GetTouchDeviceType(touchID: Any, /) -> Any: + """SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID)""" + + @staticmethod + def SDL_GetTouchDevices(count: Any, /) -> Any: + """SDL_TouchID *SDL_GetTouchDevices(int *count)""" + + @staticmethod + def SDL_GetTouchFingers(touchID: Any, count: Any, /) -> Any: + """SDL_Finger **SDL_GetTouchFingers(SDL_TouchID touchID, int *count)""" + + @staticmethod + def SDL_GetTrayEntries(menu: Any, count: Any, /) -> Any: + """const SDL_TrayEntry **SDL_GetTrayEntries(SDL_TrayMenu *menu, int *count)""" + + @staticmethod + def SDL_GetTrayEntryChecked(entry: Any, /) -> bool: + """bool SDL_GetTrayEntryChecked(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_GetTrayEntryEnabled(entry: Any, /) -> bool: + """bool SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_GetTrayEntryLabel(entry: Any, /) -> Any: + """const char *SDL_GetTrayEntryLabel(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_GetTrayEntryParent(entry: Any, /) -> Any: + """SDL_TrayMenu *SDL_GetTrayEntryParent(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_GetTrayMenu(tray: Any, /) -> Any: + """SDL_TrayMenu *SDL_GetTrayMenu(SDL_Tray *tray)""" + + @staticmethod + def SDL_GetTrayMenuParentEntry(menu: Any, /) -> Any: + """SDL_TrayEntry *SDL_GetTrayMenuParentEntry(SDL_TrayMenu *menu)""" + + @staticmethod + def SDL_GetTrayMenuParentTray(menu: Any, /) -> Any: + """SDL_Tray *SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu)""" + + @staticmethod + def SDL_GetTraySubmenu(entry: Any, /) -> Any: + """SDL_TrayMenu *SDL_GetTraySubmenu(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_GetUserFolder(folder: Any, /) -> Any: + """const char *SDL_GetUserFolder(SDL_Folder folder)""" + + @staticmethod + def SDL_GetVersion() -> int: + """int SDL_GetVersion(void)""" + + @staticmethod + def SDL_GetVideoDriver(index: int, /) -> Any: + """const char *SDL_GetVideoDriver(int index)""" + + @staticmethod + def SDL_GetWindowAspectRatio(window: Any, min_aspect: Any, max_aspect: Any, /) -> bool: + """bool SDL_GetWindowAspectRatio(SDL_Window *window, float *min_aspect, float *max_aspect)""" + + @staticmethod + def SDL_GetWindowBordersSize(window: Any, top: Any, left: Any, bottom: Any, right: Any, /) -> bool: + """bool SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right)""" + + @staticmethod + def SDL_GetWindowDisplayScale(window: Any, /) -> float: + """float SDL_GetWindowDisplayScale(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowFlags(window: Any, /) -> Any: + """SDL_WindowFlags SDL_GetWindowFlags(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowFromEvent(event: Any, /) -> Any: + """SDL_Window *SDL_GetWindowFromEvent(const SDL_Event *event)""" + + @staticmethod + def SDL_GetWindowFromID(id: Any, /) -> Any: + """SDL_Window *SDL_GetWindowFromID(SDL_WindowID id)""" + + @staticmethod + def SDL_GetWindowFullscreenMode(window: Any, /) -> Any: + """const SDL_DisplayMode *SDL_GetWindowFullscreenMode(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowICCProfile(window: Any, size: Any, /) -> Any: + """void *SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)""" + + @staticmethod + def SDL_GetWindowID(window: Any, /) -> Any: + """SDL_WindowID SDL_GetWindowID(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowKeyboardGrab(window: Any, /) -> bool: + """bool SDL_GetWindowKeyboardGrab(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowMaximumSize(window: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h)""" + + @staticmethod + def SDL_GetWindowMinimumSize(window: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h)""" + + @staticmethod + def SDL_GetWindowMouseGrab(window: Any, /) -> bool: + """bool SDL_GetWindowMouseGrab(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowMouseRect(window: Any, /) -> Any: + """const SDL_Rect *SDL_GetWindowMouseRect(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowOpacity(window: Any, /) -> float: + """float SDL_GetWindowOpacity(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowParent(window: Any, /) -> Any: + """SDL_Window *SDL_GetWindowParent(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowPixelDensity(window: Any, /) -> float: + """float SDL_GetWindowPixelDensity(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowPixelFormat(window: Any, /) -> Any: + """SDL_PixelFormat SDL_GetWindowPixelFormat(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowPosition(window: Any, x: Any, y: Any, /) -> bool: + """bool SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)""" + + @staticmethod + def SDL_GetWindowProperties(window: Any, /) -> Any: + """SDL_PropertiesID SDL_GetWindowProperties(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowRelativeMouseMode(window: Any, /) -> bool: + """bool SDL_GetWindowRelativeMouseMode(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowSafeArea(window: Any, rect: Any, /) -> bool: + """bool SDL_GetWindowSafeArea(SDL_Window *window, SDL_Rect *rect)""" + + @staticmethod + def SDL_GetWindowSize(window: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetWindowSize(SDL_Window *window, int *w, int *h)""" + + @staticmethod + def SDL_GetWindowSizeInPixels(window: Any, w: Any, h: Any, /) -> bool: + """bool SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h)""" + + @staticmethod + def SDL_GetWindowSurface(window: Any, /) -> Any: + """SDL_Surface *SDL_GetWindowSurface(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindowSurfaceVSync(window: Any, vsync: Any, /) -> bool: + """bool SDL_GetWindowSurfaceVSync(SDL_Window *window, int *vsync)""" + + @staticmethod + def SDL_GetWindowTitle(window: Any, /) -> Any: + """const char *SDL_GetWindowTitle(SDL_Window *window)""" + + @staticmethod + def SDL_GetWindows(count: Any, /) -> Any: + """SDL_Window **SDL_GetWindows(int *count)""" + + @staticmethod + def SDL_GlobDirectory(path: Any, pattern: Any, flags: Any, count: Any, /) -> Any: + """char **SDL_GlobDirectory(const char *path, const char *pattern, SDL_GlobFlags flags, int *count)""" + + @staticmethod + def SDL_GlobStorageDirectory(storage: Any, path: Any, pattern: Any, flags: Any, count: Any, /) -> Any: + """char **SDL_GlobStorageDirectory(SDL_Storage *storage, const char *path, const char *pattern, SDL_GlobFlags flags, int *count)""" + + @staticmethod + def SDL_HapticEffectSupported(haptic: Any, effect: Any, /) -> bool: + """bool SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect)""" + + @staticmethod + def SDL_HapticRumbleSupported(haptic: Any, /) -> bool: + """bool SDL_HapticRumbleSupported(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_HasARMSIMD() -> bool: + """bool SDL_HasARMSIMD(void)""" + + @staticmethod + def SDL_HasAVX() -> bool: + """bool SDL_HasAVX(void)""" + + @staticmethod + def SDL_HasAVX2() -> bool: + """bool SDL_HasAVX2(void)""" + + @staticmethod + def SDL_HasAVX512F() -> bool: + """bool SDL_HasAVX512F(void)""" + + @staticmethod + def SDL_HasAltiVec() -> bool: + """bool SDL_HasAltiVec(void)""" + + @staticmethod + def SDL_HasClipboardData(mime_type: Any, /) -> bool: + """bool SDL_HasClipboardData(const char *mime_type)""" + + @staticmethod + def SDL_HasClipboardText() -> bool: + """bool SDL_HasClipboardText(void)""" + + @staticmethod + def SDL_HasEvent(type: Any, /) -> bool: + """bool SDL_HasEvent(Uint32 type)""" + + @staticmethod + def SDL_HasEvents(minType: Any, maxType: Any, /) -> bool: + """bool SDL_HasEvents(Uint32 minType, Uint32 maxType)""" + + @staticmethod + def SDL_HasGamepad() -> bool: + """bool SDL_HasGamepad(void)""" + + @staticmethod + def SDL_HasJoystick() -> bool: + """bool SDL_HasJoystick(void)""" + + @staticmethod + def SDL_HasKeyboard() -> bool: + """bool SDL_HasKeyboard(void)""" + + @staticmethod + def SDL_HasLASX() -> bool: + """bool SDL_HasLASX(void)""" + + @staticmethod + def SDL_HasLSX() -> bool: + """bool SDL_HasLSX(void)""" + + @staticmethod + def SDL_HasMMX() -> bool: + """bool SDL_HasMMX(void)""" + + @staticmethod + def SDL_HasMouse() -> bool: + """bool SDL_HasMouse(void)""" + + @staticmethod + def SDL_HasNEON() -> bool: + """bool SDL_HasNEON(void)""" + + @staticmethod + def SDL_HasPrimarySelectionText() -> bool: + """bool SDL_HasPrimarySelectionText(void)""" + + @staticmethod + def SDL_HasProperty(props: Any, name: Any, /) -> bool: + """bool SDL_HasProperty(SDL_PropertiesID props, const char *name)""" + + @staticmethod + def SDL_HasRectIntersection(A: Any, B: Any, /) -> bool: + """bool SDL_HasRectIntersection(const SDL_Rect *A, const SDL_Rect *B)""" + + @staticmethod + def SDL_HasRectIntersectionFloat(A: Any, B: Any, /) -> bool: + """bool SDL_HasRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B)""" + + @staticmethod + def SDL_HasSSE() -> bool: + """bool SDL_HasSSE(void)""" + + @staticmethod + def SDL_HasSSE2() -> bool: + """bool SDL_HasSSE2(void)""" + + @staticmethod + def SDL_HasSSE3() -> bool: + """bool SDL_HasSSE3(void)""" + + @staticmethod + def SDL_HasSSE41() -> bool: + """bool SDL_HasSSE41(void)""" + + @staticmethod + def SDL_HasSSE42() -> bool: + """bool SDL_HasSSE42(void)""" + + @staticmethod + def SDL_HasScreenKeyboardSupport() -> bool: + """bool SDL_HasScreenKeyboardSupport(void)""" + + @staticmethod + def SDL_HideCursor() -> bool: + """bool SDL_HideCursor(void)""" + + @staticmethod + def SDL_HideWindow(window: Any, /) -> bool: + """bool SDL_HideWindow(SDL_Window *window)""" + + @staticmethod + def SDL_IOFromConstMem(mem: Any, size: int, /) -> Any: + """SDL_IOStream *SDL_IOFromConstMem(const void *mem, size_t size)""" + + @staticmethod + def SDL_IOFromDynamicMem() -> Any: + """SDL_IOStream *SDL_IOFromDynamicMem(void)""" + + @staticmethod + def SDL_IOFromFile(file: Any, mode: Any, /) -> Any: + """SDL_IOStream *SDL_IOFromFile(const char *file, const char *mode)""" + + @staticmethod + def SDL_IOFromMem(mem: Any, size: int, /) -> Any: + """SDL_IOStream *SDL_IOFromMem(void *mem, size_t size)""" + + @staticmethod + def SDL_IOprintf(context: Any, fmt: Any, /, *__args: Any) -> int: + """size_t SDL_IOprintf(SDL_IOStream *context, const char *fmt, ...)""" + + @staticmethod + def SDL_Init(flags: Any, /) -> bool: + """bool SDL_Init(SDL_InitFlags flags)""" + + @staticmethod + def SDL_InitHapticRumble(haptic: Any, /) -> bool: + """bool SDL_InitHapticRumble(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_InitSubSystem(flags: Any, /) -> bool: + """bool SDL_InitSubSystem(SDL_InitFlags flags)""" + + @staticmethod + def SDL_InsertGPUDebugLabel(command_buffer: Any, text: Any, /) -> None: + """void SDL_InsertGPUDebugLabel(SDL_GPUCommandBuffer *command_buffer, const char *text)""" + + @staticmethod + def SDL_InsertTrayEntryAt(menu: Any, pos: int, label: Any, flags: Any, /) -> Any: + """SDL_TrayEntry *SDL_InsertTrayEntryAt(SDL_TrayMenu *menu, int pos, const char *label, SDL_TrayEntryFlags flags)""" + + @staticmethod + def SDL_IsAudioDevicePhysical(devid: Any, /) -> bool: + """bool SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_IsAudioDevicePlayback(devid: Any, /) -> bool: + """bool SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_IsGamepad(instance_id: Any, /) -> bool: + """bool SDL_IsGamepad(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_IsJoystickHaptic(joystick: Any, /) -> bool: + """bool SDL_IsJoystickHaptic(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_IsJoystickVirtual(instance_id: Any, /) -> bool: + """bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_IsMainThread() -> bool: + """bool SDL_IsMainThread(void)""" + + @staticmethod + def SDL_IsMouseHaptic() -> bool: + """bool SDL_IsMouseHaptic(void)""" + + @staticmethod + def SDL_IsTV() -> bool: + """bool SDL_IsTV(void)""" + + @staticmethod + def SDL_IsTablet() -> bool: + """bool SDL_IsTablet(void)""" + + @staticmethod + def SDL_JoystickConnected(joystick: Any, /) -> bool: + """bool SDL_JoystickConnected(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_JoystickEventsEnabled() -> bool: + """bool SDL_JoystickEventsEnabled(void)""" + + @staticmethod + def SDL_KillProcess(process: Any, force: bool, /) -> bool: + """bool SDL_KillProcess(SDL_Process *process, bool force)""" + + @staticmethod + def SDL_LoadBMP(file: Any, /) -> Any: + """SDL_Surface *SDL_LoadBMP(const char *file)""" + + @staticmethod + def SDL_LoadBMP_IO(src: Any, closeio: bool, /) -> Any: + """SDL_Surface *SDL_LoadBMP_IO(SDL_IOStream *src, bool closeio)""" + + @staticmethod + def SDL_LoadFile(file: Any, datasize: Any, /) -> Any: + """void *SDL_LoadFile(const char *file, size_t *datasize)""" + + @staticmethod + def SDL_LoadFileAsync(file: Any, queue: Any, userdata: Any, /) -> bool: + """bool SDL_LoadFileAsync(const char *file, SDL_AsyncIOQueue *queue, void *userdata)""" + + @staticmethod + def SDL_LoadFile_IO(src: Any, datasize: Any, closeio: bool, /) -> Any: + """void *SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, bool closeio)""" + + @staticmethod + def SDL_LoadFunction(handle: Any, name: Any, /) -> Any: + """SDL_FunctionPointer SDL_LoadFunction(SDL_SharedObject *handle, const char *name)""" + + @staticmethod + def SDL_LoadObject(sofile: Any, /) -> Any: + """SDL_SharedObject *SDL_LoadObject(const char *sofile)""" + + @staticmethod + def SDL_LoadWAV(path: Any, spec: Any, audio_buf: Any, audio_len: Any, /) -> bool: + """bool SDL_LoadWAV(const char *path, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)""" + + @staticmethod + def SDL_LoadWAV_IO(src: Any, closeio: bool, spec: Any, audio_buf: Any, audio_len: Any, /) -> bool: + """bool SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)""" + + @staticmethod + def SDL_LockAudioStream(stream: Any, /) -> bool: + """bool SDL_LockAudioStream(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_LockJoysticks() -> None: + """void SDL_LockJoysticks(void)""" + + @staticmethod + def SDL_LockMutex(mutex: Any, /) -> None: + """void SDL_LockMutex(SDL_Mutex *mutex)""" + + @staticmethod + def SDL_LockProperties(props: Any, /) -> bool: + """bool SDL_LockProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_LockRWLockForReading(rwlock: Any, /) -> None: + """void SDL_LockRWLockForReading(SDL_RWLock *rwlock)""" + + @staticmethod + def SDL_LockRWLockForWriting(rwlock: Any, /) -> None: + """void SDL_LockRWLockForWriting(SDL_RWLock *rwlock)""" + + @staticmethod + def SDL_LockSpinlock(lock: Any, /) -> None: + """void SDL_LockSpinlock(SDL_SpinLock *lock)""" + + @staticmethod + def SDL_LockSurface(surface: Any, /) -> bool: + """bool SDL_LockSurface(SDL_Surface *surface)""" + + @staticmethod + def SDL_LockTexture(texture: Any, rect: Any, pixels: Any, pitch: Any, /) -> bool: + """bool SDL_LockTexture(SDL_Texture *texture, const SDL_Rect *rect, void **pixels, int *pitch)""" + + @staticmethod + def SDL_LockTextureToSurface(texture: Any, rect: Any, surface: Any, /) -> bool: + """bool SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface)""" + + @staticmethod + def SDL_Log(fmt: Any, /, *__args: Any) -> None: + """void SDL_Log(const char *fmt, ...)""" + + @staticmethod + def SDL_LogCritical(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogCritical(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_LogDebug(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogDebug(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_LogError(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogError(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_LogInfo(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogInfo(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_LogMessage(category: int, priority: Any, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogMessage(int category, SDL_LogPriority priority, const char *fmt, ...)""" + + @staticmethod + def SDL_LogTrace(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogTrace(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_LogVerbose(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogVerbose(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_LogWarn(category: int, fmt: Any, /, *__args: Any) -> None: + """void SDL_LogWarn(int category, const char *fmt, ...)""" + + @staticmethod + def SDL_MapGPUTransferBuffer(device: Any, transfer_buffer: Any, cycle: bool, /) -> Any: + """void *SDL_MapGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer, bool cycle)""" + + @staticmethod + def SDL_MapRGB(format: Any, palette: Any, r: Any, g: Any, b: Any, /) -> Any: + """Uint32 SDL_MapRGB(const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 r, Uint8 g, Uint8 b)""" + + @staticmethod + def SDL_MapRGBA(format: Any, palette: Any, r: Any, g: Any, b: Any, a: Any, /) -> Any: + """Uint32 SDL_MapRGBA(const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 r, Uint8 g, Uint8 b, Uint8 a)""" + + @staticmethod + def SDL_MapSurfaceRGB(surface: Any, r: Any, g: Any, b: Any, /) -> Any: + """Uint32 SDL_MapSurfaceRGB(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)""" + + @staticmethod + def SDL_MapSurfaceRGBA(surface: Any, r: Any, g: Any, b: Any, a: Any, /) -> Any: + """Uint32 SDL_MapSurfaceRGBA(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b, Uint8 a)""" + + @staticmethod + def SDL_MaximizeWindow(window: Any, /) -> bool: + """bool SDL_MaximizeWindow(SDL_Window *window)""" + + @staticmethod + def SDL_MemoryBarrierAcquireFunction() -> None: + """void SDL_MemoryBarrierAcquireFunction(void)""" + + @staticmethod + def SDL_MemoryBarrierReleaseFunction() -> None: + """void SDL_MemoryBarrierReleaseFunction(void)""" + + @staticmethod + def SDL_Metal_CreateView(window: Any, /) -> Any: + """SDL_MetalView SDL_Metal_CreateView(SDL_Window *window)""" + + @staticmethod + def SDL_Metal_DestroyView(view: Any, /) -> None: + """void SDL_Metal_DestroyView(SDL_MetalView view)""" + + @staticmethod + def SDL_Metal_GetLayer(view: Any, /) -> Any: + """void *SDL_Metal_GetLayer(SDL_MetalView view)""" + + @staticmethod + def SDL_MinimizeWindow(window: Any, /) -> bool: + """bool SDL_MinimizeWindow(SDL_Window *window)""" + + @staticmethod + def SDL_MixAudio(dst: Any, src: Any, format: Any, len: Any, volume: float, /) -> bool: + """bool SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, Uint32 len, float volume)""" + + @staticmethod + def SDL_OnApplicationDidEnterBackground() -> None: + """void SDL_OnApplicationDidEnterBackground(void)""" + + @staticmethod + def SDL_OnApplicationDidEnterForeground() -> None: + """void SDL_OnApplicationDidEnterForeground(void)""" + + @staticmethod + def SDL_OnApplicationDidReceiveMemoryWarning() -> None: + """void SDL_OnApplicationDidReceiveMemoryWarning(void)""" + + @staticmethod + def SDL_OnApplicationWillEnterBackground() -> None: + """void SDL_OnApplicationWillEnterBackground(void)""" + + @staticmethod + def SDL_OnApplicationWillEnterForeground() -> None: + """void SDL_OnApplicationWillEnterForeground(void)""" + + @staticmethod + def SDL_OnApplicationWillTerminate() -> None: + """void SDL_OnApplicationWillTerminate(void)""" + + @staticmethod + def SDL_OpenAudioDevice(devid: Any, spec: Any, /) -> Any: + """SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec)""" + + @staticmethod + def SDL_OpenAudioDeviceStream(devid: Any, spec: Any, callback: Any, userdata: Any, /) -> Any: + """SDL_AudioStream *SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec, SDL_AudioStreamCallback callback, void *userdata)""" + + @staticmethod + def SDL_OpenCamera(instance_id: Any, spec: Any, /) -> Any: + """SDL_Camera *SDL_OpenCamera(SDL_CameraID instance_id, const SDL_CameraSpec *spec)""" + + @staticmethod + def SDL_OpenFileStorage(path: Any, /) -> Any: + """SDL_Storage *SDL_OpenFileStorage(const char *path)""" + + @staticmethod + def SDL_OpenGamepad(instance_id: Any, /) -> Any: + """SDL_Gamepad *SDL_OpenGamepad(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_OpenHaptic(instance_id: Any, /) -> Any: + """SDL_Haptic *SDL_OpenHaptic(SDL_HapticID instance_id)""" + + @staticmethod + def SDL_OpenHapticFromJoystick(joystick: Any, /) -> Any: + """SDL_Haptic *SDL_OpenHapticFromJoystick(SDL_Joystick *joystick)""" + + @staticmethod + def SDL_OpenHapticFromMouse() -> Any: + """SDL_Haptic *SDL_OpenHapticFromMouse(void)""" + + @staticmethod + def SDL_OpenIO(iface: Any, userdata: Any, /) -> Any: + """SDL_IOStream *SDL_OpenIO(const SDL_IOStreamInterface *iface, void *userdata)""" + + @staticmethod + def SDL_OpenJoystick(instance_id: Any, /) -> Any: + """SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id)""" + + @staticmethod + def SDL_OpenSensor(instance_id: Any, /) -> Any: + """SDL_Sensor *SDL_OpenSensor(SDL_SensorID instance_id)""" + + @staticmethod + def SDL_OpenStorage(iface: Any, userdata: Any, /) -> Any: + """SDL_Storage *SDL_OpenStorage(const SDL_StorageInterface *iface, void *userdata)""" + + @staticmethod + def SDL_OpenTitleStorage(override: Any, props: Any, /) -> Any: + """SDL_Storage *SDL_OpenTitleStorage(const char *override, SDL_PropertiesID props)""" + + @staticmethod + def SDL_OpenURL(url: Any, /) -> bool: + """bool SDL_OpenURL(const char *url)""" + + @staticmethod + def SDL_OpenUserStorage(org: Any, app: Any, props: Any, /) -> Any: + """SDL_Storage *SDL_OpenUserStorage(const char *org, const char *app, SDL_PropertiesID props)""" + + @staticmethod + def SDL_OutOfMemory() -> bool: + """bool SDL_OutOfMemory(void)""" + + @staticmethod + def SDL_PauseAudioDevice(devid: Any, /) -> bool: + """bool SDL_PauseAudioDevice(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_PauseAudioStreamDevice(stream: Any, /) -> bool: + """bool SDL_PauseAudioStreamDevice(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_PauseHaptic(haptic: Any, /) -> bool: + """bool SDL_PauseHaptic(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_PeepEvents(events: Any, numevents: int, action: Any, minType: Any, maxType: Any, /) -> int: + """int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_EventAction action, Uint32 minType, Uint32 maxType)""" + + @staticmethod + def SDL_PlayHapticRumble(haptic: Any, strength: float, length: Any, /) -> bool: + """bool SDL_PlayHapticRumble(SDL_Haptic *haptic, float strength, Uint32 length)""" + + @staticmethod + def SDL_PollEvent(event: Any, /) -> bool: + """bool SDL_PollEvent(SDL_Event *event)""" + + @staticmethod + def SDL_PopGPUDebugGroup(command_buffer: Any, /) -> None: + """void SDL_PopGPUDebugGroup(SDL_GPUCommandBuffer *command_buffer)""" + + @staticmethod + def SDL_PremultiplyAlpha( + width: int, + height: int, + src_format: Any, + src: Any, + src_pitch: int, + dst_format: Any, + dst: Any, + dst_pitch: int, + linear: bool, + /, + ) -> bool: + """bool SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch, bool linear)""" + + @staticmethod + def SDL_PremultiplySurfaceAlpha(surface: Any, linear: bool, /) -> bool: + """bool SDL_PremultiplySurfaceAlpha(SDL_Surface *surface, bool linear)""" + + @staticmethod + def SDL_PumpEvents() -> None: + """void SDL_PumpEvents(void)""" + + @staticmethod + def SDL_PushEvent(event: Any, /) -> bool: + """bool SDL_PushEvent(SDL_Event *event)""" + + @staticmethod + def SDL_PushGPUComputeUniformData(command_buffer: Any, slot_index: Any, data: Any, length: Any, /) -> None: + """void SDL_PushGPUComputeUniformData(SDL_GPUCommandBuffer *command_buffer, Uint32 slot_index, const void *data, Uint32 length)""" + + @staticmethod + def SDL_PushGPUDebugGroup(command_buffer: Any, name: Any, /) -> None: + """void SDL_PushGPUDebugGroup(SDL_GPUCommandBuffer *command_buffer, const char *name)""" + + @staticmethod + def SDL_PushGPUFragmentUniformData(command_buffer: Any, slot_index: Any, data: Any, length: Any, /) -> None: + """void SDL_PushGPUFragmentUniformData(SDL_GPUCommandBuffer *command_buffer, Uint32 slot_index, const void *data, Uint32 length)""" + + @staticmethod + def SDL_PushGPUVertexUniformData(command_buffer: Any, slot_index: Any, data: Any, length: Any, /) -> None: + """void SDL_PushGPUVertexUniformData(SDL_GPUCommandBuffer *command_buffer, Uint32 slot_index, const void *data, Uint32 length)""" + + @staticmethod + def SDL_PutAudioStreamData(stream: Any, buf: Any, len: int, /) -> bool: + """bool SDL_PutAudioStreamData(SDL_AudioStream *stream, const void *buf, int len)""" + + @staticmethod + def SDL_QueryGPUFence(device: Any, fence: Any, /) -> bool: + """bool SDL_QueryGPUFence(SDL_GPUDevice *device, SDL_GPUFence *fence)""" + + @staticmethod + def SDL_Quit() -> None: + """void SDL_Quit(void)""" + + @staticmethod + def SDL_QuitSubSystem(flags: Any, /) -> None: + """void SDL_QuitSubSystem(SDL_InitFlags flags)""" + + @staticmethod + def SDL_RaiseWindow(window: Any, /) -> bool: + """bool SDL_RaiseWindow(SDL_Window *window)""" + + @staticmethod + def SDL_ReadAsyncIO(asyncio: Any, ptr: Any, offset: Any, size: Any, queue: Any, userdata: Any, /) -> bool: + """bool SDL_ReadAsyncIO(SDL_AsyncIO *asyncio, void *ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue *queue, void *userdata)""" + + @staticmethod + def SDL_ReadIO(context: Any, ptr: Any, size: int, /) -> int: + """size_t SDL_ReadIO(SDL_IOStream *context, void *ptr, size_t size)""" + + @staticmethod + def SDL_ReadProcess(process: Any, datasize: Any, exitcode: Any, /) -> Any: + """void *SDL_ReadProcess(SDL_Process *process, size_t *datasize, int *exitcode)""" + + @staticmethod + def SDL_ReadS16BE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS16BE(SDL_IOStream *src, Sint16 *value)""" + + @staticmethod + def SDL_ReadS16LE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS16LE(SDL_IOStream *src, Sint16 *value)""" + + @staticmethod + def SDL_ReadS32BE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS32BE(SDL_IOStream *src, Sint32 *value)""" + + @staticmethod + def SDL_ReadS32LE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS32LE(SDL_IOStream *src, Sint32 *value)""" + + @staticmethod + def SDL_ReadS64BE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS64BE(SDL_IOStream *src, Sint64 *value)""" + + @staticmethod + def SDL_ReadS64LE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS64LE(SDL_IOStream *src, Sint64 *value)""" + + @staticmethod + def SDL_ReadS8(src: Any, value: Any, /) -> bool: + """bool SDL_ReadS8(SDL_IOStream *src, Sint8 *value)""" + + @staticmethod + def SDL_ReadStorageFile(storage: Any, path: Any, destination: Any, length: Any, /) -> bool: + """bool SDL_ReadStorageFile(SDL_Storage *storage, const char *path, void *destination, Uint64 length)""" + + @staticmethod + def SDL_ReadSurfacePixel(surface: Any, x: int, y: int, r: Any, g: Any, b: Any, a: Any, /) -> bool: + """bool SDL_ReadSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)""" + + @staticmethod + def SDL_ReadSurfacePixelFloat(surface: Any, x: int, y: int, r: Any, g: Any, b: Any, a: Any, /) -> bool: + """bool SDL_ReadSurfacePixelFloat(SDL_Surface *surface, int x, int y, float *r, float *g, float *b, float *a)""" + + @staticmethod + def SDL_ReadU16BE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU16BE(SDL_IOStream *src, Uint16 *value)""" + + @staticmethod + def SDL_ReadU16LE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU16LE(SDL_IOStream *src, Uint16 *value)""" + + @staticmethod + def SDL_ReadU32BE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU32BE(SDL_IOStream *src, Uint32 *value)""" + + @staticmethod + def SDL_ReadU32LE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU32LE(SDL_IOStream *src, Uint32 *value)""" + + @staticmethod + def SDL_ReadU64BE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU64BE(SDL_IOStream *src, Uint64 *value)""" + + @staticmethod + def SDL_ReadU64LE(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU64LE(SDL_IOStream *src, Uint64 *value)""" + + @staticmethod + def SDL_ReadU8(src: Any, value: Any, /) -> bool: + """bool SDL_ReadU8(SDL_IOStream *src, Uint8 *value)""" + + @staticmethod + def SDL_RegisterEvents(numevents: int, /) -> Any: + """Uint32 SDL_RegisterEvents(int numevents)""" + + @staticmethod + def SDL_ReleaseCameraFrame(camera: Any, frame: Any, /) -> None: + """void SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_Surface *frame)""" + + @staticmethod + def SDL_ReleaseGPUBuffer(device: Any, buffer: Any, /) -> None: + """void SDL_ReleaseGPUBuffer(SDL_GPUDevice *device, SDL_GPUBuffer *buffer)""" + + @staticmethod + def SDL_ReleaseGPUComputePipeline(device: Any, compute_pipeline: Any, /) -> None: + """void SDL_ReleaseGPUComputePipeline(SDL_GPUDevice *device, SDL_GPUComputePipeline *compute_pipeline)""" + + @staticmethod + def SDL_ReleaseGPUFence(device: Any, fence: Any, /) -> None: + """void SDL_ReleaseGPUFence(SDL_GPUDevice *device, SDL_GPUFence *fence)""" + + @staticmethod + def SDL_ReleaseGPUGraphicsPipeline(device: Any, graphics_pipeline: Any, /) -> None: + """void SDL_ReleaseGPUGraphicsPipeline(SDL_GPUDevice *device, SDL_GPUGraphicsPipeline *graphics_pipeline)""" + + @staticmethod + def SDL_ReleaseGPUSampler(device: Any, sampler: Any, /) -> None: + """void SDL_ReleaseGPUSampler(SDL_GPUDevice *device, SDL_GPUSampler *sampler)""" + + @staticmethod + def SDL_ReleaseGPUShader(device: Any, shader: Any, /) -> None: + """void SDL_ReleaseGPUShader(SDL_GPUDevice *device, SDL_GPUShader *shader)""" + + @staticmethod + def SDL_ReleaseGPUTexture(device: Any, texture: Any, /) -> None: + """void SDL_ReleaseGPUTexture(SDL_GPUDevice *device, SDL_GPUTexture *texture)""" + + @staticmethod + def SDL_ReleaseGPUTransferBuffer(device: Any, transfer_buffer: Any, /) -> None: + """void SDL_ReleaseGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer)""" + + @staticmethod + def SDL_ReleaseWindowFromGPUDevice(device: Any, window: Any, /) -> None: + """void SDL_ReleaseWindowFromGPUDevice(SDL_GPUDevice *device, SDL_Window *window)""" + + @staticmethod + def SDL_ReloadGamepadMappings() -> bool: + """bool SDL_ReloadGamepadMappings(void)""" + + @staticmethod + def SDL_RemoveEventWatch(filter: Any, userdata: Any, /) -> None: + """void SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata)""" + + @staticmethod + def SDL_RemoveHintCallback(name: Any, callback: Any, userdata: Any, /) -> None: + """void SDL_RemoveHintCallback(const char *name, SDL_HintCallback callback, void *userdata)""" + + @staticmethod + def SDL_RemovePath(path: Any, /) -> bool: + """bool SDL_RemovePath(const char *path)""" + + @staticmethod + def SDL_RemoveStoragePath(storage: Any, path: Any, /) -> bool: + """bool SDL_RemoveStoragePath(SDL_Storage *storage, const char *path)""" + + @staticmethod + def SDL_RemoveSurfaceAlternateImages(surface: Any, /) -> None: + """void SDL_RemoveSurfaceAlternateImages(SDL_Surface *surface)""" + + @staticmethod + def SDL_RemoveTimer(id: Any, /) -> bool: + """bool SDL_RemoveTimer(SDL_TimerID id)""" + + @staticmethod + def SDL_RemoveTrayEntry(entry: Any, /) -> None: + """void SDL_RemoveTrayEntry(SDL_TrayEntry *entry)""" + + @staticmethod + def SDL_RenamePath(oldpath: Any, newpath: Any, /) -> bool: + """bool SDL_RenamePath(const char *oldpath, const char *newpath)""" + + @staticmethod + def SDL_RenameStoragePath(storage: Any, oldpath: Any, newpath: Any, /) -> bool: + """bool SDL_RenameStoragePath(SDL_Storage *storage, const char *oldpath, const char *newpath)""" + + @staticmethod + def SDL_RenderClear(renderer: Any, /) -> bool: + """bool SDL_RenderClear(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_RenderClipEnabled(renderer: Any, /) -> bool: + """bool SDL_RenderClipEnabled(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_RenderCoordinatesFromWindow(renderer: Any, window_x: float, window_y: float, x: Any, y: Any, /) -> bool: + """bool SDL_RenderCoordinatesFromWindow(SDL_Renderer *renderer, float window_x, float window_y, float *x, float *y)""" + + @staticmethod + def SDL_RenderCoordinatesToWindow(renderer: Any, x: float, y: float, window_x: Any, window_y: Any, /) -> bool: + """bool SDL_RenderCoordinatesToWindow(SDL_Renderer *renderer, float x, float y, float *window_x, float *window_y)""" + + @staticmethod + def SDL_RenderDebugText(renderer: Any, x: float, y: float, str: Any, /) -> bool: + """bool SDL_RenderDebugText(SDL_Renderer *renderer, float x, float y, const char *str)""" + + @staticmethod + def SDL_RenderDebugTextFormat(renderer: Any, x: float, y: float, fmt: Any, /, *__args: Any) -> bool: + """bool SDL_RenderDebugTextFormat(SDL_Renderer *renderer, float x, float y, const char *fmt, ...)""" + + @staticmethod + def SDL_RenderFillRect(renderer: Any, rect: Any, /) -> bool: + """bool SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_FRect *rect)""" + + @staticmethod + def SDL_RenderFillRects(renderer: Any, rects: Any, count: int, /) -> bool: + """bool SDL_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count)""" + + @staticmethod + def SDL_RenderGeometry( + renderer: Any, texture: Any, vertices: Any, num_vertices: int, indices: Any, num_indices: int, / + ) -> bool: + """bool SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices)""" + + @staticmethod + def SDL_RenderGeometryRaw( + renderer: Any, + texture: Any, + xy: Any, + xy_stride: int, + color: Any, + color_stride: int, + uv: Any, + uv_stride: int, + num_vertices: int, + indices: Any, + num_indices: int, + size_indices: int, + /, + ) -> bool: + """bool SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_FColor *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices)""" + + @staticmethod + def SDL_RenderLine(renderer: Any, x1: float, y1: float, x2: float, y2: float, /) -> bool: + """bool SDL_RenderLine(SDL_Renderer *renderer, float x1, float y1, float x2, float y2)""" + + @staticmethod + def SDL_RenderLines(renderer: Any, points: Any, count: int, /) -> bool: + """bool SDL_RenderLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count)""" + + @staticmethod + def SDL_RenderPoint(renderer: Any, x: float, y: float, /) -> bool: + """bool SDL_RenderPoint(SDL_Renderer *renderer, float x, float y)""" + + @staticmethod + def SDL_RenderPoints(renderer: Any, points: Any, count: int, /) -> bool: + """bool SDL_RenderPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int count)""" + + @staticmethod + def SDL_RenderPresent(renderer: Any, /) -> bool: + """bool SDL_RenderPresent(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_RenderReadPixels(renderer: Any, rect: Any, /) -> Any: + """SDL_Surface *SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect)""" + + @staticmethod + def SDL_RenderRect(renderer: Any, rect: Any, /) -> bool: + """bool SDL_RenderRect(SDL_Renderer *renderer, const SDL_FRect *rect)""" + + @staticmethod + def SDL_RenderRects(renderer: Any, rects: Any, count: int, /) -> bool: + """bool SDL_RenderRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count)""" + + @staticmethod + def SDL_RenderTexture(renderer: Any, texture: Any, srcrect: Any, dstrect: Any, /) -> bool: + """bool SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FRect *dstrect)""" + + @staticmethod + def SDL_RenderTexture9Grid( + renderer: Any, + texture: Any, + srcrect: Any, + left_width: float, + right_width: float, + top_height: float, + bottom_height: float, + scale: float, + dstrect: Any, + /, + ) -> bool: + """bool SDL_RenderTexture9Grid(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, const SDL_FRect *dstrect)""" + + @staticmethod + def SDL_RenderTextureAffine( + renderer: Any, texture: Any, srcrect: Any, origin: Any, right: Any, down: Any, / + ) -> bool: + """bool SDL_RenderTextureAffine(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FPoint *origin, const SDL_FPoint *right, const SDL_FPoint *down)""" + + @staticmethod + def SDL_RenderTextureRotated( + renderer: Any, texture: Any, srcrect: Any, dstrect: Any, angle: float, center: Any, flip: Any, / + ) -> bool: + """bool SDL_RenderTextureRotated(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FRect *dstrect, double angle, const SDL_FPoint *center, SDL_FlipMode flip)""" + + @staticmethod + def SDL_RenderTextureTiled(renderer: Any, texture: Any, srcrect: Any, scale: float, dstrect: Any, /) -> bool: + """bool SDL_RenderTextureTiled(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float scale, const SDL_FRect *dstrect)""" + + @staticmethod + def SDL_RenderViewportSet(renderer: Any, /) -> bool: + """bool SDL_RenderViewportSet(SDL_Renderer *renderer)""" + + @staticmethod + def SDL_ReportAssertion(data: Any, func: Any, file: Any, line: int, /) -> Any: + """SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data, const char *func, const char *file, int line)""" + + @staticmethod + def SDL_ResetAssertionReport() -> None: + """void SDL_ResetAssertionReport(void)""" + + @staticmethod + def SDL_ResetHint(name: Any, /) -> bool: + """bool SDL_ResetHint(const char *name)""" + + @staticmethod + def SDL_ResetHints() -> None: + """void SDL_ResetHints(void)""" + + @staticmethod + def SDL_ResetKeyboard() -> None: + """void SDL_ResetKeyboard(void)""" + + @staticmethod + def SDL_ResetLogPriorities() -> None: + """void SDL_ResetLogPriorities(void)""" + + @staticmethod + def SDL_RestoreWindow(window: Any, /) -> bool: + """bool SDL_RestoreWindow(SDL_Window *window)""" + + @staticmethod + def SDL_ResumeAudioDevice(devid: Any, /) -> bool: + """bool SDL_ResumeAudioDevice(SDL_AudioDeviceID devid)""" + + @staticmethod + def SDL_ResumeAudioStreamDevice(stream: Any, /) -> bool: + """bool SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_ResumeHaptic(haptic: Any, /) -> bool: + """bool SDL_ResumeHaptic(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_RumbleGamepad( + gamepad: Any, low_frequency_rumble: Any, high_frequency_rumble: Any, duration_ms: Any, / + ) -> bool: + """bool SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)""" + + @staticmethod + def SDL_RumbleGamepadTriggers(gamepad: Any, left_rumble: Any, right_rumble: Any, duration_ms: Any, /) -> bool: + """bool SDL_RumbleGamepadTriggers(SDL_Gamepad *gamepad, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)""" + + @staticmethod + def SDL_RumbleJoystick( + joystick: Any, low_frequency_rumble: Any, high_frequency_rumble: Any, duration_ms: Any, / + ) -> bool: + """bool SDL_RumbleJoystick(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)""" + + @staticmethod + def SDL_RumbleJoystickTriggers(joystick: Any, left_rumble: Any, right_rumble: Any, duration_ms: Any, /) -> bool: + """bool SDL_RumbleJoystickTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)""" + + @staticmethod + def SDL_RunHapticEffect(haptic: Any, effect: int, iterations: Any, /) -> bool: + """bool SDL_RunHapticEffect(SDL_Haptic *haptic, int effect, Uint32 iterations)""" + + @staticmethod + def SDL_RunOnMainThread(callback: Any, userdata: Any, wait_complete: bool, /) -> bool: + """bool SDL_RunOnMainThread(SDL_MainThreadCallback callback, void *userdata, bool wait_complete)""" + + @staticmethod + def SDL_SaveBMP(surface: Any, file: Any, /) -> bool: + """bool SDL_SaveBMP(SDL_Surface *surface, const char *file)""" + + @staticmethod + def SDL_SaveBMP_IO(surface: Any, dst: Any, closeio: bool, /) -> bool: + """bool SDL_SaveBMP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio)""" + + @staticmethod + def SDL_SaveFile(file: Any, data: Any, datasize: int, /) -> bool: + """bool SDL_SaveFile(const char *file, const void *data, size_t datasize)""" + + @staticmethod + def SDL_SaveFile_IO(src: Any, data: Any, datasize: int, closeio: bool, /) -> bool: + """bool SDL_SaveFile_IO(SDL_IOStream *src, const void *data, size_t datasize, bool closeio)""" + + @staticmethod + def SDL_ScaleSurface(surface: Any, width: int, height: int, scaleMode: Any, /) -> Any: + """SDL_Surface *SDL_ScaleSurface(SDL_Surface *surface, int width, int height, SDL_ScaleMode scaleMode)""" + + @staticmethod + def SDL_ScreenKeyboardShown(window: Any, /) -> bool: + """bool SDL_ScreenKeyboardShown(SDL_Window *window)""" + + @staticmethod + def SDL_ScreenSaverEnabled() -> bool: + """bool SDL_ScreenSaverEnabled(void)""" + + @staticmethod + def SDL_SeekIO(context: Any, offset: Any, whence: Any, /) -> Any: + """Sint64 SDL_SeekIO(SDL_IOStream *context, Sint64 offset, SDL_IOWhence whence)""" + + @staticmethod + def SDL_SendGamepadEffect(gamepad: Any, data: Any, size: int, /) -> bool: + """bool SDL_SendGamepadEffect(SDL_Gamepad *gamepad, const void *data, int size)""" + + @staticmethod + def SDL_SendJoystickEffect(joystick: Any, data: Any, size: int, /) -> bool: + """bool SDL_SendJoystickEffect(SDL_Joystick *joystick, const void *data, int size)""" + + @staticmethod + def SDL_SendJoystickVirtualSensorData( + joystick: Any, type: Any, sensor_timestamp: Any, data: Any, num_values: int, / + ) -> bool: + """bool SDL_SendJoystickVirtualSensorData(SDL_Joystick *joystick, SDL_SensorType type, Uint64 sensor_timestamp, const float *data, int num_values)""" + + @staticmethod + def SDL_SetAppMetadata(appname: Any, appversion: Any, appidentifier: Any, /) -> bool: + """bool SDL_SetAppMetadata(const char *appname, const char *appversion, const char *appidentifier)""" + + @staticmethod + def SDL_SetAppMetadataProperty(name: Any, value: Any, /) -> bool: + """bool SDL_SetAppMetadataProperty(const char *name, const char *value)""" + + @staticmethod + def SDL_SetAssertionHandler(handler: Any, userdata: Any, /) -> None: + """void SDL_SetAssertionHandler(SDL_AssertionHandler handler, void *userdata)""" + + @staticmethod + def SDL_SetAtomicInt(a: Any, v: int, /) -> int: + """int SDL_SetAtomicInt(SDL_AtomicInt *a, int v)""" + + @staticmethod + def SDL_SetAtomicPointer(a: Any, v: Any, /) -> Any: + """void *SDL_SetAtomicPointer(void **a, void *v)""" + + @staticmethod + def SDL_SetAtomicU32(a: Any, v: Any, /) -> Any: + """Uint32 SDL_SetAtomicU32(SDL_AtomicU32 *a, Uint32 v)""" + + @staticmethod + def SDL_SetAudioDeviceGain(devid: Any, gain: float, /) -> bool: + """bool SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain)""" + + @staticmethod + def SDL_SetAudioPostmixCallback(devid: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallback callback, void *userdata)""" + + @staticmethod + def SDL_SetAudioStreamFormat(stream: Any, src_spec: Any, dst_spec: Any, /) -> bool: + """bool SDL_SetAudioStreamFormat(SDL_AudioStream *stream, const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec)""" + + @staticmethod + def SDL_SetAudioStreamFrequencyRatio(stream: Any, ratio: float, /) -> bool: + """bool SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream *stream, float ratio)""" + + @staticmethod + def SDL_SetAudioStreamGain(stream: Any, gain: float, /) -> bool: + """bool SDL_SetAudioStreamGain(SDL_AudioStream *stream, float gain)""" + + @staticmethod + def SDL_SetAudioStreamGetCallback(stream: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_SetAudioStreamGetCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata)""" + + @staticmethod + def SDL_SetAudioStreamInputChannelMap(stream: Any, chmap: Any, count: int, /) -> bool: + """bool SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count)""" + + @staticmethod + def SDL_SetAudioStreamOutputChannelMap(stream: Any, chmap: Any, count: int, /) -> bool: + """bool SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream *stream, const int *chmap, int count)""" + + @staticmethod + def SDL_SetAudioStreamPutCallback(stream: Any, callback: Any, userdata: Any, /) -> bool: + """bool SDL_SetAudioStreamPutCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata)""" + + @staticmethod + def SDL_SetBooleanProperty(props: Any, name: Any, value: bool, /) -> bool: + """bool SDL_SetBooleanProperty(SDL_PropertiesID props, const char *name, bool value)""" + + @staticmethod + def SDL_SetClipboardData( + callback: Any, cleanup: Any, userdata: Any, mime_types: Any, num_mime_types: int, / + ) -> bool: + """bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char **mime_types, size_t num_mime_types)""" + + @staticmethod + def SDL_SetClipboardText(text: Any, /) -> bool: + """bool SDL_SetClipboardText(const char *text)""" + + @staticmethod + def SDL_SetCurrentThreadPriority(priority: Any, /) -> bool: + """bool SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority)""" + + @staticmethod + def SDL_SetCursor(cursor: Any, /) -> bool: + """bool SDL_SetCursor(SDL_Cursor *cursor)""" + + @staticmethod + def SDL_SetEnvironmentVariable(env: Any, name: Any, value: Any, overwrite: bool, /) -> bool: + """bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const char *value, bool overwrite)""" + + @staticmethod + def SDL_SetError(fmt: Any, /, *__args: Any) -> bool: + """bool SDL_SetError(const char *fmt, ...)""" + + @staticmethod + def SDL_SetEventEnabled(type: Any, enabled: bool, /) -> None: + """void SDL_SetEventEnabled(Uint32 type, bool enabled)""" + + @staticmethod + def SDL_SetEventFilter(filter: Any, userdata: Any, /) -> None: + """void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata)""" + + @staticmethod + def SDL_SetFloatProperty(props: Any, name: Any, value: float, /) -> bool: + """bool SDL_SetFloatProperty(SDL_PropertiesID props, const char *name, float value)""" + + @staticmethod + def SDL_SetGPUAllowedFramesInFlight(device: Any, allowed_frames_in_flight: Any, /) -> bool: + """bool SDL_SetGPUAllowedFramesInFlight(SDL_GPUDevice *device, Uint32 allowed_frames_in_flight)""" + + @staticmethod + def SDL_SetGPUBlendConstants(render_pass: Any, blend_constants: Any, /) -> None: + """void SDL_SetGPUBlendConstants(SDL_GPURenderPass *render_pass, SDL_FColor blend_constants)""" + + @staticmethod + def SDL_SetGPUBufferName(device: Any, buffer: Any, text: Any, /) -> None: + """void SDL_SetGPUBufferName(SDL_GPUDevice *device, SDL_GPUBuffer *buffer, const char *text)""" + + @staticmethod + def SDL_SetGPUScissor(render_pass: Any, scissor: Any, /) -> None: + """void SDL_SetGPUScissor(SDL_GPURenderPass *render_pass, const SDL_Rect *scissor)""" + + @staticmethod + def SDL_SetGPUStencilReference(render_pass: Any, reference: Any, /) -> None: + """void SDL_SetGPUStencilReference(SDL_GPURenderPass *render_pass, Uint8 reference)""" + + @staticmethod + def SDL_SetGPUSwapchainParameters( + device: Any, window: Any, swapchain_composition: Any, present_mode: Any, / + ) -> bool: + """bool SDL_SetGPUSwapchainParameters(SDL_GPUDevice *device, SDL_Window *window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode)""" + + @staticmethod + def SDL_SetGPUTextureName(device: Any, texture: Any, text: Any, /) -> None: + """void SDL_SetGPUTextureName(SDL_GPUDevice *device, SDL_GPUTexture *texture, const char *text)""" + + @staticmethod + def SDL_SetGPUViewport(render_pass: Any, viewport: Any, /) -> None: + """void SDL_SetGPUViewport(SDL_GPURenderPass *render_pass, const SDL_GPUViewport *viewport)""" + + @staticmethod + def SDL_SetGamepadEventsEnabled(enabled: bool, /) -> None: + """void SDL_SetGamepadEventsEnabled(bool enabled)""" + + @staticmethod + def SDL_SetGamepadLED(gamepad: Any, red: Any, green: Any, blue: Any, /) -> bool: + """bool SDL_SetGamepadLED(SDL_Gamepad *gamepad, Uint8 red, Uint8 green, Uint8 blue)""" + + @staticmethod + def SDL_SetGamepadMapping(instance_id: Any, mapping: Any, /) -> bool: + """bool SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping)""" + + @staticmethod + def SDL_SetGamepadPlayerIndex(gamepad: Any, player_index: int, /) -> bool: + """bool SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int player_index)""" + + @staticmethod + def SDL_SetGamepadSensorEnabled(gamepad: Any, type: Any, enabled: bool, /) -> bool: + """bool SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type, bool enabled)""" + + @staticmethod + def SDL_SetHapticAutocenter(haptic: Any, autocenter: int, /) -> bool: + """bool SDL_SetHapticAutocenter(SDL_Haptic *haptic, int autocenter)""" + + @staticmethod + def SDL_SetHapticGain(haptic: Any, gain: int, /) -> bool: + """bool SDL_SetHapticGain(SDL_Haptic *haptic, int gain)""" + + @staticmethod + def SDL_SetHint(name: Any, value: Any, /) -> bool: + """bool SDL_SetHint(const char *name, const char *value)""" + + @staticmethod + def SDL_SetHintWithPriority(name: Any, value: Any, priority: Any, /) -> bool: + """bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)""" + + @staticmethod + def SDL_SetInitialized(state: Any, initialized: bool, /) -> None: + """void SDL_SetInitialized(SDL_InitState *state, bool initialized)""" + + @staticmethod + def SDL_SetJoystickEventsEnabled(enabled: bool, /) -> None: + """void SDL_SetJoystickEventsEnabled(bool enabled)""" + + @staticmethod + def SDL_SetJoystickLED(joystick: Any, red: Any, green: Any, blue: Any, /) -> bool: + """bool SDL_SetJoystickLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)""" + + @staticmethod + def SDL_SetJoystickPlayerIndex(joystick: Any, player_index: int, /) -> bool: + """bool SDL_SetJoystickPlayerIndex(SDL_Joystick *joystick, int player_index)""" + + @staticmethod + def SDL_SetJoystickVirtualAxis(joystick: Any, axis: int, value: Any, /) -> bool: + """bool SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)""" + + @staticmethod + def SDL_SetJoystickVirtualBall(joystick: Any, ball: int, xrel: Any, yrel: Any, /) -> bool: + """bool SDL_SetJoystickVirtualBall(SDL_Joystick *joystick, int ball, Sint16 xrel, Sint16 yrel)""" + + @staticmethod + def SDL_SetJoystickVirtualButton(joystick: Any, button: int, down: bool, /) -> bool: + """bool SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, bool down)""" + + @staticmethod + def SDL_SetJoystickVirtualHat(joystick: Any, hat: int, value: Any, /) -> bool: + """bool SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)""" + + @staticmethod + def SDL_SetJoystickVirtualTouchpad( + joystick: Any, touchpad: int, finger: int, down: bool, x: float, y: float, pressure: float, / + ) -> bool: + """bool SDL_SetJoystickVirtualTouchpad(SDL_Joystick *joystick, int touchpad, int finger, bool down, float x, float y, float pressure)""" + + @staticmethod + def SDL_SetLogOutputFunction(callback: Any, userdata: Any, /) -> None: + """void SDL_SetLogOutputFunction(SDL_LogOutputFunction callback, void *userdata)""" + + @staticmethod + def SDL_SetLogPriorities(priority: Any, /) -> None: + """void SDL_SetLogPriorities(SDL_LogPriority priority)""" + + @staticmethod + def SDL_SetLogPriority(category: int, priority: Any, /) -> None: + """void SDL_SetLogPriority(int category, SDL_LogPriority priority)""" + + @staticmethod + def SDL_SetLogPriorityPrefix(priority: Any, prefix: Any, /) -> bool: + """bool SDL_SetLogPriorityPrefix(SDL_LogPriority priority, const char *prefix)""" + + @staticmethod + def SDL_SetMemoryFunctions(malloc_func: Any, calloc_func: Any, realloc_func: Any, free_func: Any, /) -> bool: + """bool SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, SDL_realloc_func realloc_func, SDL_free_func free_func)""" + + @staticmethod + def SDL_SetModState(modstate: Any, /) -> None: + """void SDL_SetModState(SDL_Keymod modstate)""" + + @staticmethod + def SDL_SetNumberProperty(props: Any, name: Any, value: Any, /) -> bool: + """bool SDL_SetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 value)""" + + @staticmethod + def SDL_SetPaletteColors(palette: Any, colors: Any, firstcolor: int, ncolors: int, /) -> bool: + """bool SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors)""" + + @staticmethod + def SDL_SetPointerProperty(props: Any, name: Any, value: Any, /) -> bool: + """bool SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value)""" + + @staticmethod + def SDL_SetPointerPropertyWithCleanup(props: Any, name: Any, value: Any, cleanup: Any, userdata: Any, /) -> bool: + """bool SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata)""" + + @staticmethod + def SDL_SetPrimarySelectionText(text: Any, /) -> bool: + """bool SDL_SetPrimarySelectionText(const char *text)""" + + @staticmethod + def SDL_SetRenderClipRect(renderer: Any, rect: Any, /) -> bool: + """bool SDL_SetRenderClipRect(SDL_Renderer *renderer, const SDL_Rect *rect)""" + + @staticmethod + def SDL_SetRenderColorScale(renderer: Any, scale: float, /) -> bool: + """bool SDL_SetRenderColorScale(SDL_Renderer *renderer, float scale)""" + + @staticmethod + def SDL_SetRenderDrawBlendMode(renderer: Any, blendMode: Any, /) -> bool: + """bool SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode)""" + + @staticmethod + def SDL_SetRenderDrawColor(renderer: Any, r: Any, g: Any, b: Any, a: Any, /) -> bool: + """bool SDL_SetRenderDrawColor(SDL_Renderer *renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a)""" + + @staticmethod + def SDL_SetRenderDrawColorFloat(renderer: Any, r: float, g: float, b: float, a: float, /) -> bool: + """bool SDL_SetRenderDrawColorFloat(SDL_Renderer *renderer, float r, float g, float b, float a)""" + + @staticmethod + def SDL_SetRenderLogicalPresentation(renderer: Any, w: int, h: int, mode: Any, /) -> bool: + """bool SDL_SetRenderLogicalPresentation(SDL_Renderer *renderer, int w, int h, SDL_RendererLogicalPresentation mode)""" + + @staticmethod + def SDL_SetRenderScale(renderer: Any, scaleX: float, scaleY: float, /) -> bool: + """bool SDL_SetRenderScale(SDL_Renderer *renderer, float scaleX, float scaleY)""" + + @staticmethod + def SDL_SetRenderTarget(renderer: Any, texture: Any, /) -> bool: + """bool SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)""" + + @staticmethod + def SDL_SetRenderVSync(renderer: Any, vsync: int, /) -> bool: + """bool SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync)""" + + @staticmethod + def SDL_SetRenderViewport(renderer: Any, rect: Any, /) -> bool: + """bool SDL_SetRenderViewport(SDL_Renderer *renderer, const SDL_Rect *rect)""" + + @staticmethod + def SDL_SetScancodeName(scancode: Any, name: Any, /) -> bool: + """bool SDL_SetScancodeName(SDL_Scancode scancode, const char *name)""" + + @staticmethod + def SDL_SetStringProperty(props: Any, name: Any, value: Any, /) -> bool: + """bool SDL_SetStringProperty(SDL_PropertiesID props, const char *name, const char *value)""" + + @staticmethod + def SDL_SetSurfaceAlphaMod(surface: Any, alpha: Any, /) -> bool: + """bool SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)""" + + @staticmethod + def SDL_SetSurfaceBlendMode(surface: Any, blendMode: Any, /) -> bool: + """bool SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)""" + + @staticmethod + def SDL_SetSurfaceClipRect(surface: Any, rect: Any, /) -> bool: + """bool SDL_SetSurfaceClipRect(SDL_Surface *surface, const SDL_Rect *rect)""" + + @staticmethod + def SDL_SetSurfaceColorKey(surface: Any, enabled: bool, key: Any, /) -> bool: + """bool SDL_SetSurfaceColorKey(SDL_Surface *surface, bool enabled, Uint32 key)""" + + @staticmethod + def SDL_SetSurfaceColorMod(surface: Any, r: Any, g: Any, b: Any, /) -> bool: + """bool SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)""" + + @staticmethod + def SDL_SetSurfaceColorspace(surface: Any, colorspace: Any, /) -> bool: + """bool SDL_SetSurfaceColorspace(SDL_Surface *surface, SDL_Colorspace colorspace)""" + + @staticmethod + def SDL_SetSurfacePalette(surface: Any, palette: Any, /) -> bool: + """bool SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)""" + + @staticmethod + def SDL_SetSurfaceRLE(surface: Any, enabled: bool, /) -> bool: + """bool SDL_SetSurfaceRLE(SDL_Surface *surface, bool enabled)""" + + @staticmethod + def SDL_SetTLS(id: Any, value: Any, destructor: Any, /) -> bool: + """bool SDL_SetTLS(SDL_TLSID *id, const void *value, SDL_TLSDestructorCallback destructor)""" + + @staticmethod + def SDL_SetTextInputArea(window: Any, rect: Any, cursor: int, /) -> bool: + """bool SDL_SetTextInputArea(SDL_Window *window, const SDL_Rect *rect, int cursor)""" + + @staticmethod + def SDL_SetTextureAlphaMod(texture: Any, alpha: Any, /) -> bool: + """bool SDL_SetTextureAlphaMod(SDL_Texture *texture, Uint8 alpha)""" + + @staticmethod + def SDL_SetTextureAlphaModFloat(texture: Any, alpha: float, /) -> bool: + """bool SDL_SetTextureAlphaModFloat(SDL_Texture *texture, float alpha)""" + + @staticmethod + def SDL_SetTextureBlendMode(texture: Any, blendMode: Any, /) -> bool: + """bool SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode)""" + + @staticmethod + def SDL_SetTextureColorMod(texture: Any, r: Any, g: Any, b: Any, /) -> bool: + """bool SDL_SetTextureColorMod(SDL_Texture *texture, Uint8 r, Uint8 g, Uint8 b)""" + + @staticmethod + def SDL_SetTextureColorModFloat(texture: Any, r: float, g: float, b: float, /) -> bool: + """bool SDL_SetTextureColorModFloat(SDL_Texture *texture, float r, float g, float b)""" + + @staticmethod + def SDL_SetTextureScaleMode(texture: Any, scaleMode: Any, /) -> bool: + """bool SDL_SetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode scaleMode)""" + + @staticmethod + def SDL_SetTrayEntryCallback(entry: Any, callback: Any, userdata: Any, /) -> None: + """void SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata)""" + + @staticmethod + def SDL_SetTrayEntryChecked(entry: Any, checked: bool, /) -> None: + """void SDL_SetTrayEntryChecked(SDL_TrayEntry *entry, bool checked)""" + + @staticmethod + def SDL_SetTrayEntryEnabled(entry: Any, enabled: bool, /) -> None: + """void SDL_SetTrayEntryEnabled(SDL_TrayEntry *entry, bool enabled)""" + + @staticmethod + def SDL_SetTrayEntryLabel(entry: Any, label: Any, /) -> None: + """void SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, const char *label)""" + + @staticmethod + def SDL_SetTrayIcon(tray: Any, icon: Any, /) -> None: + """void SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *icon)""" + + @staticmethod + def SDL_SetTrayTooltip(tray: Any, tooltip: Any, /) -> None: + """void SDL_SetTrayTooltip(SDL_Tray *tray, const char *tooltip)""" + + @staticmethod + def SDL_SetWindowAlwaysOnTop(window: Any, on_top: bool, /) -> bool: + """bool SDL_SetWindowAlwaysOnTop(SDL_Window *window, bool on_top)""" + + @staticmethod + def SDL_SetWindowAspectRatio(window: Any, min_aspect: float, max_aspect: float, /) -> bool: + """bool SDL_SetWindowAspectRatio(SDL_Window *window, float min_aspect, float max_aspect)""" + + @staticmethod + def SDL_SetWindowBordered(window: Any, bordered: bool, /) -> bool: + """bool SDL_SetWindowBordered(SDL_Window *window, bool bordered)""" + + @staticmethod + def SDL_SetWindowFocusable(window: Any, focusable: bool, /) -> bool: + """bool SDL_SetWindowFocusable(SDL_Window *window, bool focusable)""" + + @staticmethod + def SDL_SetWindowFullscreen(window: Any, fullscreen: bool, /) -> bool: + """bool SDL_SetWindowFullscreen(SDL_Window *window, bool fullscreen)""" + + @staticmethod + def SDL_SetWindowFullscreenMode(window: Any, mode: Any, /) -> bool: + """bool SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode)""" + + @staticmethod + def SDL_SetWindowHitTest(window: Any, callback: Any, callback_data: Any, /) -> bool: + """bool SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data)""" + + @staticmethod + def SDL_SetWindowIcon(window: Any, icon: Any, /) -> bool: + """bool SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon)""" + + @staticmethod + def SDL_SetWindowKeyboardGrab(window: Any, grabbed: bool, /) -> bool: + """bool SDL_SetWindowKeyboardGrab(SDL_Window *window, bool grabbed)""" + + @staticmethod + def SDL_SetWindowMaximumSize(window: Any, max_w: int, max_h: int, /) -> bool: + """bool SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)""" + + @staticmethod + def SDL_SetWindowMinimumSize(window: Any, min_w: int, min_h: int, /) -> bool: + """bool SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h)""" + + @staticmethod + def SDL_SetWindowModal(window: Any, modal: bool, /) -> bool: + """bool SDL_SetWindowModal(SDL_Window *window, bool modal)""" + + @staticmethod + def SDL_SetWindowMouseGrab(window: Any, grabbed: bool, /) -> bool: + """bool SDL_SetWindowMouseGrab(SDL_Window *window, bool grabbed)""" + + @staticmethod + def SDL_SetWindowMouseRect(window: Any, rect: Any, /) -> bool: + """bool SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect)""" + + @staticmethod + def SDL_SetWindowOpacity(window: Any, opacity: float, /) -> bool: + """bool SDL_SetWindowOpacity(SDL_Window *window, float opacity)""" + + @staticmethod + def SDL_SetWindowParent(window: Any, parent: Any, /) -> bool: + """bool SDL_SetWindowParent(SDL_Window *window, SDL_Window *parent)""" + + @staticmethod + def SDL_SetWindowPosition(window: Any, x: int, y: int, /) -> bool: + """bool SDL_SetWindowPosition(SDL_Window *window, int x, int y)""" + + @staticmethod + def SDL_SetWindowRelativeMouseMode(window: Any, enabled: bool, /) -> bool: + """bool SDL_SetWindowRelativeMouseMode(SDL_Window *window, bool enabled)""" + + @staticmethod + def SDL_SetWindowResizable(window: Any, resizable: bool, /) -> bool: + """bool SDL_SetWindowResizable(SDL_Window *window, bool resizable)""" + + @staticmethod + def SDL_SetWindowShape(window: Any, shape: Any, /) -> bool: + """bool SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape)""" + + @staticmethod + def SDL_SetWindowSize(window: Any, w: int, h: int, /) -> bool: + """bool SDL_SetWindowSize(SDL_Window *window, int w, int h)""" + + @staticmethod + def SDL_SetWindowSurfaceVSync(window: Any, vsync: int, /) -> bool: + """bool SDL_SetWindowSurfaceVSync(SDL_Window *window, int vsync)""" + + @staticmethod + def SDL_SetWindowTitle(window: Any, title: Any, /) -> bool: + """bool SDL_SetWindowTitle(SDL_Window *window, const char *title)""" + + @staticmethod + def SDL_SetX11EventHook(callback: Any, userdata: Any, /) -> None: + """void SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata)""" + + @staticmethod + def SDL_ShouldInit(state: Any, /) -> bool: + """bool SDL_ShouldInit(SDL_InitState *state)""" + + @staticmethod + def SDL_ShouldQuit(state: Any, /) -> bool: + """bool SDL_ShouldQuit(SDL_InitState *state)""" + + @staticmethod + def SDL_ShowCursor() -> bool: + """bool SDL_ShowCursor(void)""" + + @staticmethod + def SDL_ShowFileDialogWithProperties(type: Any, callback: Any, userdata: Any, props: Any, /) -> None: + """void SDL_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFileCallback callback, void *userdata, SDL_PropertiesID props)""" + + @staticmethod + def SDL_ShowMessageBox(messageboxdata: Any, buttonid: Any, /) -> bool: + """bool SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)""" + + @staticmethod + def SDL_ShowOpenFileDialog( + callback: Any, + userdata: Any, + window: Any, + filters: Any, + nfilters: int, + default_location: Any, + allow_many: bool, + /, + ) -> None: + """void SDL_ShowOpenFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location, bool allow_many)""" + + @staticmethod + def SDL_ShowOpenFolderDialog( + callback: Any, userdata: Any, window: Any, default_location: Any, allow_many: bool, / + ) -> None: + """void SDL_ShowOpenFolderDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const char *default_location, bool allow_many)""" + + @staticmethod + def SDL_ShowSaveFileDialog( + callback: Any, userdata: Any, window: Any, filters: Any, nfilters: int, default_location: Any, / + ) -> None: + """void SDL_ShowSaveFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location)""" + + @staticmethod + def SDL_ShowSimpleMessageBox(flags: Any, title: Any, message: Any, window: Any, /) -> bool: + """bool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, const char *title, const char *message, SDL_Window *window)""" + + @staticmethod + def SDL_ShowWindow(window: Any, /) -> bool: + """bool SDL_ShowWindow(SDL_Window *window)""" + + @staticmethod + def SDL_ShowWindowSystemMenu(window: Any, x: int, y: int, /) -> bool: + """bool SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y)""" + + @staticmethod + def SDL_SignalAsyncIOQueue(queue: Any, /) -> None: + """void SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue)""" + + @staticmethod + def SDL_SignalCondition(cond: Any, /) -> None: + """void SDL_SignalCondition(SDL_Condition *cond)""" + + @staticmethod + def SDL_SignalSemaphore(sem: Any, /) -> None: + """void SDL_SignalSemaphore(SDL_Semaphore *sem)""" + + @staticmethod + def SDL_StartTextInput(window: Any, /) -> bool: + """bool SDL_StartTextInput(SDL_Window *window)""" + + @staticmethod + def SDL_StartTextInputWithProperties(window: Any, props: Any, /) -> bool: + """bool SDL_StartTextInputWithProperties(SDL_Window *window, SDL_PropertiesID props)""" + + @staticmethod + def SDL_StepBackUTF8(start: Any, pstr: Any, /) -> Any: + """Uint32 SDL_StepBackUTF8(const char *start, const char **pstr)""" + + @staticmethod + def SDL_StepUTF8(pstr: Any, pslen: Any, /) -> Any: + """Uint32 SDL_StepUTF8(const char **pstr, size_t *pslen)""" + + @staticmethod + def SDL_StopHapticEffect(haptic: Any, effect: int, /) -> bool: + """bool SDL_StopHapticEffect(SDL_Haptic *haptic, int effect)""" + + @staticmethod + def SDL_StopHapticEffects(haptic: Any, /) -> bool: + """bool SDL_StopHapticEffects(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_StopHapticRumble(haptic: Any, /) -> bool: + """bool SDL_StopHapticRumble(SDL_Haptic *haptic)""" + + @staticmethod + def SDL_StopTextInput(window: Any, /) -> bool: + """bool SDL_StopTextInput(SDL_Window *window)""" + + @staticmethod + def SDL_StorageReady(storage: Any, /) -> bool: + """bool SDL_StorageReady(SDL_Storage *storage)""" + + @staticmethod + def SDL_StretchSurface(src: Any, srcrect: Any, dst: Any, dstrect: Any, scaleMode: Any, /) -> bool: + """bool SDL_StretchSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode)""" + + @staticmethod + def SDL_StringToGUID(pchGUID: Any, /) -> Any: + """SDL_GUID SDL_StringToGUID(const char *pchGUID)""" + + @staticmethod + def SDL_SubmitGPUCommandBuffer(command_buffer: Any, /) -> bool: + """bool SDL_SubmitGPUCommandBuffer(SDL_GPUCommandBuffer *command_buffer)""" + + @staticmethod + def SDL_SubmitGPUCommandBufferAndAcquireFence(command_buffer: Any, /) -> Any: + """SDL_GPUFence *SDL_SubmitGPUCommandBufferAndAcquireFence(SDL_GPUCommandBuffer *command_buffer)""" + + @staticmethod + def SDL_SurfaceHasAlternateImages(surface: Any, /) -> bool: + """bool SDL_SurfaceHasAlternateImages(SDL_Surface *surface)""" + + @staticmethod + def SDL_SurfaceHasColorKey(surface: Any, /) -> bool: + """bool SDL_SurfaceHasColorKey(SDL_Surface *surface)""" + + @staticmethod + def SDL_SurfaceHasRLE(surface: Any, /) -> bool: + """bool SDL_SurfaceHasRLE(SDL_Surface *surface)""" + + @staticmethod + def SDL_SyncWindow(window: Any, /) -> bool: + """bool SDL_SyncWindow(SDL_Window *window)""" + + @staticmethod + def SDL_TellIO(context: Any, /) -> Any: + """Sint64 SDL_TellIO(SDL_IOStream *context)""" + + @staticmethod + def SDL_TextInputActive(window: Any, /) -> bool: + """bool SDL_TextInputActive(SDL_Window *window)""" + + @staticmethod + def SDL_TimeFromWindows(dwLowDateTime: Any, dwHighDateTime: Any, /) -> Any: + """SDL_Time SDL_TimeFromWindows(Uint32 dwLowDateTime, Uint32 dwHighDateTime)""" + + @staticmethod + def SDL_TimeToDateTime(ticks: Any, dt: Any, localTime: bool, /) -> bool: + """bool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime)""" + + @staticmethod + def SDL_TimeToWindows(ticks: Any, dwLowDateTime: Any, dwHighDateTime: Any, /) -> None: + """void SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime)""" + + @staticmethod + def SDL_TryLockMutex(mutex: Any, /) -> bool: + """bool SDL_TryLockMutex(SDL_Mutex *mutex)""" + + @staticmethod + def SDL_TryLockRWLockForReading(rwlock: Any, /) -> bool: + """bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)""" + + @staticmethod + def SDL_TryLockRWLockForWriting(rwlock: Any, /) -> bool: + """bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)""" + + @staticmethod + def SDL_TryLockSpinlock(lock: Any, /) -> bool: + """bool SDL_TryLockSpinlock(SDL_SpinLock *lock)""" + + @staticmethod + def SDL_TryWaitSemaphore(sem: Any, /) -> bool: + """bool SDL_TryWaitSemaphore(SDL_Semaphore *sem)""" + + @staticmethod + def SDL_UCS4ToUTF8(codepoint: Any, dst: Any, /) -> Any: + """char *SDL_UCS4ToUTF8(Uint32 codepoint, char *dst)""" + + @staticmethod + def SDL_UnbindAudioStream(stream: Any, /) -> None: + """void SDL_UnbindAudioStream(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_UnbindAudioStreams(streams: Any, num_streams: int, /) -> None: + """void SDL_UnbindAudioStreams(SDL_AudioStream * const *streams, int num_streams)""" + + @staticmethod + def SDL_UnloadObject(handle: Any, /) -> None: + """void SDL_UnloadObject(SDL_SharedObject *handle)""" + + @staticmethod + def SDL_UnlockAudioStream(stream: Any, /) -> bool: + """bool SDL_UnlockAudioStream(SDL_AudioStream *stream)""" + + @staticmethod + def SDL_UnlockJoysticks() -> None: + """void SDL_UnlockJoysticks(void)""" + + @staticmethod + def SDL_UnlockMutex(mutex: Any, /) -> None: + """void SDL_UnlockMutex(SDL_Mutex *mutex)""" + + @staticmethod + def SDL_UnlockProperties(props: Any, /) -> None: + """void SDL_UnlockProperties(SDL_PropertiesID props)""" + + @staticmethod + def SDL_UnlockRWLock(rwlock: Any, /) -> None: + """void SDL_UnlockRWLock(SDL_RWLock *rwlock)""" + + @staticmethod + def SDL_UnlockSpinlock(lock: Any, /) -> None: + """void SDL_UnlockSpinlock(SDL_SpinLock *lock)""" + + @staticmethod + def SDL_UnlockSurface(surface: Any, /) -> None: + """void SDL_UnlockSurface(SDL_Surface *surface)""" + + @staticmethod + def SDL_UnlockTexture(texture: Any, /) -> None: + """void SDL_UnlockTexture(SDL_Texture *texture)""" + + @staticmethod + def SDL_UnmapGPUTransferBuffer(device: Any, transfer_buffer: Any, /) -> None: + """void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer)""" + + @staticmethod + def SDL_UnsetEnvironmentVariable(env: Any, name: Any, /) -> bool: + """bool SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name)""" + + @staticmethod + def SDL_UpdateGamepads() -> None: + """void SDL_UpdateGamepads(void)""" + + @staticmethod + def SDL_UpdateHapticEffect(haptic: Any, effect: int, data: Any, /) -> bool: + """bool SDL_UpdateHapticEffect(SDL_Haptic *haptic, int effect, const SDL_HapticEffect *data)""" + + @staticmethod + def SDL_UpdateJoysticks() -> None: + """void SDL_UpdateJoysticks(void)""" + + @staticmethod + def SDL_UpdateNVTexture(texture: Any, rect: Any, Yplane: Any, Ypitch: int, UVplane: Any, UVpitch: int, /) -> bool: + """bool SDL_UpdateNVTexture(SDL_Texture *texture, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch)""" + + @staticmethod + def SDL_UpdateSensors() -> None: + """void SDL_UpdateSensors(void)""" + + @staticmethod + def SDL_UpdateTexture(texture: Any, rect: Any, pixels: Any, pitch: int, /) -> bool: + """bool SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch)""" + + @staticmethod + def SDL_UpdateTrays() -> None: + """void SDL_UpdateTrays(void)""" + + @staticmethod + def SDL_UpdateWindowSurface(window: Any, /) -> bool: + """bool SDL_UpdateWindowSurface(SDL_Window *window)""" + + @staticmethod + def SDL_UpdateWindowSurfaceRects(window: Any, rects: Any, numrects: int, /) -> bool: + """bool SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects)""" + + @staticmethod + def SDL_UpdateYUVTexture( + texture: Any, rect: Any, Yplane: Any, Ypitch: int, Uplane: Any, Upitch: int, Vplane: Any, Vpitch: int, / + ) -> bool: + """bool SDL_UpdateYUVTexture(SDL_Texture *texture, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch)""" + + @staticmethod + def SDL_UploadToGPUBuffer(copy_pass: Any, source: Any, destination: Any, cycle: bool, /) -> None: + """void SDL_UploadToGPUBuffer(SDL_GPUCopyPass *copy_pass, const SDL_GPUTransferBufferLocation *source, const SDL_GPUBufferRegion *destination, bool cycle)""" + + @staticmethod + def SDL_UploadToGPUTexture(copy_pass: Any, source: Any, destination: Any, cycle: bool, /) -> None: + """void SDL_UploadToGPUTexture(SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureTransferInfo *source, const SDL_GPUTextureRegion *destination, bool cycle)""" + + @staticmethod + def SDL_WaitAndAcquireGPUSwapchainTexture( + command_buffer: Any, + window: Any, + swapchain_texture: Any, + swapchain_texture_width: Any, + swapchain_texture_height: Any, + /, + ) -> bool: + """bool SDL_WaitAndAcquireGPUSwapchainTexture(SDL_GPUCommandBuffer *command_buffer, SDL_Window *window, SDL_GPUTexture **swapchain_texture, Uint32 *swapchain_texture_width, Uint32 *swapchain_texture_height)""" + + @staticmethod + def SDL_WaitAsyncIOResult(queue: Any, outcome: Any, timeoutMS: Any, /) -> bool: + """bool SDL_WaitAsyncIOResult(SDL_AsyncIOQueue *queue, SDL_AsyncIOOutcome *outcome, Sint32 timeoutMS)""" + + @staticmethod + def SDL_WaitCondition(cond: Any, mutex: Any, /) -> None: + """void SDL_WaitCondition(SDL_Condition *cond, SDL_Mutex *mutex)""" + + @staticmethod + def SDL_WaitConditionTimeout(cond: Any, mutex: Any, timeoutMS: Any, /) -> bool: + """bool SDL_WaitConditionTimeout(SDL_Condition *cond, SDL_Mutex *mutex, Sint32 timeoutMS)""" + + @staticmethod + def SDL_WaitEvent(event: Any, /) -> bool: + """bool SDL_WaitEvent(SDL_Event *event)""" + + @staticmethod + def SDL_WaitEventTimeout(event: Any, timeoutMS: Any, /) -> bool: + """bool SDL_WaitEventTimeout(SDL_Event *event, Sint32 timeoutMS)""" + + @staticmethod + def SDL_WaitForGPUFences(device: Any, wait_all: bool, fences: Any, num_fences: Any, /) -> bool: + """bool SDL_WaitForGPUFences(SDL_GPUDevice *device, bool wait_all, SDL_GPUFence * const *fences, Uint32 num_fences)""" + + @staticmethod + def SDL_WaitForGPUIdle(device: Any, /) -> bool: + """bool SDL_WaitForGPUIdle(SDL_GPUDevice *device)""" + + @staticmethod + def SDL_WaitForGPUSwapchain(device: Any, window: Any, /) -> bool: + """bool SDL_WaitForGPUSwapchain(SDL_GPUDevice *device, SDL_Window *window)""" + + @staticmethod + def SDL_WaitProcess(process: Any, block: bool, exitcode: Any, /) -> bool: + """bool SDL_WaitProcess(SDL_Process *process, bool block, int *exitcode)""" + + @staticmethod + def SDL_WaitSemaphore(sem: Any, /) -> None: + """void SDL_WaitSemaphore(SDL_Semaphore *sem)""" + + @staticmethod + def SDL_WaitSemaphoreTimeout(sem: Any, timeoutMS: Any, /) -> bool: + """bool SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Sint32 timeoutMS)""" + + @staticmethod + def SDL_WaitThread(thread: Any, status: Any, /) -> None: + """void SDL_WaitThread(SDL_Thread *thread, int *status)""" + + @staticmethod + def SDL_WarpMouseGlobal(x: float, y: float, /) -> bool: + """bool SDL_WarpMouseGlobal(float x, float y)""" + + @staticmethod + def SDL_WarpMouseInWindow(window: Any, x: float, y: float, /) -> None: + """void SDL_WarpMouseInWindow(SDL_Window *window, float x, float y)""" + + @staticmethod + def SDL_WasInit(flags: Any, /) -> Any: + """SDL_InitFlags SDL_WasInit(SDL_InitFlags flags)""" + + @staticmethod + def SDL_WindowHasSurface(window: Any, /) -> bool: + """bool SDL_WindowHasSurface(SDL_Window *window)""" + + @staticmethod + def SDL_WindowSupportsGPUPresentMode(device: Any, window: Any, present_mode: Any, /) -> bool: + """bool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice *device, SDL_Window *window, SDL_GPUPresentMode present_mode)""" + + @staticmethod + def SDL_WindowSupportsGPUSwapchainComposition(device: Any, window: Any, swapchain_composition: Any, /) -> bool: + """bool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice *device, SDL_Window *window, SDL_GPUSwapchainComposition swapchain_composition)""" + + @staticmethod + def SDL_WriteAsyncIO(asyncio: Any, ptr: Any, offset: Any, size: Any, queue: Any, userdata: Any, /) -> bool: + """bool SDL_WriteAsyncIO(SDL_AsyncIO *asyncio, void *ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue *queue, void *userdata)""" + + @staticmethod + def SDL_WriteIO(context: Any, ptr: Any, size: int, /) -> int: + """size_t SDL_WriteIO(SDL_IOStream *context, const void *ptr, size_t size)""" + + @staticmethod + def SDL_WriteS16BE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS16BE(SDL_IOStream *dst, Sint16 value)""" + + @staticmethod + def SDL_WriteS16LE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS16LE(SDL_IOStream *dst, Sint16 value)""" + + @staticmethod + def SDL_WriteS32BE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS32BE(SDL_IOStream *dst, Sint32 value)""" + + @staticmethod + def SDL_WriteS32LE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS32LE(SDL_IOStream *dst, Sint32 value)""" + + @staticmethod + def SDL_WriteS64BE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS64BE(SDL_IOStream *dst, Sint64 value)""" + + @staticmethod + def SDL_WriteS64LE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS64LE(SDL_IOStream *dst, Sint64 value)""" + + @staticmethod + def SDL_WriteS8(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteS8(SDL_IOStream *dst, Sint8 value)""" + + @staticmethod + def SDL_WriteStorageFile(storage: Any, path: Any, source: Any, length: Any, /) -> bool: + """bool SDL_WriteStorageFile(SDL_Storage *storage, const char *path, const void *source, Uint64 length)""" + + @staticmethod + def SDL_WriteSurfacePixel(surface: Any, x: int, y: int, r: Any, g: Any, b: Any, a: Any, /) -> bool: + """bool SDL_WriteSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)""" + + @staticmethod + def SDL_WriteSurfacePixelFloat(surface: Any, x: int, y: int, r: float, g: float, b: float, a: float, /) -> bool: + """bool SDL_WriteSurfacePixelFloat(SDL_Surface *surface, int x, int y, float r, float g, float b, float a)""" + + @staticmethod + def SDL_WriteU16BE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU16BE(SDL_IOStream *dst, Uint16 value)""" + + @staticmethod + def SDL_WriteU16LE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU16LE(SDL_IOStream *dst, Uint16 value)""" + + @staticmethod + def SDL_WriteU32BE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU32BE(SDL_IOStream *dst, Uint32 value)""" + + @staticmethod + def SDL_WriteU32LE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU32LE(SDL_IOStream *dst, Uint32 value)""" + + @staticmethod + def SDL_WriteU64BE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU64BE(SDL_IOStream *dst, Uint64 value)""" + + @staticmethod + def SDL_WriteU64LE(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU64LE(SDL_IOStream *dst, Uint64 value)""" + + @staticmethod + def SDL_WriteU8(dst: Any, value: Any, /) -> bool: + """bool SDL_WriteU8(SDL_IOStream *dst, Uint8 value)""" + + @staticmethod + def SDL_abs(x: int, /) -> int: + """int SDL_abs(int x)""" + + @staticmethod + def SDL_acos(x: float, /) -> float: + """double SDL_acos(double x)""" + + @staticmethod + def SDL_acosf(x: float, /) -> float: + """float SDL_acosf(float x)""" + + @staticmethod + def SDL_aligned_alloc(alignment: int, size: int, /) -> Any: + """void *SDL_aligned_alloc(size_t alignment, size_t size)""" + + @staticmethod + def SDL_aligned_free(mem: Any, /) -> None: + """void SDL_aligned_free(void *mem)""" + + @staticmethod + def SDL_asin(x: float, /) -> float: + """double SDL_asin(double x)""" + + @staticmethod + def SDL_asinf(x: float, /) -> float: + """float SDL_asinf(float x)""" + + @staticmethod + def SDL_asprintf(strp: Any, fmt: Any, /, *__args: Any) -> int: + """int SDL_asprintf(char **strp, const char *fmt, ...)""" + + @staticmethod + def SDL_atan(x: float, /) -> float: + """double SDL_atan(double x)""" + + @staticmethod + def SDL_atan2(y: float, x: float, /) -> float: + """double SDL_atan2(double y, double x)""" + + @staticmethod + def SDL_atan2f(y: float, x: float, /) -> float: + """float SDL_atan2f(float y, float x)""" + + @staticmethod + def SDL_atanf(x: float, /) -> float: + """float SDL_atanf(float x)""" + + @staticmethod + def SDL_atof(str: Any, /) -> float: + """double SDL_atof(const char *str)""" + + @staticmethod + def SDL_atoi(str: Any, /) -> int: + """int SDL_atoi(const char *str)""" + + @staticmethod + def SDL_bsearch(key: Any, base: Any, nmemb: int, size: int, compare: Any, /) -> Any: + """void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, SDL_CompareCallback compare)""" + + @staticmethod + def SDL_bsearch_r(key: Any, base: Any, nmemb: int, size: int, compare: Any, userdata: Any, /) -> Any: + """void *SDL_bsearch_r(const void *key, const void *base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void *userdata)""" + + @staticmethod + def SDL_calloc(nmemb: int, size: int, /) -> Any: + """void *SDL_calloc(size_t nmemb, size_t size)""" + + @staticmethod + def SDL_ceil(x: float, /) -> float: + """double SDL_ceil(double x)""" + + @staticmethod + def SDL_ceilf(x: float, /) -> float: + """float SDL_ceilf(float x)""" + + @staticmethod + def SDL_copysign(x: float, y: float, /) -> float: + """double SDL_copysign(double x, double y)""" + + @staticmethod + def SDL_copysignf(x: float, y: float, /) -> float: + """float SDL_copysignf(float x, float y)""" + + @staticmethod + def SDL_cos(x: float, /) -> float: + """double SDL_cos(double x)""" + + @staticmethod + def SDL_cosf(x: float, /) -> float: + """float SDL_cosf(float x)""" + + @staticmethod + def SDL_crc16(crc: Any, data: Any, len: int, /) -> Any: + """Uint16 SDL_crc16(Uint16 crc, const void *data, size_t len)""" + + @staticmethod + def SDL_crc32(crc: Any, data: Any, len: int, /) -> Any: + """Uint32 SDL_crc32(Uint32 crc, const void *data, size_t len)""" + + @staticmethod + def SDL_exp(x: float, /) -> float: + """double SDL_exp(double x)""" + + @staticmethod + def SDL_expf(x: float, /) -> float: + """float SDL_expf(float x)""" + + @staticmethod + def SDL_fabs(x: float, /) -> float: + """double SDL_fabs(double x)""" + + @staticmethod + def SDL_fabsf(x: float, /) -> float: + """float SDL_fabsf(float x)""" + + @staticmethod + def SDL_floor(x: float, /) -> float: + """double SDL_floor(double x)""" + + @staticmethod + def SDL_floorf(x: float, /) -> float: + """float SDL_floorf(float x)""" + + @staticmethod + def SDL_fmod(x: float, y: float, /) -> float: + """double SDL_fmod(double x, double y)""" + + @staticmethod + def SDL_fmodf(x: float, y: float, /) -> float: + """float SDL_fmodf(float x, float y)""" + + @staticmethod + def SDL_free(mem: Any, /) -> None: + """void SDL_free(void *mem)""" + + @staticmethod + def SDL_getenv(name: Any, /) -> Any: + """const char *SDL_getenv(const char *name)""" + + @staticmethod + def SDL_getenv_unsafe(name: Any, /) -> Any: + """const char *SDL_getenv_unsafe(const char *name)""" + + @staticmethod + def SDL_hid_ble_scan(active: bool, /) -> None: + """void SDL_hid_ble_scan(bool active)""" + + @staticmethod + def SDL_hid_close(dev: Any, /) -> int: + """int SDL_hid_close(SDL_hid_device *dev)""" + + @staticmethod + def SDL_hid_device_change_count() -> Any: + """Uint32 SDL_hid_device_change_count(void)""" + + @staticmethod + def SDL_hid_enumerate(vendor_id: Any, product_id: Any, /) -> Any: + """SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id)""" + + @staticmethod + def SDL_hid_exit() -> int: + """int SDL_hid_exit(void)""" + + @staticmethod + def SDL_hid_free_enumeration(devs: Any, /) -> None: + """void SDL_hid_free_enumeration(SDL_hid_device_info *devs)""" + + @staticmethod + def SDL_hid_get_device_info(dev: Any, /) -> Any: + """SDL_hid_device_info *SDL_hid_get_device_info(SDL_hid_device *dev)""" + + @staticmethod + def SDL_hid_get_feature_report(dev: Any, data: Any, length: int, /) -> int: + """int SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length)""" + + @staticmethod + def SDL_hid_get_indexed_string(dev: Any, string_index: int, string: Any, maxlen: int, /) -> int: + """int SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen)""" + + @staticmethod + def SDL_hid_get_input_report(dev: Any, data: Any, length: int, /) -> int: + """int SDL_hid_get_input_report(SDL_hid_device *dev, unsigned char *data, size_t length)""" + + @staticmethod + def SDL_hid_get_manufacturer_string(dev: Any, string: Any, maxlen: int, /) -> int: + """int SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen)""" + + @staticmethod + def SDL_hid_get_product_string(dev: Any, string: Any, maxlen: int, /) -> int: + """int SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen)""" + + @staticmethod + def SDL_hid_get_report_descriptor(dev: Any, buf: Any, buf_size: int, /) -> int: + """int SDL_hid_get_report_descriptor(SDL_hid_device *dev, unsigned char *buf, size_t buf_size)""" + + @staticmethod + def SDL_hid_get_serial_number_string(dev: Any, string: Any, maxlen: int, /) -> int: + """int SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen)""" + + @staticmethod + def SDL_hid_init() -> int: + """int SDL_hid_init(void)""" + + @staticmethod + def SDL_hid_open(vendor_id: Any, product_id: Any, serial_number: Any, /) -> Any: + """SDL_hid_device *SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number)""" + + @staticmethod + def SDL_hid_open_path(path: Any, /) -> Any: + """SDL_hid_device *SDL_hid_open_path(const char *path)""" + + @staticmethod + def SDL_hid_read(dev: Any, data: Any, length: int, /) -> int: + """int SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length)""" + + @staticmethod + def SDL_hid_read_timeout(dev: Any, data: Any, length: int, milliseconds: int, /) -> int: + """int SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds)""" + + @staticmethod + def SDL_hid_send_feature_report(dev: Any, data: Any, length: int, /) -> int: + """int SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length)""" + + @staticmethod + def SDL_hid_set_nonblocking(dev: Any, nonblock: int, /) -> int: + """int SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock)""" + + @staticmethod + def SDL_hid_write(dev: Any, data: Any, length: int, /) -> int: + """int SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length)""" + + @staticmethod + def SDL_iconv(cd: Any, inbuf: Any, inbytesleft: Any, outbuf: Any, outbytesleft: Any, /) -> int: + """size_t SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)""" + + @staticmethod + def SDL_iconv_close(cd: Any, /) -> int: + """int SDL_iconv_close(SDL_iconv_t cd)""" + + @staticmethod + def SDL_iconv_open(tocode: Any, fromcode: Any, /) -> Any: + """SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode)""" + + @staticmethod + def SDL_iconv_string(tocode: Any, fromcode: Any, inbuf: Any, inbytesleft: int, /) -> Any: + """char *SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft)""" + + @staticmethod + def SDL_isalnum(x: int, /) -> int: + """int SDL_isalnum(int x)""" + + @staticmethod + def SDL_isalpha(x: int, /) -> int: + """int SDL_isalpha(int x)""" + + @staticmethod + def SDL_isblank(x: int, /) -> int: + """int SDL_isblank(int x)""" + + @staticmethod + def SDL_iscntrl(x: int, /) -> int: + """int SDL_iscntrl(int x)""" + + @staticmethod + def SDL_isdigit(x: int, /) -> int: + """int SDL_isdigit(int x)""" + + @staticmethod + def SDL_isgraph(x: int, /) -> int: + """int SDL_isgraph(int x)""" + + @staticmethod + def SDL_isinf(x: float, /) -> int: + """int SDL_isinf(double x)""" + + @staticmethod + def SDL_isinff(x: float, /) -> int: + """int SDL_isinff(float x)""" + + @staticmethod + def SDL_islower(x: int, /) -> int: + """int SDL_islower(int x)""" + + @staticmethod + def SDL_isnan(x: float, /) -> int: + """int SDL_isnan(double x)""" + + @staticmethod + def SDL_isnanf(x: float, /) -> int: + """int SDL_isnanf(float x)""" + + @staticmethod + def SDL_isprint(x: int, /) -> int: + """int SDL_isprint(int x)""" + + @staticmethod + def SDL_ispunct(x: int, /) -> int: + """int SDL_ispunct(int x)""" + + @staticmethod + def SDL_isspace(x: int, /) -> int: + """int SDL_isspace(int x)""" + + @staticmethod + def SDL_isupper(x: int, /) -> int: + """int SDL_isupper(int x)""" + + @staticmethod + def SDL_isxdigit(x: int, /) -> int: + """int SDL_isxdigit(int x)""" + + @staticmethod + def SDL_itoa(value: int, str: Any, radix: int, /) -> Any: + """char *SDL_itoa(int value, char *str, int radix)""" + + @staticmethod + def SDL_lltoa(value: Any, str: Any, radix: int, /) -> Any: + """char *SDL_lltoa(long long value, char *str, int radix)""" + + @staticmethod + def SDL_log(x: float, /) -> float: + """double SDL_log(double x)""" + + @staticmethod + def SDL_log10(x: float, /) -> float: + """double SDL_log10(double x)""" + + @staticmethod + def SDL_log10f(x: float, /) -> float: + """float SDL_log10f(float x)""" + + @staticmethod + def SDL_logf(x: float, /) -> float: + """float SDL_logf(float x)""" + + @staticmethod + def SDL_lround(x: float, /) -> Any: + """long SDL_lround(double x)""" + + @staticmethod + def SDL_lroundf(x: float, /) -> Any: + """long SDL_lroundf(float x)""" + + @staticmethod + def SDL_ltoa(value: Any, str: Any, radix: int, /) -> Any: + """char *SDL_ltoa(long value, char *str, int radix)""" + + @staticmethod + def SDL_malloc(size: int, /) -> Any: + """void *SDL_malloc(size_t size)""" + + @staticmethod + def SDL_memcmp(s1: Any, s2: Any, len: int, /) -> int: + """int SDL_memcmp(const void *s1, const void *s2, size_t len)""" + + @staticmethod + def SDL_memcpy(dst: Any, src: Any, len: int, /) -> Any: + """void *SDL_memcpy(void *dst, const void *src, size_t len)""" + + @staticmethod + def SDL_memmove(dst: Any, src: Any, len: int, /) -> Any: + """void *SDL_memmove(void *dst, const void *src, size_t len)""" + + @staticmethod + def SDL_memset(dst: Any, c: int, len: int, /) -> Any: + """void *SDL_memset(void *dst, int c, size_t len)""" + + @staticmethod + def SDL_memset4(dst: Any, val: Any, dwords: int, /) -> Any: + """void *SDL_memset4(void *dst, Uint32 val, size_t dwords)""" + + @staticmethod + def SDL_modf(x: float, y: Any, /) -> float: + """double SDL_modf(double x, double *y)""" + + @staticmethod + def SDL_modff(x: float, y: Any, /) -> float: + """float SDL_modff(float x, float *y)""" + + @staticmethod + def SDL_murmur3_32(data: Any, len: int, seed: Any, /) -> Any: + """Uint32 SDL_murmur3_32(const void *data, size_t len, Uint32 seed)""" + + @staticmethod + def SDL_pow(x: float, y: float, /) -> float: + """double SDL_pow(double x, double y)""" + + @staticmethod + def SDL_powf(x: float, y: float, /) -> float: + """float SDL_powf(float x, float y)""" + + @staticmethod + def SDL_qsort(base: Any, nmemb: int, size: int, compare: Any, /) -> None: + """void SDL_qsort(void *base, size_t nmemb, size_t size, SDL_CompareCallback compare)""" + + @staticmethod + def SDL_qsort_r(base: Any, nmemb: int, size: int, compare: Any, userdata: Any, /) -> None: + """void SDL_qsort_r(void *base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void *userdata)""" + + @staticmethod + def SDL_rand(n: Any, /) -> Any: + """Sint32 SDL_rand(Sint32 n)""" + + @staticmethod + def SDL_rand_bits() -> Any: + """Uint32 SDL_rand_bits(void)""" + + @staticmethod + def SDL_rand_bits_r(state: Any, /) -> Any: + """Uint32 SDL_rand_bits_r(Uint64 *state)""" + + @staticmethod + def SDL_rand_r(state: Any, n: Any, /) -> Any: + """Sint32 SDL_rand_r(Uint64 *state, Sint32 n)""" + + @staticmethod + def SDL_randf() -> float: + """float SDL_randf(void)""" + + @staticmethod + def SDL_randf_r(state: Any, /) -> float: + """float SDL_randf_r(Uint64 *state)""" + + @staticmethod + def SDL_realloc(mem: Any, size: int, /) -> Any: + """void *SDL_realloc(void *mem, size_t size)""" + + @staticmethod + def SDL_round(x: float, /) -> float: + """double SDL_round(double x)""" + + @staticmethod + def SDL_roundf(x: float, /) -> float: + """float SDL_roundf(float x)""" + + @staticmethod + def SDL_scalbn(x: float, n: int, /) -> float: + """double SDL_scalbn(double x, int n)""" + + @staticmethod + def SDL_scalbnf(x: float, n: int, /) -> float: + """float SDL_scalbnf(float x, int n)""" + + @staticmethod + def SDL_setenv_unsafe(name: Any, value: Any, overwrite: int, /) -> int: + """int SDL_setenv_unsafe(const char *name, const char *value, int overwrite)""" + + @staticmethod + def SDL_sin(x: float, /) -> float: + """double SDL_sin(double x)""" + + @staticmethod + def SDL_sinf(x: float, /) -> float: + """float SDL_sinf(float x)""" + + @staticmethod + def SDL_snprintf(text: Any, maxlen: int, fmt: Any, /, *__args: Any) -> int: + """int SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...)""" + + @staticmethod + def SDL_sqrt(x: float, /) -> float: + """double SDL_sqrt(double x)""" + + @staticmethod + def SDL_sqrtf(x: float, /) -> float: + """float SDL_sqrtf(float x)""" + + @staticmethod + def SDL_srand(seed: Any, /) -> None: + """void SDL_srand(Uint64 seed)""" + + @staticmethod + def SDL_sscanf(text: Any, fmt: Any, /, *__args: Any) -> int: + """int SDL_sscanf(const char *text, const char *fmt, ...)""" + + @staticmethod + def SDL_strcasecmp(str1: Any, str2: Any, /) -> int: + """int SDL_strcasecmp(const char *str1, const char *str2)""" + + @staticmethod + def SDL_strcasestr(haystack: Any, needle: Any, /) -> Any: + """char *SDL_strcasestr(const char *haystack, const char *needle)""" + + @staticmethod + def SDL_strchr(str: Any, c: int, /) -> Any: + """char *SDL_strchr(const char *str, int c)""" + + @staticmethod + def SDL_strcmp(str1: Any, str2: Any, /) -> int: + """int SDL_strcmp(const char *str1, const char *str2)""" + + @staticmethod + def SDL_strdup(str: Any, /) -> Any: + """char *SDL_strdup(const char *str)""" + + @staticmethod + def SDL_strlcat(dst: Any, src: Any, maxlen: int, /) -> int: + """size_t SDL_strlcat(char *dst, const char *src, size_t maxlen)""" + + @staticmethod + def SDL_strlcpy(dst: Any, src: Any, maxlen: int, /) -> int: + """size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen)""" + + @staticmethod + def SDL_strlen(str: Any, /) -> int: + """size_t SDL_strlen(const char *str)""" + + @staticmethod + def SDL_strlwr(str: Any, /) -> Any: + """char *SDL_strlwr(char *str)""" + + @staticmethod + def SDL_strncasecmp(str1: Any, str2: Any, maxlen: int, /) -> int: + """int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen)""" + + @staticmethod + def SDL_strncmp(str1: Any, str2: Any, maxlen: int, /) -> int: + """int SDL_strncmp(const char *str1, const char *str2, size_t maxlen)""" + + @staticmethod + def SDL_strndup(str: Any, maxlen: int, /) -> Any: + """char *SDL_strndup(const char *str, size_t maxlen)""" + + @staticmethod + def SDL_strnlen(str: Any, maxlen: int, /) -> int: + """size_t SDL_strnlen(const char *str, size_t maxlen)""" + + @staticmethod + def SDL_strnstr(haystack: Any, needle: Any, maxlen: int, /) -> Any: + """char *SDL_strnstr(const char *haystack, const char *needle, size_t maxlen)""" + + @staticmethod + def SDL_strpbrk(str: Any, breakset: Any, /) -> Any: + """char *SDL_strpbrk(const char *str, const char *breakset)""" + + @staticmethod + def SDL_strrchr(str: Any, c: int, /) -> Any: + """char *SDL_strrchr(const char *str, int c)""" + + @staticmethod + def SDL_strrev(str: Any, /) -> Any: + """char *SDL_strrev(char *str)""" + + @staticmethod + def SDL_strstr(haystack: Any, needle: Any, /) -> Any: + """char *SDL_strstr(const char *haystack, const char *needle)""" + + @staticmethod + def SDL_strtod(str: Any, endp: Any, /) -> float: + """double SDL_strtod(const char *str, char **endp)""" + + @staticmethod + def SDL_strtok_r(str: Any, delim: Any, saveptr: Any, /) -> Any: + """char *SDL_strtok_r(char *str, const char *delim, char **saveptr)""" + + @staticmethod + def SDL_strtol(str: Any, endp: Any, base: int, /) -> Any: + """long SDL_strtol(const char *str, char **endp, int base)""" + + @staticmethod + def SDL_strtoll(str: Any, endp: Any, base: int, /) -> Any: + """long long SDL_strtoll(const char *str, char **endp, int base)""" + + @staticmethod + def SDL_strtoul(str: Any, endp: Any, base: int, /) -> Any: + """unsigned long SDL_strtoul(const char *str, char **endp, int base)""" + + @staticmethod + def SDL_strtoull(str: Any, endp: Any, base: int, /) -> Any: + """unsigned long long SDL_strtoull(const char *str, char **endp, int base)""" + + @staticmethod + def SDL_strupr(str: Any, /) -> Any: + """char *SDL_strupr(char *str)""" + + @staticmethod + def SDL_swprintf(text: Any, maxlen: int, fmt: Any, /, *__args: Any) -> int: + """int SDL_swprintf(wchar_t *text, size_t maxlen, const wchar_t *fmt, ...)""" + + @staticmethod + def SDL_tan(x: float, /) -> float: + """double SDL_tan(double x)""" + + @staticmethod + def SDL_tanf(x: float, /) -> float: + """float SDL_tanf(float x)""" + + @staticmethod + def SDL_tolower(x: int, /) -> int: + """int SDL_tolower(int x)""" + + @staticmethod + def SDL_toupper(x: int, /) -> int: + """int SDL_toupper(int x)""" + + @staticmethod + def SDL_trunc(x: float, /) -> float: + """double SDL_trunc(double x)""" + + @staticmethod + def SDL_truncf(x: float, /) -> float: + """float SDL_truncf(float x)""" + + @staticmethod + def SDL_uitoa(value: int, str: Any, radix: int, /) -> Any: + """char *SDL_uitoa(unsigned int value, char *str, int radix)""" + + @staticmethod + def SDL_ulltoa(value: Any, str: Any, radix: int, /) -> Any: + """char *SDL_ulltoa(unsigned long long value, char *str, int radix)""" + + @staticmethod + def SDL_ultoa(value: Any, str: Any, radix: int, /) -> Any: + """char *SDL_ultoa(unsigned long value, char *str, int radix)""" + + @staticmethod + def SDL_unsetenv_unsafe(name: Any, /) -> int: + """int SDL_unsetenv_unsafe(const char *name)""" + + @staticmethod + def SDL_utf8strlcpy(dst: Any, src: Any, dst_bytes: int, /) -> int: + """size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes)""" + + @staticmethod + def SDL_utf8strlen(str: Any, /) -> int: + """size_t SDL_utf8strlen(const char *str)""" + + @staticmethod + def SDL_utf8strnlen(str: Any, bytes: int, /) -> int: + """size_t SDL_utf8strnlen(const char *str, size_t bytes)""" + + @staticmethod + def SDL_wcscasecmp(str1: Any, str2: Any, /) -> int: + """int SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2)""" + + @staticmethod + def SDL_wcscmp(str1: Any, str2: Any, /) -> int: + """int SDL_wcscmp(const wchar_t *str1, const wchar_t *str2)""" + + @staticmethod + def SDL_wcsdup(wstr: Any, /) -> Any: + """wchar_t *SDL_wcsdup(const wchar_t *wstr)""" + + @staticmethod + def SDL_wcslcat(dst: Any, src: Any, maxlen: int, /) -> int: + """size_t SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen)""" + + @staticmethod + def SDL_wcslcpy(dst: Any, src: Any, maxlen: int, /) -> int: + """size_t SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen)""" + + @staticmethod + def SDL_wcslen(wstr: Any, /) -> int: + """size_t SDL_wcslen(const wchar_t *wstr)""" + + @staticmethod + def SDL_wcsncasecmp(str1: Any, str2: Any, maxlen: int, /) -> int: + """int SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen)""" + + @staticmethod + def SDL_wcsncmp(str1: Any, str2: Any, maxlen: int, /) -> int: + """int SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen)""" + + @staticmethod + def SDL_wcsnlen(wstr: Any, maxlen: int, /) -> int: + """size_t SDL_wcsnlen(const wchar_t *wstr, size_t maxlen)""" + + @staticmethod + def SDL_wcsnstr(haystack: Any, needle: Any, maxlen: int, /) -> Any: + """wchar_t *SDL_wcsnstr(const wchar_t *haystack, const wchar_t *needle, size_t maxlen)""" + + @staticmethod + def SDL_wcsstr(haystack: Any, needle: Any, /) -> Any: + """wchar_t *SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle)""" + + @staticmethod + def SDL_wcstol(str: Any, endp: Any, base: int, /) -> Any: + """long SDL_wcstol(const wchar_t *str, wchar_t **endp, int base)""" + + @staticmethod + def TCOD_bsp_contains(node: Any, x: int, y: int, /) -> bool: + """bool TCOD_bsp_contains(TCOD_bsp_t *node, int x, int y)""" + + @staticmethod + def TCOD_bsp_delete(node: Any, /) -> None: + """void TCOD_bsp_delete(TCOD_bsp_t *node)""" + + @staticmethod + def TCOD_bsp_father(node: Any, /) -> Any: + """TCOD_bsp_t *TCOD_bsp_father(TCOD_bsp_t *node)""" + + @staticmethod + def TCOD_bsp_find_node(node: Any, x: int, y: int, /) -> Any: + """TCOD_bsp_t *TCOD_bsp_find_node(TCOD_bsp_t *node, int x, int y)""" + + @staticmethod + def TCOD_bsp_is_leaf(node: Any, /) -> bool: + """bool TCOD_bsp_is_leaf(TCOD_bsp_t *node)""" + + @staticmethod + def TCOD_bsp_left(node: Any, /) -> Any: + """TCOD_bsp_t *TCOD_bsp_left(TCOD_bsp_t *node)""" + + @staticmethod + def TCOD_bsp_new() -> Any: + """TCOD_bsp_t *TCOD_bsp_new(void)""" + + @staticmethod + def TCOD_bsp_new_with_size(x: int, y: int, w: int, h: int, /) -> Any: + """TCOD_bsp_t *TCOD_bsp_new_with_size(int x, int y, int w, int h)""" + + @staticmethod + def TCOD_bsp_remove_sons(node: Any, /) -> None: + """void TCOD_bsp_remove_sons(TCOD_bsp_t *node)""" + + @staticmethod + def TCOD_bsp_resize(node: Any, x: int, y: int, w: int, h: int, /) -> None: + """void TCOD_bsp_resize(TCOD_bsp_t *node, int x, int y, int w, int h)""" + + @staticmethod + def TCOD_bsp_right(node: Any, /) -> Any: + """TCOD_bsp_t *TCOD_bsp_right(TCOD_bsp_t *node)""" + + @staticmethod + def TCOD_bsp_split_once(node: Any, horizontal: bool, position: int, /) -> None: + """void TCOD_bsp_split_once(TCOD_bsp_t *node, bool horizontal, int position)""" + + @staticmethod + def TCOD_bsp_split_recursive( + node: Any, randomizer: Any, nb: int, minHSize: int, minVSize: int, maxHRatio: float, maxVRatio: float, / + ) -> None: + """void TCOD_bsp_split_recursive(TCOD_bsp_t *node, TCOD_Random *randomizer, int nb, int minHSize, int minVSize, float maxHRatio, float maxVRatio)""" + + @staticmethod + def TCOD_bsp_traverse_in_order(node: Any, listener: Any, userData: Any, /) -> bool: + """bool TCOD_bsp_traverse_in_order(TCOD_bsp_t *node, TCOD_bsp_callback_t listener, void *userData)""" + + @staticmethod + def TCOD_bsp_traverse_inverted_level_order(node: Any, listener: Any, userData: Any, /) -> bool: + """bool TCOD_bsp_traverse_inverted_level_order(TCOD_bsp_t *node, TCOD_bsp_callback_t listener, void *userData)""" + + @staticmethod + def TCOD_bsp_traverse_level_order(node: Any, listener: Any, userData: Any, /) -> bool: + """bool TCOD_bsp_traverse_level_order(TCOD_bsp_t *node, TCOD_bsp_callback_t listener, void *userData)""" + + @staticmethod + def TCOD_bsp_traverse_post_order(node: Any, listener: Any, userData: Any, /) -> bool: + """bool TCOD_bsp_traverse_post_order(TCOD_bsp_t *node, TCOD_bsp_callback_t listener, void *userData)""" + + @staticmethod + def TCOD_bsp_traverse_pre_order(node: Any, listener: Any, userData: Any, /) -> bool: + """bool TCOD_bsp_traverse_pre_order(TCOD_bsp_t *node, TCOD_bsp_callback_t listener, void *userData)""" + + @staticmethod + def TCOD_clear_error() -> None: + """void TCOD_clear_error(void)""" + + @staticmethod + def TCOD_close_library(arg0: Any, /) -> None: + """void TCOD_close_library(TCOD_library_t)""" + + @staticmethod + def TCOD_color_HSV(hue: float, saturation: float, value: float, /) -> Any: + """TCOD_color_t TCOD_color_HSV(float hue, float saturation, float value)""" + + @staticmethod + def TCOD_color_RGB(r: Any, g: Any, b: Any, /) -> Any: + """TCOD_color_t TCOD_color_RGB(uint8_t r, uint8_t g, uint8_t b)""" + + @staticmethod + def TCOD_color_add(c1: Any, c2: Any, /) -> Any: + """TCOD_color_t TCOD_color_add(TCOD_color_t c1, TCOD_color_t c2)""" + + @staticmethod + def TCOD_color_add_wrapper(c1: Any, c2: Any, /) -> Any: + """colornum_t TCOD_color_add_wrapper(colornum_t c1, colornum_t c2)""" + + @staticmethod + def TCOD_color_alpha_blend(dst: Any, src: Any, /) -> None: + """void TCOD_color_alpha_blend(TCOD_ColorRGBA *dst, const TCOD_ColorRGBA *src)""" + + @staticmethod + def TCOD_color_equals(c1: Any, c2: Any, /) -> bool: + """bool TCOD_color_equals(TCOD_color_t c1, TCOD_color_t c2)""" + + @staticmethod + def TCOD_color_equals_wrapper(c1: Any, c2: Any, /) -> bool: + """bool TCOD_color_equals_wrapper(colornum_t c1, colornum_t c2)""" + + @staticmethod + def TCOD_color_gen_map(map: Any, nb_key: int, key_color: Any, key_index: Any, /) -> None: + """void TCOD_color_gen_map(TCOD_color_t *map, int nb_key, const TCOD_color_t *key_color, const int *key_index)""" + + @staticmethod + def TCOD_color_get_HSV(color: Any, hue: Any, saturation: Any, value: Any, /) -> None: + """void TCOD_color_get_HSV(TCOD_color_t color, float *hue, float *saturation, float *value)""" + + @staticmethod + def TCOD_color_get_HSV_wrapper(c: Any, h: Any, s: Any, v: Any, /) -> None: + """void TCOD_color_get_HSV_wrapper(colornum_t c, float *h, float *s, float *v)""" + + @staticmethod + def TCOD_color_get_hue(color: Any, /) -> float: + """float TCOD_color_get_hue(TCOD_color_t color)""" + + @staticmethod + def TCOD_color_get_hue_wrapper(c: Any, /) -> float: + """float TCOD_color_get_hue_wrapper(colornum_t c)""" + + @staticmethod + def TCOD_color_get_saturation(color: Any, /) -> float: + """float TCOD_color_get_saturation(TCOD_color_t color)""" + + @staticmethod + def TCOD_color_get_saturation_wrapper(c: Any, /) -> float: + """float TCOD_color_get_saturation_wrapper(colornum_t c)""" + + @staticmethod + def TCOD_color_get_value(color: Any, /) -> float: + """float TCOD_color_get_value(TCOD_color_t color)""" + + @staticmethod + def TCOD_color_get_value_wrapper(c: Any, /) -> float: + """float TCOD_color_get_value_wrapper(colornum_t c)""" + + @staticmethod + def TCOD_color_lerp(c1: Any, c2: Any, coef: float, /) -> Any: + """TCOD_color_t TCOD_color_lerp(TCOD_color_t c1, TCOD_color_t c2, float coef)""" + + @staticmethod + def TCOD_color_lerp_wrapper(c1: Any, c2: Any, coef: float, /) -> Any: + """colornum_t TCOD_color_lerp_wrapper(colornum_t c1, colornum_t c2, float coef)""" + + @staticmethod + def TCOD_color_multiply(c1: Any, c2: Any, /) -> Any: + """TCOD_color_t TCOD_color_multiply(TCOD_color_t c1, TCOD_color_t c2)""" + + @staticmethod + def TCOD_color_multiply_scalar(c1: Any, value: float, /) -> Any: + """TCOD_color_t TCOD_color_multiply_scalar(TCOD_color_t c1, float value)""" + + @staticmethod + def TCOD_color_multiply_scalar_wrapper(c1: Any, value: float, /) -> Any: + """colornum_t TCOD_color_multiply_scalar_wrapper(colornum_t c1, float value)""" + + @staticmethod + def TCOD_color_multiply_wrapper(c1: Any, c2: Any, /) -> Any: + """colornum_t TCOD_color_multiply_wrapper(colornum_t c1, colornum_t c2)""" + + @staticmethod + def TCOD_color_scale_HSV(color: Any, saturation_coef: float, value_coef: float, /) -> None: + """void TCOD_color_scale_HSV(TCOD_color_t *color, float saturation_coef, float value_coef)""" + + @staticmethod + def TCOD_color_set_HSV(color: Any, hue: float, saturation: float, value: float, /) -> None: + """void TCOD_color_set_HSV(TCOD_color_t *color, float hue, float saturation, float value)""" + + @staticmethod + def TCOD_color_set_hue(color: Any, hue: float, /) -> None: + """void TCOD_color_set_hue(TCOD_color_t *color, float hue)""" + + @staticmethod + def TCOD_color_set_saturation(color: Any, saturation: float, /) -> None: + """void TCOD_color_set_saturation(TCOD_color_t *color, float saturation)""" + + @staticmethod + def TCOD_color_set_value(color: Any, value: float, /) -> None: + """void TCOD_color_set_value(TCOD_color_t *color, float value)""" + + @staticmethod + def TCOD_color_shift_hue(color: Any, shift: float, /) -> None: + """void TCOD_color_shift_hue(TCOD_color_t *color, float shift)""" + + @staticmethod + def TCOD_color_subtract(c1: Any, c2: Any, /) -> Any: + """TCOD_color_t TCOD_color_subtract(TCOD_color_t c1, TCOD_color_t c2)""" + + @staticmethod + def TCOD_color_subtract_wrapper(c1: Any, c2: Any, /) -> Any: + """colornum_t TCOD_color_subtract_wrapper(colornum_t c1, colornum_t c2)""" + + @staticmethod + def TCOD_condition_broadcast(sem: Any, /) -> None: + """void TCOD_condition_broadcast(TCOD_cond_t sem)""" + + @staticmethod + def TCOD_condition_delete(sem: Any, /) -> None: + """void TCOD_condition_delete(TCOD_cond_t sem)""" + + @staticmethod + def TCOD_condition_new() -> Any: + """TCOD_cond_t TCOD_condition_new(void)""" + + @staticmethod + def TCOD_condition_signal(sem: Any, /) -> None: + """void TCOD_condition_signal(TCOD_cond_t sem)""" + + @staticmethod + def TCOD_condition_wait(sem: Any, mut: Any, /) -> None: + """void TCOD_condition_wait(TCOD_cond_t sem, TCOD_mutex_t mut)""" + + @staticmethod + def TCOD_console_blit( + src: Any, + xSrc: int, + ySrc: int, + wSrc: int, + hSrc: int, + dst: Any, + xDst: int, + yDst: int, + foreground_alpha: float, + background_alpha: float, + /, + ) -> None: + """void TCOD_console_blit(const TCOD_Console *src, int xSrc, int ySrc, int wSrc, int hSrc, TCOD_Console *dst, int xDst, int yDst, float foreground_alpha, float background_alpha)""" + + @staticmethod + def TCOD_console_blit_key_color( + src: Any, + xSrc: int, + ySrc: int, + wSrc: int, + hSrc: int, + dst: Any, + xDst: int, + yDst: int, + foreground_alpha: float, + background_alpha: float, + key_color: Any, + /, + ) -> None: + """void TCOD_console_blit_key_color(const TCOD_Console *src, int xSrc, int ySrc, int wSrc, int hSrc, TCOD_Console *dst, int xDst, int yDst, float foreground_alpha, float background_alpha, const TCOD_color_t *key_color)""" + + @staticmethod + def TCOD_console_check_for_keypress(flags: int, /) -> Any: + """TCOD_key_t TCOD_console_check_for_keypress(int flags)""" + + @staticmethod + def TCOD_console_check_for_keypress_wrapper(holder: Any, flags: int, /) -> bool: + """bool TCOD_console_check_for_keypress_wrapper(TCOD_key_t *holder, int flags)""" + + @staticmethod + def TCOD_console_clear(con: Any, /) -> None: + """void TCOD_console_clear(TCOD_Console *con)""" + + @staticmethod + def TCOD_console_credits() -> None: + """void TCOD_console_credits(void)""" + + @staticmethod + def TCOD_console_credits_render(x: int, y: int, alpha: bool, /) -> bool: + """bool TCOD_console_credits_render(int x, int y, bool alpha)""" + + @staticmethod + def TCOD_console_credits_render_ex(console: Any, x: int, y: int, alpha: bool, delta_time: float, /) -> bool: + """bool TCOD_console_credits_render_ex(TCOD_Console *console, int x, int y, bool alpha, float delta_time)""" + + @staticmethod + def TCOD_console_credits_reset() -> None: + """void TCOD_console_credits_reset(void)""" + + @staticmethod + def TCOD_console_delete(console: Any, /) -> None: + """void TCOD_console_delete(TCOD_Console *console)""" + + @staticmethod + def TCOD_console_disable_keyboard_repeat() -> None: + """void TCOD_console_disable_keyboard_repeat(void)""" + + @staticmethod + def TCOD_console_double_hline(con: Any, x: int, y: int, l: int, flag: Any, /) -> None: + """void TCOD_console_double_hline(TCOD_console_t con, int x, int y, int l, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_double_vline(con: Any, x: int, y: int, l: int, flag: Any, /) -> None: + """void TCOD_console_double_vline(TCOD_console_t con, int x, int y, int l, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_draw_frame_rgb( + con: Any, x: int, y: int, width: int, height: int, decoration: Any, fg: Any, bg: Any, flag: Any, clear: bool, / + ) -> Any: + """TCOD_Error TCOD_console_draw_frame_rgb(struct TCOD_Console *con, int x, int y, int width, int height, const int *decoration, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, bool clear)""" + + @staticmethod + def TCOD_console_draw_rect_rgb( + console: Any, x: int, y: int, width: int, height: int, ch: int, fg: Any, bg: Any, flag: Any, / + ) -> Any: + """TCOD_Error TCOD_console_draw_rect_rgb(TCOD_Console *console, int x, int y, int width, int height, int ch, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_fill_background(con: Any, r: Any, g: Any, b: Any, /) -> None: + """void TCOD_console_fill_background(TCOD_console_t con, int *r, int *g, int *b)""" + + @staticmethod + def TCOD_console_fill_char(con: Any, arr: Any, /) -> None: + """void TCOD_console_fill_char(TCOD_console_t con, int *arr)""" + + @staticmethod + def TCOD_console_fill_foreground(con: Any, r: Any, g: Any, b: Any, /) -> None: + """void TCOD_console_fill_foreground(TCOD_console_t con, int *r, int *g, int *b)""" + + @staticmethod + def TCOD_console_flush() -> Any: + """TCOD_Error TCOD_console_flush(void)""" + + @staticmethod + def TCOD_console_flush_ex(console: Any, viewport: Any, /) -> Any: + """TCOD_Error TCOD_console_flush_ex(TCOD_Console *console, struct TCOD_ViewportOptions *viewport)""" + + @staticmethod + def TCOD_console_forward(s: Any, l: int, /) -> Any: + """unsigned char *TCOD_console_forward(unsigned char *s, int l)""" + + @staticmethod + def TCOD_console_from_file(filename: Any, /) -> Any: + """TCOD_console_t TCOD_console_from_file(const char *filename)""" + + @staticmethod + def TCOD_console_from_xp(filename: Any, /) -> Any: + """TCOD_console_t TCOD_console_from_xp(const char *filename)""" + + @staticmethod + def TCOD_console_get_alignment(con: Any, /) -> Any: + """TCOD_alignment_t TCOD_console_get_alignment(TCOD_Console *con)""" + + @staticmethod + def TCOD_console_get_background_flag(con: Any, /) -> Any: + """TCOD_bkgnd_flag_t TCOD_console_get_background_flag(TCOD_Console *con)""" + + @staticmethod + def TCOD_console_get_char(con: Any, x: int, y: int, /) -> int: + """int TCOD_console_get_char(const TCOD_Console *con, int x, int y)""" + + @staticmethod + def TCOD_console_get_char_background(con: Any, x: int, y: int, /) -> Any: + """TCOD_color_t TCOD_console_get_char_background(const TCOD_Console *con, int x, int y)""" + + @staticmethod + def TCOD_console_get_char_background_wrapper(con: Any, x: int, y: int, /) -> Any: + """colornum_t TCOD_console_get_char_background_wrapper(TCOD_console_t con, int x, int y)""" + + @staticmethod + def TCOD_console_get_char_foreground(con: Any, x: int, y: int, /) -> Any: + """TCOD_color_t TCOD_console_get_char_foreground(const TCOD_Console *con, int x, int y)""" + + @staticmethod + def TCOD_console_get_char_foreground_wrapper(con: Any, x: int, y: int, /) -> Any: + """colornum_t TCOD_console_get_char_foreground_wrapper(TCOD_console_t con, int x, int y)""" + + @staticmethod + def TCOD_console_get_default_background(con: Any, /) -> Any: + """TCOD_color_t TCOD_console_get_default_background(TCOD_Console *con)""" + + @staticmethod + def TCOD_console_get_default_background_wrapper(con: Any, /) -> Any: + """colornum_t TCOD_console_get_default_background_wrapper(TCOD_console_t con)""" + + @staticmethod + def TCOD_console_get_default_foreground(con: Any, /) -> Any: + """TCOD_color_t TCOD_console_get_default_foreground(TCOD_Console *con)""" + + @staticmethod + def TCOD_console_get_default_foreground_wrapper(con: Any, /) -> Any: + """colornum_t TCOD_console_get_default_foreground_wrapper(TCOD_console_t con)""" + + @staticmethod + def TCOD_console_get_fade() -> Any: + """uint8_t TCOD_console_get_fade(void)""" + + @staticmethod + def TCOD_console_get_fading_color() -> Any: + """TCOD_color_t TCOD_console_get_fading_color(void)""" + + @staticmethod + def TCOD_console_get_fading_color_wrapper() -> Any: + """colornum_t TCOD_console_get_fading_color_wrapper(void)""" + + @staticmethod + def TCOD_console_get_height(con: Any, /) -> int: + """int TCOD_console_get_height(const TCOD_Console *con)""" + + @staticmethod + def TCOD_console_get_height_rect(con: Any, x: int, y: int, w: int, h: int, fmt: Any, /, *__args: Any) -> int: + """int TCOD_console_get_height_rect(TCOD_Console *con, int x, int y, int w, int h, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_get_height_rect_fmt(con: Any, x: int, y: int, w: int, h: int, fmt: Any, /, *__args: Any) -> int: + """int TCOD_console_get_height_rect_fmt(TCOD_Console *con, int x, int y, int w, int h, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_get_height_rect_n( + console: Any, x: int, y: int, width: int, height: int, n: int, str: Any, / + ) -> int: + """int TCOD_console_get_height_rect_n(TCOD_Console *console, int x, int y, int width, int height, size_t n, const char *str)""" + + @staticmethod + def TCOD_console_get_height_rect_utf(con: Any, x: int, y: int, w: int, h: int, fmt: Any, /, *__args: Any) -> int: + """int TCOD_console_get_height_rect_utf(TCOD_Console *con, int x, int y, int w, int h, const wchar_t *fmt, ...)""" + + @staticmethod + def TCOD_console_get_height_rect_wn(width: int, n: int, str: Any, /) -> int: + """int TCOD_console_get_height_rect_wn(int width, size_t n, const char *str)""" + + @staticmethod + def TCOD_console_get_width(con: Any, /) -> int: + """int TCOD_console_get_width(const TCOD_Console *con)""" + + @staticmethod + def TCOD_console_has_mouse_focus() -> bool: + """bool TCOD_console_has_mouse_focus(void)""" + + @staticmethod + def TCOD_console_hline(con: Any, x: int, y: int, l: int, flag: Any, /) -> None: + """void TCOD_console_hline(TCOD_Console *con, int x, int y, int l, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_init_root(w: int, h: int, title: Any, fullscreen: bool, renderer: Any, /) -> Any: + """TCOD_Error TCOD_console_init_root(int w, int h, const char *title, bool fullscreen, TCOD_renderer_t renderer)""" + + @staticmethod + def TCOD_console_init_root_(w: int, h: int, title: Any, fullscreen: bool, renderer: Any, vsync: bool, /) -> Any: + """TCOD_Error TCOD_console_init_root_(int w, int h, const char *title, bool fullscreen, TCOD_renderer_t renderer, bool vsync)""" + + @staticmethod + def TCOD_console_is_active() -> bool: + """bool TCOD_console_is_active(void)""" + + @staticmethod + def TCOD_console_is_fullscreen() -> bool: + """bool TCOD_console_is_fullscreen(void)""" + + @staticmethod + def TCOD_console_is_index_valid_(console: Any, x: int, y: int, /) -> bool: + """inline static bool TCOD_console_is_index_valid_(const TCOD_Console *console, int x, int y)""" + + @staticmethod + def TCOD_console_is_key_pressed(key: Any, /) -> bool: + """bool TCOD_console_is_key_pressed(TCOD_keycode_t key)""" + + @staticmethod + def TCOD_console_is_window_closed() -> bool: + """bool TCOD_console_is_window_closed(void)""" + + @staticmethod + def TCOD_console_list_from_xp(filename: Any, /) -> Any: + """TCOD_list_t TCOD_console_list_from_xp(const char *filename)""" + + @staticmethod + def TCOD_console_list_save_xp(console_list: Any, filename: Any, compress_level: int, /) -> bool: + """bool TCOD_console_list_save_xp(TCOD_list_t console_list, const char *filename, int compress_level)""" + + @staticmethod + def TCOD_console_load_apf(con: Any, filename: Any, /) -> bool: + """bool TCOD_console_load_apf(TCOD_console_t con, const char *filename)""" + + @staticmethod + def TCOD_console_load_asc(con: Any, filename: Any, /) -> bool: + """bool TCOD_console_load_asc(TCOD_console_t con, const char *filename)""" + + @staticmethod + def TCOD_console_load_xp(con: Any, filename: Any, /) -> bool: + """bool TCOD_console_load_xp(TCOD_Console *con, const char *filename)""" + + @staticmethod + def TCOD_console_map_ascii_code_to_font(asciiCode: int, fontCharX: int, fontCharY: int, /) -> None: + """void TCOD_console_map_ascii_code_to_font(int asciiCode, int fontCharX, int fontCharY)""" + + @staticmethod + def TCOD_console_map_ascii_codes_to_font(asciiCode: int, nbCodes: int, fontCharX: int, fontCharY: int, /) -> None: + """void TCOD_console_map_ascii_codes_to_font(int asciiCode, int nbCodes, int fontCharX, int fontCharY)""" + + @staticmethod + def TCOD_console_map_string_to_font(s: Any, fontCharX: int, fontCharY: int, /) -> None: + """void TCOD_console_map_string_to_font(const char *s, int fontCharX, int fontCharY)""" + + @staticmethod + def TCOD_console_map_string_to_font_utf(s: Any, fontCharX: int, fontCharY: int, /) -> None: + """void TCOD_console_map_string_to_font_utf(const wchar_t *s, int fontCharX, int fontCharY)""" + + @staticmethod + def TCOD_console_new(w: int, h: int, /) -> Any: + """TCOD_Console *TCOD_console_new(int w, int h)""" + + @staticmethod + def TCOD_console_print(con: Any, x: int, y: int, fmt: Any, /, *__args: Any) -> None: + """void TCOD_console_print(TCOD_Console *con, int x, int y, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_print_double_frame( + con: Any, x: int, y: int, w: int, h: int, empty: bool, flag: Any, fmt: Any, /, *__args: Any + ) -> None: + """void TCOD_console_print_double_frame(TCOD_console_t con, int x, int y, int w, int h, bool empty, TCOD_bkgnd_flag_t flag, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_print_ex(con: Any, x: int, y: int, flag: Any, alignment: Any, fmt: Any, /, *__args: Any) -> None: + """void TCOD_console_print_ex(TCOD_Console *con, int x, int y, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_print_ex_utf( + con: Any, x: int, y: int, flag: Any, alignment: Any, fmt: Any, /, *__args: Any + ) -> None: + """void TCOD_console_print_ex_utf(TCOD_Console *con, int x, int y, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const wchar_t *fmt, ...)""" + + @staticmethod + def TCOD_console_print_frame( + con: Any, x: int, y: int, w: int, h: int, empty: bool, flag: Any, fmt: Any, /, *__args: Any + ) -> None: + """void TCOD_console_print_frame(TCOD_console_t con, int x, int y, int w, int h, bool empty, TCOD_bkgnd_flag_t flag, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_print_internal( + con: Any, x: int, y: int, w: int, h: int, flag: Any, align: Any, msg: Any, can_split: bool, count_only: bool, / + ) -> int: + """int TCOD_console_print_internal(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t align, char *msg, bool can_split, bool count_only)""" + + @staticmethod + def TCOD_console_print_internal_utf( + con: Any, + x: int, + y: int, + rw: int, + rh: int, + flag: Any, + align: Any, + msg: Any, + can_split: bool, + count_only: bool, + /, + ) -> int: + """int TCOD_console_print_internal_utf(TCOD_console_t con, int x, int y, int rw, int rh, TCOD_bkgnd_flag_t flag, TCOD_alignment_t align, wchar_t *msg, bool can_split, bool count_only)""" + + @staticmethod + def TCOD_console_print_rect(con: Any, x: int, y: int, w: int, h: int, fmt: Any, /, *__args: Any) -> int: + """int TCOD_console_print_rect(TCOD_Console *con, int x, int y, int w, int h, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_print_rect_ex( + con: Any, x: int, y: int, w: int, h: int, flag: Any, alignment: Any, fmt: Any, /, *__args: Any + ) -> int: + """int TCOD_console_print_rect_ex(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_print_rect_ex_utf( + con: Any, x: int, y: int, w: int, h: int, flag: Any, alignment: Any, fmt: Any, /, *__args: Any + ) -> int: + """int TCOD_console_print_rect_ex_utf(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const wchar_t *fmt, ...)""" + + @staticmethod + def TCOD_console_print_rect_utf(con: Any, x: int, y: int, w: int, h: int, fmt: Any, /, *__args: Any) -> int: + """int TCOD_console_print_rect_utf(TCOD_Console *con, int x, int y, int w, int h, const wchar_t *fmt, ...)""" + + @staticmethod + def TCOD_console_print_return_string( + con: Any, + x: int, + y: int, + rw: int, + rh: int, + flag: Any, + align: Any, + msg: Any, + can_split: bool, + count_only: bool, + /, + ) -> Any: + """char *TCOD_console_print_return_string(TCOD_console_t con, int x, int y, int rw, int rh, TCOD_bkgnd_flag_t flag, TCOD_alignment_t align, char *msg, bool can_split, bool count_only)""" + + @staticmethod + def TCOD_console_print_utf(con: Any, x: int, y: int, fmt: Any, /, *__args: Any) -> None: + """void TCOD_console_print_utf(TCOD_Console *con, int x, int y, const wchar_t *fmt, ...)""" + + @staticmethod + def TCOD_console_printf(con: Any, x: int, y: int, fmt: Any, /, *__args: Any) -> Any: + """TCOD_Error TCOD_console_printf(TCOD_Console *con, int x, int y, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_printf_ex(con: Any, x: int, y: int, flag: Any, alignment: Any, fmt: Any, /, *__args: Any) -> Any: + """TCOD_Error TCOD_console_printf_ex(TCOD_Console *con, int x, int y, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_printf_frame( + con: Any, x: int, y: int, w: int, h: int, empty: int, flag: Any, fmt: Any, /, *__args: Any + ) -> Any: + """TCOD_Error TCOD_console_printf_frame(TCOD_Console *con, int x, int y, int w, int h, int empty, TCOD_bkgnd_flag_t flag, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_printf_rect(con: Any, x: int, y: int, w: int, h: int, fmt: Any, /, *__args: Any) -> int: + """int TCOD_console_printf_rect(TCOD_Console *con, int x, int y, int w, int h, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_printf_rect_ex( + con: Any, x: int, y: int, w: int, h: int, flag: Any, alignment: Any, fmt: Any, /, *__args: Any + ) -> int: + """int TCOD_console_printf_rect_ex(TCOD_Console *con, int x, int y, int w, int h, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment, const char *fmt, ...)""" + + @staticmethod + def TCOD_console_printn( + console: Any, x: int, y: int, n: int, str: Any, fg: Any, bg: Any, flag: Any, alignment: Any, / + ) -> Any: + """TCOD_Error TCOD_console_printn(TCOD_Console *console, int x, int y, size_t n, const char *str, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment)""" + + @staticmethod + def TCOD_console_printn_frame( + console: Any, + x: int, + y: int, + width: int, + height: int, + n: int, + title: Any, + fg: Any, + bg: Any, + flag: Any, + clear: bool, + /, + ) -> Any: + """TCOD_Error TCOD_console_printn_frame(TCOD_Console *console, int x, int y, int width, int height, size_t n, const char *title, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, bool clear)""" + + @staticmethod + def TCOD_console_printn_rect( + console: Any, + x: int, + y: int, + width: int, + height: int, + n: int, + str: Any, + fg: Any, + bg: Any, + flag: Any, + alignment: Any, + /, + ) -> int: + """int TCOD_console_printn_rect(TCOD_Console *console, int x, int y, int width, int height, size_t n, const char *str, const TCOD_ColorRGB *fg, const TCOD_ColorRGB *bg, TCOD_bkgnd_flag_t flag, TCOD_alignment_t alignment)""" + + @staticmethod + def TCOD_console_put_char(con: Any, x: int, y: int, c: int, flag: Any, /) -> None: + """void TCOD_console_put_char(TCOD_Console *con, int x, int y, int c, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_put_char_ex(con: Any, x: int, y: int, c: int, fore: Any, back: Any, /) -> None: + """void TCOD_console_put_char_ex(TCOD_Console *con, int x, int y, int c, TCOD_color_t fore, TCOD_color_t back)""" + + @staticmethod + def TCOD_console_put_char_ex_wrapper(con: Any, x: int, y: int, c: int, fore: Any, back: Any, /) -> None: + """void TCOD_console_put_char_ex_wrapper(TCOD_console_t con, int x, int y, int c, colornum_t fore, colornum_t back)""" + + @staticmethod + def TCOD_console_put_rgb(console: Any, x: int, y: int, ch: int, fg: Any, bg: Any, flag: Any, /) -> None: + """void TCOD_console_put_rgb(TCOD_Console *console, int x, int y, int ch, const TCOD_color_t *fg, const TCOD_color_t *bg, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_rect(con: Any, x: int, y: int, rw: int, rh: int, clear: bool, flag: Any, /) -> None: + """void TCOD_console_rect(TCOD_Console *con, int x, int y, int rw, int rh, bool clear, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_resize_(console: Any, width: int, height: int, /) -> None: + """void TCOD_console_resize_(TCOD_Console *console, int width, int height)""" + + @staticmethod + def TCOD_console_save_apf(con: Any, filename: Any, /) -> bool: + """bool TCOD_console_save_apf(TCOD_console_t con, const char *filename)""" + + @staticmethod + def TCOD_console_save_asc(con: Any, filename: Any, /) -> bool: + """bool TCOD_console_save_asc(TCOD_console_t con, const char *filename)""" + + @staticmethod + def TCOD_console_save_xp(con: Any, filename: Any, compress_level: int, /) -> bool: + """bool TCOD_console_save_xp(const TCOD_Console *con, const char *filename, int compress_level)""" + + @staticmethod + def TCOD_console_set_alignment(con: Any, alignment: Any, /) -> None: + """void TCOD_console_set_alignment(TCOD_Console *con, TCOD_alignment_t alignment)""" + + @staticmethod + def TCOD_console_set_background_flag(con: Any, flag: Any, /) -> None: + """void TCOD_console_set_background_flag(TCOD_Console *con, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_set_char(con: Any, x: int, y: int, c: int, /) -> None: + """void TCOD_console_set_char(TCOD_Console *con, int x, int y, int c)""" + + @staticmethod + def TCOD_console_set_char_background(con: Any, x: int, y: int, col: Any, flag: Any, /) -> None: + """void TCOD_console_set_char_background(TCOD_Console *con, int x, int y, TCOD_color_t col, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_set_char_background_wrapper(con: Any, x: int, y: int, col: Any, flag: Any, /) -> None: + """void TCOD_console_set_char_background_wrapper(TCOD_console_t con, int x, int y, colornum_t col, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_set_char_foreground(con: Any, x: int, y: int, col: Any, /) -> None: + """void TCOD_console_set_char_foreground(TCOD_Console *con, int x, int y, TCOD_color_t col)""" + + @staticmethod + def TCOD_console_set_char_foreground_wrapper(con: Any, x: int, y: int, col: Any, /) -> None: + """void TCOD_console_set_char_foreground_wrapper(TCOD_console_t con, int x, int y, colornum_t col)""" + + @staticmethod + def TCOD_console_set_color_control(con: Any, fore: Any, back: Any, /) -> None: + """void TCOD_console_set_color_control(TCOD_colctrl_t con, TCOD_color_t fore, TCOD_color_t back)""" + + @staticmethod + def TCOD_console_set_color_control_wrapper(con: Any, fore: Any, back: Any, /) -> None: + """void TCOD_console_set_color_control_wrapper(TCOD_colctrl_t con, colornum_t fore, colornum_t back)""" + + @staticmethod + def TCOD_console_set_custom_font(fontFile: Any, flags: int, nb_char_horiz: int, nb_char_vertic: int, /) -> Any: + """TCOD_Error TCOD_console_set_custom_font(const char *fontFile, int flags, int nb_char_horiz, int nb_char_vertic)""" + + @staticmethod + def TCOD_console_set_default_background(con: Any, col: Any, /) -> None: + """void TCOD_console_set_default_background(TCOD_Console *con, TCOD_color_t col)""" + + @staticmethod + def TCOD_console_set_default_background_wrapper(con: Any, col: Any, /) -> None: + """void TCOD_console_set_default_background_wrapper(TCOD_console_t con, colornum_t col)""" + + @staticmethod + def TCOD_console_set_default_foreground(con: Any, col: Any, /) -> None: + """void TCOD_console_set_default_foreground(TCOD_Console *con, TCOD_color_t col)""" + + @staticmethod + def TCOD_console_set_default_foreground_wrapper(con: Any, col: Any, /) -> None: + """void TCOD_console_set_default_foreground_wrapper(TCOD_console_t con, colornum_t col)""" + + @staticmethod + def TCOD_console_set_dirty(x: int, y: int, w: int, h: int, /) -> None: + """void TCOD_console_set_dirty(int x, int y, int w, int h)""" + + @staticmethod + def TCOD_console_set_fade(val: Any, fade_color: Any, /) -> None: + """void TCOD_console_set_fade(uint8_t val, TCOD_color_t fade_color)""" + + @staticmethod + def TCOD_console_set_fade_wrapper(val: Any, fade: Any, /) -> None: + """void TCOD_console_set_fade_wrapper(uint8_t val, colornum_t fade)""" + + @staticmethod + def TCOD_console_set_fullscreen(fullscreen: bool, /) -> None: + """void TCOD_console_set_fullscreen(bool fullscreen)""" + + @staticmethod + def TCOD_console_set_key_color(con: Any, col: Any, /) -> None: + """void TCOD_console_set_key_color(TCOD_Console *con, TCOD_color_t col)""" + + @staticmethod + def TCOD_console_set_key_color_wrapper(con: Any, c: Any, /) -> None: + """void TCOD_console_set_key_color_wrapper(TCOD_console_t con, colornum_t c)""" + + @staticmethod + def TCOD_console_set_keyboard_repeat(initial_delay: int, interval: int, /) -> None: + """void TCOD_console_set_keyboard_repeat(int initial_delay, int interval)""" + + @staticmethod + def TCOD_console_set_window_title(title: Any, /) -> None: + """void TCOD_console_set_window_title(const char *title)""" + + @staticmethod + def TCOD_console_stringLength(s: Any, /) -> int: + """int TCOD_console_stringLength(const unsigned char *s)""" + + @staticmethod + def TCOD_console_validate_(console: Any, /) -> Any: + """inline static TCOD_Console *TCOD_console_validate_(const TCOD_Console *console)""" + + @staticmethod + def TCOD_console_vline(con: Any, x: int, y: int, l: int, flag: Any, /) -> None: + """void TCOD_console_vline(TCOD_Console *con, int x, int y, int l, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TCOD_console_wait_for_keypress(flush: bool, /) -> Any: + """TCOD_key_t TCOD_console_wait_for_keypress(bool flush)""" + + @staticmethod + def TCOD_console_wait_for_keypress_wrapper(holder: Any, flush: bool, /) -> None: + """void TCOD_console_wait_for_keypress_wrapper(TCOD_key_t *holder, bool flush)""" + + @staticmethod + def TCOD_context_change_tileset(self: Any, tileset: Any, /) -> Any: + """TCOD_Error TCOD_context_change_tileset(struct TCOD_Context *self, TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_context_convert_event_coordinates(context: Any, event: Any, /) -> Any: + """TCOD_Error TCOD_context_convert_event_coordinates(struct TCOD_Context *context, union SDL_Event *event)""" + + @staticmethod + def TCOD_context_delete(renderer: Any, /) -> None: + """void TCOD_context_delete(struct TCOD_Context *renderer)""" + + @staticmethod + def TCOD_context_get_renderer_type(context: Any, /) -> int: + """int TCOD_context_get_renderer_type(struct TCOD_Context *context)""" + + @staticmethod + def TCOD_context_get_sdl_renderer(context: Any, /) -> Any: + """struct SDL_Renderer *TCOD_context_get_sdl_renderer(struct TCOD_Context *context)""" + + @staticmethod + def TCOD_context_get_sdl_window(context: Any, /) -> Any: + """struct SDL_Window *TCOD_context_get_sdl_window(struct TCOD_Context *context)""" + + @staticmethod + def TCOD_context_new(params: Any, out: Any, /) -> Any: + """TCOD_Error TCOD_context_new(const TCOD_ContextParams *params, TCOD_Context **out)""" + + @staticmethod + def TCOD_context_new_() -> Any: + """struct TCOD_Context *TCOD_context_new_(void)""" + + @staticmethod + def TCOD_context_present(context: Any, console: Any, viewport: Any, /) -> Any: + """TCOD_Error TCOD_context_present(struct TCOD_Context *context, const struct TCOD_Console *console, const struct TCOD_ViewportOptions *viewport)""" + + @staticmethod + def TCOD_context_recommended_console_size(context: Any, magnification: float, columns: Any, rows: Any, /) -> Any: + """TCOD_Error TCOD_context_recommended_console_size(struct TCOD_Context *context, float magnification, int *columns, int *rows)""" + + @staticmethod + def TCOD_context_save_screenshot(context: Any, filename: Any, /) -> Any: + """TCOD_Error TCOD_context_save_screenshot(struct TCOD_Context *context, const char *filename)""" + + @staticmethod + def TCOD_context_screen_capture(context: Any, out_pixels: Any, width: Any, height: Any, /) -> Any: + """TCOD_Error TCOD_context_screen_capture(struct TCOD_Context *context, TCOD_ColorRGBA *out_pixels, int *width, int *height)""" + + @staticmethod + def TCOD_context_screen_capture_alloc(context: Any, width: Any, height: Any, /) -> Any: + """TCOD_ColorRGBA *TCOD_context_screen_capture_alloc(struct TCOD_Context *context, int *width, int *height)""" + + @staticmethod + def TCOD_context_screen_pixel_to_tile_d(context: Any, x: Any, y: Any, /) -> Any: + """TCOD_Error TCOD_context_screen_pixel_to_tile_d(struct TCOD_Context *context, double *x, double *y)""" + + @staticmethod + def TCOD_context_screen_pixel_to_tile_i(context: Any, x: Any, y: Any, /) -> Any: + """TCOD_Error TCOD_context_screen_pixel_to_tile_i(struct TCOD_Context *context, int *x, int *y)""" + + @staticmethod + def TCOD_context_set_mouse_transform(context: Any, transform: Any, /) -> Any: + """TCOD_Error TCOD_context_set_mouse_transform(struct TCOD_Context *context, const TCOD_MouseTransform *transform)""" + + @staticmethod + def TCOD_dijkstra_compute(dijkstra: Any, root_x: int, root_y: int, /) -> None: + """void TCOD_dijkstra_compute(TCOD_Dijkstra *dijkstra, int root_x, int root_y)""" + + @staticmethod + def TCOD_dijkstra_delete(dijkstra: Any, /) -> None: + """void TCOD_dijkstra_delete(TCOD_Dijkstra *dijkstra)""" + + @staticmethod + def TCOD_dijkstra_get(path: Any, index: int, x: Any, y: Any, /) -> None: + """void TCOD_dijkstra_get(TCOD_Dijkstra *path, int index, int *x, int *y)""" + + @staticmethod + def TCOD_dijkstra_get_distance(dijkstra: Any, x: int, y: int, /) -> float: + """float TCOD_dijkstra_get_distance(TCOD_Dijkstra *dijkstra, int x, int y)""" + + @staticmethod + def TCOD_dijkstra_is_empty(path: Any, /) -> bool: + """bool TCOD_dijkstra_is_empty(TCOD_Dijkstra *path)""" + + @staticmethod + def TCOD_dijkstra_new(map: Any, diagonalCost: float, /) -> Any: + """TCOD_Dijkstra *TCOD_dijkstra_new(TCOD_Map *map, float diagonalCost)""" + + @staticmethod + def TCOD_dijkstra_new_using_function( + map_width: int, map_height: int, func: Any, user_data: Any, diagonalCost: float, / + ) -> Any: + """TCOD_Dijkstra *TCOD_dijkstra_new_using_function(int map_width, int map_height, TCOD_path_func_t func, void *user_data, float diagonalCost)""" + + @staticmethod + def TCOD_dijkstra_path_set(dijkstra: Any, x: int, y: int, /) -> bool: + """bool TCOD_dijkstra_path_set(TCOD_Dijkstra *dijkstra, int x, int y)""" + + @staticmethod + def TCOD_dijkstra_path_walk(dijkstra: Any, x: Any, y: Any, /) -> bool: + """bool TCOD_dijkstra_path_walk(TCOD_Dijkstra *dijkstra, int *x, int *y)""" + + @staticmethod + def TCOD_dijkstra_reverse(path: Any, /) -> None: + """void TCOD_dijkstra_reverse(TCOD_Dijkstra *path)""" + + @staticmethod + def TCOD_dijkstra_size(path: Any, /) -> int: + """int TCOD_dijkstra_size(TCOD_Dijkstra *path)""" + + @staticmethod + def TCOD_frontier_clear(frontier: Any, /) -> Any: + """TCOD_Error TCOD_frontier_clear(struct TCOD_Frontier *frontier)""" + + @staticmethod + def TCOD_frontier_delete(frontier: Any, /) -> None: + """void TCOD_frontier_delete(struct TCOD_Frontier *frontier)""" + + @staticmethod + def TCOD_frontier_new(ndim: int, /) -> Any: + """struct TCOD_Frontier *TCOD_frontier_new(int ndim)""" + + @staticmethod + def TCOD_frontier_pop(frontier: Any, /) -> Any: + """TCOD_Error TCOD_frontier_pop(struct TCOD_Frontier *frontier)""" + + @staticmethod + def TCOD_frontier_push(frontier: Any, index: Any, dist: int, heuristic: int, /) -> Any: + """TCOD_Error TCOD_frontier_push(struct TCOD_Frontier *frontier, const int *index, int dist, int heuristic)""" + + @staticmethod + def TCOD_frontier_size(frontier: Any, /) -> int: + """int TCOD_frontier_size(const struct TCOD_Frontier *frontier)""" + + @staticmethod + def TCOD_get_default_tileset() -> Any: + """TCOD_Tileset *TCOD_get_default_tileset(void)""" + + @staticmethod + def TCOD_get_error() -> Any: + """const char *TCOD_get_error(void)""" + + @staticmethod + def TCOD_get_function_address(library: Any, function_name: Any, /) -> Any: + """void *TCOD_get_function_address(TCOD_library_t library, const char *function_name)""" + + @staticmethod + def TCOD_heap_clear(heap: Any, /) -> None: + """void TCOD_heap_clear(struct TCOD_Heap *heap)""" + + @staticmethod + def TCOD_heap_init(heap: Any, data_size: int, /) -> int: + """int TCOD_heap_init(struct TCOD_Heap *heap, size_t data_size)""" + + @staticmethod + def TCOD_heap_uninit(heap: Any, /) -> None: + """void TCOD_heap_uninit(struct TCOD_Heap *heap)""" + + @staticmethod + def TCOD_heightmap_add(hm: Any, value: float, /) -> None: + """void TCOD_heightmap_add(TCOD_heightmap_t *hm, float value)""" + + @staticmethod + def TCOD_heightmap_add_fbm( + hm: Any, + noise: Any, + mul_x: float, + mul_y: float, + add_x: float, + add_y: float, + octaves: float, + delta: float, + scale: float, + /, + ) -> None: + """void TCOD_heightmap_add_fbm(TCOD_heightmap_t *hm, TCOD_noise_t noise, float mul_x, float mul_y, float add_x, float add_y, float octaves, float delta, float scale)""" + + @staticmethod + def TCOD_heightmap_add_hill(hm: Any, hx: float, hy: float, h_radius: float, h_height: float, /) -> None: + """void TCOD_heightmap_add_hill(TCOD_heightmap_t *hm, float hx, float hy, float h_radius, float h_height)""" + + @staticmethod + def TCOD_heightmap_add_hm(hm1: Any, hm2: Any, out: Any, /) -> None: + """void TCOD_heightmap_add_hm(const TCOD_heightmap_t *hm1, const TCOD_heightmap_t *hm2, TCOD_heightmap_t *out)""" + + @staticmethod + def TCOD_heightmap_add_voronoi(hm: Any, nbPoints: int, nbCoef: int, coef: Any, rnd: Any, /) -> None: + """void TCOD_heightmap_add_voronoi(TCOD_heightmap_t *hm, int nbPoints, int nbCoef, const float *coef, TCOD_Random *rnd)""" + + @staticmethod + def TCOD_heightmap_clamp(hm: Any, min: float, max: float, /) -> None: + """void TCOD_heightmap_clamp(TCOD_heightmap_t *hm, float min, float max)""" + + @staticmethod + def TCOD_heightmap_clear(hm: Any, /) -> None: + """void TCOD_heightmap_clear(TCOD_heightmap_t *hm)""" + + @staticmethod + def TCOD_heightmap_copy(hm_source: Any, hm_dest: Any, /) -> None: + """void TCOD_heightmap_copy(const TCOD_heightmap_t *hm_source, TCOD_heightmap_t *hm_dest)""" + + @staticmethod + def TCOD_heightmap_count_cells(hm: Any, min: float, max: float, /) -> int: + """int TCOD_heightmap_count_cells(const TCOD_heightmap_t *hm, float min, float max)""" + + @staticmethod + def TCOD_heightmap_delete(hm: Any, /) -> None: + """void TCOD_heightmap_delete(TCOD_heightmap_t *hm)""" + + @staticmethod + def TCOD_heightmap_dig_bezier( + hm: Any, px: Any, py: Any, startRadius: float, startDepth: float, endRadius: float, endDepth: float, / + ) -> None: + """void TCOD_heightmap_dig_bezier(TCOD_heightmap_t *hm, int px[4], int py[4], float startRadius, float startDepth, float endRadius, float endDepth)""" + + @staticmethod + def TCOD_heightmap_dig_hill(hm: Any, hx: float, hy: float, h_radius: float, h_height: float, /) -> None: + """void TCOD_heightmap_dig_hill(TCOD_heightmap_t *hm, float hx, float hy, float h_radius, float h_height)""" + + @staticmethod + def TCOD_heightmap_get_interpolated_value(hm: Any, x: float, y: float, /) -> float: + """float TCOD_heightmap_get_interpolated_value(const TCOD_heightmap_t *hm, float x, float y)""" + + @staticmethod + def TCOD_heightmap_get_minmax(hm: Any, min: Any, max: Any, /) -> None: + """void TCOD_heightmap_get_minmax(const TCOD_heightmap_t *hm, float *min, float *max)""" + + @staticmethod + def TCOD_heightmap_get_normal(hm: Any, x: float, y: float, n: Any, waterLevel: float, /) -> None: + """void TCOD_heightmap_get_normal(const TCOD_heightmap_t *hm, float x, float y, float n[3], float waterLevel)""" + + @staticmethod + def TCOD_heightmap_get_slope(hm: Any, x: int, y: int, /) -> float: + """float TCOD_heightmap_get_slope(const TCOD_heightmap_t *hm, int x, int y)""" + + @staticmethod + def TCOD_heightmap_get_value(hm: Any, x: int, y: int, /) -> float: + """float TCOD_heightmap_get_value(const TCOD_heightmap_t *hm, int x, int y)""" + + @staticmethod + def TCOD_heightmap_has_land_on_border(hm: Any, waterLevel: float, /) -> bool: + """bool TCOD_heightmap_has_land_on_border(const TCOD_heightmap_t *hm, float waterLevel)""" + + @staticmethod + def TCOD_heightmap_islandify(hm: Any, seaLevel: float, rnd: Any, /) -> None: + """void TCOD_heightmap_islandify(TCOD_heightmap_t *hm, float seaLevel, TCOD_Random *rnd)""" + + @staticmethod + def TCOD_heightmap_kernel_transform( + hm: Any, kernel_size: int, dx: Any, dy: Any, weight: Any, minLevel: float, maxLevel: float, / + ) -> None: + """void TCOD_heightmap_kernel_transform(TCOD_heightmap_t *hm, int kernel_size, const int *dx, const int *dy, const float *weight, float minLevel, float maxLevel)""" + + @staticmethod + def TCOD_heightmap_lerp_hm(hm1: Any, hm2: Any, out: Any, coef: float, /) -> None: + """void TCOD_heightmap_lerp_hm(const TCOD_heightmap_t *hm1, const TCOD_heightmap_t *hm2, TCOD_heightmap_t *out, float coef)""" + + @staticmethod + def TCOD_heightmap_mid_point_displacement(hm: Any, rnd: Any, roughness: float, /) -> None: + """void TCOD_heightmap_mid_point_displacement(TCOD_heightmap_t *hm, TCOD_Random *rnd, float roughness)""" + + @staticmethod + def TCOD_heightmap_multiply_hm(hm1: Any, hm2: Any, out: Any, /) -> None: + """void TCOD_heightmap_multiply_hm(const TCOD_heightmap_t *hm1, const TCOD_heightmap_t *hm2, TCOD_heightmap_t *out)""" + + @staticmethod + def TCOD_heightmap_new(w: int, h: int, /) -> Any: + """TCOD_heightmap_t *TCOD_heightmap_new(int w, int h)""" + + @staticmethod + def TCOD_heightmap_normalize(hm: Any, min: float, max: float, /) -> None: + """void TCOD_heightmap_normalize(TCOD_heightmap_t *hm, float min, float max)""" + + @staticmethod + def TCOD_heightmap_rain_erosion( + hm: Any, nbDrops: int, erosionCoef: float, sedimentationCoef: float, rnd: Any, / + ) -> None: + """void TCOD_heightmap_rain_erosion(TCOD_heightmap_t *hm, int nbDrops, float erosionCoef, float sedimentationCoef, TCOD_Random *rnd)""" + + @staticmethod + def TCOD_heightmap_scale(hm: Any, value: float, /) -> None: + """void TCOD_heightmap_scale(TCOD_heightmap_t *hm, float value)""" + + @staticmethod + def TCOD_heightmap_scale_fbm( + hm: Any, + noise: Any, + mul_x: float, + mul_y: float, + add_x: float, + add_y: float, + octaves: float, + delta: float, + scale: float, + /, + ) -> None: + """void TCOD_heightmap_scale_fbm(TCOD_heightmap_t *hm, TCOD_noise_t noise, float mul_x, float mul_y, float add_x, float add_y, float octaves, float delta, float scale)""" + + @staticmethod + def TCOD_heightmap_set_value(hm: Any, x: int, y: int, value: float, /) -> None: + """void TCOD_heightmap_set_value(TCOD_heightmap_t *hm, int x, int y, float value)""" + + @staticmethod + def TCOD_image_blit( + image: Any, console: Any, x: float, y: float, bkgnd_flag: Any, scale_x: float, scale_y: float, angle: float, / + ) -> None: + """void TCOD_image_blit(TCOD_Image *image, TCOD_console_t console, float x, float y, TCOD_bkgnd_flag_t bkgnd_flag, float scale_x, float scale_y, float angle)""" + + @staticmethod + def TCOD_image_blit_2x(image: Any, dest: Any, dx: int, dy: int, sx: int, sy: int, w: int, h: int, /) -> None: + """void TCOD_image_blit_2x(const TCOD_Image *image, TCOD_Console *dest, int dx, int dy, int sx, int sy, int w, int h)""" + + @staticmethod + def TCOD_image_blit_rect(image: Any, console: Any, x: int, y: int, w: int, h: int, bkgnd_flag: Any, /) -> None: + """void TCOD_image_blit_rect(TCOD_Image *image, TCOD_console_t console, int x, int y, int w, int h, TCOD_bkgnd_flag_t bkgnd_flag)""" + + @staticmethod + def TCOD_image_clear(image: Any, color: Any, /) -> None: + """void TCOD_image_clear(TCOD_Image *image, TCOD_color_t color)""" + + @staticmethod + def TCOD_image_clear_wrapper(image: Any, color: Any, /) -> None: + """void TCOD_image_clear_wrapper(TCOD_image_t image, colornum_t color)""" + + @staticmethod + def TCOD_image_delete(image: Any, /) -> None: + """void TCOD_image_delete(TCOD_Image *image)""" + + @staticmethod + def TCOD_image_from_console(console: Any, /) -> Any: + """TCOD_Image *TCOD_image_from_console(const TCOD_Console *console)""" + + @staticmethod + def TCOD_image_get_alpha(image: Any, x: int, y: int, /) -> int: + """int TCOD_image_get_alpha(const TCOD_Image *image, int x, int y)""" + + @staticmethod + def TCOD_image_get_mipmap_pixel(image: Any, x0: float, y0: float, x1: float, y1: float, /) -> Any: + """TCOD_color_t TCOD_image_get_mipmap_pixel(TCOD_Image *image, float x0, float y0, float x1, float y1)""" + + @staticmethod + def TCOD_image_get_mipmap_pixel_wrapper(image: Any, x0: float, y0: float, x1: float, y1: float, /) -> Any: + """colornum_t TCOD_image_get_mipmap_pixel_wrapper(TCOD_image_t image, float x0, float y0, float x1, float y1)""" + + @staticmethod + def TCOD_image_get_pixel(image: Any, x: int, y: int, /) -> Any: + """TCOD_color_t TCOD_image_get_pixel(const TCOD_Image *image, int x, int y)""" + + @staticmethod + def TCOD_image_get_pixel_wrapper(image: Any, x: int, y: int, /) -> Any: + """colornum_t TCOD_image_get_pixel_wrapper(TCOD_image_t image, int x, int y)""" + + @staticmethod + def TCOD_image_get_size(image: Any, w: Any, h: Any, /) -> None: + """void TCOD_image_get_size(const TCOD_Image *image, int *w, int *h)""" + + @staticmethod + def TCOD_image_hflip(image: Any, /) -> None: + """void TCOD_image_hflip(TCOD_Image *image)""" + + @staticmethod + def TCOD_image_invert(image: Any, /) -> None: + """void TCOD_image_invert(TCOD_Image *image)""" + + @staticmethod + def TCOD_image_is_pixel_transparent(image: Any, x: int, y: int, /) -> bool: + """bool TCOD_image_is_pixel_transparent(const TCOD_Image *image, int x, int y)""" + + @staticmethod + def TCOD_image_load(filename: Any, /) -> Any: + """TCOD_Image *TCOD_image_load(const char *filename)""" + + @staticmethod + def TCOD_image_new(width: int, height: int, /) -> Any: + """TCOD_Image *TCOD_image_new(int width, int height)""" + + @staticmethod + def TCOD_image_put_pixel(image: Any, x: int, y: int, col: Any, /) -> None: + """void TCOD_image_put_pixel(TCOD_Image *image, int x, int y, TCOD_color_t col)""" + + @staticmethod + def TCOD_image_put_pixel_wrapper(image: Any, x: int, y: int, col: Any, /) -> None: + """void TCOD_image_put_pixel_wrapper(TCOD_image_t image, int x, int y, colornum_t col)""" + + @staticmethod + def TCOD_image_refresh_console(image: Any, console: Any, /) -> None: + """void TCOD_image_refresh_console(TCOD_Image *image, const TCOD_Console *console)""" + + @staticmethod + def TCOD_image_rotate90(image: Any, numRotations: int, /) -> None: + """void TCOD_image_rotate90(TCOD_Image *image, int numRotations)""" + + @staticmethod + def TCOD_image_save(image: Any, filename: Any, /) -> Any: + """TCOD_Error TCOD_image_save(const TCOD_Image *image, const char *filename)""" + + @staticmethod + def TCOD_image_scale(image: Any, new_w: int, new_h: int, /) -> None: + """void TCOD_image_scale(TCOD_Image *image, int new_w, int new_h)""" + + @staticmethod + def TCOD_image_set_key_color(image: Any, key_color: Any, /) -> None: + """void TCOD_image_set_key_color(TCOD_Image *image, TCOD_color_t key_color)""" + + @staticmethod + def TCOD_image_set_key_color_wrapper(image: Any, key_color: Any, /) -> None: + """void TCOD_image_set_key_color_wrapper(TCOD_image_t image, colornum_t key_color)""" + + @staticmethod + def TCOD_image_vflip(image: Any, /) -> None: + """void TCOD_image_vflip(TCOD_Image *image)""" + + @staticmethod + def TCOD_lex_delete(lex: Any, /) -> None: + """void TCOD_lex_delete(TCOD_lex_t *lex)""" + + @staticmethod + def TCOD_lex_expect_token_type(lex: Any, token_type: int, /) -> bool: + """bool TCOD_lex_expect_token_type(TCOD_lex_t *lex, int token_type)""" + + @staticmethod + def TCOD_lex_expect_token_value(lex: Any, token_type: int, token_value: Any, /) -> bool: + """bool TCOD_lex_expect_token_value(TCOD_lex_t *lex, int token_type, const char *token_value)""" + + @staticmethod + def TCOD_lex_get_last_javadoc(lex: Any, /) -> Any: + """char *TCOD_lex_get_last_javadoc(TCOD_lex_t *lex)""" + + @staticmethod + def TCOD_lex_get_token_name(token_type: int, /) -> Any: + """const char *TCOD_lex_get_token_name(int token_type)""" + + @staticmethod + def TCOD_lex_hextoint(c: Any, /) -> int: + """int TCOD_lex_hextoint(char c)""" + + @staticmethod + def TCOD_lex_new( + symbols: Any, + keywords: Any, + simpleComment: Any, + commentStart: Any, + commentStop: Any, + javadocCommentStart: Any, + stringDelim: Any, + flags: int, + /, + ) -> Any: + """TCOD_lex_t *TCOD_lex_new(const char * const *symbols, const char * const *keywords, const char *simpleComment, const char *commentStart, const char *commentStop, const char *javadocCommentStart, const char *stringDelim, int flags)""" + + @staticmethod + def TCOD_lex_new_intern() -> Any: + """TCOD_lex_t *TCOD_lex_new_intern(void)""" + + @staticmethod + def TCOD_lex_parse(lex: Any, /) -> int: + """int TCOD_lex_parse(TCOD_lex_t *lex)""" + + @staticmethod + def TCOD_lex_parse_until_token_type(lex: Any, token_type: int, /) -> int: + """int TCOD_lex_parse_until_token_type(TCOD_lex_t *lex, int token_type)""" + + @staticmethod + def TCOD_lex_parse_until_token_value(lex: Any, token_value: Any, /) -> int: + """int TCOD_lex_parse_until_token_value(TCOD_lex_t *lex, const char *token_value)""" + + @staticmethod + def TCOD_lex_restore(lex: Any, savepoint: Any, /) -> None: + """void TCOD_lex_restore(TCOD_lex_t *lex, TCOD_lex_t *savepoint)""" + + @staticmethod + def TCOD_lex_savepoint(lex: Any, savepoint: Any, /) -> None: + """void TCOD_lex_savepoint(TCOD_lex_t *lex, TCOD_lex_t *savepoint)""" + + @staticmethod + def TCOD_lex_set_data_buffer(lex: Any, dat: Any, /) -> None: + """void TCOD_lex_set_data_buffer(TCOD_lex_t *lex, char *dat)""" + + @staticmethod + def TCOD_lex_set_data_file(lex: Any, filename: Any, /) -> bool: + """bool TCOD_lex_set_data_file(TCOD_lex_t *lex, const char *filename)""" + + @staticmethod + def TCOD_line(xFrom: int, yFrom: int, xTo: int, yTo: int, listener: Any, /) -> bool: + """bool TCOD_line(int xFrom, int yFrom, int xTo, int yTo, TCOD_line_listener_t listener)""" + + @staticmethod + def TCOD_line_init(xFrom: int, yFrom: int, xTo: int, yTo: int, /) -> None: + """void TCOD_line_init(int xFrom, int yFrom, int xTo, int yTo)""" + + @staticmethod + def TCOD_line_init_mt(xFrom: int, yFrom: int, xTo: int, yTo: int, data: Any, /) -> None: + """void TCOD_line_init_mt(int xFrom, int yFrom, int xTo, int yTo, TCOD_bresenham_data_t *data)""" + + @staticmethod + def TCOD_line_mt(xFrom: int, yFrom: int, xTo: int, yTo: int, listener: Any, data: Any, /) -> bool: + """bool TCOD_line_mt(int xFrom, int yFrom, int xTo, int yTo, TCOD_line_listener_t listener, TCOD_bresenham_data_t *data)""" + + @staticmethod + def TCOD_line_step(xCur: Any, yCur: Any, /) -> bool: + """bool TCOD_line_step(int *xCur, int *yCur)""" + + @staticmethod + def TCOD_line_step_mt(xCur: Any, yCur: Any, data: Any, /) -> bool: + """bool TCOD_line_step_mt(int *xCur, int *yCur, TCOD_bresenham_data_t *data)""" + + @staticmethod + def TCOD_list_add_all(l: Any, l2: Any, /) -> None: + """void TCOD_list_add_all(TCOD_list_t l, TCOD_list_t l2)""" + + @staticmethod + def TCOD_list_allocate(nb_elements: int, /) -> Any: + """TCOD_list_t TCOD_list_allocate(int nb_elements)""" + + @staticmethod + def TCOD_list_begin(l: Any, /) -> Any: + """void **TCOD_list_begin(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_clear(l: Any, /) -> None: + """void TCOD_list_clear(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_clear_and_delete(l: Any, /) -> None: + """void TCOD_list_clear_and_delete(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_contains(l: Any, elt: Any, /) -> bool: + """bool TCOD_list_contains(TCOD_list_t l, const void *elt)""" + + @staticmethod + def TCOD_list_delete(l: Any, /) -> None: + """void TCOD_list_delete(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_duplicate(l: Any, /) -> Any: + """TCOD_list_t TCOD_list_duplicate(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_end(l: Any, /) -> Any: + """void **TCOD_list_end(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_get(l: Any, idx: int, /) -> Any: + """void *TCOD_list_get(TCOD_list_t l, int idx)""" + + @staticmethod + def TCOD_list_insert_before(l: Any, elt: Any, before: int, /) -> Any: + """void **TCOD_list_insert_before(TCOD_list_t l, const void *elt, int before)""" + + @staticmethod + def TCOD_list_is_empty(l: Any, /) -> bool: + """bool TCOD_list_is_empty(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_new() -> Any: + """TCOD_list_t TCOD_list_new(void)""" + + @staticmethod + def TCOD_list_peek(l: Any, /) -> Any: + """void *TCOD_list_peek(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_pop(l: Any, /) -> Any: + """void *TCOD_list_pop(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_push(l: Any, elt: Any, /) -> None: + """void TCOD_list_push(TCOD_list_t l, const void *elt)""" + + @staticmethod + def TCOD_list_remove(l: Any, elt: Any, /) -> None: + """void TCOD_list_remove(TCOD_list_t l, const void *elt)""" + + @staticmethod + def TCOD_list_remove_fast(l: Any, elt: Any, /) -> None: + """void TCOD_list_remove_fast(TCOD_list_t l, const void *elt)""" + + @staticmethod + def TCOD_list_remove_iterator(l: Any, elt: Any, /) -> Any: + """void **TCOD_list_remove_iterator(TCOD_list_t l, void **elt)""" + + @staticmethod + def TCOD_list_remove_iterator_fast(l: Any, elt: Any, /) -> Any: + """void **TCOD_list_remove_iterator_fast(TCOD_list_t l, void **elt)""" + + @staticmethod + def TCOD_list_reverse(l: Any, /) -> None: + """void TCOD_list_reverse(TCOD_list_t l)""" + + @staticmethod + def TCOD_list_set(l: Any, elt: Any, idx: int, /) -> None: + """void TCOD_list_set(TCOD_list_t l, const void *elt, int idx)""" + + @staticmethod + def TCOD_list_set_size(l: Any, size: int, /) -> None: + """void TCOD_list_set_size(TCOD_list_t l, int size)""" + + @staticmethod + def TCOD_list_size(l: Any, /) -> int: + """int TCOD_list_size(TCOD_list_t l)""" + + @staticmethod + def TCOD_load_bdf(path: Any, /) -> Any: + """TCOD_Tileset *TCOD_load_bdf(const char *path)""" + + @staticmethod + def TCOD_load_bdf_memory(size: int, buffer: Any, /) -> Any: + """TCOD_Tileset *TCOD_load_bdf_memory(int size, const unsigned char *buffer)""" + + @staticmethod + def TCOD_load_library(path: Any, /) -> Any: + """TCOD_library_t TCOD_load_library(const char *path)""" + + @staticmethod + def TCOD_load_truetype_font_(path: Any, tile_width: int, tile_height: int, /) -> Any: + """TCOD_Tileset *TCOD_load_truetype_font_(const char *path, int tile_width, int tile_height)""" + + @staticmethod + def TCOD_load_xp(path: Any, n: int, out: Any, /) -> int: + """int TCOD_load_xp(const char *path, int n, TCOD_Console **out)""" + + @staticmethod + def TCOD_load_xp_from_memory(n_data: int, data: Any, n_out: int, out: Any, /) -> int: + """int TCOD_load_xp_from_memory(int n_data, const unsigned char *data, int n_out, TCOD_Console **out)""" + + @staticmethod + def TCOD_log_verbose_(msg: Any, level: int, source: Any, line: int, /) -> None: + """void TCOD_log_verbose_(const char *msg, int level, const char *source, int line)""" + + @staticmethod + def TCOD_log_verbose_fmt_(level: int, source: Any, line: int, fmt: Any, /, *__args: Any) -> None: + """void TCOD_log_verbose_fmt_(int level, const char *source, int line, const char *fmt, ...)""" + + @staticmethod + def TCOD_map_clear(map: Any, transparent: bool, walkable: bool, /) -> None: + """void TCOD_map_clear(TCOD_Map *map, bool transparent, bool walkable)""" + + @staticmethod + def TCOD_map_compute_fov(map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, algo: Any, /) -> Any: + """TCOD_Error TCOD_map_compute_fov(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls, TCOD_fov_algorithm_t algo)""" + + @staticmethod + def TCOD_map_compute_fov_circular_raycasting( + map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, / + ) -> Any: + """TCOD_Error TCOD_map_compute_fov_circular_raycasting(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls)""" + + @staticmethod + def TCOD_map_compute_fov_diamond_raycasting( + map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, / + ) -> Any: + """TCOD_Error TCOD_map_compute_fov_diamond_raycasting(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls)""" + + @staticmethod + def TCOD_map_compute_fov_permissive2( + map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, permissiveness: int, / + ) -> Any: + """TCOD_Error TCOD_map_compute_fov_permissive2(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls, int permissiveness)""" + + @staticmethod + def TCOD_map_compute_fov_recursive_shadowcasting( + map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, / + ) -> Any: + """TCOD_Error TCOD_map_compute_fov_recursive_shadowcasting(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls)""" + + @staticmethod + def TCOD_map_compute_fov_restrictive_shadowcasting( + map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, / + ) -> Any: + """TCOD_Error TCOD_map_compute_fov_restrictive_shadowcasting(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls)""" + + @staticmethod + def TCOD_map_compute_fov_symmetric_shadowcast( + map: Any, pov_x: int, pov_y: int, max_radius: int, light_walls: bool, / + ) -> Any: + """TCOD_Error TCOD_map_compute_fov_symmetric_shadowcast(TCOD_Map *map, int pov_x, int pov_y, int max_radius, bool light_walls)""" + + @staticmethod + def TCOD_map_copy(source: Any, dest: Any, /) -> Any: + """TCOD_Error TCOD_map_copy(const TCOD_Map *source, TCOD_Map *dest)""" + + @staticmethod + def TCOD_map_delete(map: Any, /) -> None: + """void TCOD_map_delete(TCOD_Map *map)""" + + @staticmethod + def TCOD_map_get_height(map: Any, /) -> int: + """int TCOD_map_get_height(const TCOD_Map *map)""" + + @staticmethod + def TCOD_map_get_nb_cells(map: Any, /) -> int: + """int TCOD_map_get_nb_cells(const TCOD_Map *map)""" + + @staticmethod + def TCOD_map_get_width(map: Any, /) -> int: + """int TCOD_map_get_width(const TCOD_Map *map)""" + + @staticmethod + def TCOD_map_in_bounds(map: Any, x: int, y: int, /) -> bool: + """inline static bool TCOD_map_in_bounds(const struct TCOD_Map *map, int x, int y)""" + + @staticmethod + def TCOD_map_is_in_fov(map: Any, x: int, y: int, /) -> bool: + """bool TCOD_map_is_in_fov(const TCOD_Map *map, int x, int y)""" + + @staticmethod + def TCOD_map_is_transparent(map: Any, x: int, y: int, /) -> bool: + """bool TCOD_map_is_transparent(const TCOD_Map *map, int x, int y)""" + + @staticmethod + def TCOD_map_is_walkable(map: Any, x: int, y: int, /) -> bool: + """bool TCOD_map_is_walkable(TCOD_Map *map, int x, int y)""" + + @staticmethod + def TCOD_map_new(width: int, height: int, /) -> Any: + """TCOD_Map *TCOD_map_new(int width, int height)""" + + @staticmethod + def TCOD_map_postprocess(map: Any, pov_x: int, pov_y: int, radius: int, /) -> Any: + """TCOD_Error TCOD_map_postprocess(TCOD_Map *map, int pov_x, int pov_y, int radius)""" + + @staticmethod + def TCOD_map_set_in_fov(map: Any, x: int, y: int, fov: bool, /) -> None: + """void TCOD_map_set_in_fov(TCOD_Map *map, int x, int y, bool fov)""" + + @staticmethod + def TCOD_map_set_properties(map: Any, x: int, y: int, is_transparent: bool, is_walkable: bool, /) -> None: + """void TCOD_map_set_properties(TCOD_Map *map, int x, int y, bool is_transparent, bool is_walkable)""" + + @staticmethod + def TCOD_minheap_heapify(minheap: Any, /) -> None: + """void TCOD_minheap_heapify(struct TCOD_Heap *minheap)""" + + @staticmethod + def TCOD_minheap_pop(minheap: Any, out: Any, /) -> None: + """void TCOD_minheap_pop(struct TCOD_Heap *minheap, void *out)""" + + @staticmethod + def TCOD_minheap_push(minheap: Any, priority: int, data: Any, /) -> int: + """int TCOD_minheap_push(struct TCOD_Heap *minheap, int priority, const void *data)""" + + @staticmethod + def TCOD_mouse_get_status() -> Any: + """TCOD_mouse_t TCOD_mouse_get_status(void)""" + + @staticmethod + def TCOD_mouse_get_status_wrapper(holder: Any, /) -> None: + """void TCOD_mouse_get_status_wrapper(TCOD_mouse_t *holder)""" + + @staticmethod + def TCOD_mouse_includes_touch(enable: bool, /) -> None: + """void TCOD_mouse_includes_touch(bool enable)""" + + @staticmethod + def TCOD_mouse_is_cursor_visible() -> bool: + """bool TCOD_mouse_is_cursor_visible(void)""" + + @staticmethod + def TCOD_mouse_move(x: int, y: int, /) -> None: + """void TCOD_mouse_move(int x, int y)""" + + @staticmethod + def TCOD_mouse_show_cursor(visible: bool, /) -> None: + """void TCOD_mouse_show_cursor(bool visible)""" + + @staticmethod + def TCOD_mutex_delete(mut: Any, /) -> None: + """void TCOD_mutex_delete(TCOD_mutex_t mut)""" + + @staticmethod + def TCOD_mutex_in(mut: Any, /) -> None: + """void TCOD_mutex_in(TCOD_mutex_t mut)""" + + @staticmethod + def TCOD_mutex_new() -> Any: + """TCOD_mutex_t TCOD_mutex_new(void)""" + + @staticmethod + def TCOD_mutex_out(mut: Any, /) -> None: + """void TCOD_mutex_out(TCOD_mutex_t mut)""" + + @staticmethod + def TCOD_namegen_destroy() -> None: + """void TCOD_namegen_destroy(void)""" + + @staticmethod + def TCOD_namegen_generate(name: Any, allocate: bool, /) -> Any: + """char *TCOD_namegen_generate(const char *name, bool allocate)""" + + @staticmethod + def TCOD_namegen_generate_custom(name: Any, rule: Any, allocate: bool, /) -> Any: + """char *TCOD_namegen_generate_custom(const char *name, const char *rule, bool allocate)""" + + @staticmethod + def TCOD_namegen_get_nb_sets_wrapper() -> int: + """int TCOD_namegen_get_nb_sets_wrapper(void)""" + + @staticmethod + def TCOD_namegen_get_sets() -> Any: + """TCOD_list_t TCOD_namegen_get_sets(void)""" + + @staticmethod + def TCOD_namegen_get_sets_wrapper(sets: Any, /) -> None: + """void TCOD_namegen_get_sets_wrapper(char **sets)""" + + @staticmethod + def TCOD_namegen_parse(filename: Any, random: Any, /) -> None: + """void TCOD_namegen_parse(const char *filename, TCOD_Random *random)""" + + @staticmethod + def TCOD_noise_delete(noise: Any, /) -> None: + """void TCOD_noise_delete(TCOD_Noise *noise)""" + + @staticmethod + def TCOD_noise_get(noise: Any, f: Any, /) -> float: + """float TCOD_noise_get(TCOD_Noise *noise, const float *f)""" + + @staticmethod + def TCOD_noise_get_ex(noise: Any, f: Any, type: Any, /) -> float: + """float TCOD_noise_get_ex(TCOD_Noise *noise, const float *f, TCOD_noise_type_t type)""" + + @staticmethod + def TCOD_noise_get_fbm(noise: Any, f: Any, octaves: float, /) -> float: + """float TCOD_noise_get_fbm(TCOD_Noise *noise, const float *f, float octaves)""" + + @staticmethod + def TCOD_noise_get_fbm_ex(noise: Any, f: Any, octaves: float, type: Any, /) -> float: + """float TCOD_noise_get_fbm_ex(TCOD_Noise *noise, const float *f, float octaves, TCOD_noise_type_t type)""" + + @staticmethod + def TCOD_noise_get_fbm_vectorized( + noise: Any, type: Any, octaves: float, n: int, x: Any, y: Any, z: Any, w: Any, out: Any, / + ) -> None: + """void TCOD_noise_get_fbm_vectorized(TCOD_Noise *noise, TCOD_noise_type_t type, float octaves, int n, float *x, float *y, float *z, float *w, float *out)""" + + @staticmethod + def TCOD_noise_get_turbulence(noise: Any, f: Any, octaves: float, /) -> float: + """float TCOD_noise_get_turbulence(TCOD_Noise *noise, const float *f, float octaves)""" + + @staticmethod + def TCOD_noise_get_turbulence_ex(noise: Any, f: Any, octaves: float, type: Any, /) -> float: + """float TCOD_noise_get_turbulence_ex(TCOD_Noise *noise, const float *f, float octaves, TCOD_noise_type_t type)""" + + @staticmethod + def TCOD_noise_get_turbulence_vectorized( + noise: Any, type: Any, octaves: float, n: int, x: Any, y: Any, z: Any, w: Any, out: Any, / + ) -> None: + """void TCOD_noise_get_turbulence_vectorized(TCOD_Noise *noise, TCOD_noise_type_t type, float octaves, int n, float *x, float *y, float *z, float *w, float *out)""" + + @staticmethod + def TCOD_noise_get_vectorized(noise: Any, type: Any, n: int, x: Any, y: Any, z: Any, w: Any, out: Any, /) -> None: + """void TCOD_noise_get_vectorized(TCOD_Noise *noise, TCOD_noise_type_t type, int n, float *x, float *y, float *z, float *w, float *out)""" + + @staticmethod + def TCOD_noise_new(dimensions: int, hurst: float, lacunarity: float, random: Any, /) -> Any: + """TCOD_Noise *TCOD_noise_new(int dimensions, float hurst, float lacunarity, TCOD_Random *random)""" + + @staticmethod + def TCOD_noise_set_type(noise: Any, type: Any, /) -> None: + """void TCOD_noise_set_type(TCOD_Noise *noise, TCOD_noise_type_t type)""" + + @staticmethod + def TCOD_parse_bool_value() -> Any: + """TCOD_value_t TCOD_parse_bool_value(void)""" + + @staticmethod + def TCOD_parse_char_value() -> Any: + """TCOD_value_t TCOD_parse_char_value(void)""" + + @staticmethod + def TCOD_parse_color_value() -> Any: + """TCOD_value_t TCOD_parse_color_value(void)""" + + @staticmethod + def TCOD_parse_dice_value() -> Any: + """TCOD_value_t TCOD_parse_dice_value(void)""" + + @staticmethod + def TCOD_parse_float_value() -> Any: + """TCOD_value_t TCOD_parse_float_value(void)""" + + @staticmethod + def TCOD_parse_integer_value() -> Any: + """TCOD_value_t TCOD_parse_integer_value(void)""" + + @staticmethod + def TCOD_parse_property_value(parser: Any, def_: Any, propname: Any, list: bool, /) -> Any: + """TCOD_value_t TCOD_parse_property_value(TCOD_Parser *parser, TCOD_ParserStruct *def, char *propname, bool list)""" + + @staticmethod + def TCOD_parse_string_value() -> Any: + """TCOD_value_t TCOD_parse_string_value(void)""" + + @staticmethod + def TCOD_parse_value_list_value(def_: Any, list_num: int, /) -> Any: + """TCOD_value_t TCOD_parse_value_list_value(TCOD_ParserStruct *def, int list_num)""" + + @staticmethod + def TCOD_parser_delete(parser: Any, /) -> None: + """void TCOD_parser_delete(TCOD_Parser *parser)""" + + @staticmethod + def TCOD_parser_error(msg: Any, /, *__args: Any) -> None: + """void TCOD_parser_error(const char *msg, ...)""" + + @staticmethod + def TCOD_parser_get_bool_property(parser: Any, name: Any, /) -> bool: + """bool TCOD_parser_get_bool_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_char_property(parser: Any, name: Any, /) -> int: + """int TCOD_parser_get_char_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_color_property(parser: Any, name: Any, /) -> Any: + """TCOD_color_t TCOD_parser_get_color_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_color_property_wrapper(parser: Any, name: Any, /) -> Any: + """colornum_t TCOD_parser_get_color_property_wrapper(TCOD_parser_t parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_custom_property(parser: Any, name: Any, /) -> Any: + """void *TCOD_parser_get_custom_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_dice_property(parser: Any, name: Any, /) -> Any: + """TCOD_dice_t TCOD_parser_get_dice_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_dice_property_py(parser: Any, name: Any, dice: Any, /) -> None: + """void TCOD_parser_get_dice_property_py(TCOD_Parser *parser, const char *name, TCOD_dice_t *dice)""" + + @staticmethod + def TCOD_parser_get_float_property(parser: Any, name: Any, /) -> float: + """float TCOD_parser_get_float_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_int_property(parser: Any, name: Any, /) -> int: + """int TCOD_parser_get_int_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_get_list_property(parser: Any, name: Any, type: Any, /) -> Any: + """TCOD_list_t TCOD_parser_get_list_property(TCOD_Parser *parser, const char *name, TCOD_value_type_t type)""" + + @staticmethod + def TCOD_parser_get_string_property(parser: Any, name: Any, /) -> Any: + """const char *TCOD_parser_get_string_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_has_property(parser: Any, name: Any, /) -> bool: + """bool TCOD_parser_has_property(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_new() -> Any: + """TCOD_Parser *TCOD_parser_new(void)""" + + @staticmethod + def TCOD_parser_new_custom_type(parser: Any, custom_type_parser: Any, /) -> Any: + """TCOD_value_type_t TCOD_parser_new_custom_type(TCOD_Parser *parser, TCOD_parser_custom_t custom_type_parser)""" + + @staticmethod + def TCOD_parser_new_struct(parser: Any, name: Any, /) -> Any: + """TCOD_ParserStruct *TCOD_parser_new_struct(TCOD_Parser *parser, const char *name)""" + + @staticmethod + def TCOD_parser_run(parser: Any, filename: Any, listener: Any, /) -> None: + """void TCOD_parser_run(TCOD_Parser *parser, const char *filename, TCOD_parser_listener_t *listener)""" + + @staticmethod + def TCOD_path_compute(path: Any, ox: int, oy: int, dx: int, dy: int, /) -> bool: + """bool TCOD_path_compute(TCOD_path_t path, int ox, int oy, int dx, int dy)""" + + @staticmethod + def TCOD_path_delete(path: Any, /) -> None: + """void TCOD_path_delete(TCOD_path_t path)""" + + @staticmethod + def TCOD_path_get(path: Any, index: int, x: Any, y: Any, /) -> None: + """void TCOD_path_get(TCOD_path_t path, int index, int *x, int *y)""" + + @staticmethod + def TCOD_path_get_destination(path: Any, x: Any, y: Any, /) -> None: + """void TCOD_path_get_destination(TCOD_path_t path, int *x, int *y)""" + + @staticmethod + def TCOD_path_get_origin(path: Any, x: Any, y: Any, /) -> None: + """void TCOD_path_get_origin(TCOD_path_t path, int *x, int *y)""" + + @staticmethod + def TCOD_path_is_empty(path: Any, /) -> bool: + """bool TCOD_path_is_empty(TCOD_path_t path)""" + + @staticmethod + def TCOD_path_new_using_function( + map_width: int, map_height: int, func: Any, user_data: Any, diagonalCost: float, / + ) -> Any: + """TCOD_path_t TCOD_path_new_using_function(int map_width, int map_height, TCOD_path_func_t func, void *user_data, float diagonalCost)""" + + @staticmethod + def TCOD_path_new_using_map(map: Any, diagonalCost: float, /) -> Any: + """TCOD_path_t TCOD_path_new_using_map(TCOD_Map *map, float diagonalCost)""" + + @staticmethod + def TCOD_path_reverse(path: Any, /) -> None: + """void TCOD_path_reverse(TCOD_path_t path)""" + + @staticmethod + def TCOD_path_size(path: Any, /) -> int: + """int TCOD_path_size(TCOD_path_t path)""" + + @staticmethod + def TCOD_path_walk(path: Any, x: Any, y: Any, recalculate_when_needed: bool, /) -> bool: + """bool TCOD_path_walk(TCOD_path_t path, int *x, int *y, bool recalculate_when_needed)""" + + @staticmethod + def TCOD_pf_compute(path: Any, /) -> int: + """int TCOD_pf_compute(struct TCOD_Pathfinder *path)""" + + @staticmethod + def TCOD_pf_compute_step(path: Any, /) -> int: + """int TCOD_pf_compute_step(struct TCOD_Pathfinder *path)""" + + @staticmethod + def TCOD_pf_delete(path: Any, /) -> None: + """void TCOD_pf_delete(struct TCOD_Pathfinder *path)""" + + @staticmethod + def TCOD_pf_new(ndim: int, shape: Any, /) -> Any: + """struct TCOD_Pathfinder *TCOD_pf_new(int ndim, const size_t *shape)""" + + @staticmethod + def TCOD_pf_recompile(path: Any, /) -> int: + """int TCOD_pf_recompile(struct TCOD_Pathfinder *path)""" + + @staticmethod + def TCOD_pf_set_distance_pointer(path: Any, data: Any, int_type: int, strides: Any, /) -> None: + """void TCOD_pf_set_distance_pointer(struct TCOD_Pathfinder *path, void *data, int int_type, const size_t *strides)""" + + @staticmethod + def TCOD_pf_set_graph2d_pointer( + path: Any, data: Any, int_type: int, strides: Any, cardinal: int, diagonal: int, / + ) -> None: + """void TCOD_pf_set_graph2d_pointer(struct TCOD_Pathfinder *path, void *data, int int_type, const size_t *strides, int cardinal, int diagonal)""" + + @staticmethod + def TCOD_pf_set_traversal_pointer(path: Any, data: Any, int_type: int, strides: Any, /) -> None: + """void TCOD_pf_set_traversal_pointer(struct TCOD_Pathfinder *path, void *data, int int_type, const size_t *strides)""" + + @staticmethod + def TCOD_printf_rgb(console: Any, params: Any, fmt: Any, /, *__args: Any) -> int: + """int TCOD_printf_rgb(TCOD_Console *console, TCOD_PrintParamsRGB params, const char *fmt, ...)""" + + @staticmethod + def TCOD_printn_rgb(console: Any, params: Any, n: int, str: Any, /) -> int: + """int TCOD_printn_rgb(TCOD_Console *console, TCOD_PrintParamsRGB params, int n, const char *str)""" + + @staticmethod + def TCOD_quit() -> None: + """void TCOD_quit(void)""" + + @staticmethod + def TCOD_random_delete(mersenne: Any, /) -> None: + """void TCOD_random_delete(TCOD_Random *mersenne)""" + + @staticmethod + def TCOD_random_dice_new(s: Any, /) -> Any: + """TCOD_dice_t TCOD_random_dice_new(const char *s)""" + + @staticmethod + def TCOD_random_dice_roll(mersenne: Any, dice: Any, /) -> int: + """int TCOD_random_dice_roll(TCOD_Random *mersenne, TCOD_dice_t dice)""" + + @staticmethod + def TCOD_random_dice_roll_s(mersenne: Any, s: Any, /) -> int: + """int TCOD_random_dice_roll_s(TCOD_Random *mersenne, const char *s)""" + + @staticmethod + def TCOD_random_get_d(mersenne: Any, min: float, max: float, /) -> float: + """double TCOD_random_get_d(TCOD_random_t mersenne, double min, double max)""" + + @staticmethod + def TCOD_random_get_double(mersenne: Any, min: float, max: float, /) -> float: + """double TCOD_random_get_double(TCOD_Random *mersenne, double min, double max)""" + + @staticmethod + def TCOD_random_get_double_mean(mersenne: Any, min: float, max: float, mean: float, /) -> float: + """double TCOD_random_get_double_mean(TCOD_Random *mersenne, double min, double max, double mean)""" + + @staticmethod + def TCOD_random_get_float(mersenne: Any, min: float, max: float, /) -> float: + """float TCOD_random_get_float(TCOD_Random *mersenne, float min, float max)""" + + @staticmethod + def TCOD_random_get_float_mean(mersenne: Any, min: float, max: float, mean: float, /) -> float: + """float TCOD_random_get_float_mean(TCOD_Random *mersenne, float min, float max, float mean)""" + + @staticmethod + def TCOD_random_get_gaussian_double(mersenne: Any, mean: float, std_deviation: float, /) -> float: + """double TCOD_random_get_gaussian_double(TCOD_random_t mersenne, double mean, double std_deviation)""" + + @staticmethod + def TCOD_random_get_gaussian_double_inv(mersenne: Any, mean: float, std_deviation: float, /) -> float: + """double TCOD_random_get_gaussian_double_inv(TCOD_random_t mersenne, double mean, double std_deviation)""" + + @staticmethod + def TCOD_random_get_gaussian_double_range(mersenne: Any, min: float, max: float, /) -> float: + """double TCOD_random_get_gaussian_double_range(TCOD_random_t mersenne, double min, double max)""" + + @staticmethod + def TCOD_random_get_gaussian_double_range_custom(mersenne: Any, min: float, max: float, mean: float, /) -> float: + """double TCOD_random_get_gaussian_double_range_custom(TCOD_random_t mersenne, double min, double max, double mean)""" + + @staticmethod + def TCOD_random_get_gaussian_double_range_custom_inv( + mersenne: Any, min: float, max: float, mean: float, / + ) -> float: + """double TCOD_random_get_gaussian_double_range_custom_inv(TCOD_random_t mersenne, double min, double max, double mean)""" + + @staticmethod + def TCOD_random_get_gaussian_double_range_inv(mersenne: Any, min: float, max: float, /) -> float: + """double TCOD_random_get_gaussian_double_range_inv(TCOD_random_t mersenne, double min, double max)""" + + @staticmethod + def TCOD_random_get_i(mersenne: Any, min: int, max: int, /) -> int: + """int TCOD_random_get_i(TCOD_random_t mersenne, int min, int max)""" + + @staticmethod + def TCOD_random_get_instance() -> Any: + """TCOD_Random *TCOD_random_get_instance(void)""" + + @staticmethod + def TCOD_random_get_int(mersenne: Any, min: int, max: int, /) -> int: + """int TCOD_random_get_int(TCOD_Random *mersenne, int min, int max)""" + + @staticmethod + def TCOD_random_get_int_mean(mersenne: Any, min: int, max: int, mean: int, /) -> int: + """int TCOD_random_get_int_mean(TCOD_Random *mersenne, int min, int max, int mean)""" + + @staticmethod + def TCOD_random_new(algo: Any, /) -> Any: + """TCOD_Random *TCOD_random_new(TCOD_random_algo_t algo)""" + + @staticmethod + def TCOD_random_new_from_seed(algo: Any, seed: Any, /) -> Any: + """TCOD_Random *TCOD_random_new_from_seed(TCOD_random_algo_t algo, uint32_t seed)""" + + @staticmethod + def TCOD_random_restore(mersenne: Any, backup: Any, /) -> None: + """void TCOD_random_restore(TCOD_Random *mersenne, TCOD_Random *backup)""" + + @staticmethod + def TCOD_random_save(mersenne: Any, /) -> Any: + """TCOD_Random *TCOD_random_save(TCOD_Random *mersenne)""" + + @staticmethod + def TCOD_random_set_distribution(mersenne: Any, distribution: Any, /) -> None: + """void TCOD_random_set_distribution(TCOD_Random *mersenne, TCOD_distribution_t distribution)""" + + @staticmethod + def TCOD_renderer_init_sdl2( + x: int, y: int, width: int, height: int, title: Any, window_flags: int, vsync: int, tileset: Any, / + ) -> Any: + """struct TCOD_Context *TCOD_renderer_init_sdl2(int x, int y, int width, int height, const char *title, int window_flags, int vsync, struct TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_renderer_init_sdl3(window_props: Any, renderer_props: Any, tileset: Any, /) -> Any: + """TCOD_Context *TCOD_renderer_init_sdl3(SDL_PropertiesID window_props, SDL_PropertiesID renderer_props, struct TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_renderer_init_xterm( + window_x: int, window_y: int, pixel_width: int, pixel_height: int, columns: int, rows: int, window_title: Any, / + ) -> Any: + """TCOD_Context *TCOD_renderer_init_xterm(int window_x, int window_y, int pixel_width, int pixel_height, int columns, int rows, const char *window_title)""" + + @staticmethod + def TCOD_rng_splitmix64_next(state: Any, /) -> Any: + """inline static uint64_t TCOD_rng_splitmix64_next(uint64_t *state)""" + + @staticmethod + def TCOD_save_xp(n: int, consoles: Any, path: Any, compress_level: int, /) -> Any: + """TCOD_Error TCOD_save_xp(int n, const TCOD_Console * const *consoles, const char *path, int compress_level)""" + + @staticmethod + def TCOD_save_xp_to_memory(n_consoles: int, consoles: Any, n_out: int, out: Any, compression_level: int, /) -> int: + """int TCOD_save_xp_to_memory(int n_consoles, const TCOD_Console * const *consoles, int n_out, unsigned char *out, int compression_level)""" + + @staticmethod + def TCOD_sdl2_atlas_delete(atlas: Any, /) -> None: + """void TCOD_sdl2_atlas_delete(struct TCOD_TilesetAtlasSDL2 *atlas)""" + + @staticmethod + def TCOD_sdl2_atlas_new(renderer: Any, tileset: Any, /) -> Any: + """struct TCOD_TilesetAtlasSDL2 *TCOD_sdl2_atlas_new(struct SDL_Renderer *renderer, struct TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_sdl2_render_texture(atlas: Any, console: Any, cache: Any, target: Any, /) -> Any: + """TCOD_Error TCOD_sdl2_render_texture(const struct TCOD_TilesetAtlasSDL2 *atlas, const struct TCOD_Console *console, struct TCOD_Console *cache, struct SDL_Texture *target)""" + + @staticmethod + def TCOD_sdl2_render_texture_setup(atlas: Any, console: Any, cache: Any, target: Any, /) -> Any: + """TCOD_Error TCOD_sdl2_render_texture_setup(const struct TCOD_TilesetAtlasSDL2 *atlas, const struct TCOD_Console *console, struct TCOD_Console **cache, struct SDL_Texture **target)""" + + @staticmethod + def TCOD_semaphore_delete(sem: Any, /) -> None: + """void TCOD_semaphore_delete(TCOD_semaphore_t sem)""" + + @staticmethod + def TCOD_semaphore_lock(sem: Any, /) -> None: + """void TCOD_semaphore_lock(TCOD_semaphore_t sem)""" + + @staticmethod + def TCOD_semaphore_new(initVal: int, /) -> Any: + """TCOD_semaphore_t TCOD_semaphore_new(int initVal)""" + + @staticmethod + def TCOD_semaphore_unlock(sem: Any, /) -> None: + """void TCOD_semaphore_unlock(TCOD_semaphore_t sem)""" + + @staticmethod + def TCOD_set_default_tileset(tileset: Any, /) -> None: + """void TCOD_set_default_tileset(TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_set_error(msg: Any, /) -> Any: + """TCOD_Error TCOD_set_error(const char *msg)""" + + @staticmethod + def TCOD_set_errorf(fmt: Any, /, *__args: Any) -> Any: + """TCOD_Error TCOD_set_errorf(const char *fmt, ...)""" + + @staticmethod + def TCOD_set_log_callback(callback: Any, userdata: Any, /) -> None: + """void TCOD_set_log_callback(TCOD_LoggingCallback callback, void *userdata)""" + + @staticmethod + def TCOD_set_log_level(level: int, /) -> None: + """void TCOD_set_log_level(int level)""" + + @staticmethod + def TCOD_strcasecmp(s1: Any, s2: Any, /) -> int: + """int TCOD_strcasecmp(const char *s1, const char *s2)""" + + @staticmethod + def TCOD_strdup(s: Any, /) -> Any: + """char *TCOD_strdup(const char *s)""" + + @staticmethod + def TCOD_strncasecmp(s1: Any, s2: Any, n: int, /) -> int: + """int TCOD_strncasecmp(const char *s1, const char *s2, size_t n)""" + + @staticmethod + def TCOD_struct_add_flag(def_: Any, propname: Any, /) -> None: + """void TCOD_struct_add_flag(TCOD_ParserStruct *def, const char *propname)""" + + @staticmethod + def TCOD_struct_add_list_property(def_: Any, name: Any, type: Any, mandatory: bool, /) -> None: + """void TCOD_struct_add_list_property(TCOD_ParserStruct *def, const char *name, TCOD_value_type_t type, bool mandatory)""" + + @staticmethod + def TCOD_struct_add_property(def_: Any, name: Any, type: Any, mandatory: bool, /) -> None: + """void TCOD_struct_add_property(TCOD_ParserStruct *def, const char *name, TCOD_value_type_t type, bool mandatory)""" + + @staticmethod + def TCOD_struct_add_structure(def_: Any, sub_structure: Any, /) -> None: + """void TCOD_struct_add_structure(TCOD_ParserStruct *def, const TCOD_ParserStruct *sub_structure)""" + + @staticmethod + def TCOD_struct_add_value_list(def_: Any, name: Any, value_list: Any, mandatory: bool, /) -> None: + """void TCOD_struct_add_value_list(TCOD_ParserStruct *def, const char *name, const char * const *value_list, bool mandatory)""" + + @staticmethod + def TCOD_struct_add_value_list_sized(def_: Any, name: Any, value_list: Any, size: int, mandatory: bool, /) -> None: + """void TCOD_struct_add_value_list_sized(TCOD_ParserStruct *def, const char *name, const char * const *value_list, int size, bool mandatory)""" + + @staticmethod + def TCOD_struct_get_name(def_: Any, /) -> Any: + """const char *TCOD_struct_get_name(const TCOD_ParserStruct *def)""" + + @staticmethod + def TCOD_struct_get_type(def_: Any, propname: Any, /) -> Any: + """TCOD_value_type_t TCOD_struct_get_type(const TCOD_ParserStruct *def, const char *propname)""" + + @staticmethod + def TCOD_struct_is_mandatory(def_: Any, propname: Any, /) -> bool: + """bool TCOD_struct_is_mandatory(TCOD_ParserStruct *def, const char *propname)""" + + @staticmethod + def TCOD_sys_accumulate_console(console: Any, /) -> int: + """int TCOD_sys_accumulate_console(const TCOD_Console *console)""" + + @staticmethod + def TCOD_sys_accumulate_console_(console: Any, viewport: Any, /) -> int: + """int TCOD_sys_accumulate_console_(const TCOD_Console *console, const struct SDL_Rect *viewport)""" + + @staticmethod + def TCOD_sys_check_for_event(eventMask: int, key: Any, mouse: Any, /) -> Any: + """TCOD_event_t TCOD_sys_check_for_event(int eventMask, TCOD_key_t *key, TCOD_mouse_t *mouse)""" + + @staticmethod + def TCOD_sys_check_for_keypress(flags: int, /) -> Any: + """TCOD_key_t TCOD_sys_check_for_keypress(int flags)""" + + @staticmethod + def TCOD_sys_check_magic_number(filename: Any, size: int, data: Any, /) -> bool: + """bool TCOD_sys_check_magic_number(const char *filename, size_t size, uint8_t *data)""" + + @staticmethod + def TCOD_sys_clipboard_get() -> Any: + """char *TCOD_sys_clipboard_get(void)""" + + @staticmethod + def TCOD_sys_clipboard_set(value: Any, /) -> bool: + """bool TCOD_sys_clipboard_set(const char *value)""" + + @staticmethod + def TCOD_sys_create_directory(path: Any, /) -> bool: + """bool TCOD_sys_create_directory(const char *path)""" + + @staticmethod + def TCOD_sys_decode_font_() -> None: + """void TCOD_sys_decode_font_(void)""" + + @staticmethod + def TCOD_sys_delete_directory(path: Any, /) -> bool: + """bool TCOD_sys_delete_directory(const char *path)""" + + @staticmethod + def TCOD_sys_delete_file(path: Any, /) -> bool: + """bool TCOD_sys_delete_file(const char *path)""" + + @staticmethod + def TCOD_sys_elapsed_milli() -> Any: + """uint32_t TCOD_sys_elapsed_milli(void)""" + + @staticmethod + def TCOD_sys_elapsed_seconds() -> float: + """float TCOD_sys_elapsed_seconds(void)""" + + @staticmethod + def TCOD_sys_file_exists(filename: Any, /, *__args: Any) -> bool: + """bool TCOD_sys_file_exists(const char *filename, ...)""" + + @staticmethod + def TCOD_sys_force_fullscreen_resolution(width: int, height: int, /) -> None: + """void TCOD_sys_force_fullscreen_resolution(int width, int height)""" + + @staticmethod + def TCOD_sys_get_SDL_renderer() -> Any: + """struct SDL_Renderer *TCOD_sys_get_SDL_renderer(void)""" + + @staticmethod + def TCOD_sys_get_SDL_window() -> Any: + """struct SDL_Window *TCOD_sys_get_SDL_window(void)""" + + @staticmethod + def TCOD_sys_get_char_size(w: Any, h: Any, /) -> None: + """void TCOD_sys_get_char_size(int *w, int *h)""" + + @staticmethod + def TCOD_sys_get_current_resolution(w: Any, h: Any, /) -> Any: + """TCOD_Error TCOD_sys_get_current_resolution(int *w, int *h)""" + + @staticmethod + def TCOD_sys_get_current_resolution_x() -> int: + """int TCOD_sys_get_current_resolution_x(void)""" + + @staticmethod + def TCOD_sys_get_current_resolution_y() -> int: + """int TCOD_sys_get_current_resolution_y(void)""" + + @staticmethod + def TCOD_sys_get_directory_content(path: Any, pattern: Any, /) -> Any: + """TCOD_list_t TCOD_sys_get_directory_content(const char *path, const char *pattern)""" + + @staticmethod + def TCOD_sys_get_fps() -> int: + """int TCOD_sys_get_fps(void)""" + + @staticmethod + def TCOD_sys_get_fullscreen_offsets(offset_x: Any, offset_y: Any, /) -> None: + """void TCOD_sys_get_fullscreen_offsets(int *offset_x, int *offset_y)""" + + @staticmethod + def TCOD_sys_get_image_alpha(image: Any, x: int, y: int, /) -> int: + """int TCOD_sys_get_image_alpha(const struct SDL_Surface *image, int x, int y)""" + + @staticmethod + def TCOD_sys_get_image_pixel(image: Any, x: int, y: int, /) -> Any: + """TCOD_color_t TCOD_sys_get_image_pixel(const struct SDL_Surface *image, int x, int y)""" + + @staticmethod + def TCOD_sys_get_image_size(image: Any, w: Any, h: Any, /) -> None: + """void TCOD_sys_get_image_size(const struct SDL_Surface *image, int *w, int *h)""" + + @staticmethod + def TCOD_sys_get_internal_console() -> Any: + """TCOD_Console *TCOD_sys_get_internal_console(void)""" + + @staticmethod + def TCOD_sys_get_internal_context() -> Any: + """TCOD_Context *TCOD_sys_get_internal_context(void)""" + + @staticmethod + def TCOD_sys_get_last_frame_length() -> float: + """float TCOD_sys_get_last_frame_length(void)""" + + @staticmethod + def TCOD_sys_get_num_cores() -> int: + """int TCOD_sys_get_num_cores(void)""" + + @staticmethod + def TCOD_sys_get_renderer() -> Any: + """TCOD_renderer_t TCOD_sys_get_renderer(void)""" + + @staticmethod + def TCOD_sys_get_sdl_renderer() -> Any: + """struct SDL_Renderer *TCOD_sys_get_sdl_renderer(void)""" + + @staticmethod + def TCOD_sys_get_sdl_window() -> Any: + """struct SDL_Window *TCOD_sys_get_sdl_window(void)""" + + @staticmethod + def TCOD_sys_handle_key_event(ev: Any, key: Any, /) -> Any: + """TCOD_event_t TCOD_sys_handle_key_event(const union SDL_Event *ev, TCOD_key_t *key)""" + + @staticmethod + def TCOD_sys_handle_mouse_event(ev: Any, mouse: Any, /) -> Any: + """TCOD_event_t TCOD_sys_handle_mouse_event(const union SDL_Event *ev, TCOD_mouse_t *mouse)""" + + @staticmethod + def TCOD_sys_is_directory(path: Any, /) -> bool: + """bool TCOD_sys_is_directory(const char *path)""" + + @staticmethod + def TCOD_sys_is_key_pressed(key: Any, /) -> bool: + """bool TCOD_sys_is_key_pressed(TCOD_keycode_t key)""" + + @staticmethod + def TCOD_sys_load_image(filename: Any, /) -> Any: + """struct SDL_Surface *TCOD_sys_load_image(const char *filename)""" + + @staticmethod + def TCOD_sys_load_player_config() -> Any: + """TCOD_Error TCOD_sys_load_player_config(void)""" + + @staticmethod + def TCOD_sys_map_ascii_to_font(asciiCode: int, fontCharX: int, fontCharY: int, /) -> None: + """void TCOD_sys_map_ascii_to_font(int asciiCode, int fontCharX, int fontCharY)""" + + @staticmethod + def TCOD_sys_pixel_to_tile(x: Any, y: Any, /) -> None: + """void TCOD_sys_pixel_to_tile(double *x, double *y)""" + + @staticmethod + def TCOD_sys_read_file(filename: Any, buf: Any, size: Any, /) -> bool: + """bool TCOD_sys_read_file(const char *filename, unsigned char **buf, size_t *size)""" + + @staticmethod + def TCOD_sys_register_SDL_renderer(renderer: Any, /) -> None: + """void TCOD_sys_register_SDL_renderer(SDL_renderer_t renderer)""" + + @staticmethod + def TCOD_sys_restore_fps() -> None: + """void TCOD_sys_restore_fps(void)""" + + @staticmethod + def TCOD_sys_save_bitmap(bitmap: Any, filename: Any, /) -> Any: + """TCOD_Error TCOD_sys_save_bitmap(struct SDL_Surface *bitmap, const char *filename)""" + + @staticmethod + def TCOD_sys_save_fps() -> None: + """void TCOD_sys_save_fps(void)""" + + @staticmethod + def TCOD_sys_save_screenshot(filename: Any, /) -> None: + """void TCOD_sys_save_screenshot(const char *filename)""" + + @staticmethod + def TCOD_sys_set_fps(val: int, /) -> None: + """void TCOD_sys_set_fps(int val)""" + + @staticmethod + def TCOD_sys_set_renderer(renderer: Any, /) -> int: + """int TCOD_sys_set_renderer(TCOD_renderer_t renderer)""" + + @staticmethod + def TCOD_sys_shutdown() -> None: + """void TCOD_sys_shutdown(void)""" + + @staticmethod + def TCOD_sys_sleep_milli(val: Any, /) -> None: + """void TCOD_sys_sleep_milli(uint32_t val)""" + + @staticmethod + def TCOD_sys_startup() -> None: + """void TCOD_sys_startup(void)""" + + @staticmethod + def TCOD_sys_update_char(asciiCode: int, font_x: int, font_y: int, img: Any, x: int, y: int, /) -> None: + """void TCOD_sys_update_char(int asciiCode, int font_x, int font_y, const TCOD_Image *img, int x, int y)""" + + @staticmethod + def TCOD_sys_wait_for_event(eventMask: int, key: Any, mouse: Any, flush: bool, /) -> Any: + """TCOD_event_t TCOD_sys_wait_for_event(int eventMask, TCOD_key_t *key, TCOD_mouse_t *mouse, bool flush)""" + + @staticmethod + def TCOD_sys_wait_for_keypress(flush: bool, /) -> Any: + """TCOD_key_t TCOD_sys_wait_for_keypress(bool flush)""" + + @staticmethod + def TCOD_sys_write_file(filename: Any, buf: Any, size: Any, /) -> bool: + """bool TCOD_sys_write_file(const char *filename, unsigned char *buf, uint32_t size)""" + + @staticmethod + def TCOD_text_delete(txt: Any, /) -> None: + """void TCOD_text_delete(TCOD_text_t txt)""" + + @staticmethod + def TCOD_text_get(txt: Any, /) -> Any: + """const char *TCOD_text_get(TCOD_text_t txt)""" + + @staticmethod + def TCOD_text_init(x: int, y: int, w: int, h: int, max_chars: int, /) -> Any: + """TCOD_text_t TCOD_text_init(int x, int y, int w, int h, int max_chars)""" + + @staticmethod + def TCOD_text_init2(w: int, h: int, max_chars: int, /) -> Any: + """TCOD_text_t TCOD_text_init2(int w, int h, int max_chars)""" + + @staticmethod + def TCOD_text_render(txt: Any, con: Any, /) -> None: + """void TCOD_text_render(TCOD_text_t txt, TCOD_console_t con)""" + + @staticmethod + def TCOD_text_reset(txt: Any, /) -> None: + """void TCOD_text_reset(TCOD_text_t txt)""" + + @staticmethod + def TCOD_text_set_colors(txt: Any, fore: Any, back: Any, back_transparency: float, /) -> None: + """void TCOD_text_set_colors(TCOD_text_t txt, TCOD_color_t fore, TCOD_color_t back, float back_transparency)""" + + @staticmethod + def TCOD_text_set_pos(txt: Any, x: int, y: int, /) -> None: + """void TCOD_text_set_pos(TCOD_text_t txt, int x, int y)""" + + @staticmethod + def TCOD_text_set_properties( + txt: Any, cursor_char: int, blink_interval: int, prompt: Any, tab_size: int, / + ) -> None: + """void TCOD_text_set_properties(TCOD_text_t txt, int cursor_char, int blink_interval, const char *prompt, int tab_size)""" + + @staticmethod + def TCOD_text_update(txt: Any, key: Any, /) -> bool: + """bool TCOD_text_update(TCOD_text_t txt, TCOD_key_t key)""" + + @staticmethod + def TCOD_thread_delete(th: Any, /) -> None: + """void TCOD_thread_delete(TCOD_thread_t th)""" + + @staticmethod + def TCOD_thread_new(func: Any, data: Any, /) -> Any: + """TCOD_thread_t TCOD_thread_new(int (*func)(void *), void *data)""" + + @staticmethod + def TCOD_thread_wait(th: Any, /) -> None: + """void TCOD_thread_wait(TCOD_thread_t th)""" + + @staticmethod + def TCOD_tileset_assign_tile(tileset: Any, tile_id: int, codepoint: int, /) -> int: + """int TCOD_tileset_assign_tile(struct TCOD_Tileset *tileset, int tile_id, int codepoint)""" + + @staticmethod + def TCOD_tileset_delete(tileset: Any, /) -> None: + """void TCOD_tileset_delete(TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_tileset_get_tile(tileset: Any, codepoint: int, /) -> Any: + """const struct TCOD_ColorRGBA *TCOD_tileset_get_tile(const TCOD_Tileset *tileset, int codepoint)""" + + @staticmethod + def TCOD_tileset_get_tile_(tileset: Any, codepoint: int, buffer: Any, /) -> Any: + """TCOD_Error TCOD_tileset_get_tile_(const TCOD_Tileset *tileset, int codepoint, struct TCOD_ColorRGBA *buffer)""" + + @staticmethod + def TCOD_tileset_get_tile_height_(tileset: Any, /) -> int: + """int TCOD_tileset_get_tile_height_(const TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_tileset_get_tile_width_(tileset: Any, /) -> int: + """int TCOD_tileset_get_tile_width_(const TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_tileset_load(filename: Any, columns: int, rows: int, n: int, charmap: Any, /) -> Any: + """TCOD_Tileset *TCOD_tileset_load(const char *filename, int columns, int rows, int n, const int *charmap)""" + + @staticmethod + def TCOD_tileset_load_fallback_font_(tile_width: int, tile_height: int, /) -> Any: + """TCOD_Tileset *TCOD_tileset_load_fallback_font_(int tile_width, int tile_height)""" + + @staticmethod + def TCOD_tileset_load_mem(buffer_length: int, buffer: Any, columns: int, rows: int, n: int, charmap: Any, /) -> Any: + """TCOD_Tileset *TCOD_tileset_load_mem(size_t buffer_length, const unsigned char *buffer, int columns, int rows, int n, const int *charmap)""" + + @staticmethod + def TCOD_tileset_load_raw( + width: int, height: int, pixels: Any, columns: int, rows: int, n: int, charmap: Any, / + ) -> Any: + """TCOD_Tileset *TCOD_tileset_load_raw(int width, int height, const struct TCOD_ColorRGBA *pixels, int columns, int rows, int n, const int *charmap)""" + + @staticmethod + def TCOD_tileset_load_truetype_(path: Any, tile_width: int, tile_height: int, /) -> Any: + """TCOD_Error TCOD_tileset_load_truetype_(const char *path, int tile_width, int tile_height)""" + + @staticmethod + def TCOD_tileset_new(tile_width: int, tile_height: int, /) -> Any: + """TCOD_Tileset *TCOD_tileset_new(int tile_width, int tile_height)""" + + @staticmethod + def TCOD_tileset_notify_tile_changed(tileset: Any, tile_id: int, /) -> None: + """void TCOD_tileset_notify_tile_changed(TCOD_Tileset *tileset, int tile_id)""" + + @staticmethod + def TCOD_tileset_observer_delete(observer: Any, /) -> None: + """void TCOD_tileset_observer_delete(struct TCOD_TilesetObserver *observer)""" + + @staticmethod + def TCOD_tileset_observer_new(tileset: Any, /) -> Any: + """struct TCOD_TilesetObserver *TCOD_tileset_observer_new(struct TCOD_Tileset *tileset)""" + + @staticmethod + def TCOD_tileset_render_to_surface(tileset: Any, console: Any, cache: Any, surface_out: Any, /) -> Any: + """TCOD_Error TCOD_tileset_render_to_surface(const TCOD_Tileset *tileset, const TCOD_Console *console, TCOD_Console **cache, struct SDL_Surface **surface_out)""" + + @staticmethod + def TCOD_tileset_reserve(tileset: Any, desired: int, /) -> Any: + """TCOD_Error TCOD_tileset_reserve(TCOD_Tileset *tileset, int desired)""" + + @staticmethod + def TCOD_tileset_set_tile_(tileset: Any, codepoint: int, buffer: Any, /) -> Any: + """TCOD_Error TCOD_tileset_set_tile_(TCOD_Tileset *tileset, int codepoint, const struct TCOD_ColorRGBA *buffer)""" + + @staticmethod + def TCOD_tree_add_son(node: Any, son: Any, /) -> None: + """void TCOD_tree_add_son(TCOD_tree_t *node, TCOD_tree_t *son)""" + + @staticmethod + def TCOD_tree_new() -> Any: + """TCOD_tree_t *TCOD_tree_new(void)""" + + @staticmethod + def TCOD_viewport_delete(viewport: Any, /) -> None: + """void TCOD_viewport_delete(TCOD_ViewportOptions *viewport)""" + + @staticmethod + def TCOD_viewport_new() -> Any: + """TCOD_ViewportOptions *TCOD_viewport_new(void)""" + + @staticmethod + def TCOD_zip_delete(zip: Any, /) -> None: + """void TCOD_zip_delete(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_char(zip: Any, /) -> Any: + """char TCOD_zip_get_char(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_color(zip: Any, /) -> Any: + """TCOD_color_t TCOD_zip_get_color(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_console(zip: Any, /) -> Any: + """TCOD_console_t TCOD_zip_get_console(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_current_bytes(zip: Any, /) -> Any: + """uint32_t TCOD_zip_get_current_bytes(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_data(zip: Any, nbBytes: int, data: Any, /) -> int: + """int TCOD_zip_get_data(TCOD_zip_t zip, int nbBytes, void *data)""" + + @staticmethod + def TCOD_zip_get_float(zip: Any, /) -> float: + """float TCOD_zip_get_float(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_image(zip: Any, /) -> Any: + """TCOD_Image *TCOD_zip_get_image(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_int(zip: Any, /) -> int: + """int TCOD_zip_get_int(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_random(zip: Any, /) -> Any: + """TCOD_Random *TCOD_zip_get_random(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_remaining_bytes(zip: Any, /) -> Any: + """uint32_t TCOD_zip_get_remaining_bytes(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_get_string(zip: Any, /) -> Any: + """const char *TCOD_zip_get_string(TCOD_zip_t zip)""" + + @staticmethod + def TCOD_zip_load_from_file(zip: Any, filename: Any, /) -> int: + """int TCOD_zip_load_from_file(TCOD_zip_t zip, const char *filename)""" + + @staticmethod + def TCOD_zip_new() -> Any: + """TCOD_zip_t TCOD_zip_new(void)""" + + @staticmethod + def TCOD_zip_put_char(zip: Any, val: Any, /) -> None: + """void TCOD_zip_put_char(TCOD_zip_t zip, char val)""" + + @staticmethod + def TCOD_zip_put_color(zip: Any, val: Any, /) -> None: + """void TCOD_zip_put_color(TCOD_zip_t zip, const TCOD_color_t val)""" + + @staticmethod + def TCOD_zip_put_console(zip: Any, val: Any, /) -> None: + """void TCOD_zip_put_console(TCOD_zip_t zip, const TCOD_Console *val)""" + + @staticmethod + def TCOD_zip_put_data(zip: Any, nbBytes: int, data: Any, /) -> None: + """void TCOD_zip_put_data(TCOD_zip_t zip, int nbBytes, const void *data)""" + + @staticmethod + def TCOD_zip_put_float(zip: Any, val: float, /) -> None: + """void TCOD_zip_put_float(TCOD_zip_t zip, float val)""" + + @staticmethod + def TCOD_zip_put_image(zip: Any, val: Any, /) -> None: + """void TCOD_zip_put_image(TCOD_zip_t zip, const TCOD_Image *val)""" + + @staticmethod + def TCOD_zip_put_int(zip: Any, val: int, /) -> None: + """void TCOD_zip_put_int(TCOD_zip_t zip, int val)""" + + @staticmethod + def TCOD_zip_put_random(zip: Any, val: Any, /) -> None: + """void TCOD_zip_put_random(TCOD_zip_t zip, const TCOD_Random *val)""" + + @staticmethod + def TCOD_zip_put_string(zip: Any, val: Any, /) -> None: + """void TCOD_zip_put_string(TCOD_zip_t zip, const char *val)""" + + @staticmethod + def TCOD_zip_save_to_file(zip: Any, filename: Any, /) -> int: + """int TCOD_zip_save_to_file(TCOD_zip_t zip, const char *filename)""" + + @staticmethod + def TCOD_zip_skip_bytes(zip: Any, nbBytes: Any, /) -> None: + """void TCOD_zip_skip_bytes(TCOD_zip_t zip, uint32_t nbBytes)""" + + @staticmethod + def TDL_color_HSV(h: float, s: float, v: float, /) -> int: + """int TDL_color_HSV(float h, float s, float v)""" + + @staticmethod + def TDL_color_RGB(r: int, g: int, b: int, /) -> int: + """int TDL_color_RGB(int r, int g, int b)""" + + @staticmethod + def TDL_color_add(c1: int, c2: int, /) -> int: + """int TDL_color_add(int c1, int c2)""" + + @staticmethod + def TDL_color_equals(c1: int, c2: int, /) -> bool: + """bool TDL_color_equals(int c1, int c2)""" + + @staticmethod + def TDL_color_from_int(color: int, /) -> Any: + """TCOD_color_t TDL_color_from_int(int color)""" + + @staticmethod + def TDL_color_get_hue(color: int, /) -> float: + """float TDL_color_get_hue(int color)""" + + @staticmethod + def TDL_color_get_saturation(color: int, /) -> float: + """float TDL_color_get_saturation(int color)""" + + @staticmethod + def TDL_color_get_value(color: int, /) -> float: + """float TDL_color_get_value(int color)""" + + @staticmethod + def TDL_color_int_to_array(color: int, /) -> Any: + """int *TDL_color_int_to_array(int color)""" + + @staticmethod + def TDL_color_lerp(c1: int, c2: int, coef: float, /) -> int: + """int TDL_color_lerp(int c1, int c2, float coef)""" + + @staticmethod + def TDL_color_multiply(c1: int, c2: int, /) -> int: + """int TDL_color_multiply(int c1, int c2)""" + + @staticmethod + def TDL_color_multiply_scalar(c: int, value: float, /) -> int: + """int TDL_color_multiply_scalar(int c, float value)""" + + @staticmethod + def TDL_color_scale_HSV(color: int, scoef: float, vcoef: float, /) -> int: + """int TDL_color_scale_HSV(int color, float scoef, float vcoef)""" + + @staticmethod + def TDL_color_set_hue(color: int, h: float, /) -> int: + """int TDL_color_set_hue(int color, float h)""" + + @staticmethod + def TDL_color_set_saturation(color: int, h: float, /) -> int: + """int TDL_color_set_saturation(int color, float h)""" + + @staticmethod + def TDL_color_set_value(color: int, h: float, /) -> int: + """int TDL_color_set_value(int color, float h)""" + + @staticmethod + def TDL_color_shift_hue(color: int, hue_shift: float, /) -> int: + """int TDL_color_shift_hue(int color, float hue_shift)""" + + @staticmethod + def TDL_color_subtract(c1: int, c2: int, /) -> int: + """int TDL_color_subtract(int c1, int c2)""" + + @staticmethod + def TDL_color_to_int(color: Any, /) -> int: + """int TDL_color_to_int(TCOD_color_t *color)""" + + @staticmethod + def TDL_console_get_bg(console: Any, x: int, y: int, /) -> int: + """int TDL_console_get_bg(TCOD_console_t console, int x, int y)""" + + @staticmethod + def TDL_console_get_fg(console: Any, x: int, y: int, /) -> int: + """int TDL_console_get_fg(TCOD_console_t console, int x, int y)""" + + @staticmethod + def TDL_console_put_char_ex(console: Any, x: int, y: int, ch: int, fg: int, bg: int, flag: Any, /) -> int: + """int TDL_console_put_char_ex(TCOD_console_t console, int x, int y, int ch, int fg, int bg, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TDL_console_set_bg(console: Any, x: int, y: int, color: int, flag: Any, /) -> None: + """void TDL_console_set_bg(TCOD_console_t console, int x, int y, int color, TCOD_bkgnd_flag_t flag)""" + + @staticmethod + def TDL_console_set_fg(console: Any, x: int, y: int, color: int, /) -> None: + """void TDL_console_set_fg(TCOD_console_t console, int x, int y, int color)""" + + @staticmethod + def TDL_list_get_bool(l: Any, idx: int, /) -> bool: + """bool TDL_list_get_bool(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_char(l: Any, idx: int, /) -> Any: + """char TDL_list_get_char(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_color(l: Any, idx: int, /) -> Any: + """TCOD_color_t TDL_list_get_color(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_dice(l: Any, idx: int, /) -> Any: + """TCOD_dice_t TDL_list_get_dice(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_float(l: Any, idx: int, /) -> float: + """float TDL_list_get_float(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_int(l: Any, idx: int, /) -> int: + """int TDL_list_get_int(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_string(l: Any, idx: int, /) -> Any: + """char *TDL_list_get_string(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_list_get_union(l: Any, idx: int, /) -> Any: + """TCOD_value_t TDL_list_get_union(TCOD_list_t l, int idx)""" + + @staticmethod + def TDL_map_data_from_buffer(map: Any, buffer: Any, /) -> None: + """void TDL_map_data_from_buffer(TCOD_map_t map, uint8_t *buffer)""" + + @staticmethod + def TDL_map_fov_to_buffer(map: Any, buffer: Any, cumulative: bool, /) -> None: + """void TDL_map_fov_to_buffer(TCOD_map_t map, uint8_t *buffer, bool cumulative)""" + + @staticmethod + def _libtcod_log_watcher(message: Any, userdata: Any, /) -> None: + """void _libtcod_log_watcher(const TCOD_LogMessage *message, void *userdata)""" + + @staticmethod + def _pycall_bsp_callback(node: Any, userData: Any, /) -> bool: + """bool _pycall_bsp_callback(TCOD_bsp_t *node, void *userData)""" + + @staticmethod + def _pycall_cli_output(userdata: Any, output: Any, /) -> None: + """void _pycall_cli_output(void *userdata, const char *output)""" + + @staticmethod + def _pycall_parser_end_struct(str: Any, name: Any, /) -> bool: + """bool _pycall_parser_end_struct(TCOD_parser_struct_t str, const char *name)""" + + @staticmethod + def _pycall_parser_error(msg: Any, /) -> None: + """void _pycall_parser_error(const char *msg)""" + + @staticmethod + def _pycall_parser_new_flag(name: Any, /) -> bool: + """bool _pycall_parser_new_flag(const char *name)""" + + @staticmethod + def _pycall_parser_new_property(propname: Any, type: Any, value: Any, /) -> bool: + """bool _pycall_parser_new_property(const char *propname, TCOD_value_type_t type, TCOD_value_t value)""" + + @staticmethod + def _pycall_parser_new_struct(str: Any, name: Any, /) -> bool: + """bool _pycall_parser_new_struct(TCOD_parser_struct_t str, const char *name)""" + + @staticmethod + def _pycall_path_dest_only(x1: int, y1: int, x2: int, y2: int, user_data: Any, /) -> float: + """float _pycall_path_dest_only(int x1, int y1, int x2, int y2, void *user_data)""" + + @staticmethod + def _pycall_path_old(x: int, y: int, xDest: int, yDest: int, user_data: Any, /) -> float: + """float _pycall_path_old(int x, int y, int xDest, int yDest, void *user_data)""" + + @staticmethod + def _pycall_path_simple(x: int, y: int, xDest: int, yDest: int, user_data: Any, /) -> float: + """float _pycall_path_simple(int x, int y, int xDest, int yDest, void *user_data)""" + + @staticmethod + def _pycall_path_swap_src_dest(x1: int, y1: int, x2: int, y2: int, user_data: Any, /) -> float: + """float _pycall_path_swap_src_dest(int x1, int y1, int x2, int y2, void *user_data)""" + + @staticmethod + def _pycall_sdl_hook(arg0: Any, /) -> None: + """void _pycall_sdl_hook(struct SDL_Surface *)""" + + @staticmethod + def _sdl_audio_stream_callback(userdata: Any, stream: Any, additional_amount: int, total_amount: int, /) -> None: + """void _sdl_audio_stream_callback(void *userdata, SDL_AudioStream *stream, int additional_amount, int total_amount)""" + + @staticmethod + def _sdl_event_watcher(userdata: Any, event: Any, /) -> int: + """int _sdl_event_watcher(void *userdata, SDL_Event *event)""" + + @staticmethod + def _sdl_log_output_function(userdata: Any, category: int, priority: Any, message: Any, /) -> None: + """void _sdl_log_output_function(void *userdata, int category, SDL_LogPriority priority, const char *message)""" + + @staticmethod + def alloca(arg0: int, /) -> Any: + """void *alloca(size_t)""" + + @staticmethod + def bresenham(x1: int, y1: int, x2: int, y2: int, n: int, out: Any, /) -> int: + """int bresenham(int x1, int y1, int x2, int y2, int n, int *out)""" + + @staticmethod + def compute_heuristic(heuristic: Any, ndim: int, index: Any, /) -> int: + """int compute_heuristic(const struct PathfinderHeuristic *heuristic, int ndim, const int *index)""" + + @staticmethod + def dijkstra2d(dist: Any, cost: Any, edges_2d_n: int, edges_2d: Any, /) -> int: + """int dijkstra2d(struct NArray *dist, const struct NArray *cost, int edges_2d_n, const int *edges_2d)""" + + @staticmethod + def dijkstra2d_basic(dist: Any, cost: Any, cardinal: int, diagonal: int, /) -> int: + """int dijkstra2d_basic(struct NArray *dist, const struct NArray *cost, int cardinal, int diagonal)""" + + @staticmethod + def frontier_has_index(frontier: Any, index: Any, /) -> int: + """int frontier_has_index(const struct TCOD_Frontier *frontier, const int *index)""" + + @staticmethod + def get_travel_path(ndim: Any, travel_map: Any, start: Any, out: Any, /) -> int: + """ptrdiff_t get_travel_path(int8_t ndim, const NArray *travel_map, const int *start, int *out)""" + + @staticmethod + def hillclimb2d(dist_array: Any, start_i: int, start_j: int, edges_2d_n: int, edges_2d: Any, out: Any, /) -> int: + """int hillclimb2d(const struct NArray *dist_array, int start_i, int start_j, int edges_2d_n, const int *edges_2d, int *out)""" + + @staticmethod + def hillclimb2d_basic(dist: Any, x: int, y: int, cardinal: bool, diagonal: bool, out: Any, /) -> int: + """int hillclimb2d_basic(const struct NArray *dist, int x, int y, bool cardinal, bool diagonal, int *out)""" + + @staticmethod + def path_compute(frontier: Any, dist_map: Any, travel_map: Any, n: int, rules: Any, heuristic: Any, /) -> int: + """int path_compute(struct TCOD_Frontier *frontier, struct NArray *dist_map, struct NArray *travel_map, int n, const struct PathfinderRule *rules, const struct PathfinderHeuristic *heuristic)""" + + @staticmethod + def path_compute_step(frontier: Any, dist_map: Any, travel_map: Any, n: int, rules: Any, heuristic: Any, /) -> int: + """int path_compute_step(struct TCOD_Frontier *frontier, struct NArray *dist_map, struct NArray *travel_map, int n, const struct PathfinderRule *rules, const struct PathfinderHeuristic *heuristic)""" + + @staticmethod + def rebuild_frontier_from_distance(frontier: Any, dist_map: Any, /) -> int: + """int rebuild_frontier_from_distance(struct TCOD_Frontier *frontier, const NArray *dist_map)""" + + @staticmethod + def sync_time_() -> None: + """void sync_time_(void)""" + + @staticmethod + def update_frontier_heuristic(frontier: Any, heuristic: Any, /) -> int: + """int update_frontier_heuristic(struct TCOD_Frontier *frontier, const struct PathfinderHeuristic *heuristic)""" + + FOV_BASIC: Final[int] + FOV_DIAMOND: Final[int] + FOV_PERMISSIVE_0: Final[int] + FOV_PERMISSIVE_1: Final[int] + FOV_PERMISSIVE_2: Final[int] + FOV_PERMISSIVE_3: Final[int] + FOV_PERMISSIVE_4: Final[int] + FOV_PERMISSIVE_5: Final[int] + FOV_PERMISSIVE_6: Final[int] + FOV_PERMISSIVE_7: Final[int] + FOV_PERMISSIVE_8: Final[int] + FOV_RESTRICTIVE: Final[int] + FOV_SHADOW: Final[int] + FOV_SYMMETRIC_SHADOWCAST: Final[int] + NB_FOV_ALGORITHMS: Final[int] + SDLK_0: Final[int] + SDLK_1: Final[int] + SDLK_2: Final[int] + SDLK_3: Final[int] + SDLK_4: Final[int] + SDLK_5: Final[int] + SDLK_6: Final[int] + SDLK_7: Final[int] + SDLK_8: Final[int] + SDLK_9: Final[int] + SDLK_A: Final[int] + SDLK_AC_BACK: Final[int] + SDLK_AC_BOOKMARKS: Final[int] + SDLK_AC_CLOSE: Final[int] + SDLK_AC_EXIT: Final[int] + SDLK_AC_FORWARD: Final[int] + SDLK_AC_HOME: Final[int] + SDLK_AC_NEW: Final[int] + SDLK_AC_OPEN: Final[int] + SDLK_AC_PRINT: Final[int] + SDLK_AC_PROPERTIES: Final[int] + SDLK_AC_REFRESH: Final[int] + SDLK_AC_SAVE: Final[int] + SDLK_AC_SEARCH: Final[int] + SDLK_AC_STOP: Final[int] + SDLK_AGAIN: Final[int] + SDLK_ALTERASE: Final[int] + SDLK_AMPERSAND: Final[int] + SDLK_APOSTROPHE: Final[int] + SDLK_APPLICATION: Final[int] + SDLK_ASTERISK: Final[int] + SDLK_AT: Final[int] + SDLK_B: Final[int] + SDLK_BACKSLASH: Final[int] + SDLK_BACKSPACE: Final[int] + SDLK_C: Final[int] + SDLK_CALL: Final[int] + SDLK_CANCEL: Final[int] + SDLK_CAPSLOCK: Final[int] + SDLK_CARET: Final[int] + SDLK_CHANNEL_DECREMENT: Final[int] + SDLK_CHANNEL_INCREMENT: Final[int] + SDLK_CLEAR: Final[int] + SDLK_CLEARAGAIN: Final[int] + SDLK_COLON: Final[int] + SDLK_COMMA: Final[int] + SDLK_COPY: Final[int] + SDLK_CRSEL: Final[int] + SDLK_CURRENCYSUBUNIT: Final[int] + SDLK_CURRENCYUNIT: Final[int] + SDLK_CUT: Final[int] + SDLK_D: Final[int] + SDLK_DBLAPOSTROPHE: Final[int] + SDLK_DECIMALSEPARATOR: Final[int] + SDLK_DELETE: Final[int] + SDLK_DOLLAR: Final[int] + SDLK_DOWN: Final[int] + SDLK_E: Final[int] + SDLK_END: Final[int] + SDLK_ENDCALL: Final[int] + SDLK_EQUALS: Final[int] + SDLK_ESCAPE: Final[int] + SDLK_EXCLAIM: Final[int] + SDLK_EXECUTE: Final[int] + SDLK_EXSEL: Final[int] + SDLK_EXTENDED_MASK: Final[int] + SDLK_F10: Final[int] + SDLK_F11: Final[int] + SDLK_F12: Final[int] + SDLK_F13: Final[int] + SDLK_F14: Final[int] + SDLK_F15: Final[int] + SDLK_F16: Final[int] + SDLK_F17: Final[int] + SDLK_F18: Final[int] + SDLK_F19: Final[int] + SDLK_F1: Final[int] + SDLK_F20: Final[int] + SDLK_F21: Final[int] + SDLK_F22: Final[int] + SDLK_F23: Final[int] + SDLK_F24: Final[int] + SDLK_F2: Final[int] + SDLK_F3: Final[int] + SDLK_F4: Final[int] + SDLK_F5: Final[int] + SDLK_F6: Final[int] + SDLK_F7: Final[int] + SDLK_F8: Final[int] + SDLK_F9: Final[int] + SDLK_F: Final[int] + SDLK_FIND: Final[int] + SDLK_G: Final[int] + SDLK_GRAVE: Final[int] + SDLK_GREATER: Final[int] + SDLK_H: Final[int] + SDLK_HASH: Final[int] + SDLK_HELP: Final[int] + SDLK_HOME: Final[int] + SDLK_I: Final[int] + SDLK_INSERT: Final[int] + SDLK_J: Final[int] + SDLK_K: Final[int] + SDLK_KP_000: Final[int] + SDLK_KP_00: Final[int] + SDLK_KP_0: Final[int] + SDLK_KP_1: Final[int] + SDLK_KP_2: Final[int] + SDLK_KP_3: Final[int] + SDLK_KP_4: Final[int] + SDLK_KP_5: Final[int] + SDLK_KP_6: Final[int] + SDLK_KP_7: Final[int] + SDLK_KP_8: Final[int] + SDLK_KP_9: Final[int] + SDLK_KP_A: Final[int] + SDLK_KP_AMPERSAND: Final[int] + SDLK_KP_AT: Final[int] + SDLK_KP_B: Final[int] + SDLK_KP_BACKSPACE: Final[int] + SDLK_KP_BINARY: Final[int] + SDLK_KP_C: Final[int] + SDLK_KP_CLEAR: Final[int] + SDLK_KP_CLEARENTRY: Final[int] + SDLK_KP_COLON: Final[int] + SDLK_KP_COMMA: Final[int] + SDLK_KP_D: Final[int] + SDLK_KP_DBLAMPERSAND: Final[int] + SDLK_KP_DBLVERTICALBAR: Final[int] + SDLK_KP_DECIMAL: Final[int] + SDLK_KP_DIVIDE: Final[int] + SDLK_KP_E: Final[int] + SDLK_KP_ENTER: Final[int] + SDLK_KP_EQUALS: Final[int] + SDLK_KP_EQUALSAS400: Final[int] + SDLK_KP_EXCLAM: Final[int] + SDLK_KP_F: Final[int] + SDLK_KP_GREATER: Final[int] + SDLK_KP_HASH: Final[int] + SDLK_KP_HEXADECIMAL: Final[int] + SDLK_KP_LEFTBRACE: Final[int] + SDLK_KP_LEFTPAREN: Final[int] + SDLK_KP_LESS: Final[int] + SDLK_KP_MEMADD: Final[int] + SDLK_KP_MEMCLEAR: Final[int] + SDLK_KP_MEMDIVIDE: Final[int] + SDLK_KP_MEMMULTIPLY: Final[int] + SDLK_KP_MEMRECALL: Final[int] + SDLK_KP_MEMSTORE: Final[int] + SDLK_KP_MEMSUBTRACT: Final[int] + SDLK_KP_MINUS: Final[int] + SDLK_KP_MULTIPLY: Final[int] + SDLK_KP_OCTAL: Final[int] + SDLK_KP_PERCENT: Final[int] + SDLK_KP_PERIOD: Final[int] + SDLK_KP_PLUS: Final[int] + SDLK_KP_PLUSMINUS: Final[int] + SDLK_KP_POWER: Final[int] + SDLK_KP_RIGHTBRACE: Final[int] + SDLK_KP_RIGHTPAREN: Final[int] + SDLK_KP_SPACE: Final[int] + SDLK_KP_TAB: Final[int] + SDLK_KP_VERTICALBAR: Final[int] + SDLK_KP_XOR: Final[int] + SDLK_L: Final[int] + SDLK_LALT: Final[int] + SDLK_LCTRL: Final[int] + SDLK_LEFT: Final[int] + SDLK_LEFTBRACE: Final[int] + SDLK_LEFTBRACKET: Final[int] + SDLK_LEFTPAREN: Final[int] + SDLK_LEFT_TAB: Final[int] + SDLK_LESS: Final[int] + SDLK_LEVEL5_SHIFT: Final[int] + SDLK_LGUI: Final[int] + SDLK_LHYPER: Final[int] + SDLK_LMETA: Final[int] + SDLK_LSHIFT: Final[int] + SDLK_M: Final[int] + SDLK_MEDIA_EJECT: Final[int] + SDLK_MEDIA_FAST_FORWARD: Final[int] + SDLK_MEDIA_NEXT_TRACK: Final[int] + SDLK_MEDIA_PAUSE: Final[int] + SDLK_MEDIA_PLAY: Final[int] + SDLK_MEDIA_PLAY_PAUSE: Final[int] + SDLK_MEDIA_PREVIOUS_TRACK: Final[int] + SDLK_MEDIA_RECORD: Final[int] + SDLK_MEDIA_REWIND: Final[int] + SDLK_MEDIA_SELECT: Final[int] + SDLK_MEDIA_STOP: Final[int] + SDLK_MENU: Final[int] + SDLK_MINUS: Final[int] + SDLK_MODE: Final[int] + SDLK_MULTI_KEY_COMPOSE: Final[int] + SDLK_MUTE: Final[int] + SDLK_N: Final[int] + SDLK_NUMLOCKCLEAR: Final[int] + SDLK_O: Final[int] + SDLK_OPER: Final[int] + SDLK_OUT: Final[int] + SDLK_P: Final[int] + SDLK_PAGEDOWN: Final[int] + SDLK_PAGEUP: Final[int] + SDLK_PASTE: Final[int] + SDLK_PAUSE: Final[int] + SDLK_PERCENT: Final[int] + SDLK_PERIOD: Final[int] + SDLK_PIPE: Final[int] + SDLK_PLUS: Final[int] + SDLK_PLUSMINUS: Final[int] + SDLK_POWER: Final[int] + SDLK_PRINTSCREEN: Final[int] + SDLK_PRIOR: Final[int] + SDLK_Q: Final[int] + SDLK_QUESTION: Final[int] + SDLK_R: Final[int] + SDLK_RALT: Final[int] + SDLK_RCTRL: Final[int] + SDLK_RETURN2: Final[int] + SDLK_RETURN: Final[int] + SDLK_RGUI: Final[int] + SDLK_RHYPER: Final[int] + SDLK_RIGHT: Final[int] + SDLK_RIGHTBRACE: Final[int] + SDLK_RIGHTBRACKET: Final[int] + SDLK_RIGHTPAREN: Final[int] + SDLK_RMETA: Final[int] + SDLK_RSHIFT: Final[int] + SDLK_S: Final[int] + SDLK_SCANCODE_MASK: Final[int] + SDLK_SCROLLLOCK: Final[int] + SDLK_SELECT: Final[int] + SDLK_SEMICOLON: Final[int] + SDLK_SEPARATOR: Final[int] + SDLK_SLASH: Final[int] + SDLK_SLEEP: Final[int] + SDLK_SOFTLEFT: Final[int] + SDLK_SOFTRIGHT: Final[int] + SDLK_SPACE: Final[int] + SDLK_STOP: Final[int] + SDLK_SYSREQ: Final[int] + SDLK_T: Final[int] + SDLK_TAB: Final[int] + SDLK_THOUSANDSSEPARATOR: Final[int] + SDLK_TILDE: Final[int] + SDLK_U: Final[int] + SDLK_UNDERSCORE: Final[int] + SDLK_UNDO: Final[int] + SDLK_UNKNOWN: Final[int] + SDLK_UP: Final[int] + SDLK_V: Final[int] + SDLK_VOLUMEDOWN: Final[int] + SDLK_VOLUMEUP: Final[int] + SDLK_W: Final[int] + SDLK_WAKE: Final[int] + SDLK_X: Final[int] + SDLK_Y: Final[int] + SDLK_Z: Final[int] + SDL_ADDEVENT: Final[int] + SDL_ALPHA_OPAQUE: Final[int] + SDL_ALPHA_TRANSPARENT: Final[int] + SDL_APP_CONTINUE: Final[int] + SDL_APP_FAILURE: Final[int] + SDL_APP_SUCCESS: Final[int] + SDL_ARRAYORDER_ABGR: Final[int] + SDL_ARRAYORDER_ARGB: Final[int] + SDL_ARRAYORDER_BGR: Final[int] + SDL_ARRAYORDER_BGRA: Final[int] + SDL_ARRAYORDER_NONE: Final[int] + SDL_ARRAYORDER_RGB: Final[int] + SDL_ARRAYORDER_RGBA: Final[int] + SDL_ASSERTION_ABORT: Final[int] + SDL_ASSERTION_ALWAYS_IGNORE: Final[int] + SDL_ASSERTION_BREAK: Final[int] + SDL_ASSERTION_IGNORE: Final[int] + SDL_ASSERTION_RETRY: Final[int] + SDL_ASSERT_LEVEL: Final[int] + SDL_ASYNCIO_CANCELED: Final[int] + SDL_ASYNCIO_COMPLETE: Final[int] + SDL_ASYNCIO_FAILURE: Final[int] + SDL_ASYNCIO_TASK_CLOSE: Final[int] + SDL_ASYNCIO_TASK_READ: Final[int] + SDL_ASYNCIO_TASK_WRITE: Final[int] + SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK: Final[int] + SDL_AUDIO_DEVICE_DEFAULT_RECORDING: Final[int] + SDL_AUDIO_F32: Final[int] + SDL_AUDIO_F32BE: Final[Literal[37152]] = 37152 + SDL_AUDIO_F32LE: Final[Literal[33056]] = 33056 + SDL_AUDIO_MASK_BIG_ENDIAN: Final[int] + SDL_AUDIO_MASK_BITSIZE: Final[int] + SDL_AUDIO_MASK_FLOAT: Final[int] + SDL_AUDIO_MASK_SIGNED: Final[int] + SDL_AUDIO_S16: Final[int] + SDL_AUDIO_S16BE: Final[Literal[36880]] = 36880 + SDL_AUDIO_S16LE: Final[Literal[32784]] = 32784 + SDL_AUDIO_S32: Final[int] + SDL_AUDIO_S32BE: Final[Literal[36896]] = 36896 + SDL_AUDIO_S32LE: Final[Literal[32800]] = 32800 + SDL_AUDIO_S8: Final[Literal[32776]] = 32776 + SDL_AUDIO_U8: Final[Literal[8]] = 8 + SDL_AUDIO_UNKNOWN: Final[Literal[0]] = 0 + SDL_BIG_ENDIAN: Final[int] + SDL_BITMAPORDER_1234: Final[int] + SDL_BITMAPORDER_4321: Final[int] + SDL_BITMAPORDER_NONE: Final[int] + SDL_BLENDFACTOR_DST_ALPHA: Final[Literal[9]] = 9 + SDL_BLENDFACTOR_DST_COLOR: Final[Literal[7]] = 7 + SDL_BLENDFACTOR_ONE: Final[Literal[2]] = 2 + SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA: Final[Literal[10]] = 10 + SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR: Final[Literal[8]] = 8 + SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA: Final[Literal[6]] = 6 + SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR: Final[Literal[4]] = 4 + SDL_BLENDFACTOR_SRC_ALPHA: Final[Literal[5]] = 5 + SDL_BLENDFACTOR_SRC_COLOR: Final[Literal[3]] = 3 + SDL_BLENDFACTOR_ZERO: Final[Literal[1]] = 1 + SDL_BLENDMODE_ADD: Final[int] + SDL_BLENDMODE_ADD_PREMULTIPLIED: Final[int] + SDL_BLENDMODE_BLEND: Final[int] + SDL_BLENDMODE_BLEND_PREMULTIPLIED: Final[int] + SDL_BLENDMODE_INVALID: Final[int] + SDL_BLENDMODE_MOD: Final[int] + SDL_BLENDMODE_MUL: Final[int] + SDL_BLENDMODE_NONE: Final[int] + SDL_BLENDOPERATION_ADD: Final[Literal[1]] = 1 + SDL_BLENDOPERATION_MAXIMUM: Final[Literal[5]] = 5 + SDL_BLENDOPERATION_MINIMUM: Final[Literal[4]] = 4 + SDL_BLENDOPERATION_REV_SUBTRACT: Final[Literal[3]] = 3 + SDL_BLENDOPERATION_SUBTRACT: Final[Literal[2]] = 2 + SDL_BUTTON_LEFT: Final[int] + SDL_BUTTON_LMASK: Final[int] + SDL_BUTTON_MIDDLE: Final[int] + SDL_BUTTON_MMASK: Final[int] + SDL_BUTTON_RIGHT: Final[int] + SDL_BUTTON_RMASK: Final[int] + SDL_BUTTON_X1: Final[int] + SDL_BUTTON_X1MASK: Final[int] + SDL_BUTTON_X2: Final[int] + SDL_BUTTON_X2MASK: Final[int] + SDL_BYTEORDER: Final[int] + SDL_CACHELINE_SIZE: Final[int] + SDL_CAMERA_POSITION_BACK_FACING: Final[int] + SDL_CAMERA_POSITION_FRONT_FACING: Final[int] + SDL_CAMERA_POSITION_UNKNOWN: Final[int] + SDL_CAPITALIZE_LETTERS: Final[int] + SDL_CAPITALIZE_NONE: Final[int] + SDL_CAPITALIZE_SENTENCES: Final[int] + SDL_CAPITALIZE_WORDS: Final[int] + SDL_CHROMA_LOCATION_CENTER: Final[Literal[2]] = 2 + SDL_CHROMA_LOCATION_LEFT: Final[Literal[1]] = 1 + SDL_CHROMA_LOCATION_NONE: Final[Literal[0]] = 0 + SDL_CHROMA_LOCATION_TOPLEFT: Final[Literal[3]] = 3 + SDL_COLORSPACE_BT2020_FULL: Final[Literal[571483657]] = 571483657 + SDL_COLORSPACE_BT2020_LIMITED: Final[Literal[554706441]] = 554706441 + SDL_COLORSPACE_BT601_FULL: Final[Literal[571480262]] = 571480262 + SDL_COLORSPACE_BT601_LIMITED: Final[Literal[554703046]] = 554703046 + SDL_COLORSPACE_BT709_FULL: Final[Literal[571474977]] = 571474977 + SDL_COLORSPACE_BT709_LIMITED: Final[Literal[554697761]] = 554697761 + SDL_COLORSPACE_HDR10: Final[Literal[301999616]] = 301999616 + SDL_COLORSPACE_JPEG: Final[Literal[570426566]] = 570426566 + SDL_COLORSPACE_RGB_DEFAULT: Final[int] + SDL_COLORSPACE_SRGB: Final[Literal[301991328]] = 301991328 + SDL_COLORSPACE_SRGB_LINEAR: Final[Literal[301991168]] = 301991168 + SDL_COLORSPACE_UNKNOWN: Final[Literal[0]] = 0 + SDL_COLORSPACE_YUV_DEFAULT: Final[int] + SDL_COLOR_PRIMARIES_BT2020: Final[Literal[9]] = 9 + SDL_COLOR_PRIMARIES_BT470BG: Final[Literal[5]] = 5 + SDL_COLOR_PRIMARIES_BT470M: Final[Literal[4]] = 4 + SDL_COLOR_PRIMARIES_BT601: Final[Literal[6]] = 6 + SDL_COLOR_PRIMARIES_BT709: Final[Literal[1]] = 1 + SDL_COLOR_PRIMARIES_CUSTOM: Final[Literal[31]] = 31 + SDL_COLOR_PRIMARIES_EBU3213: Final[Literal[22]] = 22 + SDL_COLOR_PRIMARIES_GENERIC_FILM: Final[Literal[8]] = 8 + SDL_COLOR_PRIMARIES_SMPTE240: Final[Literal[7]] = 7 + SDL_COLOR_PRIMARIES_SMPTE431: Final[Literal[11]] = 11 + SDL_COLOR_PRIMARIES_SMPTE432: Final[Literal[12]] = 12 + SDL_COLOR_PRIMARIES_UNKNOWN: Final[Literal[0]] = 0 + SDL_COLOR_PRIMARIES_UNSPECIFIED: Final[Literal[2]] = 2 + SDL_COLOR_PRIMARIES_XYZ: Final[Literal[10]] = 10 + SDL_COLOR_RANGE_FULL: Final[Literal[2]] = 2 + SDL_COLOR_RANGE_LIMITED: Final[Literal[1]] = 1 + SDL_COLOR_RANGE_UNKNOWN: Final[Literal[0]] = 0 + SDL_COLOR_TYPE_RGB: Final[Literal[1]] = 1 + SDL_COLOR_TYPE_UNKNOWN: Final[Literal[0]] = 0 + SDL_COLOR_TYPE_YCBCR: Final[Literal[2]] = 2 + SDL_DATE_FORMAT_DDMMYYYY: Final[Literal[1]] = 1 + SDL_DATE_FORMAT_MMDDYYYY: Final[Literal[2]] = 2 + SDL_DATE_FORMAT_YYYYMMDD: Final[Literal[0]] = 0 + SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE: Final[int] + SDL_ENUM_CONTINUE: Final[int] + SDL_ENUM_FAILURE: Final[int] + SDL_ENUM_SUCCESS: Final[int] + SDL_EVENT_AUDIO_DEVICE_ADDED: Final[Literal[4352]] = 4352 + SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED: Final[int] + SDL_EVENT_AUDIO_DEVICE_REMOVED: Final[int] + SDL_EVENT_CAMERA_DEVICE_ADDED: Final[Literal[5120]] = 5120 + SDL_EVENT_CAMERA_DEVICE_APPROVED: Final[int] + SDL_EVENT_CAMERA_DEVICE_DENIED: Final[int] + SDL_EVENT_CAMERA_DEVICE_REMOVED: Final[int] + SDL_EVENT_CLIPBOARD_UPDATE: Final[Literal[2304]] = 2304 + SDL_EVENT_DID_ENTER_BACKGROUND: Final[int] + SDL_EVENT_DID_ENTER_FOREGROUND: Final[int] + SDL_EVENT_DISPLAY_ADDED: Final[int] + SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED: Final[int] + SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED: Final[int] + SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED: Final[int] + SDL_EVENT_DISPLAY_FIRST: Final[int] + SDL_EVENT_DISPLAY_LAST: Final[int] + SDL_EVENT_DISPLAY_MOVED: Final[int] + SDL_EVENT_DISPLAY_ORIENTATION: Final[Literal[337]] = 337 + SDL_EVENT_DISPLAY_REMOVED: Final[int] + SDL_EVENT_DROP_BEGIN: Final[int] + SDL_EVENT_DROP_COMPLETE: Final[int] + SDL_EVENT_DROP_FILE: Final[Literal[4096]] = 4096 + SDL_EVENT_DROP_POSITION: Final[int] + SDL_EVENT_DROP_TEXT: Final[int] + SDL_EVENT_ENUM_PADDING: Final[Literal[2147483647]] = 2147483647 + SDL_EVENT_FINGER_CANCELED: Final[int] + SDL_EVENT_FINGER_DOWN: Final[Literal[1792]] = 1792 + SDL_EVENT_FINGER_MOTION: Final[int] + SDL_EVENT_FINGER_UP: Final[int] + SDL_EVENT_FIRST: Final[Literal[0]] = 0 + SDL_EVENT_GAMEPAD_ADDED: Final[int] + SDL_EVENT_GAMEPAD_AXIS_MOTION: Final[Literal[1616]] = 1616 + SDL_EVENT_GAMEPAD_BUTTON_DOWN: Final[int] + SDL_EVENT_GAMEPAD_BUTTON_UP: Final[int] + SDL_EVENT_GAMEPAD_REMAPPED: Final[int] + SDL_EVENT_GAMEPAD_REMOVED: Final[int] + SDL_EVENT_GAMEPAD_SENSOR_UPDATE: Final[int] + SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED: Final[int] + SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN: Final[int] + SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION: Final[int] + SDL_EVENT_GAMEPAD_TOUCHPAD_UP: Final[int] + SDL_EVENT_GAMEPAD_UPDATE_COMPLETE: Final[int] + SDL_EVENT_JOYSTICK_ADDED: Final[int] + SDL_EVENT_JOYSTICK_AXIS_MOTION: Final[Literal[1536]] = 1536 + SDL_EVENT_JOYSTICK_BALL_MOTION: Final[int] + SDL_EVENT_JOYSTICK_BATTERY_UPDATED: Final[int] + SDL_EVENT_JOYSTICK_BUTTON_DOWN: Final[int] + SDL_EVENT_JOYSTICK_BUTTON_UP: Final[int] + SDL_EVENT_JOYSTICK_HAT_MOTION: Final[int] + SDL_EVENT_JOYSTICK_REMOVED: Final[int] + SDL_EVENT_JOYSTICK_UPDATE_COMPLETE: Final[int] + SDL_EVENT_KEYBOARD_ADDED: Final[int] + SDL_EVENT_KEYBOARD_REMOVED: Final[int] + SDL_EVENT_KEYMAP_CHANGED: Final[int] + SDL_EVENT_KEY_DOWN: Final[Literal[768]] = 768 + SDL_EVENT_KEY_UP: Final[int] + SDL_EVENT_LAST: Final[Literal[65535]] = 65535 + SDL_EVENT_LOCALE_CHANGED: Final[int] + SDL_EVENT_LOW_MEMORY: Final[int] + SDL_EVENT_MOUSE_ADDED: Final[int] + SDL_EVENT_MOUSE_BUTTON_DOWN: Final[int] + SDL_EVENT_MOUSE_BUTTON_UP: Final[int] + SDL_EVENT_MOUSE_MOTION: Final[Literal[1024]] = 1024 + SDL_EVENT_MOUSE_REMOVED: Final[int] + SDL_EVENT_MOUSE_WHEEL: Final[int] + SDL_EVENT_PEN_AXIS: Final[int] + SDL_EVENT_PEN_BUTTON_DOWN: Final[int] + SDL_EVENT_PEN_BUTTON_UP: Final[int] + SDL_EVENT_PEN_DOWN: Final[int] + SDL_EVENT_PEN_MOTION: Final[int] + SDL_EVENT_PEN_PROXIMITY_IN: Final[Literal[4864]] = 4864 + SDL_EVENT_PEN_PROXIMITY_OUT: Final[int] + SDL_EVENT_PEN_UP: Final[int] + SDL_EVENT_POLL_SENTINEL: Final[Literal[32512]] = 32512 + SDL_EVENT_PRIVATE0: Final[Literal[16384]] = 16384 + SDL_EVENT_PRIVATE1: Final[int] + SDL_EVENT_PRIVATE2: Final[int] + SDL_EVENT_PRIVATE3: Final[int] + SDL_EVENT_QUIT: Final[Literal[256]] = 256 + SDL_EVENT_RENDER_DEVICE_LOST: Final[int] + SDL_EVENT_RENDER_DEVICE_RESET: Final[int] + SDL_EVENT_RENDER_TARGETS_RESET: Final[Literal[8192]] = 8192 + SDL_EVENT_SENSOR_UPDATE: Final[Literal[4608]] = 4608 + SDL_EVENT_SYSTEM_THEME_CHANGED: Final[int] + SDL_EVENT_TERMINATING: Final[int] + SDL_EVENT_TEXT_EDITING: Final[int] + SDL_EVENT_TEXT_EDITING_CANDIDATES: Final[int] + SDL_EVENT_TEXT_INPUT: Final[int] + SDL_EVENT_USER: Final[Literal[32768]] = 32768 + SDL_EVENT_WILL_ENTER_BACKGROUND: Final[int] + SDL_EVENT_WILL_ENTER_FOREGROUND: Final[int] + SDL_EVENT_WINDOW_CLOSE_REQUESTED: Final[int] + SDL_EVENT_WINDOW_DESTROYED: Final[int] + SDL_EVENT_WINDOW_DISPLAY_CHANGED: Final[int] + SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED: Final[int] + SDL_EVENT_WINDOW_ENTER_FULLSCREEN: Final[int] + SDL_EVENT_WINDOW_EXPOSED: Final[int] + SDL_EVENT_WINDOW_FIRST: Final[int] + SDL_EVENT_WINDOW_FOCUS_GAINED: Final[int] + SDL_EVENT_WINDOW_FOCUS_LOST: Final[int] + SDL_EVENT_WINDOW_HDR_STATE_CHANGED: Final[int] + SDL_EVENT_WINDOW_HIDDEN: Final[int] + SDL_EVENT_WINDOW_HIT_TEST: Final[int] + SDL_EVENT_WINDOW_ICCPROF_CHANGED: Final[int] + SDL_EVENT_WINDOW_LAST: Final[int] + SDL_EVENT_WINDOW_LEAVE_FULLSCREEN: Final[int] + SDL_EVENT_WINDOW_MAXIMIZED: Final[int] + SDL_EVENT_WINDOW_METAL_VIEW_RESIZED: Final[int] + SDL_EVENT_WINDOW_MINIMIZED: Final[int] + SDL_EVENT_WINDOW_MOUSE_ENTER: Final[int] + SDL_EVENT_WINDOW_MOUSE_LEAVE: Final[int] + SDL_EVENT_WINDOW_MOVED: Final[int] + SDL_EVENT_WINDOW_OCCLUDED: Final[int] + SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED: Final[int] + SDL_EVENT_WINDOW_RESIZED: Final[int] + SDL_EVENT_WINDOW_RESTORED: Final[int] + SDL_EVENT_WINDOW_SAFE_AREA_CHANGED: Final[int] + SDL_EVENT_WINDOW_SHOWN: Final[Literal[514]] = 514 + SDL_FILEDIALOG_OPENFILE: Final[int] + SDL_FILEDIALOG_OPENFOLDER: Final[int] + SDL_FILEDIALOG_SAVEFILE: Final[int] + SDL_FLASH_BRIEFLY: Final[int] + SDL_FLASH_CANCEL: Final[int] + SDL_FLASH_UNTIL_FOCUSED: Final[int] + SDL_FLIP_HORIZONTAL: Final[int] + SDL_FLIP_NONE: Final[int] + SDL_FLIP_VERTICAL: Final[int] + SDL_FLOATWORDORDER: Final[int] + SDL_FOLDER_COUNT: Final[int] + SDL_FOLDER_DESKTOP: Final[int] + SDL_FOLDER_DOCUMENTS: Final[int] + SDL_FOLDER_DOWNLOADS: Final[int] + SDL_FOLDER_HOME: Final[int] + SDL_FOLDER_MUSIC: Final[int] + SDL_FOLDER_PICTURES: Final[int] + SDL_FOLDER_PUBLICSHARE: Final[int] + SDL_FOLDER_SAVEDGAMES: Final[int] + SDL_FOLDER_SCREENSHOTS: Final[int] + SDL_FOLDER_TEMPLATES: Final[int] + SDL_FOLDER_VIDEOS: Final[int] + SDL_GAMEPAD_AXIS_COUNT: Final[int] + SDL_GAMEPAD_AXIS_INVALID: Final[Literal[-1]] = -1 + SDL_GAMEPAD_AXIS_LEFTX: Final[int] + SDL_GAMEPAD_AXIS_LEFTY: Final[int] + SDL_GAMEPAD_AXIS_LEFT_TRIGGER: Final[int] + SDL_GAMEPAD_AXIS_RIGHTX: Final[int] + SDL_GAMEPAD_AXIS_RIGHTY: Final[int] + SDL_GAMEPAD_AXIS_RIGHT_TRIGGER: Final[int] + SDL_GAMEPAD_BINDTYPE_AXIS: Final[int] + SDL_GAMEPAD_BINDTYPE_BUTTON: Final[int] + SDL_GAMEPAD_BINDTYPE_HAT: Final[int] + SDL_GAMEPAD_BINDTYPE_NONE: Final[Literal[0]] = 0 + SDL_GAMEPAD_BUTTON_BACK: Final[int] + SDL_GAMEPAD_BUTTON_COUNT: Final[int] + SDL_GAMEPAD_BUTTON_DPAD_DOWN: Final[int] + SDL_GAMEPAD_BUTTON_DPAD_LEFT: Final[int] + SDL_GAMEPAD_BUTTON_DPAD_RIGHT: Final[int] + SDL_GAMEPAD_BUTTON_DPAD_UP: Final[int] + SDL_GAMEPAD_BUTTON_EAST: Final[int] + SDL_GAMEPAD_BUTTON_GUIDE: Final[int] + SDL_GAMEPAD_BUTTON_INVALID: Final[Literal[-1]] = -1 + SDL_GAMEPAD_BUTTON_LABEL_A: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_B: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_CIRCLE: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_CROSS: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_SQUARE: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_X: Final[int] + SDL_GAMEPAD_BUTTON_LABEL_Y: Final[int] + SDL_GAMEPAD_BUTTON_LEFT_PADDLE1: Final[int] + SDL_GAMEPAD_BUTTON_LEFT_PADDLE2: Final[int] + SDL_GAMEPAD_BUTTON_LEFT_SHOULDER: Final[int] + SDL_GAMEPAD_BUTTON_LEFT_STICK: Final[int] + SDL_GAMEPAD_BUTTON_MISC1: Final[int] + SDL_GAMEPAD_BUTTON_MISC2: Final[int] + SDL_GAMEPAD_BUTTON_MISC3: Final[int] + SDL_GAMEPAD_BUTTON_MISC4: Final[int] + SDL_GAMEPAD_BUTTON_MISC5: Final[int] + SDL_GAMEPAD_BUTTON_MISC6: Final[int] + SDL_GAMEPAD_BUTTON_NORTH: Final[int] + SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1: Final[int] + SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2: Final[int] + SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER: Final[int] + SDL_GAMEPAD_BUTTON_RIGHT_STICK: Final[int] + SDL_GAMEPAD_BUTTON_SOUTH: Final[int] + SDL_GAMEPAD_BUTTON_START: Final[int] + SDL_GAMEPAD_BUTTON_TOUCHPAD: Final[int] + SDL_GAMEPAD_BUTTON_WEST: Final[int] + SDL_GAMEPAD_TYPE_COUNT: Final[int] + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT: Final[int] + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR: Final[int] + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT: Final[int] + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO: Final[int] + SDL_GAMEPAD_TYPE_PS3: Final[int] + SDL_GAMEPAD_TYPE_PS4: Final[int] + SDL_GAMEPAD_TYPE_PS5: Final[int] + SDL_GAMEPAD_TYPE_STANDARD: Final[int] + SDL_GAMEPAD_TYPE_UNKNOWN: Final[Literal[0]] = 0 + SDL_GAMEPAD_TYPE_XBOX360: Final[int] + SDL_GAMEPAD_TYPE_XBOXONE: Final[int] + SDL_GETEVENT: Final[int] + SDL_GLOB_CASEINSENSITIVE: Final[int] + SDL_GL_ACCELERATED_VISUAL: Final[int] + SDL_GL_ACCUM_ALPHA_SIZE: Final[int] + SDL_GL_ACCUM_BLUE_SIZE: Final[int] + SDL_GL_ACCUM_GREEN_SIZE: Final[int] + SDL_GL_ACCUM_RED_SIZE: Final[int] + SDL_GL_ALPHA_SIZE: Final[int] + SDL_GL_BLUE_SIZE: Final[int] + SDL_GL_BUFFER_SIZE: Final[int] + SDL_GL_CONTEXT_DEBUG_FLAG: Final[int] + SDL_GL_CONTEXT_FLAGS: Final[int] + SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG: Final[int] + SDL_GL_CONTEXT_MAJOR_VERSION: Final[int] + SDL_GL_CONTEXT_MINOR_VERSION: Final[int] + SDL_GL_CONTEXT_NO_ERROR: Final[int] + SDL_GL_CONTEXT_PROFILE_COMPATIBILITY: Final[int] + SDL_GL_CONTEXT_PROFILE_CORE: Final[int] + SDL_GL_CONTEXT_PROFILE_ES: Final[int] + SDL_GL_CONTEXT_PROFILE_MASK: Final[int] + SDL_GL_CONTEXT_RELEASE_BEHAVIOR: Final[int] + SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH: Final[int] + SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE: Final[int] + SDL_GL_CONTEXT_RESET_ISOLATION_FLAG: Final[int] + SDL_GL_CONTEXT_RESET_LOSE_CONTEXT: Final[int] + SDL_GL_CONTEXT_RESET_NOTIFICATION: Final[int] + SDL_GL_CONTEXT_RESET_NO_NOTIFICATION: Final[int] + SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG: Final[int] + SDL_GL_DEPTH_SIZE: Final[int] + SDL_GL_DOUBLEBUFFER: Final[int] + SDL_GL_EGL_PLATFORM: Final[int] + SDL_GL_FLOATBUFFERS: Final[int] + SDL_GL_FRAMEBUFFER_SRGB_CAPABLE: Final[int] + SDL_GL_GREEN_SIZE: Final[int] + SDL_GL_MULTISAMPLEBUFFERS: Final[int] + SDL_GL_MULTISAMPLESAMPLES: Final[int] + SDL_GL_RED_SIZE: Final[int] + SDL_GL_RETAINED_BACKING: Final[int] + SDL_GL_SHARE_WITH_CURRENT_CONTEXT: Final[int] + SDL_GL_STENCIL_SIZE: Final[int] + SDL_GL_STEREO: Final[int] + SDL_GPU_BLENDFACTOR_CONSTANT_COLOR: Final[int] + SDL_GPU_BLENDFACTOR_DST_ALPHA: Final[int] + SDL_GPU_BLENDFACTOR_DST_COLOR: Final[int] + SDL_GPU_BLENDFACTOR_INVALID: Final[int] + SDL_GPU_BLENDFACTOR_ONE: Final[int] + SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR: Final[int] + SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA: Final[int] + SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR: Final[int] + SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA: Final[int] + SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR: Final[int] + SDL_GPU_BLENDFACTOR_SRC_ALPHA: Final[int] + SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE: Final[int] + SDL_GPU_BLENDFACTOR_SRC_COLOR: Final[int] + SDL_GPU_BLENDFACTOR_ZERO: Final[int] + SDL_GPU_BLENDOP_ADD: Final[int] + SDL_GPU_BLENDOP_INVALID: Final[int] + SDL_GPU_BLENDOP_MAX: Final[int] + SDL_GPU_BLENDOP_MIN: Final[int] + SDL_GPU_BLENDOP_REVERSE_SUBTRACT: Final[int] + SDL_GPU_BLENDOP_SUBTRACT: Final[int] + SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ: Final[int] + SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE: Final[int] + SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ: Final[int] + SDL_GPU_BUFFERUSAGE_INDEX: Final[int] + SDL_GPU_BUFFERUSAGE_INDIRECT: Final[int] + SDL_GPU_BUFFERUSAGE_VERTEX: Final[int] + SDL_GPU_COLORCOMPONENT_A: Final[int] + SDL_GPU_COLORCOMPONENT_B: Final[int] + SDL_GPU_COLORCOMPONENT_G: Final[int] + SDL_GPU_COLORCOMPONENT_R: Final[int] + SDL_GPU_COMPAREOP_ALWAYS: Final[int] + SDL_GPU_COMPAREOP_EQUAL: Final[int] + SDL_GPU_COMPAREOP_GREATER: Final[int] + SDL_GPU_COMPAREOP_GREATER_OR_EQUAL: Final[int] + SDL_GPU_COMPAREOP_INVALID: Final[int] + SDL_GPU_COMPAREOP_LESS: Final[int] + SDL_GPU_COMPAREOP_LESS_OR_EQUAL: Final[int] + SDL_GPU_COMPAREOP_NEVER: Final[int] + SDL_GPU_COMPAREOP_NOT_EQUAL: Final[int] + SDL_GPU_CUBEMAPFACE_NEGATIVEX: Final[int] + SDL_GPU_CUBEMAPFACE_NEGATIVEY: Final[int] + SDL_GPU_CUBEMAPFACE_NEGATIVEZ: Final[int] + SDL_GPU_CUBEMAPFACE_POSITIVEX: Final[int] + SDL_GPU_CUBEMAPFACE_POSITIVEY: Final[int] + SDL_GPU_CUBEMAPFACE_POSITIVEZ: Final[int] + SDL_GPU_CULLMODE_BACK: Final[int] + SDL_GPU_CULLMODE_FRONT: Final[int] + SDL_GPU_CULLMODE_NONE: Final[int] + SDL_GPU_FILLMODE_FILL: Final[int] + SDL_GPU_FILLMODE_LINE: Final[int] + SDL_GPU_FILTER_LINEAR: Final[int] + SDL_GPU_FILTER_NEAREST: Final[int] + SDL_GPU_FRONTFACE_CLOCKWISE: Final[int] + SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE: Final[int] + SDL_GPU_INDEXELEMENTSIZE_16BIT: Final[int] + SDL_GPU_INDEXELEMENTSIZE_32BIT: Final[int] + SDL_GPU_LOADOP_CLEAR: Final[int] + SDL_GPU_LOADOP_DONT_CARE: Final[int] + SDL_GPU_LOADOP_LOAD: Final[int] + SDL_GPU_PRESENTMODE_IMMEDIATE: Final[int] + SDL_GPU_PRESENTMODE_MAILBOX: Final[int] + SDL_GPU_PRESENTMODE_VSYNC: Final[int] + SDL_GPU_PRIMITIVETYPE_LINELIST: Final[int] + SDL_GPU_PRIMITIVETYPE_LINESTRIP: Final[int] + SDL_GPU_PRIMITIVETYPE_POINTLIST: Final[int] + SDL_GPU_PRIMITIVETYPE_TRIANGLELIST: Final[int] + SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP: Final[int] + SDL_GPU_SAMPLECOUNT_1: Final[int] + SDL_GPU_SAMPLECOUNT_2: Final[int] + SDL_GPU_SAMPLECOUNT_4: Final[int] + SDL_GPU_SAMPLECOUNT_8: Final[int] + SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE: Final[int] + SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT: Final[int] + SDL_GPU_SAMPLERADDRESSMODE_REPEAT: Final[int] + SDL_GPU_SAMPLERMIPMAPMODE_LINEAR: Final[int] + SDL_GPU_SAMPLERMIPMAPMODE_NEAREST: Final[int] + SDL_GPU_SHADERFORMAT_DXBC: Final[int] + SDL_GPU_SHADERFORMAT_DXIL: Final[int] + SDL_GPU_SHADERFORMAT_INVALID: Final[int] + SDL_GPU_SHADERFORMAT_METALLIB: Final[int] + SDL_GPU_SHADERFORMAT_MSL: Final[int] + SDL_GPU_SHADERFORMAT_PRIVATE: Final[int] + SDL_GPU_SHADERFORMAT_SPIRV: Final[int] + SDL_GPU_SHADERSTAGE_FRAGMENT: Final[int] + SDL_GPU_SHADERSTAGE_VERTEX: Final[int] + SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP: Final[int] + SDL_GPU_STENCILOP_DECREMENT_AND_WRAP: Final[int] + SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP: Final[int] + SDL_GPU_STENCILOP_INCREMENT_AND_WRAP: Final[int] + SDL_GPU_STENCILOP_INVALID: Final[int] + SDL_GPU_STENCILOP_INVERT: Final[int] + SDL_GPU_STENCILOP_KEEP: Final[int] + SDL_GPU_STENCILOP_REPLACE: Final[int] + SDL_GPU_STENCILOP_ZERO: Final[int] + SDL_GPU_STOREOP_DONT_CARE: Final[int] + SDL_GPU_STOREOP_RESOLVE: Final[int] + SDL_GPU_STOREOP_RESOLVE_AND_STORE: Final[int] + SDL_GPU_STOREOP_STORE: Final[int] + SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084: Final[int] + SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR: Final[int] + SDL_GPU_SWAPCHAINCOMPOSITION_SDR: Final[int] + SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR: Final[int] + SDL_GPU_TEXTUREFORMAT_A8_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_D16_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_D24_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_D32_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_INVALID: Final[int] + SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16_SNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16G16_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R16_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16_SNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R16_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R16_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32G32_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32G32_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32_FLOAT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R32_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8_SNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8G8_UNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R8_INT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8_SNORM: Final[int] + SDL_GPU_TEXTUREFORMAT_R8_UINT: Final[int] + SDL_GPU_TEXTUREFORMAT_R8_UNORM: Final[int] + SDL_GPU_TEXTURETYPE_2D: Final[int] + SDL_GPU_TEXTURETYPE_2D_ARRAY: Final[int] + SDL_GPU_TEXTURETYPE_3D: Final[int] + SDL_GPU_TEXTURETYPE_CUBE: Final[int] + SDL_GPU_TEXTURETYPE_CUBE_ARRAY: Final[int] + SDL_GPU_TEXTUREUSAGE_COLOR_TARGET: Final[int] + SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ: Final[int] + SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE: Final[int] + SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE: Final[int] + SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET: Final[int] + SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ: Final[int] + SDL_GPU_TEXTUREUSAGE_SAMPLER: Final[int] + SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD: Final[int] + SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_BYTE2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_BYTE4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_FLOAT: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_HALF2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_HALF4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_INT2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_INT3: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_INT4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_INT: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_INVALID: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_SHORT2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_SHORT4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UINT2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UINT3: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UINT4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_UINT: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_USHORT2: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_USHORT4: Final[int] + SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM: Final[int] + SDL_GPU_VERTEXINPUTRATE_INSTANCE: Final[int] + SDL_GPU_VERTEXINPUTRATE_VERTEX: Final[int] + SDL_HAPTIC_AUTOCENTER: Final[int] + SDL_HAPTIC_CARTESIAN: Final[int] + SDL_HAPTIC_CONSTANT: Final[int] + SDL_HAPTIC_CUSTOM: Final[int] + SDL_HAPTIC_DAMPER: Final[int] + SDL_HAPTIC_FRICTION: Final[int] + SDL_HAPTIC_GAIN: Final[int] + SDL_HAPTIC_INERTIA: Final[int] + SDL_HAPTIC_INFINITY: Final[int] + SDL_HAPTIC_LEFTRIGHT: Final[int] + SDL_HAPTIC_PAUSE: Final[int] + SDL_HAPTIC_POLAR: Final[int] + SDL_HAPTIC_RAMP: Final[int] + SDL_HAPTIC_RESERVED1: Final[int] + SDL_HAPTIC_RESERVED2: Final[int] + SDL_HAPTIC_RESERVED3: Final[int] + SDL_HAPTIC_SAWTOOTHDOWN: Final[int] + SDL_HAPTIC_SAWTOOTHUP: Final[int] + SDL_HAPTIC_SINE: Final[int] + SDL_HAPTIC_SPHERICAL: Final[int] + SDL_HAPTIC_SPRING: Final[int] + SDL_HAPTIC_SQUARE: Final[int] + SDL_HAPTIC_STATUS: Final[int] + SDL_HAPTIC_STEERING_AXIS: Final[int] + SDL_HAPTIC_TRIANGLE: Final[int] + SDL_HAT_CENTERED: Final[int] + SDL_HAT_DOWN: Final[int] + SDL_HAT_LEFT: Final[int] + SDL_HAT_LEFTDOWN: Final[int] + SDL_HAT_LEFTUP: Final[int] + SDL_HAT_RIGHT: Final[int] + SDL_HAT_RIGHTDOWN: Final[int] + SDL_HAT_RIGHTUP: Final[int] + SDL_HAT_UP: Final[int] + SDL_HID_API_BUS_BLUETOOTH: Final[Literal[2]] = 2 + SDL_HID_API_BUS_I2C: Final[Literal[3]] = 3 + SDL_HID_API_BUS_SPI: Final[Literal[4]] = 4 + SDL_HID_API_BUS_UNKNOWN: Final[Literal[0]] = 0 + SDL_HID_API_BUS_USB: Final[Literal[1]] = 1 + SDL_HINT_DEFAULT: Final[int] + SDL_HINT_NORMAL: Final[int] + SDL_HINT_OVERRIDE: Final[int] + SDL_HITTEST_DRAGGABLE: Final[int] + SDL_HITTEST_NORMAL: Final[int] + SDL_HITTEST_RESIZE_BOTTOM: Final[int] + SDL_HITTEST_RESIZE_BOTTOMLEFT: Final[int] + SDL_HITTEST_RESIZE_BOTTOMRIGHT: Final[int] + SDL_HITTEST_RESIZE_LEFT: Final[int] + SDL_HITTEST_RESIZE_RIGHT: Final[int] + SDL_HITTEST_RESIZE_TOP: Final[int] + SDL_HITTEST_RESIZE_TOPLEFT: Final[int] + SDL_HITTEST_RESIZE_TOPRIGHT: Final[int] + SDL_ICONV_E2BIG: Final[int] + SDL_ICONV_EILSEQ: Final[int] + SDL_ICONV_EINVAL: Final[int] + SDL_ICONV_ERROR: Final[int] + SDL_INIT_AUDIO: Final[int] + SDL_INIT_CAMERA: Final[int] + SDL_INIT_EVENTS: Final[int] + SDL_INIT_GAMEPAD: Final[int] + SDL_INIT_HAPTIC: Final[int] + SDL_INIT_JOYSTICK: Final[int] + SDL_INIT_SENSOR: Final[int] + SDL_INIT_STATUS_INITIALIZED: Final[int] + SDL_INIT_STATUS_INITIALIZING: Final[int] + SDL_INIT_STATUS_UNINITIALIZED: Final[int] + SDL_INIT_STATUS_UNINITIALIZING: Final[int] + SDL_INIT_VIDEO: Final[int] + SDL_INVALID_UNICODE_CODEPOINT: Final[int] + SDL_IO_SEEK_CUR: Final[int] + SDL_IO_SEEK_END: Final[int] + SDL_IO_SEEK_SET: Final[int] + SDL_IO_STATUS_EOF: Final[int] + SDL_IO_STATUS_ERROR: Final[int] + SDL_IO_STATUS_NOT_READY: Final[int] + SDL_IO_STATUS_READONLY: Final[int] + SDL_IO_STATUS_READY: Final[int] + SDL_IO_STATUS_WRITEONLY: Final[int] + SDL_JOYSTICK_AXIS_MAX: Final[int] + SDL_JOYSTICK_AXIS_MIN: Final[int] + SDL_JOYSTICK_CONNECTION_INVALID: Final[Literal[-1]] = -1 + SDL_JOYSTICK_CONNECTION_UNKNOWN: Final[int] + SDL_JOYSTICK_CONNECTION_WIRED: Final[int] + SDL_JOYSTICK_CONNECTION_WIRELESS: Final[int] + SDL_JOYSTICK_TYPE_ARCADE_PAD: Final[int] + SDL_JOYSTICK_TYPE_ARCADE_STICK: Final[int] + SDL_JOYSTICK_TYPE_COUNT: Final[int] + SDL_JOYSTICK_TYPE_DANCE_PAD: Final[int] + SDL_JOYSTICK_TYPE_DRUM_KIT: Final[int] + SDL_JOYSTICK_TYPE_FLIGHT_STICK: Final[int] + SDL_JOYSTICK_TYPE_GAMEPAD: Final[int] + SDL_JOYSTICK_TYPE_GUITAR: Final[int] + SDL_JOYSTICK_TYPE_THROTTLE: Final[int] + SDL_JOYSTICK_TYPE_UNKNOWN: Final[int] + SDL_JOYSTICK_TYPE_WHEEL: Final[int] + SDL_KMOD_ALT: Final[int] + SDL_KMOD_CAPS: Final[int] + SDL_KMOD_CTRL: Final[int] + SDL_KMOD_GUI: Final[int] + SDL_KMOD_LALT: Final[int] + SDL_KMOD_LCTRL: Final[int] + SDL_KMOD_LEVEL5: Final[int] + SDL_KMOD_LGUI: Final[int] + SDL_KMOD_LSHIFT: Final[int] + SDL_KMOD_MODE: Final[int] + SDL_KMOD_NONE: Final[int] + SDL_KMOD_NUM: Final[int] + SDL_KMOD_RALT: Final[int] + SDL_KMOD_RCTRL: Final[int] + SDL_KMOD_RGUI: Final[int] + SDL_KMOD_RSHIFT: Final[int] + SDL_KMOD_SCROLL: Final[int] + SDL_KMOD_SHIFT: Final[int] + SDL_LIL_ENDIAN: Final[int] + SDL_LOGICAL_PRESENTATION_DISABLED: Final[int] + SDL_LOGICAL_PRESENTATION_INTEGER_SCALE: Final[int] + SDL_LOGICAL_PRESENTATION_LETTERBOX: Final[int] + SDL_LOGICAL_PRESENTATION_OVERSCAN: Final[int] + SDL_LOGICAL_PRESENTATION_STRETCH: Final[int] + SDL_LOG_CATEGORY_APPLICATION: Final[int] + SDL_LOG_CATEGORY_ASSERT: Final[int] + SDL_LOG_CATEGORY_AUDIO: Final[int] + SDL_LOG_CATEGORY_CUSTOM: Final[int] + SDL_LOG_CATEGORY_ERROR: Final[int] + SDL_LOG_CATEGORY_GPU: Final[int] + SDL_LOG_CATEGORY_INPUT: Final[int] + SDL_LOG_CATEGORY_RENDER: Final[int] + SDL_LOG_CATEGORY_RESERVED10: Final[int] + SDL_LOG_CATEGORY_RESERVED2: Final[int] + SDL_LOG_CATEGORY_RESERVED3: Final[int] + SDL_LOG_CATEGORY_RESERVED4: Final[int] + SDL_LOG_CATEGORY_RESERVED5: Final[int] + SDL_LOG_CATEGORY_RESERVED6: Final[int] + SDL_LOG_CATEGORY_RESERVED7: Final[int] + SDL_LOG_CATEGORY_RESERVED8: Final[int] + SDL_LOG_CATEGORY_RESERVED9: Final[int] + SDL_LOG_CATEGORY_SYSTEM: Final[int] + SDL_LOG_CATEGORY_TEST: Final[int] + SDL_LOG_CATEGORY_VIDEO: Final[int] + SDL_LOG_PRIORITY_COUNT: Final[int] + SDL_LOG_PRIORITY_CRITICAL: Final[int] + SDL_LOG_PRIORITY_DEBUG: Final[int] + SDL_LOG_PRIORITY_ERROR: Final[int] + SDL_LOG_PRIORITY_INFO: Final[int] + SDL_LOG_PRIORITY_INVALID: Final[int] + SDL_LOG_PRIORITY_TRACE: Final[int] + SDL_LOG_PRIORITY_VERBOSE: Final[int] + SDL_LOG_PRIORITY_WARN: Final[int] + SDL_MAJOR_VERSION: Final[int] + SDL_MATRIX_COEFFICIENTS_BT2020_CL: Final[Literal[10]] = 10 + SDL_MATRIX_COEFFICIENTS_BT2020_NCL: Final[Literal[9]] = 9 + SDL_MATRIX_COEFFICIENTS_BT470BG: Final[Literal[5]] = 5 + SDL_MATRIX_COEFFICIENTS_BT601: Final[Literal[6]] = 6 + SDL_MATRIX_COEFFICIENTS_BT709: Final[Literal[1]] = 1 + SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL: Final[Literal[13]] = 13 + SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: Final[Literal[12]] = 12 + SDL_MATRIX_COEFFICIENTS_CUSTOM: Final[Literal[31]] = 31 + SDL_MATRIX_COEFFICIENTS_FCC: Final[Literal[4]] = 4 + SDL_MATRIX_COEFFICIENTS_ICTCP: Final[Literal[14]] = 14 + SDL_MATRIX_COEFFICIENTS_IDENTITY: Final[Literal[0]] = 0 + SDL_MATRIX_COEFFICIENTS_SMPTE2085: Final[Literal[11]] = 11 + SDL_MATRIX_COEFFICIENTS_SMPTE240: Final[Literal[7]] = 7 + SDL_MATRIX_COEFFICIENTS_UNSPECIFIED: Final[Literal[2]] = 2 + SDL_MATRIX_COEFFICIENTS_YCGCO: Final[Literal[8]] = 8 + SDL_MAX_SINT16: Final[int] + SDL_MAX_SINT32: Final[int] + SDL_MAX_SINT64: Final[int] + SDL_MAX_SINT8: Final[int] + SDL_MAX_TIME: Final[int] + SDL_MAX_UINT16: Final[int] + SDL_MAX_UINT32: Final[int] + SDL_MAX_UINT64: Final[int] + SDL_MAX_UINT8: Final[int] + SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT: Final[int] + SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT: Final[int] + SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT: Final[int] + SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT: Final[int] + SDL_MESSAGEBOX_COLOR_BACKGROUND: Final[int] + SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND: Final[int] + SDL_MESSAGEBOX_COLOR_BUTTON_BORDER: Final[int] + SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED: Final[int] + SDL_MESSAGEBOX_COLOR_COUNT: Final[int] + SDL_MESSAGEBOX_COLOR_TEXT: Final[int] + SDL_MESSAGEBOX_ERROR: Final[int] + SDL_MESSAGEBOX_INFORMATION: Final[int] + SDL_MESSAGEBOX_WARNING: Final[int] + SDL_MICRO_VERSION: Final[int] + SDL_MINOR_VERSION: Final[int] + SDL_MIN_SINT16: Final[int] + SDL_MIN_SINT32: Final[int] + SDL_MIN_SINT64: Final[int] + SDL_MIN_SINT8: Final[int] + SDL_MIN_TIME: Final[int] + SDL_MIN_UINT16: Final[int] + SDL_MIN_UINT32: Final[int] + SDL_MIN_UINT64: Final[int] + SDL_MIN_UINT8: Final[int] + SDL_MOUSEWHEEL_FLIPPED: Final[int] + SDL_MOUSEWHEEL_NORMAL: Final[int] + SDL_MOUSE_TOUCHID: Final[int] + SDL_MS_PER_SECOND: Final[int] + SDL_NS_PER_MS: Final[int] + SDL_NS_PER_SECOND: Final[int] + SDL_NS_PER_US: Final[int] + SDL_NULL_WHILE_LOOP_CONDITION: Final[int] + SDL_ORIENTATION_LANDSCAPE: Final[int] + SDL_ORIENTATION_LANDSCAPE_FLIPPED: Final[int] + SDL_ORIENTATION_PORTRAIT: Final[int] + SDL_ORIENTATION_PORTRAIT_FLIPPED: Final[int] + SDL_ORIENTATION_UNKNOWN: Final[int] + SDL_PACKEDLAYOUT_1010102: Final[int] + SDL_PACKEDLAYOUT_1555: Final[int] + SDL_PACKEDLAYOUT_2101010: Final[int] + SDL_PACKEDLAYOUT_332: Final[int] + SDL_PACKEDLAYOUT_4444: Final[int] + SDL_PACKEDLAYOUT_5551: Final[int] + SDL_PACKEDLAYOUT_565: Final[int] + SDL_PACKEDLAYOUT_8888: Final[int] + SDL_PACKEDLAYOUT_NONE: Final[int] + SDL_PACKEDORDER_ABGR: Final[int] + SDL_PACKEDORDER_ARGB: Final[int] + SDL_PACKEDORDER_BGRA: Final[int] + SDL_PACKEDORDER_BGRX: Final[int] + SDL_PACKEDORDER_NONE: Final[int] + SDL_PACKEDORDER_RGBA: Final[int] + SDL_PACKEDORDER_RGBX: Final[int] + SDL_PACKEDORDER_XBGR: Final[int] + SDL_PACKEDORDER_XRGB: Final[int] + SDL_PATHTYPE_DIRECTORY: Final[int] + SDL_PATHTYPE_FILE: Final[int] + SDL_PATHTYPE_NONE: Final[int] + SDL_PATHTYPE_OTHER: Final[int] + SDL_PEEKEVENT: Final[int] + SDL_PEN_AXIS_COUNT: Final[int] + SDL_PEN_AXIS_DISTANCE: Final[int] + SDL_PEN_AXIS_PRESSURE: Final[int] + SDL_PEN_AXIS_ROTATION: Final[int] + SDL_PEN_AXIS_SLIDER: Final[int] + SDL_PEN_AXIS_TANGENTIAL_PRESSURE: Final[int] + SDL_PEN_AXIS_XTILT: Final[int] + SDL_PEN_AXIS_YTILT: Final[int] + SDL_PEN_INPUT_BUTTON_1: Final[int] + SDL_PEN_INPUT_BUTTON_2: Final[int] + SDL_PEN_INPUT_BUTTON_3: Final[int] + SDL_PEN_INPUT_BUTTON_4: Final[int] + SDL_PEN_INPUT_BUTTON_5: Final[int] + SDL_PEN_INPUT_DOWN: Final[int] + SDL_PEN_INPUT_ERASER_TIP: Final[int] + SDL_PEN_MOUSEID: Final[int] + SDL_PEN_TOUCHID: Final[int] + SDL_PIXELFORMAT_ABGR128_FLOAT: int + SDL_PIXELFORMAT_ABGR1555: int + SDL_PIXELFORMAT_ABGR2101010: int + SDL_PIXELFORMAT_ABGR32: int + SDL_PIXELFORMAT_ABGR4444: int + SDL_PIXELFORMAT_ABGR64: int + SDL_PIXELFORMAT_ABGR64_FLOAT: int + SDL_PIXELFORMAT_ABGR8888: int + SDL_PIXELFORMAT_ARGB128_FLOAT: int + SDL_PIXELFORMAT_ARGB1555: int + SDL_PIXELFORMAT_ARGB2101010: int + SDL_PIXELFORMAT_ARGB32: int + SDL_PIXELFORMAT_ARGB4444: int + SDL_PIXELFORMAT_ARGB64: int + SDL_PIXELFORMAT_ARGB64_FLOAT: int + SDL_PIXELFORMAT_ARGB8888: int + SDL_PIXELFORMAT_BGR24: int + SDL_PIXELFORMAT_BGR48: int + SDL_PIXELFORMAT_BGR48_FLOAT: int + SDL_PIXELFORMAT_BGR565: int + SDL_PIXELFORMAT_BGR96_FLOAT: int + SDL_PIXELFORMAT_BGRA128_FLOAT: int + SDL_PIXELFORMAT_BGRA32: int + SDL_PIXELFORMAT_BGRA4444: int + SDL_PIXELFORMAT_BGRA5551: int + SDL_PIXELFORMAT_BGRA64: int + SDL_PIXELFORMAT_BGRA64_FLOAT: int + SDL_PIXELFORMAT_BGRA8888: int + SDL_PIXELFORMAT_BGRX32: int + SDL_PIXELFORMAT_BGRX8888: int + SDL_PIXELFORMAT_EXTERNAL_OES: int + SDL_PIXELFORMAT_INDEX1LSB: int + SDL_PIXELFORMAT_INDEX1MSB: int + SDL_PIXELFORMAT_INDEX2LSB: int + SDL_PIXELFORMAT_INDEX2MSB: int + SDL_PIXELFORMAT_INDEX4LSB: int + SDL_PIXELFORMAT_INDEX4MSB: int + SDL_PIXELFORMAT_INDEX8: int + SDL_PIXELFORMAT_IYUV: int + SDL_PIXELFORMAT_MJPG: int + SDL_PIXELFORMAT_NV12: int + SDL_PIXELFORMAT_NV21: int + SDL_PIXELFORMAT_P010: int + SDL_PIXELFORMAT_RGB24: int + SDL_PIXELFORMAT_RGB332: int + SDL_PIXELFORMAT_RGB48: int + SDL_PIXELFORMAT_RGB48_FLOAT: int + SDL_PIXELFORMAT_RGB565: int + SDL_PIXELFORMAT_RGB96_FLOAT: int + SDL_PIXELFORMAT_RGBA128_FLOAT: int + SDL_PIXELFORMAT_RGBA32: int + SDL_PIXELFORMAT_RGBA4444: int + SDL_PIXELFORMAT_RGBA5551: int + SDL_PIXELFORMAT_RGBA64: int + SDL_PIXELFORMAT_RGBA64_FLOAT: int + SDL_PIXELFORMAT_RGBA8888: int + SDL_PIXELFORMAT_RGBX32: int + SDL_PIXELFORMAT_RGBX8888: int + SDL_PIXELFORMAT_UNKNOWN: int + SDL_PIXELFORMAT_UYVY: int + SDL_PIXELFORMAT_XBGR1555: int + SDL_PIXELFORMAT_XBGR2101010: int + SDL_PIXELFORMAT_XBGR32: int + SDL_PIXELFORMAT_XBGR4444: int + SDL_PIXELFORMAT_XBGR8888: int + SDL_PIXELFORMAT_XRGB1555: int + SDL_PIXELFORMAT_XRGB2101010: int + SDL_PIXELFORMAT_XRGB32: int + SDL_PIXELFORMAT_XRGB4444: int + SDL_PIXELFORMAT_XRGB8888: int + SDL_PIXELFORMAT_YUY2: int + SDL_PIXELFORMAT_YV12: int + SDL_PIXELFORMAT_YVYU: int + SDL_PIXELTYPE_ARRAYF16: Final[int] + SDL_PIXELTYPE_ARRAYF32: Final[int] + SDL_PIXELTYPE_ARRAYU16: Final[int] + SDL_PIXELTYPE_ARRAYU32: Final[int] + SDL_PIXELTYPE_ARRAYU8: Final[int] + SDL_PIXELTYPE_INDEX1: Final[int] + SDL_PIXELTYPE_INDEX2: Final[int] + SDL_PIXELTYPE_INDEX4: Final[int] + SDL_PIXELTYPE_INDEX8: Final[int] + SDL_PIXELTYPE_PACKED16: Final[int] + SDL_PIXELTYPE_PACKED32: Final[int] + SDL_PIXELTYPE_PACKED8: Final[int] + SDL_PIXELTYPE_UNKNOWN: Final[int] + SDL_POWERSTATE_CHARGED: Final[int] + SDL_POWERSTATE_CHARGING: Final[int] + SDL_POWERSTATE_ERROR: Final[Literal[-1]] = -1 + SDL_POWERSTATE_NO_BATTERY: Final[int] + SDL_POWERSTATE_ON_BATTERY: Final[int] + SDL_POWERSTATE_UNKNOWN: Final[int] + SDL_PROCESS_STDIO_APP: Final[int] + SDL_PROCESS_STDIO_INHERITED: Final[int] + SDL_PROCESS_STDIO_NULL: Final[int] + SDL_PROCESS_STDIO_REDIRECT: Final[int] + SDL_PROPERTY_TYPE_BOOLEAN: Final[int] + SDL_PROPERTY_TYPE_FLOAT: Final[int] + SDL_PROPERTY_TYPE_INVALID: Final[int] + SDL_PROPERTY_TYPE_NUMBER: Final[int] + SDL_PROPERTY_TYPE_POINTER: Final[int] + SDL_PROPERTY_TYPE_STRING: Final[int] + SDL_RENDERER_VSYNC_ADAPTIVE: Final[int] + SDL_RENDERER_VSYNC_DISABLED: Final[int] + SDL_SANDBOX_FLATPAK: Final[int] + SDL_SANDBOX_MACOS: Final[int] + SDL_SANDBOX_NONE: Final[Literal[0]] = 0 + SDL_SANDBOX_SNAP: Final[int] + SDL_SANDBOX_UNKNOWN_CONTAINER: Final[int] + SDL_SCALEMODE_INVALID: Final[Literal[-1]] = -1 + SDL_SCALEMODE_LINEAR: Final[int] + SDL_SCALEMODE_NEAREST: Final[int] + SDL_SCANCODE_0: Final[Literal[39]] = 39 + SDL_SCANCODE_1: Final[Literal[30]] = 30 + SDL_SCANCODE_2: Final[Literal[31]] = 31 + SDL_SCANCODE_3: Final[Literal[32]] = 32 + SDL_SCANCODE_4: Final[Literal[33]] = 33 + SDL_SCANCODE_5: Final[Literal[34]] = 34 + SDL_SCANCODE_6: Final[Literal[35]] = 35 + SDL_SCANCODE_7: Final[Literal[36]] = 36 + SDL_SCANCODE_8: Final[Literal[37]] = 37 + SDL_SCANCODE_9: Final[Literal[38]] = 38 + SDL_SCANCODE_A: Final[Literal[4]] = 4 + SDL_SCANCODE_AC_BACK: Final[Literal[282]] = 282 + SDL_SCANCODE_AC_BOOKMARKS: Final[Literal[286]] = 286 + SDL_SCANCODE_AC_CLOSE: Final[Literal[275]] = 275 + SDL_SCANCODE_AC_EXIT: Final[Literal[276]] = 276 + SDL_SCANCODE_AC_FORWARD: Final[Literal[283]] = 283 + SDL_SCANCODE_AC_HOME: Final[Literal[281]] = 281 + SDL_SCANCODE_AC_NEW: Final[Literal[273]] = 273 + SDL_SCANCODE_AC_OPEN: Final[Literal[274]] = 274 + SDL_SCANCODE_AC_PRINT: Final[Literal[278]] = 278 + SDL_SCANCODE_AC_PROPERTIES: Final[Literal[279]] = 279 + SDL_SCANCODE_AC_REFRESH: Final[Literal[285]] = 285 + SDL_SCANCODE_AC_SAVE: Final[Literal[277]] = 277 + SDL_SCANCODE_AC_SEARCH: Final[Literal[280]] = 280 + SDL_SCANCODE_AC_STOP: Final[Literal[284]] = 284 + SDL_SCANCODE_AGAIN: Final[Literal[121]] = 121 + SDL_SCANCODE_ALTERASE: Final[Literal[153]] = 153 + SDL_SCANCODE_APOSTROPHE: Final[Literal[52]] = 52 + SDL_SCANCODE_APPLICATION: Final[Literal[101]] = 101 + SDL_SCANCODE_B: Final[Literal[5]] = 5 + SDL_SCANCODE_BACKSLASH: Final[Literal[49]] = 49 + SDL_SCANCODE_BACKSPACE: Final[Literal[42]] = 42 + SDL_SCANCODE_C: Final[Literal[6]] = 6 + SDL_SCANCODE_CALL: Final[Literal[289]] = 289 + SDL_SCANCODE_CANCEL: Final[Literal[155]] = 155 + SDL_SCANCODE_CAPSLOCK: Final[Literal[57]] = 57 + SDL_SCANCODE_CHANNEL_DECREMENT: Final[Literal[261]] = 261 + SDL_SCANCODE_CHANNEL_INCREMENT: Final[Literal[260]] = 260 + SDL_SCANCODE_CLEAR: Final[Literal[156]] = 156 + SDL_SCANCODE_CLEARAGAIN: Final[Literal[162]] = 162 + SDL_SCANCODE_COMMA: Final[Literal[54]] = 54 + SDL_SCANCODE_COPY: Final[Literal[124]] = 124 + SDL_SCANCODE_COUNT: Final[Literal[512]] = 512 + SDL_SCANCODE_CRSEL: Final[Literal[163]] = 163 + SDL_SCANCODE_CURRENCYSUBUNIT: Final[Literal[181]] = 181 + SDL_SCANCODE_CURRENCYUNIT: Final[Literal[180]] = 180 + SDL_SCANCODE_CUT: Final[Literal[123]] = 123 + SDL_SCANCODE_D: Final[Literal[7]] = 7 + SDL_SCANCODE_DECIMALSEPARATOR: Final[Literal[179]] = 179 + SDL_SCANCODE_DELETE: Final[Literal[76]] = 76 + SDL_SCANCODE_DOWN: Final[Literal[81]] = 81 + SDL_SCANCODE_E: Final[Literal[8]] = 8 + SDL_SCANCODE_END: Final[Literal[77]] = 77 + SDL_SCANCODE_ENDCALL: Final[Literal[290]] = 290 + SDL_SCANCODE_EQUALS: Final[Literal[46]] = 46 + SDL_SCANCODE_ESCAPE: Final[Literal[41]] = 41 + SDL_SCANCODE_EXECUTE: Final[Literal[116]] = 116 + SDL_SCANCODE_EXSEL: Final[Literal[164]] = 164 + SDL_SCANCODE_F10: Final[Literal[67]] = 67 + SDL_SCANCODE_F11: Final[Literal[68]] = 68 + SDL_SCANCODE_F12: Final[Literal[69]] = 69 + SDL_SCANCODE_F13: Final[Literal[104]] = 104 + SDL_SCANCODE_F14: Final[Literal[105]] = 105 + SDL_SCANCODE_F15: Final[Literal[106]] = 106 + SDL_SCANCODE_F16: Final[Literal[107]] = 107 + SDL_SCANCODE_F17: Final[Literal[108]] = 108 + SDL_SCANCODE_F18: Final[Literal[109]] = 109 + SDL_SCANCODE_F19: Final[Literal[110]] = 110 + SDL_SCANCODE_F1: Final[Literal[58]] = 58 + SDL_SCANCODE_F20: Final[Literal[111]] = 111 + SDL_SCANCODE_F21: Final[Literal[112]] = 112 + SDL_SCANCODE_F22: Final[Literal[113]] = 113 + SDL_SCANCODE_F23: Final[Literal[114]] = 114 + SDL_SCANCODE_F24: Final[Literal[115]] = 115 + SDL_SCANCODE_F2: Final[Literal[59]] = 59 + SDL_SCANCODE_F3: Final[Literal[60]] = 60 + SDL_SCANCODE_F4: Final[Literal[61]] = 61 + SDL_SCANCODE_F5: Final[Literal[62]] = 62 + SDL_SCANCODE_F6: Final[Literal[63]] = 63 + SDL_SCANCODE_F7: Final[Literal[64]] = 64 + SDL_SCANCODE_F8: Final[Literal[65]] = 65 + SDL_SCANCODE_F9: Final[Literal[66]] = 66 + SDL_SCANCODE_F: Final[Literal[9]] = 9 + SDL_SCANCODE_FIND: Final[Literal[126]] = 126 + SDL_SCANCODE_G: Final[Literal[10]] = 10 + SDL_SCANCODE_GRAVE: Final[Literal[53]] = 53 + SDL_SCANCODE_H: Final[Literal[11]] = 11 + SDL_SCANCODE_HELP: Final[Literal[117]] = 117 + SDL_SCANCODE_HOME: Final[Literal[74]] = 74 + SDL_SCANCODE_I: Final[Literal[12]] = 12 + SDL_SCANCODE_INSERT: Final[Literal[73]] = 73 + SDL_SCANCODE_INTERNATIONAL1: Final[Literal[135]] = 135 + SDL_SCANCODE_INTERNATIONAL2: Final[Literal[136]] = 136 + SDL_SCANCODE_INTERNATIONAL3: Final[Literal[137]] = 137 + SDL_SCANCODE_INTERNATIONAL4: Final[Literal[138]] = 138 + SDL_SCANCODE_INTERNATIONAL5: Final[Literal[139]] = 139 + SDL_SCANCODE_INTERNATIONAL6: Final[Literal[140]] = 140 + SDL_SCANCODE_INTERNATIONAL7: Final[Literal[141]] = 141 + SDL_SCANCODE_INTERNATIONAL8: Final[Literal[142]] = 142 + SDL_SCANCODE_INTERNATIONAL9: Final[Literal[143]] = 143 + SDL_SCANCODE_J: Final[Literal[13]] = 13 + SDL_SCANCODE_K: Final[Literal[14]] = 14 + SDL_SCANCODE_KP_000: Final[Literal[177]] = 177 + SDL_SCANCODE_KP_00: Final[Literal[176]] = 176 + SDL_SCANCODE_KP_0: Final[Literal[98]] = 98 + SDL_SCANCODE_KP_1: Final[Literal[89]] = 89 + SDL_SCANCODE_KP_2: Final[Literal[90]] = 90 + SDL_SCANCODE_KP_3: Final[Literal[91]] = 91 + SDL_SCANCODE_KP_4: Final[Literal[92]] = 92 + SDL_SCANCODE_KP_5: Final[Literal[93]] = 93 + SDL_SCANCODE_KP_6: Final[Literal[94]] = 94 + SDL_SCANCODE_KP_7: Final[Literal[95]] = 95 + SDL_SCANCODE_KP_8: Final[Literal[96]] = 96 + SDL_SCANCODE_KP_9: Final[Literal[97]] = 97 + SDL_SCANCODE_KP_A: Final[Literal[188]] = 188 + SDL_SCANCODE_KP_AMPERSAND: Final[Literal[199]] = 199 + SDL_SCANCODE_KP_AT: Final[Literal[206]] = 206 + SDL_SCANCODE_KP_B: Final[Literal[189]] = 189 + SDL_SCANCODE_KP_BACKSPACE: Final[Literal[187]] = 187 + SDL_SCANCODE_KP_BINARY: Final[Literal[218]] = 218 + SDL_SCANCODE_KP_C: Final[Literal[190]] = 190 + SDL_SCANCODE_KP_CLEAR: Final[Literal[216]] = 216 + SDL_SCANCODE_KP_CLEARENTRY: Final[Literal[217]] = 217 + SDL_SCANCODE_KP_COLON: Final[Literal[203]] = 203 + SDL_SCANCODE_KP_COMMA: Final[Literal[133]] = 133 + SDL_SCANCODE_KP_D: Final[Literal[191]] = 191 + SDL_SCANCODE_KP_DBLAMPERSAND: Final[Literal[200]] = 200 + SDL_SCANCODE_KP_DBLVERTICALBAR: Final[Literal[202]] = 202 + SDL_SCANCODE_KP_DECIMAL: Final[Literal[220]] = 220 + SDL_SCANCODE_KP_DIVIDE: Final[Literal[84]] = 84 + SDL_SCANCODE_KP_E: Final[Literal[192]] = 192 + SDL_SCANCODE_KP_ENTER: Final[Literal[88]] = 88 + SDL_SCANCODE_KP_EQUALS: Final[Literal[103]] = 103 + SDL_SCANCODE_KP_EQUALSAS400: Final[Literal[134]] = 134 + SDL_SCANCODE_KP_EXCLAM: Final[Literal[207]] = 207 + SDL_SCANCODE_KP_F: Final[Literal[193]] = 193 + SDL_SCANCODE_KP_GREATER: Final[Literal[198]] = 198 + SDL_SCANCODE_KP_HASH: Final[Literal[204]] = 204 + SDL_SCANCODE_KP_HEXADECIMAL: Final[Literal[221]] = 221 + SDL_SCANCODE_KP_LEFTBRACE: Final[Literal[184]] = 184 + SDL_SCANCODE_KP_LEFTPAREN: Final[Literal[182]] = 182 + SDL_SCANCODE_KP_LESS: Final[Literal[197]] = 197 + SDL_SCANCODE_KP_MEMADD: Final[Literal[211]] = 211 + SDL_SCANCODE_KP_MEMCLEAR: Final[Literal[210]] = 210 + SDL_SCANCODE_KP_MEMDIVIDE: Final[Literal[214]] = 214 + SDL_SCANCODE_KP_MEMMULTIPLY: Final[Literal[213]] = 213 + SDL_SCANCODE_KP_MEMRECALL: Final[Literal[209]] = 209 + SDL_SCANCODE_KP_MEMSTORE: Final[Literal[208]] = 208 + SDL_SCANCODE_KP_MEMSUBTRACT: Final[Literal[212]] = 212 + SDL_SCANCODE_KP_MINUS: Final[Literal[86]] = 86 + SDL_SCANCODE_KP_MULTIPLY: Final[Literal[85]] = 85 + SDL_SCANCODE_KP_OCTAL: Final[Literal[219]] = 219 + SDL_SCANCODE_KP_PERCENT: Final[Literal[196]] = 196 + SDL_SCANCODE_KP_PERIOD: Final[Literal[99]] = 99 + SDL_SCANCODE_KP_PLUS: Final[Literal[87]] = 87 + SDL_SCANCODE_KP_PLUSMINUS: Final[Literal[215]] = 215 + SDL_SCANCODE_KP_POWER: Final[Literal[195]] = 195 + SDL_SCANCODE_KP_RIGHTBRACE: Final[Literal[185]] = 185 + SDL_SCANCODE_KP_RIGHTPAREN: Final[Literal[183]] = 183 + SDL_SCANCODE_KP_SPACE: Final[Literal[205]] = 205 + SDL_SCANCODE_KP_TAB: Final[Literal[186]] = 186 + SDL_SCANCODE_KP_VERTICALBAR: Final[Literal[201]] = 201 + SDL_SCANCODE_KP_XOR: Final[Literal[194]] = 194 + SDL_SCANCODE_L: Final[Literal[15]] = 15 + SDL_SCANCODE_LALT: Final[Literal[226]] = 226 + SDL_SCANCODE_LANG1: Final[Literal[144]] = 144 + SDL_SCANCODE_LANG2: Final[Literal[145]] = 145 + SDL_SCANCODE_LANG3: Final[Literal[146]] = 146 + SDL_SCANCODE_LANG4: Final[Literal[147]] = 147 + SDL_SCANCODE_LANG5: Final[Literal[148]] = 148 + SDL_SCANCODE_LANG6: Final[Literal[149]] = 149 + SDL_SCANCODE_LANG7: Final[Literal[150]] = 150 + SDL_SCANCODE_LANG8: Final[Literal[151]] = 151 + SDL_SCANCODE_LANG9: Final[Literal[152]] = 152 + SDL_SCANCODE_LCTRL: Final[Literal[224]] = 224 + SDL_SCANCODE_LEFT: Final[Literal[80]] = 80 + SDL_SCANCODE_LEFTBRACKET: Final[Literal[47]] = 47 + SDL_SCANCODE_LGUI: Final[Literal[227]] = 227 + SDL_SCANCODE_LSHIFT: Final[Literal[225]] = 225 + SDL_SCANCODE_M: Final[Literal[16]] = 16 + SDL_SCANCODE_MEDIA_EJECT: Final[Literal[270]] = 270 + SDL_SCANCODE_MEDIA_FAST_FORWARD: Final[Literal[265]] = 265 + SDL_SCANCODE_MEDIA_NEXT_TRACK: Final[Literal[267]] = 267 + SDL_SCANCODE_MEDIA_PAUSE: Final[Literal[263]] = 263 + SDL_SCANCODE_MEDIA_PLAY: Final[Literal[262]] = 262 + SDL_SCANCODE_MEDIA_PLAY_PAUSE: Final[Literal[271]] = 271 + SDL_SCANCODE_MEDIA_PREVIOUS_TRACK: Final[Literal[268]] = 268 + SDL_SCANCODE_MEDIA_RECORD: Final[Literal[264]] = 264 + SDL_SCANCODE_MEDIA_REWIND: Final[Literal[266]] = 266 + SDL_SCANCODE_MEDIA_SELECT: Final[Literal[272]] = 272 + SDL_SCANCODE_MEDIA_STOP: Final[Literal[269]] = 269 + SDL_SCANCODE_MENU: Final[Literal[118]] = 118 + SDL_SCANCODE_MINUS: Final[Literal[45]] = 45 + SDL_SCANCODE_MODE: Final[Literal[257]] = 257 + SDL_SCANCODE_MUTE: Final[Literal[127]] = 127 + SDL_SCANCODE_N: Final[Literal[17]] = 17 + SDL_SCANCODE_NONUSBACKSLASH: Final[Literal[100]] = 100 + SDL_SCANCODE_NONUSHASH: Final[Literal[50]] = 50 + SDL_SCANCODE_NUMLOCKCLEAR: Final[Literal[83]] = 83 + SDL_SCANCODE_O: Final[Literal[18]] = 18 + SDL_SCANCODE_OPER: Final[Literal[161]] = 161 + SDL_SCANCODE_OUT: Final[Literal[160]] = 160 + SDL_SCANCODE_P: Final[Literal[19]] = 19 + SDL_SCANCODE_PAGEDOWN: Final[Literal[78]] = 78 + SDL_SCANCODE_PAGEUP: Final[Literal[75]] = 75 + SDL_SCANCODE_PASTE: Final[Literal[125]] = 125 + SDL_SCANCODE_PAUSE: Final[Literal[72]] = 72 + SDL_SCANCODE_PERIOD: Final[Literal[55]] = 55 + SDL_SCANCODE_POWER: Final[Literal[102]] = 102 + SDL_SCANCODE_PRINTSCREEN: Final[Literal[70]] = 70 + SDL_SCANCODE_PRIOR: Final[Literal[157]] = 157 + SDL_SCANCODE_Q: Final[Literal[20]] = 20 + SDL_SCANCODE_R: Final[Literal[21]] = 21 + SDL_SCANCODE_RALT: Final[Literal[230]] = 230 + SDL_SCANCODE_RCTRL: Final[Literal[228]] = 228 + SDL_SCANCODE_RESERVED: Final[Literal[400]] = 400 + SDL_SCANCODE_RETURN2: Final[Literal[158]] = 158 + SDL_SCANCODE_RETURN: Final[Literal[40]] = 40 + SDL_SCANCODE_RGUI: Final[Literal[231]] = 231 + SDL_SCANCODE_RIGHT: Final[Literal[79]] = 79 + SDL_SCANCODE_RIGHTBRACKET: Final[Literal[48]] = 48 + SDL_SCANCODE_RSHIFT: Final[Literal[229]] = 229 + SDL_SCANCODE_S: Final[Literal[22]] = 22 + SDL_SCANCODE_SCROLLLOCK: Final[Literal[71]] = 71 + SDL_SCANCODE_SELECT: Final[Literal[119]] = 119 + SDL_SCANCODE_SEMICOLON: Final[Literal[51]] = 51 + SDL_SCANCODE_SEPARATOR: Final[Literal[159]] = 159 + SDL_SCANCODE_SLASH: Final[Literal[56]] = 56 + SDL_SCANCODE_SLEEP: Final[Literal[258]] = 258 + SDL_SCANCODE_SOFTLEFT: Final[Literal[287]] = 287 + SDL_SCANCODE_SOFTRIGHT: Final[Literal[288]] = 288 + SDL_SCANCODE_SPACE: Final[Literal[44]] = 44 + SDL_SCANCODE_STOP: Final[Literal[120]] = 120 + SDL_SCANCODE_SYSREQ: Final[Literal[154]] = 154 + SDL_SCANCODE_T: Final[Literal[23]] = 23 + SDL_SCANCODE_TAB: Final[Literal[43]] = 43 + SDL_SCANCODE_THOUSANDSSEPARATOR: Final[Literal[178]] = 178 + SDL_SCANCODE_U: Final[Literal[24]] = 24 + SDL_SCANCODE_UNDO: Final[Literal[122]] = 122 + SDL_SCANCODE_UNKNOWN: Final[Literal[0]] = 0 + SDL_SCANCODE_UP: Final[Literal[82]] = 82 + SDL_SCANCODE_V: Final[Literal[25]] = 25 + SDL_SCANCODE_VOLUMEDOWN: Final[Literal[129]] = 129 + SDL_SCANCODE_VOLUMEUP: Final[Literal[128]] = 128 + SDL_SCANCODE_W: Final[Literal[26]] = 26 + SDL_SCANCODE_WAKE: Final[Literal[259]] = 259 + SDL_SCANCODE_X: Final[Literal[27]] = 27 + SDL_SCANCODE_Y: Final[Literal[28]] = 28 + SDL_SCANCODE_Z: Final[Literal[29]] = 29 + SDL_SENSOR_ACCEL: Final[int] + SDL_SENSOR_ACCEL_L: Final[int] + SDL_SENSOR_ACCEL_R: Final[int] + SDL_SENSOR_GYRO: Final[int] + SDL_SENSOR_GYRO_L: Final[int] + SDL_SENSOR_GYRO_R: Final[int] + SDL_SENSOR_INVALID: Final[Literal[-1]] = -1 + SDL_SENSOR_UNKNOWN: Final[int] + SDL_SIZE_MAX: Final[int] + SDL_SURFACE_LOCKED: Final[int] + SDL_SURFACE_LOCK_NEEDED: Final[int] + SDL_SURFACE_PREALLOCATED: Final[int] + SDL_SURFACE_SIMD_ALIGNED: Final[int] + SDL_SYSTEM_CURSOR_COUNT: Final[int] + SDL_SYSTEM_CURSOR_CROSSHAIR: Final[int] + SDL_SYSTEM_CURSOR_DEFAULT: Final[int] + SDL_SYSTEM_CURSOR_EW_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_E_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_MOVE: Final[int] + SDL_SYSTEM_CURSOR_NESW_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_NE_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_NOT_ALLOWED: Final[int] + SDL_SYSTEM_CURSOR_NS_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_NWSE_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_NW_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_N_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_POINTER: Final[int] + SDL_SYSTEM_CURSOR_PROGRESS: Final[int] + SDL_SYSTEM_CURSOR_SE_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_SW_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_S_RESIZE: Final[int] + SDL_SYSTEM_CURSOR_TEXT: Final[int] + SDL_SYSTEM_CURSOR_WAIT: Final[int] + SDL_SYSTEM_CURSOR_W_RESIZE: Final[int] + SDL_SYSTEM_THEME_DARK: Final[int] + SDL_SYSTEM_THEME_LIGHT: Final[int] + SDL_SYSTEM_THEME_UNKNOWN: Final[int] + SDL_TEXTINPUT_TYPE_NUMBER: Final[int] + SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN: Final[int] + SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE: Final[int] + SDL_TEXTINPUT_TYPE_TEXT: Final[int] + SDL_TEXTINPUT_TYPE_TEXT_EMAIL: Final[int] + SDL_TEXTINPUT_TYPE_TEXT_NAME: Final[int] + SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN: Final[int] + SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE: Final[int] + SDL_TEXTINPUT_TYPE_TEXT_USERNAME: Final[int] + SDL_TEXTUREACCESS_STATIC: Final[int] + SDL_TEXTUREACCESS_STREAMING: Final[int] + SDL_TEXTUREACCESS_TARGET: Final[int] + SDL_THREAD_ALIVE: Final[int] + SDL_THREAD_COMPLETE: Final[int] + SDL_THREAD_DETACHED: Final[int] + SDL_THREAD_PRIORITY_HIGH: Final[int] + SDL_THREAD_PRIORITY_LOW: Final[int] + SDL_THREAD_PRIORITY_NORMAL: Final[int] + SDL_THREAD_PRIORITY_TIME_CRITICAL: Final[int] + SDL_THREAD_UNKNOWN: Final[int] + SDL_TIME_FORMAT_12HR: Final[Literal[1]] = 1 + SDL_TIME_FORMAT_24HR: Final[Literal[0]] = 0 + SDL_TOUCH_DEVICE_DIRECT: Final[int] + SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE: Final[int] + SDL_TOUCH_DEVICE_INDIRECT_RELATIVE: Final[int] + SDL_TOUCH_DEVICE_INVALID: Final[Literal[-1]] = -1 + SDL_TOUCH_MOUSEID: Final[int] + SDL_TRANSFER_CHARACTERISTICS_BT1361: Final[Literal[12]] = 12 + SDL_TRANSFER_CHARACTERISTICS_BT2020_10BIT: Final[Literal[14]] = 14 + SDL_TRANSFER_CHARACTERISTICS_BT2020_12BIT: Final[Literal[15]] = 15 + SDL_TRANSFER_CHARACTERISTICS_BT601: Final[Literal[6]] = 6 + SDL_TRANSFER_CHARACTERISTICS_BT709: Final[Literal[1]] = 1 + SDL_TRANSFER_CHARACTERISTICS_CUSTOM: Final[Literal[31]] = 31 + SDL_TRANSFER_CHARACTERISTICS_GAMMA22: Final[Literal[4]] = 4 + SDL_TRANSFER_CHARACTERISTICS_GAMMA28: Final[Literal[5]] = 5 + SDL_TRANSFER_CHARACTERISTICS_HLG: Final[Literal[18]] = 18 + SDL_TRANSFER_CHARACTERISTICS_IEC61966: Final[Literal[11]] = 11 + SDL_TRANSFER_CHARACTERISTICS_LINEAR: Final[Literal[8]] = 8 + SDL_TRANSFER_CHARACTERISTICS_LOG100: Final[Literal[9]] = 9 + SDL_TRANSFER_CHARACTERISTICS_LOG100_SQRT10: Final[Literal[10]] = 10 + SDL_TRANSFER_CHARACTERISTICS_PQ: Final[Literal[16]] = 16 + SDL_TRANSFER_CHARACTERISTICS_SMPTE240: Final[Literal[7]] = 7 + SDL_TRANSFER_CHARACTERISTICS_SMPTE428: Final[Literal[17]] = 17 + SDL_TRANSFER_CHARACTERISTICS_SRGB: Final[Literal[13]] = 13 + SDL_TRANSFER_CHARACTERISTICS_UNKNOWN: Final[Literal[0]] = 0 + SDL_TRANSFER_CHARACTERISTICS_UNSPECIFIED: Final[Literal[2]] = 2 + SDL_TRAYENTRY_BUTTON: Final[int] + SDL_TRAYENTRY_CHECKBOX: Final[int] + SDL_TRAYENTRY_CHECKED: Final[int] + SDL_TRAYENTRY_DISABLED: Final[int] + SDL_TRAYENTRY_SUBMENU: Final[int] + SDL_US_PER_SECOND: Final[int] + SDL_VERSION: Final[int] + SDL_WINDOWPOS_CENTERED: Final[int] + SDL_WINDOWPOS_CENTERED_MASK: Final[int] + SDL_WINDOWPOS_UNDEFINED: Final[int] + SDL_WINDOWPOS_UNDEFINED_MASK: Final[int] + SDL_WINDOW_ALWAYS_ON_TOP: Final[int] + SDL_WINDOW_BORDERLESS: Final[int] + SDL_WINDOW_EXTERNAL: Final[int] + SDL_WINDOW_FULLSCREEN: Final[int] + SDL_WINDOW_HIDDEN: Final[int] + SDL_WINDOW_HIGH_PIXEL_DENSITY: Final[int] + SDL_WINDOW_INPUT_FOCUS: Final[int] + SDL_WINDOW_KEYBOARD_GRABBED: Final[int] + SDL_WINDOW_MAXIMIZED: Final[int] + SDL_WINDOW_METAL: Final[int] + SDL_WINDOW_MINIMIZED: Final[int] + SDL_WINDOW_MODAL: Final[int] + SDL_WINDOW_MOUSE_CAPTURE: Final[int] + SDL_WINDOW_MOUSE_FOCUS: Final[int] + SDL_WINDOW_MOUSE_GRABBED: Final[int] + SDL_WINDOW_MOUSE_RELATIVE_MODE: Final[int] + SDL_WINDOW_NOT_FOCUSABLE: Final[int] + SDL_WINDOW_OCCLUDED: Final[int] + SDL_WINDOW_OPENGL: Final[int] + SDL_WINDOW_POPUP_MENU: Final[int] + SDL_WINDOW_RESIZABLE: Final[int] + SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE: Final[int] + SDL_WINDOW_SURFACE_VSYNC_DISABLED: Final[int] + SDL_WINDOW_TOOLTIP: Final[int] + SDL_WINDOW_TRANSPARENT: Final[int] + SDL_WINDOW_UTILITY: Final[int] + SDL_WINDOW_VULKAN: Final[int] + TCODK_0: Final[int] + TCODK_1: Final[int] + TCODK_2: Final[int] + TCODK_3: Final[int] + TCODK_4: Final[int] + TCODK_5: Final[int] + TCODK_6: Final[int] + TCODK_7: Final[int] + TCODK_8: Final[int] + TCODK_9: Final[int] + TCODK_ALT: Final[int] + TCODK_APPS: Final[int] + TCODK_BACKSPACE: Final[int] + TCODK_CAPSLOCK: Final[int] + TCODK_CHAR: Final[int] + TCODK_CONTROL: Final[int] + TCODK_DELETE: Final[int] + TCODK_DOWN: Final[int] + TCODK_END: Final[int] + TCODK_ENTER: Final[int] + TCODK_ESCAPE: Final[int] + TCODK_F10: Final[int] + TCODK_F11: Final[int] + TCODK_F12: Final[int] + TCODK_F1: Final[int] + TCODK_F2: Final[int] + TCODK_F3: Final[int] + TCODK_F4: Final[int] + TCODK_F5: Final[int] + TCODK_F6: Final[int] + TCODK_F7: Final[int] + TCODK_F8: Final[int] + TCODK_F9: Final[int] + TCODK_HOME: Final[int] + TCODK_INSERT: Final[int] + TCODK_KP0: Final[int] + TCODK_KP1: Final[int] + TCODK_KP2: Final[int] + TCODK_KP3: Final[int] + TCODK_KP4: Final[int] + TCODK_KP5: Final[int] + TCODK_KP6: Final[int] + TCODK_KP7: Final[int] + TCODK_KP8: Final[int] + TCODK_KP9: Final[int] + TCODK_KPADD: Final[int] + TCODK_KPDEC: Final[int] + TCODK_KPDIV: Final[int] + TCODK_KPENTER: Final[int] + TCODK_KPMUL: Final[int] + TCODK_KPSUB: Final[int] + TCODK_LEFT: Final[int] + TCODK_LWIN: Final[int] + TCODK_NONE: Final[int] + TCODK_NUMLOCK: Final[int] + TCODK_PAGEDOWN: Final[int] + TCODK_PAGEUP: Final[int] + TCODK_PAUSE: Final[int] + TCODK_PRINTSCREEN: Final[int] + TCODK_RIGHT: Final[int] + TCODK_RWIN: Final[int] + TCODK_SCROLLLOCK: Final[int] + TCODK_SHIFT: Final[int] + TCODK_SPACE: Final[int] + TCODK_TAB: Final[int] + TCODK_TEXT: Final[int] + TCODK_UP: Final[int] + TCOD_BKGND_ADD: Final[int] + TCOD_BKGND_ADDA: Final[int] + TCOD_BKGND_ALPH: Final[int] + TCOD_BKGND_BURN: Final[int] + TCOD_BKGND_COLOR_BURN: Final[int] + TCOD_BKGND_COLOR_DODGE: Final[int] + TCOD_BKGND_DARKEN: Final[int] + TCOD_BKGND_DEFAULT: Final[int] + TCOD_BKGND_LIGHTEN: Final[int] + TCOD_BKGND_MULTIPLY: Final[int] + TCOD_BKGND_NONE: Final[int] + TCOD_BKGND_OVERLAY: Final[int] + TCOD_BKGND_SCREEN: Final[int] + TCOD_BKGND_SET: Final[int] + TCOD_CENTER: Final[int] + TCOD_CHAR_ARROW2_E: Final[Literal[16]] = 16 + TCOD_CHAR_ARROW2_N: Final[Literal[30]] = 30 + TCOD_CHAR_ARROW2_S: Final[Literal[31]] = 31 + TCOD_CHAR_ARROW2_W: Final[Literal[17]] = 17 + TCOD_CHAR_ARROW_E: Final[Literal[26]] = 26 + TCOD_CHAR_ARROW_N: Final[Literal[24]] = 24 + TCOD_CHAR_ARROW_S: Final[Literal[25]] = 25 + TCOD_CHAR_ARROW_W: Final[Literal[27]] = 27 + TCOD_CHAR_BLOCK1: Final[Literal[176]] = 176 + TCOD_CHAR_BLOCK2: Final[Literal[177]] = 177 + TCOD_CHAR_BLOCK3: Final[Literal[178]] = 178 + TCOD_CHAR_BULLET: Final[Literal[7]] = 7 + TCOD_CHAR_BULLET_INV: Final[Literal[8]] = 8 + TCOD_CHAR_BULLET_SQUARE: Final[Literal[254]] = 254 + TCOD_CHAR_CENT: Final[Literal[189]] = 189 + TCOD_CHAR_CHECKBOX_SET: Final[Literal[225]] = 225 + TCOD_CHAR_CHECKBOX_UNSET: Final[Literal[224]] = 224 + TCOD_CHAR_CLUB: Final[Literal[5]] = 5 + TCOD_CHAR_COPYRIGHT: Final[Literal[184]] = 184 + TCOD_CHAR_CROSS: Final[Literal[197]] = 197 + TCOD_CHAR_CURRENCY: Final[Literal[207]] = 207 + TCOD_CHAR_DARROW_H: Final[Literal[29]] = 29 + TCOD_CHAR_DARROW_V: Final[Literal[18]] = 18 + TCOD_CHAR_DCROSS: Final[Literal[206]] = 206 + TCOD_CHAR_DHLINE: Final[Literal[205]] = 205 + TCOD_CHAR_DIAMOND: Final[Literal[4]] = 4 + TCOD_CHAR_DIVISION: Final[Literal[246]] = 246 + TCOD_CHAR_DNE: Final[Literal[187]] = 187 + TCOD_CHAR_DNW: Final[Literal[201]] = 201 + TCOD_CHAR_DSE: Final[Literal[188]] = 188 + TCOD_CHAR_DSW: Final[Literal[200]] = 200 + TCOD_CHAR_DTEEE: Final[Literal[204]] = 204 + TCOD_CHAR_DTEEN: Final[Literal[202]] = 202 + TCOD_CHAR_DTEES: Final[Literal[203]] = 203 + TCOD_CHAR_DTEEW: Final[Literal[185]] = 185 + TCOD_CHAR_DVLINE: Final[Literal[186]] = 186 + TCOD_CHAR_EXCLAM_DOUBLE: Final[Literal[19]] = 19 + TCOD_CHAR_FEMALE: Final[Literal[12]] = 12 + TCOD_CHAR_FUNCTION: Final[Literal[159]] = 159 + TCOD_CHAR_GRADE: Final[Literal[248]] = 248 + TCOD_CHAR_HALF: Final[Literal[171]] = 171 + TCOD_CHAR_HEART: Final[Literal[3]] = 3 + TCOD_CHAR_HLINE: Final[Literal[196]] = 196 + TCOD_CHAR_LIGHT: Final[Literal[15]] = 15 + TCOD_CHAR_MALE: Final[Literal[11]] = 11 + TCOD_CHAR_MULTIPLICATION: Final[Literal[158]] = 158 + TCOD_CHAR_NE: Final[Literal[191]] = 191 + TCOD_CHAR_NOTE: Final[Literal[13]] = 13 + TCOD_CHAR_NOTE_DOUBLE: Final[Literal[14]] = 14 + TCOD_CHAR_NW: Final[Literal[218]] = 218 + TCOD_CHAR_ONE_QUARTER: Final[Literal[172]] = 172 + TCOD_CHAR_PILCROW: Final[Literal[20]] = 20 + TCOD_CHAR_POUND: Final[Literal[156]] = 156 + TCOD_CHAR_POW1: Final[Literal[251]] = 251 + TCOD_CHAR_POW2: Final[Literal[253]] = 253 + TCOD_CHAR_POW3: Final[Literal[252]] = 252 + TCOD_CHAR_RADIO_SET: Final[Literal[10]] = 10 + TCOD_CHAR_RADIO_UNSET: Final[Literal[9]] = 9 + TCOD_CHAR_RESERVED: Final[Literal[169]] = 169 + TCOD_CHAR_SE: Final[Literal[217]] = 217 + TCOD_CHAR_SECTION: Final[Literal[21]] = 21 + TCOD_CHAR_SMILIE: Final[Literal[1]] = 1 + TCOD_CHAR_SMILIE_INV: Final[Literal[2]] = 2 + TCOD_CHAR_SPADE: Final[Literal[6]] = 6 + TCOD_CHAR_SUBP_DIAG: Final[Literal[230]] = 230 + TCOD_CHAR_SUBP_E: Final[Literal[231]] = 231 + TCOD_CHAR_SUBP_N: Final[Literal[228]] = 228 + TCOD_CHAR_SUBP_NE: Final[Literal[227]] = 227 + TCOD_CHAR_SUBP_NW: Final[Literal[226]] = 226 + TCOD_CHAR_SUBP_SE: Final[Literal[229]] = 229 + TCOD_CHAR_SUBP_SW: Final[Literal[232]] = 232 + TCOD_CHAR_SW: Final[Literal[192]] = 192 + TCOD_CHAR_TEEE: Final[Literal[195]] = 195 + TCOD_CHAR_TEEN: Final[Literal[193]] = 193 + TCOD_CHAR_TEES: Final[Literal[194]] = 194 + TCOD_CHAR_TEEW: Final[Literal[180]] = 180 + TCOD_CHAR_THREE_QUARTERS: Final[Literal[243]] = 243 + TCOD_CHAR_UMLAUT: Final[Literal[249]] = 249 + TCOD_CHAR_VLINE: Final[Literal[179]] = 179 + TCOD_CHAR_YEN: Final[Literal[190]] = 190 + TCOD_COLCTRL_1: Final[Literal[1]] = 1 + TCOD_COLCTRL_2: Final[int] + TCOD_COLCTRL_3: Final[int] + TCOD_COLCTRL_4: Final[int] + TCOD_COLCTRL_5: Final[int] + TCOD_COLCTRL_BACK_RGB: Final[int] + TCOD_COLCTRL_FORE_RGB: Final[int] + TCOD_COLCTRL_NUMBER: Final[Literal[5]] = 5 + TCOD_COLCTRL_STOP: Final[int] + TCOD_COMPILEDVERSION: Final[int] + TCOD_DISTRIBUTION_GAUSSIAN: Final[int] + TCOD_DISTRIBUTION_GAUSSIAN_INVERSE: Final[int] + TCOD_DISTRIBUTION_GAUSSIAN_RANGE: Final[int] + TCOD_DISTRIBUTION_GAUSSIAN_RANGE_INVERSE: Final[int] + TCOD_DISTRIBUTION_LINEAR: Final[int] + TCOD_EVENT_ANY: Final[int] + TCOD_EVENT_FINGER: Final[int] + TCOD_EVENT_FINGER_MOVE: Final[Literal[32]] = 32 + TCOD_EVENT_FINGER_PRESS: Final[Literal[64]] = 64 + TCOD_EVENT_FINGER_RELEASE: Final[Literal[128]] = 128 + TCOD_EVENT_KEY: Final[int] + TCOD_EVENT_KEY_PRESS: Final[Literal[1]] = 1 + TCOD_EVENT_KEY_RELEASE: Final[Literal[2]] = 2 + TCOD_EVENT_MOUSE: Final[int] + TCOD_EVENT_MOUSE_MOVE: Final[Literal[4]] = 4 + TCOD_EVENT_MOUSE_PRESS: Final[Literal[8]] = 8 + TCOD_EVENT_MOUSE_RELEASE: Final[Literal[16]] = 16 + TCOD_EVENT_NONE: Final[Literal[0]] = 0 + TCOD_E_ERROR: Final[Literal[-1]] = -1 + TCOD_E_INVALID_ARGUMENT: Final[Literal[-2]] = -2 + TCOD_E_OK: Final[Literal[0]] = 0 + TCOD_E_OUT_OF_MEMORY: Final[Literal[-3]] = -3 + TCOD_E_REQUIRES_ATTENTION: Final[Literal[-4]] = -4 + TCOD_E_WARN: Final[Literal[1]] = 1 + TCOD_FALLBACK_FONT_SIZE: Final[Literal[16]] = 16 + TCOD_FONT_LAYOUT_ASCII_INCOL: Final[Literal[1]] = 1 + TCOD_FONT_LAYOUT_ASCII_INROW: Final[Literal[2]] = 2 + TCOD_FONT_LAYOUT_CP437: Final[Literal[16]] = 16 + TCOD_FONT_LAYOUT_TCOD: Final[Literal[8]] = 8 + TCOD_FONT_TYPE_GRAYSCALE: Final[Literal[4]] = 4 + TCOD_FONT_TYPE_GREYSCALE: Final[Literal[4]] = 4 + TCOD_KEY_PRESSED: Final[Literal[1]] = 1 + TCOD_KEY_RELEASED: Final[Literal[2]] = 2 + TCOD_KEY_TEXT_SIZE: Final[Literal[32]] = 32 + TCOD_LEFT: Final[int] + TCOD_LEX_CHAR: Final[Literal[7]] = 7 + TCOD_LEX_COMMENT: Final[Literal[9]] = 9 + TCOD_LEX_EOF: Final[Literal[8]] = 8 + TCOD_LEX_FLAG_NESTING_COMMENT: Final[Literal[2]] = 2 + TCOD_LEX_FLAG_NOCASE: Final[Literal[1]] = 1 + TCOD_LEX_FLAG_TOKENIZE_COMMENTS: Final[Literal[4]] = 4 + TCOD_LEX_FLOAT: Final[Literal[6]] = 6 + TCOD_LEX_IDEN: Final[Literal[3]] = 3 + TCOD_LEX_INTEGER: Final[Literal[5]] = 5 + TCOD_LEX_KEYWORD: Final[Literal[2]] = 2 + TCOD_LEX_KEYWORD_SIZE: Final[Literal[20]] = 20 + TCOD_LEX_MAX_KEYWORDS: Final[Literal[100]] = 100 + TCOD_LEX_MAX_SYMBOLS: Final[Literal[100]] = 100 + TCOD_LEX_STRING: Final[Literal[4]] = 4 + TCOD_LEX_SYMBOL: Final[Literal[1]] = 1 + TCOD_LEX_SYMBOL_SIZE: Final[Literal[5]] = 5 + TCOD_LEX_UNKNOWN: Final[Literal[0]] = 0 + TCOD_LOG_CRITICAL: Final[Literal[50]] = 50 + TCOD_LOG_DEBUG: Final[Literal[10]] = 10 + TCOD_LOG_ERROR: Final[Literal[40]] = 40 + TCOD_LOG_INFO: Final[Literal[20]] = 20 + TCOD_LOG_WARNING: Final[Literal[30]] = 30 + TCOD_MAJOR_VERSION: Final[Literal[2]] = 2 + TCOD_MINOR_VERSION: Final[Literal[1]] = 1 + TCOD_NB_RENDERERS: Final[int] + TCOD_NOISE_DEFAULT: Final[Literal[0]] = 0 + TCOD_NOISE_MAX_DIMENSIONS: Final[Literal[4]] = 4 + TCOD_NOISE_MAX_OCTAVES: Final[Literal[128]] = 128 + TCOD_NOISE_PERLIN: Final[Literal[1]] = 1 + TCOD_NOISE_SIMPLEX: Final[Literal[2]] = 2 + TCOD_NOISE_WAVELET: Final[Literal[4]] = 4 + TCOD_PATCHLEVEL: Final[Literal[1]] = 1 + TCOD_PATHFINDER_MAX_DIMENSIONS: Final[Literal[4]] = 4 + TCOD_RENDERER_GLSL: Final[int] + TCOD_RENDERER_OPENGL2: Final[int] + TCOD_RENDERER_OPENGL: Final[int] + TCOD_RENDERER_SDL2: Final[int] + TCOD_RENDERER_SDL: Final[int] + TCOD_RENDERER_XTERM: Final[int] + TCOD_RIGHT: Final[int] + TCOD_RNG_CMWC: Final[int] + TCOD_RNG_MT: Final[int] + TCOD_TYPE_BOOL: Final[int] + TCOD_TYPE_CHAR: Final[int] + TCOD_TYPE_COLOR: Final[int] + TCOD_TYPE_CUSTOM00: Final[int] + TCOD_TYPE_CUSTOM01: Final[int] + TCOD_TYPE_CUSTOM02: Final[int] + TCOD_TYPE_CUSTOM03: Final[int] + TCOD_TYPE_CUSTOM04: Final[int] + TCOD_TYPE_CUSTOM05: Final[int] + TCOD_TYPE_CUSTOM06: Final[int] + TCOD_TYPE_CUSTOM07: Final[int] + TCOD_TYPE_CUSTOM08: Final[int] + TCOD_TYPE_CUSTOM09: Final[int] + TCOD_TYPE_CUSTOM10: Final[int] + TCOD_TYPE_CUSTOM11: Final[int] + TCOD_TYPE_CUSTOM12: Final[int] + TCOD_TYPE_CUSTOM13: Final[int] + TCOD_TYPE_CUSTOM14: Final[int] + TCOD_TYPE_CUSTOM15: Final[int] + TCOD_TYPE_DICE: Final[int] + TCOD_TYPE_FLOAT: Final[int] + TCOD_TYPE_INT: Final[int] + TCOD_TYPE_LIST: Final[Literal[1024]] = 1024 + TCOD_TYPE_NONE: Final[int] + TCOD_TYPE_STRING: Final[int] + TCOD_TYPE_VALUELIST00: Final[int] + TCOD_TYPE_VALUELIST01: Final[int] + TCOD_TYPE_VALUELIST02: Final[int] + TCOD_TYPE_VALUELIST03: Final[int] + TCOD_TYPE_VALUELIST04: Final[int] + TCOD_TYPE_VALUELIST05: Final[int] + TCOD_TYPE_VALUELIST06: Final[int] + TCOD_TYPE_VALUELIST07: Final[int] + TCOD_TYPE_VALUELIST08: Final[int] + TCOD_TYPE_VALUELIST09: Final[int] + TCOD_TYPE_VALUELIST10: Final[int] + TCOD_TYPE_VALUELIST11: Final[int] + TCOD_TYPE_VALUELIST12: Final[int] + TCOD_TYPE_VALUELIST13: Final[int] + TCOD_TYPE_VALUELIST14: Final[int] + TCOD_TYPE_VALUELIST15: Final[int] + TCOD_ctx: Any + kNoiseImplementationFBM: Final[int] + kNoiseImplementationSimple: Final[int] + kNoiseImplementationTurbulence: Final[int] + np_float16: Final[int] + np_float32: Final[int] + np_float64: Final[int] + np_int16: Final[int] + np_int32: Final[int] + np_int64: Final[int] + np_int8: Final[int] + np_uint16: Final[int] + np_uint32: Final[int] + np_uint64: Final[int] + np_uint8: Final[int] + np_undefined: Final[Literal[0]] = 0 + +lib: _lib +ffi: Any diff --git a/tcod/cffi.py b/tcod/cffi.py index d1c93025..b0590d0e 100644 --- a/tcod/cffi.py +++ b/tcod/cffi.py @@ -15,17 +15,12 @@ __sdl_version__ = "" +REQUIRED_SDL_VERSION = (3, 2, 0) + ffi_check = cffi.FFI() ffi_check.cdef( """ -typedef struct SDL_version -{ - uint8_t major; - uint8_t minor; - uint8_t patch; -} SDL_version; - -void SDL_GetVersion(SDL_version * ver); +int SDL_GetVersion(void); """ ) @@ -33,11 +28,13 @@ def verify_dependencies() -> None: """Try to make sure dependencies exist on this system.""" if sys.platform == "win32": - lib_test: Any = ffi_check.dlopen("SDL2.dll") # Make sure SDL2.dll is here. - version: Any = ffi_check.new("struct SDL_version*") - lib_test.SDL_GetVersion(version) # Need to check this version. - version_tuple = version.major, version.minor, version.patch - if version_tuple < (2, 0, 5): + lib_test: Any = ffi_check.dlopen("SDL3.dll") # Make sure SDL3.dll is here. + int_version = lib_test.SDL_GetVersion() # Need to check this version. + major = int_version // 1000000 + minor = (int_version // 1000) % 1000 + patch = int_version % 1000 + version_tuple = major, minor, patch + if version_tuple < REQUIRED_SDL_VERSION: msg = f"Tried to load an old version of SDL {version_tuple!r}" raise RuntimeError(msg) @@ -48,9 +45,8 @@ def get_architecture() -> str: def get_sdl_version() -> str: - sdl_version = ffi.new("SDL_version*") - lib.SDL_GetVersion(sdl_version) - return f"{sdl_version.major}.{sdl_version.minor}.{sdl_version.patch}" + int_version = lib.SDL_GetVersion() + return f"{int_version // 1000000}.{(int_version // 1000) % 1000}.{int_version % 1000}" if sys.platform == "win32": diff --git a/tcod/color.py b/tcod/color.py index 61f18b49..9fc6f260 100644 --- a/tcod/color.py +++ b/tcod/color.py @@ -126,7 +126,7 @@ def __mul__(self, other: object) -> Color: """ if isinstance(other, (Color, list, tuple)): return Color._new_from_cdata(lib.TCOD_color_multiply(self, other)) - return Color._new_from_cdata(lib.TCOD_color_multiply_scalar(self, other)) + return Color._new_from_cdata(lib.TCOD_color_multiply_scalar(self, other)) # type: ignore[arg-type] def __repr__(self) -> str: """Return a printable representation of the current color.""" diff --git a/tcod/console.py b/tcod/console.py index ca9d4253..c4b24281 100644 --- a/tcod/console.py +++ b/tcod/console.py @@ -1516,9 +1516,9 @@ def recommended_size() -> tuple[int, int]: renderer = lib.TCOD_sys_get_sdl_renderer() with ffi.new("int[2]") as xy: if renderer: - lib.SDL_GetRendererOutputSize(renderer, xy, xy + 1) + lib.SDL_GetCurrentRenderOutputSize(renderer, xy, xy + 1) else: # Assume OpenGL if a renderer does not exist. - lib.SDL_GL_GetDrawableSize(window, xy, xy + 1) + lib.SDL_GetWindowSizeInPixels(window, xy, xy + 1) w = max(1, xy[0] // lib.TCOD_ctx.tileset.tile_width) h = max(1, xy[1] // lib.TCOD_ctx.tileset.tile_height) return w, h diff --git a/tcod/context.py b/tcod/context.py index f9d562ee..769f84d2 100644 --- a/tcod/context.py +++ b/tcod/context.py @@ -68,14 +68,9 @@ _Event = TypeVar("_Event", bound=tcod.event.Event) SDL_WINDOW_FULLSCREEN = lib.SDL_WINDOW_FULLSCREEN -"""Exclusive fullscreen mode. - -It's generally not recommended to use this flag unless you know what you're -doing. -`SDL_WINDOW_FULLSCREEN_DESKTOP` should be used instead whenever possible. -""" -SDL_WINDOW_FULLSCREEN_DESKTOP = lib.SDL_WINDOW_FULLSCREEN_DESKTOP -"""A borderless fullscreen window at the desktop resolution.""" +"""Fullscreen mode.""" +# SDL_WINDOW_FULLSCREEN_DESKTOP = lib.SDL_WINDOW_FULLSCREEN_DESKTOP +# """A borderless fullscreen window at the desktop resolution.""" SDL_WINDOW_HIDDEN = lib.SDL_WINDOW_HIDDEN """Window is hidden.""" SDL_WINDOW_BORDERLESS = lib.SDL_WINDOW_BORDERLESS @@ -86,9 +81,9 @@ """Window is minimized.""" SDL_WINDOW_MAXIMIZED = lib.SDL_WINDOW_MAXIMIZED """Window is maximized.""" -SDL_WINDOW_INPUT_GRABBED = lib.SDL_WINDOW_INPUT_GRABBED +SDL_WINDOW_INPUT_GRABBED = lib.SDL_WINDOW_MOUSE_GRABBED """Window has grabbed the input.""" -SDL_WINDOW_ALLOW_HIGHDPI = lib.SDL_WINDOW_ALLOW_HIGHDPI +SDL_WINDOW_ALLOW_HIGHDPI = lib.SDL_WINDOW_HIGH_PIXEL_DENSITY """High DPI mode, see the SDL documentation.""" RENDERER_OPENGL = lib.TCOD_RENDERER_OPENGL @@ -225,13 +220,14 @@ def present( ) _check(lib.TCOD_context_present(self._p, console.console_c, viewport_args)) - def pixel_to_tile(self, x: int, y: int) -> tuple[int, int]: + def pixel_to_tile(self, x: float, y: float) -> tuple[float, float]: """Convert window pixel coordinates to tile coordinates.""" - with ffi.new("int[2]", (x, y)) as xy: - _check(lib.TCOD_context_screen_pixel_to_tile_i(self._p, xy, xy + 1)) + with ffi.new("double[2]", (x, y)) as xy: + _check(lib.TCOD_context_screen_pixel_to_tile_d(self._p, xy, xy + 1)) return xy[0], xy[1] - def pixel_to_subtile(self, x: int, y: int) -> tuple[float, float]: + @deprecated("Use pixel_to_tile method instead.") + def pixel_to_subtile(self, x: float, y: float) -> tuple[float, float]: """Convert window pixel coordinates to sub-tile coordinates.""" with ffi.new("double[2]", (x, y)) as xy: _check(lib.TCOD_context_screen_pixel_to_tile_d(self._p, xy, xy + 1)) @@ -267,7 +263,7 @@ def convert_event(self, event: _Event) -> _Event: event.position[1] - event.motion[1], ) event_copy.motion = event._tile_motion = tcod.event.Point( - event._tile[0] - prev_tile[0], event._tile[1] - prev_tile[1] + int(event._tile[0]) - int(prev_tile[0]), int(event._tile[1]) - int(prev_tile[1]) ) return event_copy diff --git a/tcod/event.py b/tcod/event.py index 25abfb7f..b780ffdf 100644 --- a/tcod/event.py +++ b/tcod/event.py @@ -154,9 +154,9 @@ class Point(NamedTuple): :any:`MouseMotion` :any:`MouseButtonDown` :any:`MouseButtonUp` """ - x: int + x: float """A pixel or tile coordinate starting with zero as the left-most position.""" - y: int + y: float """A pixel or tile coordinate starting with zero as the top-most position.""" @@ -357,8 +357,8 @@ def __init__(self, scancode: int, sym: int, mod: int, repeat: bool = False) -> N @classmethod def from_sdl_event(cls, sdl_event: Any) -> Any: - keysym = sdl_event.key.keysym - self = cls(keysym.scancode, keysym.sym, keysym.mod, bool(sdl_event.key.repeat)) + keysym = sdl_event.key + self = cls(keysym.scancode, keysym.key, keysym.mod, bool(sdl_event.key.repeat)) self.sdl_event = sdl_event return self @@ -408,8 +408,8 @@ class MouseState(Event): def __init__( self, - position: tuple[int, int] = (0, 0), - tile: tuple[int, int] | None = (0, 0), + position: tuple[float, float] = (0, 0), + tile: tuple[float, float] | None = (0, 0), state: int = 0, ) -> None: super().__init__() @@ -440,7 +440,7 @@ def tile(self) -> Point: return _verify_tile_coordinates(self._tile) @tile.setter - def tile(self, xy: tuple[int, int]) -> None: + def tile(self, xy: tuple[float, float]) -> None: self._tile = Point(*xy) def __repr__(self) -> str: @@ -481,10 +481,10 @@ class MouseMotion(MouseState): def __init__( self, - position: tuple[int, int] = (0, 0), - motion: tuple[int, int] = (0, 0), - tile: tuple[int, int] | None = (0, 0), - tile_motion: tuple[int, int] | None = (0, 0), + position: tuple[float, float] = (0, 0), + motion: tuple[float, float] = (0, 0), + tile: tuple[float, float] | None = (0, 0), + tile_motion: tuple[float, float] | None = (0, 0), state: int = 0, ) -> None: super().__init__(position, tile, state) @@ -520,7 +520,7 @@ def tile_motion(self) -> Point: return _verify_tile_coordinates(self._tile_motion) @tile_motion.setter - def tile_motion(self, xy: tuple[int, int]) -> None: + def tile_motion(self, xy: tuple[float, float]) -> None: warnings.warn( "The mouse.tile_motion attribute is deprecated." " Use mouse.motion of the event returned by context.convert_event instead.", @@ -581,8 +581,8 @@ class MouseButtonEvent(MouseState): def __init__( self, - pixel: tuple[int, int] = (0, 0), - tile: tuple[int, int] | None = (0, 0), + pixel: tuple[float, float] = (0, 0), + tile: tuple[float, float] | None = (0, 0), button: int = 0, ) -> None: super().__init__(pixel, tile, button) @@ -601,9 +601,9 @@ def from_sdl_event(cls, sdl_event: Any) -> Any: pixel = button.x, button.y subtile = _pixel_to_tile(*pixel) if subtile is None: - tile: tuple[int, int] | None = None + tile: tuple[float, float] | None = None else: - tile = int(subtile[0]), int(subtile[1]) + tile = float(subtile[0]), float(subtile[1]) self = cls(pixel, tile, button.button) self.sdl_event = sdl_event return self @@ -727,11 +727,11 @@ def from_sdl_event(cls, sdl_event: Any) -> WindowEvent | Undefined: return Undefined.from_sdl_event(sdl_event) event_type: Final = cls.__WINDOW_TYPES[sdl_event.window.event] self: WindowEvent - if sdl_event.window.event == lib.SDL_WINDOWEVENT_MOVED: + if sdl_event.window.event == lib.SDL_EVENT_WINDOW_MOVED: self = WindowMoved(sdl_event.window.data1, sdl_event.window.data2) elif sdl_event.window.event in ( - lib.SDL_WINDOWEVENT_RESIZED, - lib.SDL_WINDOWEVENT_SIZE_CHANGED, + lib.SDL_EVENT_WINDOW_RESIZED, + lib.SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED, ): self = WindowResized(event_type, sdl_event.window.data1, sdl_event.window.data2) else: @@ -743,22 +743,20 @@ def __repr__(self) -> str: return f"tcod.event.{self.__class__.__name__}(type={self.type!r})" __WINDOW_TYPES: Final = { - lib.SDL_WINDOWEVENT_SHOWN: "WindowShown", - lib.SDL_WINDOWEVENT_HIDDEN: "WindowHidden", - lib.SDL_WINDOWEVENT_EXPOSED: "WindowExposed", - lib.SDL_WINDOWEVENT_MOVED: "WindowMoved", - lib.SDL_WINDOWEVENT_RESIZED: "WindowResized", - lib.SDL_WINDOWEVENT_SIZE_CHANGED: "WindowSizeChanged", - lib.SDL_WINDOWEVENT_MINIMIZED: "WindowMinimized", - lib.SDL_WINDOWEVENT_MAXIMIZED: "WindowMaximized", - lib.SDL_WINDOWEVENT_RESTORED: "WindowRestored", - lib.SDL_WINDOWEVENT_ENTER: "WindowEnter", - lib.SDL_WINDOWEVENT_LEAVE: "WindowLeave", - lib.SDL_WINDOWEVENT_FOCUS_GAINED: "WindowFocusGained", - lib.SDL_WINDOWEVENT_FOCUS_LOST: "WindowFocusLost", - lib.SDL_WINDOWEVENT_CLOSE: "WindowClose", - lib.SDL_WINDOWEVENT_TAKE_FOCUS: "WindowTakeFocus", - lib.SDL_WINDOWEVENT_HIT_TEST: "WindowHitTest", + lib.SDL_EVENT_WINDOW_SHOWN: "WindowShown", + lib.SDL_EVENT_WINDOW_HIDDEN: "WindowHidden", + lib.SDL_EVENT_WINDOW_EXPOSED: "WindowExposed", + lib.SDL_EVENT_WINDOW_MOVED: "WindowMoved", + lib.SDL_EVENT_WINDOW_RESIZED: "WindowResized", + lib.SDL_EVENT_WINDOW_MINIMIZED: "WindowMinimized", + lib.SDL_EVENT_WINDOW_MAXIMIZED: "WindowMaximized", + lib.SDL_EVENT_WINDOW_RESTORED: "WindowRestored", + lib.SDL_EVENT_WINDOW_MOUSE_ENTER: "WindowEnter", + lib.SDL_EVENT_WINDOW_MOUSE_LEAVE: "WindowLeave", + lib.SDL_EVENT_WINDOW_FOCUS_GAINED: "WindowFocusGained", + lib.SDL_EVENT_WINDOW_FOCUS_LOST: "WindowFocusLost", + lib.SDL_EVENT_WINDOW_CLOSE_REQUESTED: "WindowClose", + lib.SDL_EVENT_WINDOW_HIT_TEST: "WindowHitTest", } @@ -974,7 +972,10 @@ def pressed(self) -> bool: @classmethod def from_sdl_event(cls, sdl_event: Any) -> JoystickButton: - type = {lib.SDL_JOYBUTTONDOWN: "JOYBUTTONDOWN", lib.SDL_JOYBUTTONUP: "JOYBUTTONUP"}[sdl_event.type] + type = { + lib.SDL_EVENT_JOYSTICK_BUTTON_DOWN: "JOYBUTTONDOWN", + lib.SDL_EVENT_JOYSTICK_BUTTON_UP: "JOYBUTTONUP", + }[sdl_event.type] return cls(type, sdl_event.jbutton.which, sdl_event.jbutton.button) def __repr__(self) -> str: @@ -1010,7 +1011,10 @@ class JoystickDevice(JoystickEvent): @classmethod def from_sdl_event(cls, sdl_event: Any) -> JoystickDevice: - type = {lib.SDL_JOYDEVICEADDED: "JOYDEVICEADDED", lib.SDL_JOYDEVICEREMOVED: "JOYDEVICEREMOVED"}[sdl_event.type] + type = { + lib.SDL_EVENT_JOYSTICK_ADDED: "JOYDEVICEADDED", + lib.SDL_EVENT_JOYSTICK_REMOVED: "JOYDEVICEREMOVED", + }[sdl_event.type] return cls(type, sdl_event.jdevice.which) @@ -1095,14 +1099,14 @@ def __init__(self, type: str, which: int, button: tcod.sdl.joystick.ControllerBu @classmethod def from_sdl_event(cls, sdl_event: Any) -> ControllerButton: type = { - lib.SDL_CONTROLLERBUTTONDOWN: "CONTROLLERBUTTONDOWN", - lib.SDL_CONTROLLERBUTTONUP: "CONTROLLERBUTTONUP", + lib.SDL_EVENT_GAMEPAD_BUTTON_DOWN: "CONTROLLERBUTTONDOWN", + lib.SDL_EVENT_GAMEPAD_BUTTON_UP: "CONTROLLERBUTTONUP", }[sdl_event.type] return cls( type, sdl_event.cbutton.which, tcod.sdl.joystick.ControllerButton(sdl_event.cbutton.button), - sdl_event.cbutton.state == lib.SDL_PRESSED, + bool(sdl_event.cbutton.down), ) def __repr__(self) -> str: @@ -1127,9 +1131,9 @@ class ControllerDevice(ControllerEvent): @classmethod def from_sdl_event(cls, sdl_event: Any) -> ControllerDevice: type = { - lib.SDL_CONTROLLERDEVICEADDED: "CONTROLLERDEVICEADDED", - lib.SDL_CONTROLLERDEVICEREMOVED: "CONTROLLERDEVICEREMOVED", - lib.SDL_CONTROLLERDEVICEREMAPPED: "CONTROLLERDEVICEREMAPPED", + lib.SDL_EVENT_GAMEPAD_ADDED: "CONTROLLERDEVICEADDED", + lib.SDL_EVENT_GAMEPAD_REMOVED: "CONTROLLERDEVICEREMOVED", + lib.SDL_EVENT_GAMEPAD_REMAPPED: "CONTROLLERDEVICEREMAPPED", }[sdl_event.type] return cls(type, sdl_event.cdevice.which) @@ -1153,28 +1157,28 @@ def __str__(self) -> str: _SDL_TO_CLASS_TABLE: dict[int, type[Event]] = { - lib.SDL_QUIT: Quit, - lib.SDL_KEYDOWN: KeyDown, - lib.SDL_KEYUP: KeyUp, - lib.SDL_MOUSEMOTION: MouseMotion, - lib.SDL_MOUSEBUTTONDOWN: MouseButtonDown, - lib.SDL_MOUSEBUTTONUP: MouseButtonUp, - lib.SDL_MOUSEWHEEL: MouseWheel, - lib.SDL_TEXTINPUT: TextInput, - lib.SDL_WINDOWEVENT: WindowEvent, - lib.SDL_JOYAXISMOTION: JoystickAxis, - lib.SDL_JOYBALLMOTION: JoystickBall, - lib.SDL_JOYHATMOTION: JoystickHat, - lib.SDL_JOYBUTTONDOWN: JoystickButton, - lib.SDL_JOYBUTTONUP: JoystickButton, - lib.SDL_JOYDEVICEADDED: JoystickDevice, - lib.SDL_JOYDEVICEREMOVED: JoystickDevice, - lib.SDL_CONTROLLERAXISMOTION: ControllerAxis, - lib.SDL_CONTROLLERBUTTONDOWN: ControllerButton, - lib.SDL_CONTROLLERBUTTONUP: ControllerButton, - lib.SDL_CONTROLLERDEVICEADDED: ControllerDevice, - lib.SDL_CONTROLLERDEVICEREMOVED: ControllerDevice, - lib.SDL_CONTROLLERDEVICEREMAPPED: ControllerDevice, + lib.SDL_EVENT_QUIT: Quit, + lib.SDL_EVENT_KEY_DOWN: KeyDown, + lib.SDL_EVENT_KEY_UP: KeyUp, + lib.SDL_EVENT_MOUSE_MOTION: MouseMotion, + lib.SDL_EVENT_MOUSE_BUTTON_DOWN: MouseButtonDown, + lib.SDL_EVENT_MOUSE_BUTTON_UP: MouseButtonUp, + lib.SDL_EVENT_MOUSE_WHEEL: MouseWheel, + lib.SDL_EVENT_TEXT_INPUT: TextInput, + # lib.SDL_EVENT_WINDOW_EVENT: WindowEvent, + lib.SDL_EVENT_JOYSTICK_AXIS_MOTION: JoystickAxis, + lib.SDL_EVENT_JOYSTICK_BALL_MOTION: JoystickBall, + lib.SDL_EVENT_JOYSTICK_HAT_MOTION: JoystickHat, + lib.SDL_EVENT_JOYSTICK_BUTTON_DOWN: JoystickButton, + lib.SDL_EVENT_JOYSTICK_BUTTON_UP: JoystickButton, + lib.SDL_EVENT_JOYSTICK_ADDED: JoystickDevice, + lib.SDL_EVENT_JOYSTICK_REMOVED: JoystickDevice, + lib.SDL_EVENT_GAMEPAD_AXIS_MOTION: ControllerAxis, + lib.SDL_EVENT_GAMEPAD_BUTTON_DOWN: ControllerButton, + lib.SDL_EVENT_GAMEPAD_BUTTON_UP: ControllerButton, + lib.SDL_EVENT_GAMEPAD_ADDED: ControllerDevice, + lib.SDL_EVENT_GAMEPAD_REMOVED: ControllerDevice, + lib.SDL_EVENT_GAMEPAD_REMAPPED: ControllerDevice, } @@ -1618,7 +1622,7 @@ def remove_watch(callback: Callable[[Event], None]) -> None: warnings.warn(f"{callback} is not an active event watcher, nothing was removed.", RuntimeWarning, stacklevel=2) return handle = _event_watch_handles[callback] - lib.SDL_DelEventWatch(lib._sdl_event_watcher, handle) + lib.SDL_RemoveEventWatch(lib._sdl_event_watcher, handle) del _event_watch_handles[callback] @@ -2129,35 +2133,41 @@ class Scancode(enum.IntEnum): RALT = 230 RGUI = 231 MODE = 257 - AUDIONEXT = 258 - AUDIOPREV = 259 - AUDIOSTOP = 260 - AUDIOPLAY = 261 - AUDIOMUTE = 262 - MEDIASELECT = 263 - WWW = 264 - MAIL = 265 - CALCULATOR = 266 - COMPUTER = 267 - AC_SEARCH = 268 - AC_HOME = 269 - AC_BACK = 270 - AC_FORWARD = 271 - AC_STOP = 272 - AC_REFRESH = 273 - AC_BOOKMARKS = 274 - BRIGHTNESSDOWN = 275 - BRIGHTNESSUP = 276 - DISPLAYSWITCH = 277 - KBDILLUMTOGGLE = 278 - KBDILLUMDOWN = 279 - KBDILLUMUP = 280 - EJECT = 281 - SLEEP = 282 - APP1 = 283 - APP2 = 284 - AUDIOREWIND = 285 - AUDIOFASTFORWARD = 286 + SLEEP = 258 + WAKE = 259 + CHANNEL_INCREMENT = 260 + CHANNEL_DECREMENT = 261 + MEDIA_PLAY = 262 + MEDIA_PAUSE = 263 + MEDIA_RECORD = 264 + MEDIA_FAST_FORWARD = 265 + MEDIA_REWIND = 266 + MEDIA_NEXT_TRACK = 267 + MEDIA_PREVIOUS_TRACK = 268 + MEDIA_STOP = 269 + MEDIA_EJECT = 270 + MEDIA_PLAY_PAUSE = 271 + MEDIA_SELECT = 272 + AC_NEW = 273 + AC_OPEN = 274 + AC_CLOSE = 275 + AC_EXIT = 276 + AC_SAVE = 277 + AC_PRINT = 278 + AC_PROPERTIES = 279 + AC_SEARCH = 280 + AC_HOME = 281 + AC_BACK = 282 + AC_FORWARD = 283 + AC_STOP = 284 + AC_REFRESH = 285 + AC_BOOKMARKS = 286 + SOFTLEFT = 287 + SOFTRIGHT = 288 + CALL = 289 + ENDCALL = 290 + RESERVED = 400 + COUNT = 512 # --- end --- @property @@ -2179,7 +2189,7 @@ def keysym(self) -> KeySym: Based on the current keyboard layout. """ _init_sdl_video() - return KeySym(lib.SDL_GetKeyFromScancode(self.value)) + return KeySym(lib.SDL_GetKeyFromScancode(self.value, 0, False)) # noqa: FBT003 @property def scancode(self) -> Scancode: @@ -2472,12 +2482,12 @@ class KeySym(enum.IntEnum): ESCAPE = 27 SPACE = 32 EXCLAIM = 33 - QUOTEDBL = 34 + DBLAPOSTROPHE = 34 HASH = 35 DOLLAR = 36 PERCENT = 37 AMPERSAND = 38 - QUOTE = 39 + APOSTROPHE = 39 LEFTPAREN = 40 RIGHTPAREN = 41 ASTERISK = 42 @@ -2508,34 +2518,47 @@ class KeySym(enum.IntEnum): RIGHTBRACKET = 93 CARET = 94 UNDERSCORE = 95 - BACKQUOTE = 96 - a = 97 - b = 98 - c = 99 - d = 100 - e = 101 - f = 102 - g = 103 - h = 104 - i = 105 - j = 106 - k = 107 - l = 108 # noqa: E741 - m = 109 - n = 110 - o = 111 - p = 112 - q = 113 - r = 114 - s = 115 - t = 116 - u = 117 - v = 118 - w = 119 - x = 120 - y = 121 - z = 122 + GRAVE = 96 + A = 97 + B = 98 + C = 99 + D = 100 + E = 101 + F = 102 + G = 103 + H = 104 + I = 105 # noqa: E741 + J = 106 + K = 107 + L = 108 + M = 109 + N = 110 + O = 111 # noqa: E741 + P = 112 + Q = 113 + R = 114 + S = 115 + T = 116 + U = 117 + V = 118 + W = 119 + X = 120 + Y = 121 + Z = 122 + LEFTBRACE = 123 + PIPE = 124 + RIGHTBRACE = 125 + TILDE = 126 DELETE = 127 + PLUSMINUS = 177 + EXTENDED_MASK = 536870912 + LEFT_TAB = 536870913 + LEVEL5_SHIFT = 536870914 + MULTI_KEY_COMPOSE = 536870915 + LMETA = 536870916 + RMETA = 536870917 + LHYPER = 536870918 + RHYPER = 536870919 SCANCODE_MASK = 1073741824 CAPSLOCK = 1073741881 F1 = 1073741882 @@ -2677,35 +2700,39 @@ class KeySym(enum.IntEnum): RALT = 1073742054 RGUI = 1073742055 MODE = 1073742081 - AUDIONEXT = 1073742082 - AUDIOPREV = 1073742083 - AUDIOSTOP = 1073742084 - AUDIOPLAY = 1073742085 - AUDIOMUTE = 1073742086 - MEDIASELECT = 1073742087 - WWW = 1073742088 - MAIL = 1073742089 - CALCULATOR = 1073742090 - COMPUTER = 1073742091 - AC_SEARCH = 1073742092 - AC_HOME = 1073742093 - AC_BACK = 1073742094 - AC_FORWARD = 1073742095 - AC_STOP = 1073742096 - AC_REFRESH = 1073742097 - AC_BOOKMARKS = 1073742098 - BRIGHTNESSDOWN = 1073742099 - BRIGHTNESSUP = 1073742100 - DISPLAYSWITCH = 1073742101 - KBDILLUMTOGGLE = 1073742102 - KBDILLUMDOWN = 1073742103 - KBDILLUMUP = 1073742104 - EJECT = 1073742105 - SLEEP = 1073742106 - APP1 = 1073742107 - APP2 = 1073742108 - AUDIOREWIND = 1073742109 - AUDIOFASTFORWARD = 1073742110 + SLEEP = 1073742082 + WAKE = 1073742083 + CHANNEL_INCREMENT = 1073742084 + CHANNEL_DECREMENT = 1073742085 + MEDIA_PLAY = 1073742086 + MEDIA_PAUSE = 1073742087 + MEDIA_RECORD = 1073742088 + MEDIA_FAST_FORWARD = 1073742089 + MEDIA_REWIND = 1073742090 + MEDIA_NEXT_TRACK = 1073742091 + MEDIA_PREVIOUS_TRACK = 1073742092 + MEDIA_STOP = 1073742093 + MEDIA_EJECT = 1073742094 + MEDIA_PLAY_PAUSE = 1073742095 + MEDIA_SELECT = 1073742096 + AC_NEW = 1073742097 + AC_OPEN = 1073742098 + AC_CLOSE = 1073742099 + AC_EXIT = 1073742100 + AC_SAVE = 1073742101 + AC_PRINT = 1073742102 + AC_PROPERTIES = 1073742103 + AC_SEARCH = 1073742104 + AC_HOME = 1073742105 + AC_BACK = 1073742106 + AC_FORWARD = 1073742107 + AC_STOP = 1073742108 + AC_REFRESH = 1073742109 + AC_BOOKMARKS = 1073742110 + SOFTLEFT = 1073742111 + SOFTRIGHT = 1073742112 + CALL = 1073742113 + ENDCALL = 1073742114 # --- end --- @property @@ -2744,7 +2771,7 @@ def scancode(self) -> Scancode: Based on the current keyboard layout. """ _init_sdl_video() - return Scancode(lib.SDL_GetScancodeFromKey(self.value)) + return Scancode(lib.SDL_GetScancodeFromKey(self.value, ffi.NULL)) @classmethod def _missing_(cls, value: object) -> KeySym | None: diff --git a/tcod/event_constants.py b/tcod/event_constants.py index 6f012293..efeecc56 100644 --- a/tcod/event_constants.py +++ b/tcod/event_constants.py @@ -218,35 +218,41 @@ SCANCODE_RALT = 230 SCANCODE_RGUI = 231 SCANCODE_MODE = 257 -SCANCODE_AUDIONEXT = 258 -SCANCODE_AUDIOPREV = 259 -SCANCODE_AUDIOSTOP = 260 -SCANCODE_AUDIOPLAY = 261 -SCANCODE_AUDIOMUTE = 262 -SCANCODE_MEDIASELECT = 263 -SCANCODE_WWW = 264 -SCANCODE_MAIL = 265 -SCANCODE_CALCULATOR = 266 -SCANCODE_COMPUTER = 267 -SCANCODE_AC_SEARCH = 268 -SCANCODE_AC_HOME = 269 -SCANCODE_AC_BACK = 270 -SCANCODE_AC_FORWARD = 271 -SCANCODE_AC_STOP = 272 -SCANCODE_AC_REFRESH = 273 -SCANCODE_AC_BOOKMARKS = 274 -SCANCODE_BRIGHTNESSDOWN = 275 -SCANCODE_BRIGHTNESSUP = 276 -SCANCODE_DISPLAYSWITCH = 277 -SCANCODE_KBDILLUMTOGGLE = 278 -SCANCODE_KBDILLUMDOWN = 279 -SCANCODE_KBDILLUMUP = 280 -SCANCODE_EJECT = 281 -SCANCODE_SLEEP = 282 -SCANCODE_APP1 = 283 -SCANCODE_APP2 = 284 -SCANCODE_AUDIOREWIND = 285 -SCANCODE_AUDIOFASTFORWARD = 286 +SCANCODE_SLEEP = 258 +SCANCODE_WAKE = 259 +SCANCODE_CHANNEL_INCREMENT = 260 +SCANCODE_CHANNEL_DECREMENT = 261 +SCANCODE_MEDIA_PLAY = 262 +SCANCODE_MEDIA_PAUSE = 263 +SCANCODE_MEDIA_RECORD = 264 +SCANCODE_MEDIA_FAST_FORWARD = 265 +SCANCODE_MEDIA_REWIND = 266 +SCANCODE_MEDIA_NEXT_TRACK = 267 +SCANCODE_MEDIA_PREVIOUS_TRACK = 268 +SCANCODE_MEDIA_STOP = 269 +SCANCODE_MEDIA_EJECT = 270 +SCANCODE_MEDIA_PLAY_PAUSE = 271 +SCANCODE_MEDIA_SELECT = 272 +SCANCODE_AC_NEW = 273 +SCANCODE_AC_OPEN = 274 +SCANCODE_AC_CLOSE = 275 +SCANCODE_AC_EXIT = 276 +SCANCODE_AC_SAVE = 277 +SCANCODE_AC_PRINT = 278 +SCANCODE_AC_PROPERTIES = 279 +SCANCODE_AC_SEARCH = 280 +SCANCODE_AC_HOME = 281 +SCANCODE_AC_BACK = 282 +SCANCODE_AC_FORWARD = 283 +SCANCODE_AC_STOP = 284 +SCANCODE_AC_REFRESH = 285 +SCANCODE_AC_BOOKMARKS = 286 +SCANCODE_SOFTLEFT = 287 +SCANCODE_SOFTRIGHT = 288 +SCANCODE_CALL = 289 +SCANCODE_ENDCALL = 290 +SCANCODE_RESERVED = 400 +SCANCODE_COUNT = 512 # --- SDL keyboard symbols --- K_UNKNOWN = 0 @@ -256,12 +262,12 @@ K_ESCAPE = 27 K_SPACE = 32 K_EXCLAIM = 33 -K_QUOTEDBL = 34 +K_DBLAPOSTROPHE = 34 K_HASH = 35 K_DOLLAR = 36 K_PERCENT = 37 K_AMPERSAND = 38 -K_QUOTE = 39 +K_APOSTROPHE = 39 K_LEFTPAREN = 40 K_RIGHTPAREN = 41 K_ASTERISK = 42 @@ -292,34 +298,47 @@ K_RIGHTBRACKET = 93 K_CARET = 94 K_UNDERSCORE = 95 -K_BACKQUOTE = 96 -K_a = 97 -K_b = 98 -K_c = 99 -K_d = 100 -K_e = 101 -K_f = 102 -K_g = 103 -K_h = 104 -K_i = 105 -K_j = 106 -K_k = 107 -K_l = 108 -K_m = 109 -K_n = 110 -K_o = 111 -K_p = 112 -K_q = 113 -K_r = 114 -K_s = 115 -K_t = 116 -K_u = 117 -K_v = 118 -K_w = 119 -K_x = 120 -K_y = 121 -K_z = 122 +K_GRAVE = 96 +K_A = 97 +K_B = 98 +K_C = 99 +K_D = 100 +K_E = 101 +K_F = 102 +K_G = 103 +K_H = 104 +K_I = 105 +K_J = 106 +K_K = 107 +K_L = 108 +K_M = 109 +K_N = 110 +K_O = 111 +K_P = 112 +K_Q = 113 +K_R = 114 +K_S = 115 +K_T = 116 +K_U = 117 +K_V = 118 +K_W = 119 +K_X = 120 +K_Y = 121 +K_Z = 122 +K_LEFTBRACE = 123 +K_PIPE = 124 +K_RIGHTBRACE = 125 +K_TILDE = 126 K_DELETE = 127 +K_PLUSMINUS = 177 +K_EXTENDED_MASK = 536870912 +K_LEFT_TAB = 536870913 +K_LEVEL5_SHIFT = 536870914 +K_MULTI_KEY_COMPOSE = 536870915 +K_LMETA = 536870916 +K_RMETA = 536870917 +K_LHYPER = 536870918 +K_RHYPER = 536870919 K_SCANCODE_MASK = 1073741824 K_CAPSLOCK = 1073741881 K_F1 = 1073741882 @@ -461,41 +480,46 @@ K_RALT = 1073742054 K_RGUI = 1073742055 K_MODE = 1073742081 -K_AUDIONEXT = 1073742082 -K_AUDIOPREV = 1073742083 -K_AUDIOSTOP = 1073742084 -K_AUDIOPLAY = 1073742085 -K_AUDIOMUTE = 1073742086 -K_MEDIASELECT = 1073742087 -K_WWW = 1073742088 -K_MAIL = 1073742089 -K_CALCULATOR = 1073742090 -K_COMPUTER = 1073742091 -K_AC_SEARCH = 1073742092 -K_AC_HOME = 1073742093 -K_AC_BACK = 1073742094 -K_AC_FORWARD = 1073742095 -K_AC_STOP = 1073742096 -K_AC_REFRESH = 1073742097 -K_AC_BOOKMARKS = 1073742098 -K_BRIGHTNESSDOWN = 1073742099 -K_BRIGHTNESSUP = 1073742100 -K_DISPLAYSWITCH = 1073742101 -K_KBDILLUMTOGGLE = 1073742102 -K_KBDILLUMDOWN = 1073742103 -K_KBDILLUMUP = 1073742104 -K_EJECT = 1073742105 -K_SLEEP = 1073742106 -K_APP1 = 1073742107 -K_APP2 = 1073742108 -K_AUDIOREWIND = 1073742109 -K_AUDIOFASTFORWARD = 1073742110 +K_SLEEP = 1073742082 +K_WAKE = 1073742083 +K_CHANNEL_INCREMENT = 1073742084 +K_CHANNEL_DECREMENT = 1073742085 +K_MEDIA_PLAY = 1073742086 +K_MEDIA_PAUSE = 1073742087 +K_MEDIA_RECORD = 1073742088 +K_MEDIA_FAST_FORWARD = 1073742089 +K_MEDIA_REWIND = 1073742090 +K_MEDIA_NEXT_TRACK = 1073742091 +K_MEDIA_PREVIOUS_TRACK = 1073742092 +K_MEDIA_STOP = 1073742093 +K_MEDIA_EJECT = 1073742094 +K_MEDIA_PLAY_PAUSE = 1073742095 +K_MEDIA_SELECT = 1073742096 +K_AC_NEW = 1073742097 +K_AC_OPEN = 1073742098 +K_AC_CLOSE = 1073742099 +K_AC_EXIT = 1073742100 +K_AC_SAVE = 1073742101 +K_AC_PRINT = 1073742102 +K_AC_PROPERTIES = 1073742103 +K_AC_SEARCH = 1073742104 +K_AC_HOME = 1073742105 +K_AC_BACK = 1073742106 +K_AC_FORWARD = 1073742107 +K_AC_STOP = 1073742108 +K_AC_REFRESH = 1073742109 +K_AC_BOOKMARKS = 1073742110 +K_SOFTLEFT = 1073742111 +K_SOFTRIGHT = 1073742112 +K_CALL = 1073742113 +K_ENDCALL = 1073742114 # --- SDL keyboard modifiers --- KMOD_NONE = 0 KMOD_LSHIFT = 1 KMOD_RSHIFT = 2 KMOD_SHIFT = 3 +KMOD_LEVEL5 = 4 KMOD_LCTRL = 64 KMOD_RCTRL = 128 KMOD_CTRL = 192 @@ -514,6 +538,7 @@ 1: "KMOD_LSHIFT", 2: "KMOD_RSHIFT", 3: "KMOD_SHIFT", + 4: "KMOD_LEVEL5", 64: "KMOD_LCTRL", 128: "KMOD_RCTRL", 192: "KMOD_CTRL", @@ -532,15 +557,12 @@ # --- SDL wheel --- MOUSEWHEEL_NORMAL = 0 MOUSEWHEEL_FLIPPED = 1 -MOUSEWHEEL = 1027 _REVERSE_WHEEL_TABLE = { 0: "MOUSEWHEEL_NORMAL", 1: "MOUSEWHEEL_FLIPPED", - 1027: "MOUSEWHEEL", } __all__ = [ # noqa: RUF022 "MOUSEWHEEL_NORMAL", "MOUSEWHEEL_FLIPPED", - "MOUSEWHEEL", ] diff --git a/tcod/libtcodpy.py b/tcod/libtcodpy.py index 517f3377..2bff5397 100644 --- a/tcod/libtcodpy.py +++ b/tcod/libtcodpy.py @@ -1679,7 +1679,7 @@ def console_get_char(con: tcod.console.Console, x: int, y: int) -> int: Array access performs significantly faster than using this function. See :any:`Console.ch`. """ - return lib.TCOD_console_get_char(_console(con), x, y) # type: ignore + return lib.TCOD_console_get_char(_console(con), x, y) @deprecate("This function is not supported if contexts are being used.", category=FutureWarning) diff --git a/tcod/noise.py b/tcod/noise.py index 23d84691..b4631455 100644 --- a/tcod/noise.py +++ b/tcod/noise.py @@ -247,13 +247,16 @@ def __getitem__(self, indexes: Any) -> NDArray[np.float32]: indexes[i] = np.ascontiguousarray(index, dtype=np.float32) c_input[i] = ffi.from_buffer("float*", indexes[i]) + c_input_tuple = tuple(c_input) + assert len(c_input_tuple) == 4 # noqa: PLR2004 + out: NDArray[np.float32] = np.empty(indexes[0].shape, dtype=np.float32) if self.implementation == Implementation.SIMPLE: lib.TCOD_noise_get_vectorized( self.noise_c, self.algorithm, out.size, - *c_input, + *c_input_tuple, ffi.from_buffer("float*", out), ) elif self.implementation == Implementation.FBM: @@ -262,7 +265,7 @@ def __getitem__(self, indexes: Any) -> NDArray[np.float32]: self.algorithm, self.octaves, out.size, - *c_input, + *c_input_tuple, ffi.from_buffer("float*", out), ) elif self.implementation == Implementation.TURBULENCE: @@ -271,7 +274,7 @@ def __getitem__(self, indexes: Any) -> NDArray[np.float32]: self.algorithm, self.octaves, out.size, - *c_input, + *c_input_tuple, ffi.from_buffer("float*", out), ) else: diff --git a/tcod/path.c b/tcod/path.c index 873e2dae..61a09260 100644 --- a/tcod/path.c +++ b/tcod/path.c @@ -315,8 +315,8 @@ int compute_heuristic(const struct PathfinderHeuristic* __restrict heuristic, in default: return 0; } - int diagonal = heuristic->diagonal != 0 ? MIN(x, y) : 0; - int straight = MAX(x, y) - diagonal; + int diagonal = heuristic->diagonal != 0 ? TCOD_MIN(x, y) : 0; + int straight = TCOD_MAX(x, y) - diagonal; return (straight * heuristic->cardinal + diagonal * heuristic->diagonal + w * heuristic->w + z * heuristic->z); } void path_compute_add_edge( diff --git a/tcod/path.h b/tcod/path.h index dc87cae3..75754d1b 100644 --- a/tcod/path.h +++ b/tcod/path.h @@ -13,7 +13,7 @@ extern "C" { /** * Common NumPy data types. */ -enum NP_Type { +typedef enum NP_Type { np_undefined = 0, np_int8, np_int16, @@ -26,23 +26,23 @@ enum NP_Type { np_float16, np_float32, np_float64, -}; +} NP_Type; /** * A simple 4D NumPy array ctype. */ -struct NArray { - enum NP_Type type; +typedef struct NArray { + NP_Type type; int8_t ndim; char* __restrict data; ptrdiff_t shape[5]; // TCOD_PATHFINDER_MAX_DIMENSIONS + 1 ptrdiff_t strides[5]; // TCOD_PATHFINDER_MAX_DIMENSIONS + 1 -}; +} NArray; struct PathfinderRule { /** Rule condition, could be uninitialized zeros. */ - struct NArray condition; + NArray condition; /** Edge cost map, required. */ - struct NArray cost; + NArray cost; /** Number of edge rules in `edge_array`. */ int edge_count; /** Example of 2D edges: [i, j, cost, i_2, j_2, cost_2, ...] */ @@ -131,7 +131,7 @@ int path_compute( parameters. */ ptrdiff_t get_travel_path( - int8_t ndim, const struct NArray* __restrict travel_map, const int* __restrict start, int* __restrict out); + int8_t ndim, const NArray* __restrict travel_map, const int* __restrict start, int* __restrict out); /** Update the priority of nodes on the frontier and sort them. */ @@ -142,7 +142,7 @@ int update_frontier_heuristic( Assumes no heuristic is active. */ -int rebuild_frontier_from_distance(struct TCOD_Frontier* __restrict frontier, const struct NArray* __restrict dist_map); +int rebuild_frontier_from_distance(struct TCOD_Frontier* __restrict frontier, const NArray* __restrict dist_map); /** Return true if `index[frontier->ndim]` is a node in `frontier`. */ diff --git a/tcod/path.py b/tcod/path.py index 92980b85..f16c0210 100644 --- a/tcod/path.py +++ b/tcod/path.py @@ -115,7 +115,7 @@ def __init__( super().__init__(callback, shape) -class NodeCostArray(np.ndarray): # type: ignore[type-arg] +class NodeCostArray(np.ndarray): """Calculate cost from a numpy array of nodes. `array` is a NumPy array holding the path-cost of each node. @@ -574,7 +574,7 @@ def hillclimb2d( c_edges, n_edges = _compile_bool_edges(edge_map) func = functools.partial(lib.hillclimb2d, c_dist, x, y, n_edges, c_edges) else: - func = functools.partial(lib.hillclimb2d_basic, c_dist, x, y, cardinal, diagonal) + func = functools.partial(lib.hillclimb2d_basic, c_dist, x, y, bool(cardinal), bool(diagonal)) length = _check(func(ffi.NULL)) path: np.ndarray[Any, np.dtype[np.intc]] = np.ndarray((length, 2), dtype=np.intc) c_path = ffi.from_buffer("int*", path) @@ -596,7 +596,7 @@ def _world_array(shape: tuple[int, ...], dtype: DTypeLike = np.int32) -> NDArray ) -def _as_hashable(obj: np.ndarray[Any, Any] | None) -> object | None: +def _as_hashable(obj: NDArray[Any] | None) -> object | None: """Return NumPy arrays as a more hashable form.""" if obj is None: return obj @@ -772,7 +772,7 @@ def add_edge( cost = cost.T if condition is not None: condition = condition.T - key = (_as_hashable(cost), _as_hashable(condition)) + key = (_as_hashable(cost), _as_hashable(condition)) # type: ignore[arg-type] try: rule = self._graph[key] except KeyError: @@ -789,7 +789,7 @@ def add_edge( def add_edges( self, *, - edge_map: ArrayLike, + edge_map: ArrayLike | NDArray[np.integer], cost: NDArray[Any], condition: ArrayLike | None = None, ) -> None: @@ -894,16 +894,20 @@ def add_edges( # edge_map needs to be converted into C. # The other parameters are converted by the add_edge method. edge_map = edge_map.T - edge_center = tuple(i // 2 for i in edge_map.shape) - edge_map[edge_center] = 0 - edge_map[edge_map < 0] = 0 - edge_nz = edge_map.nonzero() - edge_costs = edge_map[edge_nz] + edge_center = tuple(i // 2 for i in edge_map.shape) # type: ignore[union-attr] + edge_map[edge_center] = 0 # type: ignore[index] + edge_map[edge_map < 0] = 0 # type: ignore[index, operator] + edge_nz = edge_map.nonzero() # type: ignore[union-attr] + edge_costs = edge_map[edge_nz] # type: ignore[index] edge_array = np.transpose(edge_nz) edge_array -= edge_center - for edge, edge_cost in zip(edge_array, edge_costs, strict=True): + for edge, edge_cost in zip( + edge_array, + edge_costs, # type: ignore[arg-type] + strict=True, + ): self.add_edge( - tuple(edge.tolist()), # type: ignore[arg-type] + tuple(edge.tolist()), edge_cost, cost=cost, condition=condition, @@ -1170,7 +1174,7 @@ def traversal(self) -> NDArray[Any]: """ if self._order == "F": axes = range(self._travel.ndim) - return self._travel.transpose((*axes[-2::-1], axes[-1]))[..., ::-1] + return self._travel.transpose((*axes[-2::-1], axes[-1]))[..., ::-1] # type: ignore[no-any-return] return self._travel def clear(self) -> None: diff --git a/tcod/sdl/_internal.py b/tcod/sdl/_internal.py index 23b41632..a671331e 100644 --- a/tcod/sdl/_internal.py +++ b/tcod/sdl/_internal.py @@ -3,10 +3,12 @@ from __future__ import annotations import logging -import sys as _sys +import sys from collections.abc import Callable from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, NoReturn, TypeVar +from typing import TYPE_CHECKING, Any, NoReturn, Protocol, TypeVar, overload, runtime_checkable + +from typing_extensions import Self from tcod.cffi import ffi, lib @@ -61,10 +63,92 @@ def __exit__( ) -> bool: if exc_type is None: return False - _sys.unraisablehook(_UnraisableHookArgs(exc_type, value, traceback, None, self.obj)) + sys.unraisablehook(_UnraisableHookArgs(exc_type, value, traceback, None, self.obj)) return True +@runtime_checkable +class PropertyPointer(Protocol): + """Methods for classes which support pointers being set to properties.""" + + @classmethod + def _from_property_pointer(cls, raw_cffi_pointer: Any, /) -> Self: # noqa: ANN401 + """Convert a raw pointer to this class.""" + ... + + def _as_property_pointer(self) -> Any: # noqa: ANN401 + """Return a CFFI pointer for this object.""" + ... + + +class Properties: + """SDL properties interface.""" + + def __init__(self, p: Any | None = None) -> None: # noqa: ANN401 + """Create new properties or use an existing pointer.""" + if p is None: + self.p = ffi.gc( + ffi.cast("SDL_PropertiesID", _check_int(lib.SDL_CreateProperties(), failure=0)), + lib.SDL_DestroyProperties, + ) + else: + self.p = p + + @overload + def __getitem__(self, key: tuple[str, type[bool]], /) -> bool: ... + @overload + def __getitem__(self, key: tuple[str, type[int]], /) -> int: ... + @overload + def __getitem__(self, key: tuple[str, type[float]], /) -> float: ... + @overload + def __getitem__(self, key: tuple[str, type[str]], /) -> str: ... + + def __getitem__(self, key: tuple[str, type[Any]], /) -> Any: + """Get a typed value from this property.""" + key_, type_ = key + name = key_.encode("utf-8") + match lib.SDL_GetPropertyType(self.p, name): + case lib.SDL_PROPERTY_TYPE_STRING: + assert type_ is str + return str(ffi.string(lib.SDL_GetStringProperty(self.p, name, ffi.NULL)), encoding="utf-8") + case lib.SDL_PROPERTY_TYPE_NUMBER: + assert type_ is int + return int(lib.SDL_GetNumberProperty(self.p, name, 0)) + case lib.SDL_PROPERTY_TYPE_FLOAT: + assert type_ is float + return float(lib.SDL_GetFloatProperty(self.p, name, 0.0)) + case lib.SDL_PROPERTY_TYPE_BOOLEAN: + assert type_ is bool + return bool(lib.SDL_GetBooleanProperty(self.p, name, False)) # noqa: FBT003 + case lib.SDL_PROPERTY_TYPE_POINTER: + assert isinstance(type_, PropertyPointer) + return type_._from_property_pointer(lib.SDL_GetPointerProperty(self.p, name, ffi.NULL)) + case lib.SDL_PROPERTY_TYPE_INVALID: + raise KeyError("Invalid type.") # noqa: EM101, TRY003 + case _: + raise AssertionError + + def __setitem__(self, key: tuple[str, type[T]], value: T, /) -> None: + """Assign a property.""" + key_, type_ = key + name = key_.encode("utf-8") + if type_ is str: + assert isinstance(value, str) + lib.SDL_SetStringProperty(self.p, name, value.encode("utf-8")) + elif type_ is int: + assert isinstance(value, int) + lib.SDL_SetNumberProperty(self.p, name, value) + elif type_ is float: + assert isinstance(value, (int, float)) + lib.SDL_SetFloatProperty(self.p, name, value) + elif type_ is bool: + lib.SDL_SetFloatProperty(self.p, name, bool(value)) + else: + assert isinstance(type_, PropertyPointer) + assert isinstance(value, PropertyPointer) + lib.SDL_SetPointerProperty(self.p, name, value._as_property_pointer()) + + @ffi.def_extern() # type: ignore[misc] def _sdl_log_output_function(_userdata: None, category: int, priority: int, message_p: Any) -> None: # noqa: ANN401 """Pass logs sent by SDL to Python's logging system.""" @@ -77,9 +161,23 @@ def _get_error() -> str: return str(ffi.string(lib.SDL_GetError()), encoding="utf-8") -def _check(result: int) -> int: +def _check(result: bool, /) -> bool: + """Check if an SDL function returned without errors, and raise an exception if it did.""" + if not result: + raise RuntimeError(_get_error()) + return result + + +def _check_int(result: int, /, failure: int) -> int: + """Check if an SDL function returned without errors, and raise an exception if it did.""" + if result == failure: + raise RuntimeError(_get_error()) + return result + + +def _check_float(result: float, /, failure: float) -> float: """Check if an SDL function returned without errors, and raise an exception if it did.""" - if result < 0: + if result == failure: raise RuntimeError(_get_error()) return result @@ -92,13 +190,7 @@ def _check_p(result: Any) -> Any: # noqa: ANN401 def _compiled_version() -> tuple[int, int, int]: - return int(lib.SDL_MAJOR_VERSION), int(lib.SDL_MINOR_VERSION), int(lib.SDL_PATCHLEVEL) - - -def _linked_version() -> tuple[int, int, int]: - sdl_version = ffi.new("SDL_version*") - lib.SDL_GetVersion(sdl_version) - return int(sdl_version.major), int(sdl_version.minor), int(sdl_version.patch) + return int(lib.SDL_MAJOR_VERSION), int(lib.SDL_MINOR_VERSION), int(lib.SDL_MICRO_VERSION) def _version_at_least(required: tuple[int, int, int]) -> None: @@ -122,6 +214,6 @@ def replacement(*_args: object, **_kwargs: object) -> NoReturn: return lambda _: replacement # type: ignore[return-value] -lib.SDL_LogSetOutputFunction(lib._sdl_log_output_function, ffi.NULL) +lib.SDL_SetLogOutputFunction(lib._sdl_log_output_function, ffi.NULL) if __debug__: - lib.SDL_LogSetAllPriority(lib.SDL_LOG_PRIORITY_VERBOSE) + lib.SDL_SetLogPriorities(lib.SDL_LOG_PRIORITY_VERBOSE) diff --git a/tcod/sdl/audio.py b/tcod/sdl/audio.py index 711d3fc4..d15abb32 100644 --- a/tcod/sdl/audio.py +++ b/tcod/sdl/audio.py @@ -8,35 +8,28 @@ It leaves the loading to sound samples to other libraries like `SoundFile `_. -Example:: - - # Synchronous audio example using SDL's low-level API. +Example: + # Synchronous audio example import time import soundfile # pip install soundfile import tcod.sdl.audio - device = tcod.sdl.audio.open() # Open the default output device. - sound, sample_rate = soundfile.read("example_sound.wav", dtype="float32") # Load an audio sample using SoundFile. - converted = device.convert(sound, sample_rate) # Convert this sample to the format expected by the device. - device.queue_audio(converted) # Play audio synchronously by appending it to the device buffer. - - while device.queued_samples: # Wait until device is done playing. - time.sleep(0.001) - -Example:: + device = tcod.sdl.get_default_playback().open() # Open the default output device - # Asynchronous audio example using BasicMixer. - import time + # AudioDevice's can be opened again to form a hierarchy + # This can be used to give music and sound effects their own configuration + device_music = device.open() + device_music.gain = 0 # Mute music + device_effects = device.open() + device_effects.gain = 10 ** (-6 / 10) # -6dB - import soundfile # pip install soundfile - import tcod.sdl.audio + sound, sample_rate = soundfile.read("example_sound.wav", dtype="float32") # Load an audio sample using SoundFile + stream = device_effects.new_stream(format=sound.dtype, frequency=sample_rate, channels=sound.shape[1]) + stream.queue_audio(sound) # Play audio by appending it to the audio stream + stream.flush() - mixer = tcod.sdl.audio.BasicMixer(tcod.sdl.audio.open()) # Setup BasicMixer with the default audio output. - sound, sample_rate = soundfile.read("example_sound.wav") # Load an audio sample using SoundFile. - sound = mixer.device.convert(sound, sample_rate) # Convert this sample to the format expected by the device. - channel = mixer.play(sound) # Start asynchronous playback, audio is mixed on a separate Python thread. - while channel.busy: # Wait until the sample is done playing. + while stream.queued_samples: # Wait until stream is finished time.sleep(0.001) .. versionadded:: 13.5 @@ -44,27 +37,29 @@ from __future__ import annotations +import contextlib import enum import sys import threading -import time -from collections.abc import Callable, Hashable, Iterator -from typing import TYPE_CHECKING, Any, Final, Literal +import weakref +from dataclasses import dataclass +from typing import TYPE_CHECKING, Any, Final, Literal, NamedTuple import numpy as np -from typing_extensions import Self +from typing_extensions import Self, deprecated import tcod.sdl.sys from tcod.cffi import ffi, lib -from tcod.sdl._internal import _check, _get_error, _ProtectedContext +from tcod.sdl._internal import _check, _check_float, _check_int, _check_p if TYPE_CHECKING: + from collections.abc import Callable, Hashable, Iterable, Iterator from types import TracebackType from numpy.typing import ArrayLike, DTypeLike, NDArray -def _get_format(format: DTypeLike) -> int: +def _get_format(format: DTypeLike, /) -> int: # noqa: A002 """Return a SDL_AudioFormat bit-field from a NumPy dtype.""" dt: Any = np.dtype(format) assert dt.fields is None @@ -81,33 +76,33 @@ def _get_format(format: DTypeLike) -> int: return int( bitsize - | (lib.SDL_AUDIO_MASK_DATATYPE * is_float) - | (lib.SDL_AUDIO_MASK_ENDIAN * (byteorder == ">")) + | (lib.SDL_AUDIO_MASK_FLOAT * is_float) + | (lib.SDL_AUDIO_MASK_BIG_ENDIAN * (byteorder == ">")) | (lib.SDL_AUDIO_MASK_SIGNED * is_signed) ) -def _dtype_from_format(format: int) -> np.dtype[Any]: +def _dtype_from_format(format: int, /) -> np.dtype[Any]: # noqa: A002 """Return a dtype from a SDL_AudioFormat. - >>> _dtype_from_format(tcod.lib.AUDIO_F32LSB) + >>> _dtype_from_format(tcod.lib.SDL_AUDIO_F32LE) dtype('float32') - >>> _dtype_from_format(tcod.lib.AUDIO_F32MSB) + >>> _dtype_from_format(tcod.lib.SDL_AUDIO_F32BE) dtype('>f4') - >>> _dtype_from_format(tcod.lib.AUDIO_S16LSB) + >>> _dtype_from_format(tcod.lib.SDL_AUDIO_S16LE) dtype('int16') - >>> _dtype_from_format(tcod.lib.AUDIO_S16MSB) + >>> _dtype_from_format(tcod.lib.SDL_AUDIO_S16BE) dtype('>i2') - >>> _dtype_from_format(tcod.lib.AUDIO_U16LSB) - dtype('uint16') - >>> _dtype_from_format(tcod.lib.AUDIO_U16MSB) - dtype('>u2') + >>> _dtype_from_format(tcod.lib.SDL_AUDIO_S8) + dtype('int8') + >>> _dtype_from_format(tcod.lib.SDL_AUDIO_U8) + dtype('uint8') """ bitsize = format & lib.SDL_AUDIO_MASK_BITSIZE assert bitsize % 8 == 0 byte_size = bitsize // 8 - byteorder = ">" if format & lib.SDL_AUDIO_MASK_ENDIAN else "<" - if format & lib.SDL_AUDIO_MASK_DATATYPE: + byteorder = ">" if format & lib.SDL_AUDIO_MASK_BIG_ENDIAN else "<" + if format & lib.SDL_AUDIO_MASK_FLOAT: kind = "f" elif format & lib.SDL_AUDIO_MASK_SIGNED: kind = "i" @@ -116,12 +111,34 @@ def _dtype_from_format(format: int) -> np.dtype[Any]: return np.dtype(f"{byteorder}{kind}{byte_size}") +def _silence_value_for_format(dtype: DTypeLike, /) -> int: + """Return the silence value for the given dtype format.""" + return int(lib.SDL_GetSilenceValueForFormat(_get_format(dtype))) + + +class _AudioSpec(NamedTuple): + """Named tuple for `SDL_AudioSpec`.""" + + format: int + channels: int + frequency: int + + @classmethod + def from_c(cls, c_spec_p: Any) -> Self: # noqa: ANN401 + return cls(int(c_spec_p.format), int(c_spec_p.channels), int(c_spec_p.freq)) + + @property + def _dtype(self) -> np.dtype[Any]: + return _dtype_from_format(self.format) + + def convert_audio( in_sound: ArrayLike, in_rate: int, *, out_rate: int, out_format: DTypeLike, out_channels: int -) -> NDArray[Any]: +) -> NDArray[np.number]: """Convert an audio sample into a format supported by this device. - Returns the converted array. This might be a reference to the input array if no conversion was needed. + Returns the converted array in the shape `(sample, channel)`. + This will reference the input array data if no conversion was needed. Args: in_sound: The input ArrayLike sound sample. Input format and channels are derived from the array. @@ -130,6 +147,14 @@ def convert_audio( out_format: The output format of the converted array. out_channels: The number of audio channels of the output array. + Examples:: + + >>> tcod.sdl.audio.convert_audio(np.zeros(5), 44100, out_rate=44100, out_format=np.uint8, out_channels=1).T + array([[128, 128, 128, 128, 128]], dtype=uint8) + >>> tcod.sdl.audio.convert_audio(np.zeros(3), 22050, out_rate=44100, out_format=np.int8, out_channels=2).T + array([[0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0]], dtype=int8) + .. versionadded:: 13.6 .. versionchanged:: 16.0 @@ -141,22 +166,33 @@ def convert_audio( in_array: NDArray[Any] = np.asarray(in_sound) if len(in_array.shape) == 1: in_array = in_array[:, np.newaxis] - if len(in_array.shape) != 2: # noqa: PLR2004 + elif len(in_array.shape) != 2: # noqa: PLR2004 msg = f"Expected a 1 or 2 ndim input, got {in_array.shape} instead." raise TypeError(msg) - cvt = ffi.new("SDL_AudioCVT*") - in_channels = in_array.shape[1] - in_format = _get_format(in_array.dtype) - out_sdl_format = _get_format(out_format) + in_spec = _AudioSpec(format=_get_format(in_array.dtype), channels=in_array.shape[1], frequency=in_rate) + out_spec = _AudioSpec(format=_get_format(out_format), channels=out_channels, frequency=out_rate) + if in_spec == out_spec: + return in_array # No conversion needed + + out_buffer = ffi.new("uint8_t**") + out_length = ffi.new("int*") try: - if ( - _check(lib.SDL_BuildAudioCVT(cvt, in_format, in_channels, in_rate, out_sdl_format, out_channels, out_rate)) - == 0 - ): - return in_array # No conversion needed. + _check( + lib.SDL_ConvertAudioSamples( + [in_spec], + ffi.from_buffer("const uint8_t*", in_array), + len(in_array) * in_array.itemsize, + [out_spec], + out_buffer, + out_length, + ) + ) + return ( # type: ignore[no-any-return] + np.frombuffer(ffi.buffer(out_buffer[0], out_length[0]), dtype=out_format).reshape(-1, out_channels).copy() + ) except RuntimeError as exc: if ( # SDL now only supports float32, but later versions may add more support for more formats. - exc.args[0] == "Invalid source format" + exc.args[0] == "Parameter 'src_spec->format' is invalid" and np.issubdtype(in_array.dtype, np.floating) and in_array.dtype != np.float32 ): @@ -168,68 +204,81 @@ def convert_audio( out_channels=out_channels, ) raise - # Upload to the SDL_AudioCVT buffer. - cvt.len = in_array.itemsize * in_array.size - out_buffer = cvt.buf = ffi.new("uint8_t[]", cvt.len * cvt.len_mult) - np.frombuffer(ffi.buffer(out_buffer[0 : cvt.len]), dtype=in_array.dtype).reshape(in_array.shape)[:] = in_array - - _check(lib.SDL_ConvertAudio(cvt)) - out_array: NDArray[Any] = ( - np.frombuffer(ffi.buffer(out_buffer[0 : cvt.len_cvt]), dtype=out_format).reshape(-1, out_channels).copy() - ) - return out_array + finally: + lib.SDL_free(out_buffer[0]) class AudioDevice: """An SDL audio device. - Open new audio devices using :any:`tcod.sdl.audio.open`. - - When you use this object directly the audio passed to :any:`queue_audio` is always played synchronously. - For more typical asynchronous audio you should pass an AudioDevice to :any:`BasicMixer`. + Example: + device = tcod.sdl.audio.get_default_playback().open() # Open a common audio device .. versionchanged:: 16.0 Can now be used as a context which will close the device on exit. + + .. versionchanged:: Unreleased + Removed `spec` and `callback` attribute. + + `queued_samples`, `queue_audio`, and `dequeue_audio` moved to :any:`AudioStream` class. + """ + __slots__ = ( + "__weakref__", + "_device_id", + "buffer_bytes", + "buffer_samples", + "channels", + "device_id", + "format", + "frequency", + "is_capture", + "is_physical", + "silence", + ) + def __init__( self, - device_id: int, - capture: bool, - spec: Any, # SDL_AudioSpec* # noqa: ANN401 + device_id: Any, # noqa: ANN401 + /, ) -> None: + """Initialize the class from a raw `SDL_AudioDeviceID`.""" assert device_id >= 0 - assert ffi.typeof(spec) is ffi.typeof("SDL_AudioSpec*") - assert spec - self.device_id: Final[int] = device_id + assert ffi.typeof(device_id) is ffi.typeof("SDL_AudioDeviceID"), ffi.typeof(device_id) + spec = ffi.new("SDL_AudioSpec*") + samples = ffi.new("int*") + _check(lib.SDL_GetAudioDeviceFormat(device_id, spec, samples)) + self._device_id: object = device_id + self.device_id: Final[int] = int(device_id) """The SDL device identifier used for SDL C functions.""" - self.spec: Final[Any] = spec - """The SDL_AudioSpec as a CFFI object.""" self.frequency: Final[int] = spec.freq """The audio device sound frequency.""" - self.is_capture: Final[bool] = capture + self.is_capture: Final[bool] = bool(not lib.SDL_IsAudioDevicePlayback(device_id)) """True if this is a recording device instead of an output device.""" self.format: Final[np.dtype[Any]] = _dtype_from_format(spec.format) """The format used for audio samples with this device.""" self.channels: Final[int] = int(spec.channels) """The number of audio channels for this device.""" - self.silence: float = int(spec.silence) + self.silence: float = int(lib.SDL_GetSilenceValueForFormat(spec.format)) """The value of silence, according to SDL.""" - self.buffer_samples: Final[int] = int(spec.samples) + self.buffer_samples: Final[int] = int(samples[0]) """The size of the audio buffer in samples.""" - self.buffer_bytes: Final[int] = int(spec.size) + self.buffer_bytes: Final[int] = int(self.format.itemsize * self.channels * self.buffer_samples) """The size of the audio buffer in bytes.""" - self._handle: Any | None = None - self._callback: Callable[[AudioDevice, NDArray[Any]], None] = self.__default_callback + self.is_physical: Final[bool] = bool(lib.SDL_IsAudioDevicePhysical(device_id)) + """True of this is a physical device, or False if this is a logical device. + + .. versionadded:: Unreleased + """ def __repr__(self) -> str: """Return a representation of this device.""" - if self.stopped: - return f"<{self.__class__.__name__}() stopped=True>" items = [ f"{self.__class__.__name__}(device_id={self.device_id})", f"frequency={self.frequency}", f"is_capture={self.is_capture}", + f"is_physical={self.is_physical}", f"format={self.format}", f"channels={self.channels}", f"buffer_samples={self.buffer_samples}", @@ -239,24 +288,56 @@ def __repr__(self) -> str: if self.silence: items.append(f"silence={self.silence}") - if self._handle is not None: - items.append(f"callback={self._callback}") return f"""<{" ".join(items)}>""" @property - def callback(self) -> Callable[[AudioDevice, NDArray[Any]], None]: - """If the device was opened with a callback enabled, then you may get or set the callback with this attribute.""" - if self._handle is None: - msg = "This AudioDevice was opened without a callback." - raise TypeError(msg) - return self._callback + def name(self) -> str: + """Name of the device. - @callback.setter - def callback(self, new_callback: Callable[[AudioDevice, NDArray[Any]], None]) -> None: - if self._handle is None: - msg = "This AudioDevice was opened without a callback." - raise TypeError(msg) - self._callback = new_callback + .. versionadded:: Unreleased + """ + return str(ffi.string(_check_p(lib.SDL_GetAudioDeviceName(self.device_id))), encoding="utf-8") + + @property + def gain(self) -> float: + """Get or set the logical audio device gain. + + Default is 1.0 but can be set higher or zero. + + .. versionadded:: Unreleased + """ + return _check_float(lib.SDL_GetAudioDeviceGain(self.device_id), failure=-1.0) + + @gain.setter + def gain(self, value: float, /) -> None: + _check(lib.SDL_SetAudioDeviceGain(self.device_id, value)) + + def open( + self, + format: DTypeLike | None = None, # noqa: A002 + channels: int | None = None, + frequency: int | None = None, + ) -> Self: + """Open a new logical audio device for this device. + + .. versionadded:: Unreleased + + .. seealso:: + https://wiki.libsdl.org/SDL3/SDL_OpenAudioDevice + """ + new_spec = _AudioSpec( + format=_get_format(format if format is not None else self.format), + channels=channels if channels is not None else self.channels, + frequency=frequency if frequency is not None else self.frequency, + ) + return self.__class__( + ffi.gc( + ffi.cast( + "SDL_AudioDeviceID", _check_int(lib.SDL_OpenAudioDevice(self.device_id, (new_spec,)), failure=0) + ), + lib.SDL_CloseAudioDevice, + ) + ) @property def _sample_size(self) -> int: @@ -264,20 +345,26 @@ def _sample_size(self) -> int: return self.format.itemsize * self.channels @property + @deprecated("This is no longer used by the SDL3 API") def stopped(self) -> bool: - """Is True if the device has failed or was closed.""" - if not hasattr(self, "device_id"): - return True - return bool(lib.SDL_GetAudioDeviceStatus(self.device_id) == lib.SDL_AUDIO_STOPPED) + """Is True if the device has failed or was closed. + + .. deprecated:: Unreleased + No longer used by the SDL3 API. + """ + return bool(not hasattr(self, "device_id")) @property def paused(self) -> bool: """Get or set the device paused state.""" - return bool(lib.SDL_GetAudioDeviceStatus(self.device_id) != lib.SDL_AUDIO_PLAYING) + return bool(lib.SDL_AudioDevicePaused(self.device_id)) @paused.setter def paused(self, value: bool) -> None: - lib.SDL_PauseAudioDevice(self.device_id, value) + if value: + _check(lib.SDL_PauseAudioDevice(self.device_id)) + else: + _check(lib.SDL_ResumeAudioDevice(self.device_id)) def _verify_array_format(self, samples: NDArray[Any]) -> NDArray[Any]: if samples.dtype != self.format: @@ -285,15 +372,15 @@ def _verify_array_format(self, samples: NDArray[Any]) -> NDArray[Any]: raise TypeError(msg) return samples - def _convert_array(self, samples_: ArrayLike) -> NDArray[Any]: + def _convert_array(self, samples_: ArrayLike) -> NDArray[np.number]: if isinstance(samples_, np.ndarray): samples_ = self._verify_array_format(samples_) - samples: NDArray[Any] = np.asarray(samples_, dtype=self.format) + samples: NDArray[np.number] = np.asarray(samples_, dtype=self.format) if len(samples.shape) < 2: # noqa: PLR2004 samples = samples[:, np.newaxis] return np.ascontiguousarray(np.broadcast_to(samples, (samples.shape[0], self.channels)), dtype=self.format) - def convert(self, sound: ArrayLike, rate: int | None = None) -> NDArray[Any]: + def convert(self, sound: ArrayLike, rate: int | None = None) -> NDArray[np.number]: """Convert an audio sample into a format supported by this device. Returns the converted array. This might be a reference to the input array if no conversion was needed. @@ -319,50 +406,27 @@ def convert(self, sound: ArrayLike, rate: int | None = None) -> NDArray[Any]: out_rate=self.frequency, ) - @property - def _queued_bytes(self) -> int: - """The current amount of bytes remaining in the audio queue.""" - return int(lib.SDL_GetQueuedAudioSize(self.device_id)) - - @property - def queued_samples(self) -> int: - """The current amount of samples remaining in the audio queue.""" - return self._queued_bytes // self._sample_size - - def queue_audio(self, samples: ArrayLike) -> None: - """Append audio samples to the audio data queue.""" - assert not self.is_capture - samples = self._convert_array(samples) - buffer = ffi.from_buffer(samples) - lib.SDL_QueueAudio(self.device_id, buffer, len(buffer)) - - def dequeue_audio(self) -> NDArray[Any]: - """Return the audio buffer from a capture stream.""" - assert self.is_capture - out_samples = self._queued_bytes // self._sample_size - out = np.empty((out_samples, self.channels), self.format) - buffer = ffi.from_buffer(out) - bytes_returned = lib.SDL_DequeueAudio(self.device_id, buffer, len(buffer)) - samples_returned = bytes_returned // self._sample_size - assert samples_returned == out_samples - return out - - def __del__(self) -> None: - self.close() - def close(self) -> None: """Close this audio device. Using this object after it has been closed is invalid.""" if not hasattr(self, "device_id"): return - lib.SDL_CloseAudioDevice(self.device_id) - del self.device_id + ffi.release(self._device_id) + del self._device_id + @deprecated("Use contextlib.closing if you want to close this device after a context.") def __enter__(self) -> Self: - """Return self and enter a managed context.""" + """Return self and enter a managed context. + + .. deprecated:: Unreleased + Use :func:`contextlib.closing` if you want to close this device after a context. + """ return self def __exit__( - self, type: type[BaseException] | None, value: BaseException | None, traceback: TracebackType | None + self, + type: type[BaseException] | None, # noqa: A002 + value: BaseException | None, + traceback: TracebackType | None, ) -> None: """Close the device when exiting the context.""" self.close() @@ -371,6 +435,264 @@ def __exit__( def __default_callback(device: AudioDevice, stream: NDArray[Any]) -> None: stream[...] = device.silence + def new_stream( + self, + format: DTypeLike, # noqa: A002 + channels: int, + frequency: int, + ) -> AudioStream: + """Create, bind, and return a new :any:`AudioStream` for this device. + + .. versionadded:: Unreleased + """ + new_stream = AudioStream.new(format=format, channels=channels, frequency=frequency) + self.bind((new_stream,)) + return new_stream + + def bind(self, streams: Iterable[AudioStream], /) -> None: + """Bind one or more :any:`AudioStream`'s to this device. + + .. seealso:: + https://wiki.libsdl.org/SDL3/SDL_BindAudioStreams + """ + streams = list(streams) + _check(lib.SDL_BindAudioStreams(self.device_id, [s._stream_p for s in streams], len(streams))) + + +@dataclass(frozen=True) +class AudioStreamCallbackData: + """Data provided to AudioStream callbacks. + + .. versionadded:: Unreleased + """ + + additional_bytes: int + """Amount of bytes needed to fulfill the request of the caller. Can be zero.""" + additional_samples: int + """Amount of samples needed to fulfill the request of the caller. Can be zero.""" + total_bytes: int + """Amount of bytes requested or provided by the caller.""" + total_samples: int + """Amount of samples requested or provided by the caller.""" + + +_audio_stream_get_callbacks: dict[AudioStream, Callable[[AudioStream, AudioStreamCallbackData], Any]] = {} +_audio_stream_put_callbacks: dict[AudioStream, Callable[[AudioStream, AudioStreamCallbackData], Any]] = {} + +_audio_stream_registry: weakref.WeakValueDictionary[int, AudioStream] = weakref.WeakValueDictionary() + + +class AudioStream: + """An SDL audio stream. + + This class is commonly created with :any:`AudioDevice.new_stream` which creates a new stream bound to the device. + + ..versionadded:: Unreleased + """ + + __slots__ = ("__weakref__", "_stream_p") + + _stream_p: Any + + def __new__( # noqa: PYI034 + cls, + stream_p: Any, # noqa: ANN401 + /, + ) -> AudioStream: + """Return an AudioStream for the provided `SDL_AudioStream*` C pointer.""" + assert ffi.typeof(stream_p) is ffi.typeof("SDL_AudioStream*"), ffi.typeof(stream_p) + stream_int = int(ffi.cast("intptr_t", stream_p)) + self = super().__new__(cls) + self._stream_p = stream_p + return _audio_stream_registry.setdefault(stream_int, self) + + @classmethod + def new( # noqa: PLR0913 + cls, + format: DTypeLike, # noqa: A002 + channels: int, + frequency: int, + out_format: DTypeLike | None = None, + out_channels: int | None = None, + out_frequency: int | None = None, + ) -> Self: + """Create a new unbound AudioStream.""" + in_spec = _AudioSpec(format=_get_format(format), channels=channels, frequency=frequency) + out_spec = _AudioSpec( + format=_get_format(out_format) if out_format is not None else in_spec.format, + channels=out_channels if out_channels is not None else channels, + frequency=out_frequency if out_frequency is not None else frequency, + ) + return cls(ffi.gc(_check_p(lib.SDL_CreateAudioStream((in_spec,), (out_spec,))), lib.SDL_DestroyAudioStream)) + + def close(self) -> None: + """Close this AudioStream and release its resources.""" + if not hasattr(self, "_stream_p"): + return + self.getter_callback = None + self.putter_callback = None + ffi.release(self._stream_p) + + def unbind(self) -> None: + """Unbind this stream from its currently bound device.""" + lib.SDL_UnbindAudioStream(self._stream_p) + + @property + @contextlib.contextmanager + def _lock(self) -> Iterator[None]: + """Lock context for this stream.""" + try: + lib.SDL_LockAudioStream(self._stream_p) + yield + finally: + lib.SDL_UnlockAudioStream(self._stream_p) + + @property + def _src_spec(self) -> _AudioSpec: + c_spec = ffi.new("SDL_AudioSpec*") + _check(lib.SDL_GetAudioStreamFormat(self._stream_p, c_spec, ffi.NULL)) + return _AudioSpec.from_c(c_spec) + + @property + def _src_sample_size(self) -> int: + spec = self._src_spec + return spec._dtype.itemsize * spec.channels + + @property + def _dst_sample_size(self) -> int: + spec = self._dst_spec + return spec._dtype.itemsize * spec.channels + + @property + def _dst_spec(self) -> _AudioSpec: + c_spec = ffi.new("SDL_AudioSpec*") + _check(lib.SDL_GetAudioStreamFormat(self._stream_p, ffi.NULL, c_spec)) + return _AudioSpec.from_c(c_spec) + + @property + def queued_bytes(self) -> int: + """The current amount of bytes remaining in the audio queue.""" + return _check_int(lib.SDL_GetAudioStreamQueued(self._stream_p), failure=-1) + + @property + def queued_samples(self) -> int: + """The estimated amount of samples remaining in the audio queue.""" + return self.queued_bytes // self._src_sample_size + + @property + def available_bytes(self) -> int: + """The current amount of converted data in this audio stream.""" + return _check_int(lib.SDL_GetAudioStreamAvailable(self._stream_p), failure=-1) + + @property + def available_samples(self) -> int: + """The current amount of converted samples in this audio stream.""" + return self.available_bytes // self._dst_sample_size + + def queue_audio(self, samples: ArrayLike) -> None: + """Append audio samples to the audio data queue.""" + with self._lock: + src_spec = self._src_spec + src_format = _dtype_from_format(src_spec.format) + if isinstance(samples, np.ndarray) and samples.dtype != src_format: + msg = f"Expected an array of dtype {src_format}, got {samples.dtype} instead." + raise TypeError(msg) + samples = np.asarray(samples, dtype=src_format) + if len(samples.shape) < 2: # noqa: PLR2004 + samples = samples[:, np.newaxis] + samples = np.ascontiguousarray( + np.broadcast_to(samples, (samples.shape[0], src_spec.channels)), dtype=src_format + ) + buffer = ffi.from_buffer(samples) + _check(lib.SDL_PutAudioStreamData(self._stream_p, buffer, len(buffer))) + + def flush(self) -> None: + """Ensure all queued data is available. + + This may queue silence to the end of the stream. + + .. seealso:: + https://wiki.libsdl.org/SDL3/SDL_FlushAudioStream + """ + _check(lib.SDL_FlushAudioStream(self._stream_p)) + + def dequeue_audio(self) -> NDArray[Any]: + """Return the converted output audio from this stream.""" + with self._lock: + dst_spec = self._dst_spec + out_samples = self.available_samples + out = np.empty((out_samples, dst_spec.channels), _dtype_from_format(dst_spec.format)) + buffer = ffi.from_buffer(out) + bytes_returned = _check_int(lib.SDL_GetAudioStreamData(self._stream_p, buffer, len(buffer)), failure=-1) + samples_returned = bytes_returned // self._dst_sample_size + return out[:samples_returned] + + @property + def gain(self) -> float: + """Get or set the audio stream gain. + + Default is 1.0 but can be set higher or zero. + """ + return _check_float(lib.SDL_GetAudioStreamGain(self._stream_p), failure=-1.0) + + @gain.setter + def gain(self, value: float, /) -> None: + _check(lib.SDL_SetAudioStreamGain(self._stream_p, value)) + + @property + def frequency_ratio(self) -> float: + """Get or set the frequency ratio, affecting the speed and pitch of the stream. + + Higher values play the audio faster. + + Default is 1.0. + """ + return _check_float(lib.SDL_GetAudioStreamFrequencyRatio(self._stream_p), failure=-1.0) + + @frequency_ratio.setter + def frequency_ratio(self, value: float, /) -> None: + _check(lib.SDL_SetAudioStreamFrequencyRatio(self._stream_p, value)) + + @property + def getter_callback(self) -> Callable[[AudioStream, AudioStreamCallbackData], Any] | None: + """Get or assign the stream get-callback for this stream. + + .. seealso:: + https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamGetCallback + """ + return _audio_stream_get_callbacks.get(self) + + @getter_callback.setter + def getter_callback(self, callback: Callable[[AudioStream, AudioStreamCallbackData], Any] | None, /) -> None: + if callback is None: + _check(lib.SDL_SetAudioStreamGetCallback(self._stream_p, ffi.NULL, ffi.NULL)) + _audio_stream_get_callbacks.pop(self, None) + else: + _audio_stream_get_callbacks[self] = callback + _check( + lib.SDL_SetAudioStreamGetCallback(self._stream_p, lib._sdl_audio_stream_callback, ffi.cast("void*", 0)) + ) + + @property + def putter_callback(self) -> Callable[[AudioStream, AudioStreamCallbackData], Any] | None: + """Get or assign the stream put-callback for this stream. + + .. seealso:: + https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamPutCallback + """ + return _audio_stream_put_callbacks.get(self) + + @putter_callback.setter + def putter_callback(self, callback: Callable[[AudioStream, AudioStreamCallbackData], Any] | None, /) -> None: + if callback is None: + _check(lib.SDL_SetAudioStreamPutCallback(self._stream_p, ffi.NULL, ffi.NULL)) + _audio_stream_put_callbacks.pop(self, None) + else: + _audio_stream_put_callbacks[self] = callback + _check( + lib.SDL_SetAudioStreamPutCallback(self._stream_p, lib._sdl_audio_stream_callback, ffi.cast("void*", 1)) + ) + class _LoopSoundFunc: def __init__(self, sound: NDArray[Any], loops: int, on_end: Callable[[Channel], None] | None) -> None: @@ -398,6 +720,7 @@ class Channel: """The :any:`BasicMixer` is channel belongs to.""" def __init__(self) -> None: + """Initialize this channel with generic attributes.""" self._lock = threading.RLock() self.volume: float | tuple[float, ...] = 1.0 self.sound_queue: list[NDArray[Any]] = [] @@ -471,37 +794,53 @@ def stop(self) -> None: self.fadeout(0.0005) -class BasicMixer(threading.Thread): +@deprecated( + "Changes in the SDL3 API have made this classes usefulness questionable." + "\nThis class should be replaced with custom streams." +) +class BasicMixer: """An SDL sound mixer implemented in Python and Numpy. + Example:: + + import time + + import soundfile # pip install soundfile + import tcod.sdl.audio + + device = tcod.sdl.audio.get_default_playback().open() + mixer = tcod.sdl.audio.BasicMixer(device) # Setup BasicMixer with the default audio output + sound, sample_rate = soundfile.read("example_sound.wav") # Load an audio sample using SoundFile + sound = mixer.device.convert(sound, sample_rate) # Convert this sample to the format expected by the device + channel = mixer.play(sound) # Start asynchronous playback, audio is mixed on a separate Python thread + while channel.busy: # Wait until the sample is done playing + time.sleep(0.001) + + .. versionadded:: 13.6 + + .. versionchanged:: Unreleased + Added `frequency` and `channels` parameters. + + .. deprecated:: Unreleased + Changes in the SDL3 API have made this classes usefulness questionable. + This class should be replaced with custom streams. """ - def __init__(self, device: AudioDevice) -> None: + def __init__(self, device: AudioDevice, *, frequency: int | None = None, channels: int | None = None) -> None: + """Initialize this mixer using the provided device.""" self.channels: dict[Hashable, Channel] = {} - assert device.format == np.float32 - super().__init__(daemon=True) self.device = device """The :any:`AudioDevice`""" + self._frequency = frequency if frequency is not None else device.frequency + self._channels = channels if channels is not None else device.channels self._lock = threading.RLock() - self._running = True - self.start() - - def run(self) -> None: - buffer = np.full( - (self.device.buffer_samples, self.device.channels), self.device.silence, dtype=self.device.format - ) - while self._running: - if self.device._queued_bytes > 0: - time.sleep(0.001) - continue - self._on_stream(buffer) - self.device.queue_audio(buffer) - buffer[:] = self.device.silence + self._stream = device.new_stream(format=np.float32, frequency=self._frequency, channels=self._channels) + self._stream.getter_callback = self._on_stream def close(self) -> None: """Shutdown this mixer, all playing audio will be abruptly stopped.""" - self._running = False + self._stream.close() def get_channel(self, key: Hashable) -> Channel: """Return a channel tied to with the given key. @@ -554,47 +893,98 @@ def stop(self) -> None: for channel in self.channels.values(): channel.stop() - def _on_stream(self, stream: NDArray[Any]) -> None: + def _on_stream(self, audio_stream: AudioStream, data: AudioStreamCallbackData) -> None: """Called to fill the audio buffer.""" + if data.additional_samples <= 0: + return + stream: NDArray[np.float32] = np.zeros((data.additional_samples, self._channels), dtype=np.float32) with self._lock: for channel in list(self.channels.values()): channel._on_mix(stream) - - -class _AudioCallbackUserdata: - device: AudioDevice + audio_stream.queue_audio(stream) @ffi.def_extern() # type: ignore[misc] -def _sdl_audio_callback(userdata: Any, stream: Any, length: int) -> None: # noqa: ANN401 +def _sdl_audio_stream_callback(userdata: Any, stream_p: Any, additional_amount: int, total_amount: int, /) -> None: # noqa: ANN401 """Handle audio device callbacks.""" - data: _AudioCallbackUserdata = ffi.from_handle(userdata) - device = data.device - buffer = np.frombuffer(ffi.buffer(stream, length), dtype=device.format).reshape(-1, device.channels) - with _ProtectedContext(device): - device._callback(device, buffer) + stream = AudioStream(stream_p) + is_put_callback = bool(userdata) + callback = (_audio_stream_put_callbacks if is_put_callback else _audio_stream_get_callbacks).get(stream) + if callback is None: + return + sample_size = stream._dst_sample_size if is_put_callback else stream._src_sample_size + callback( + stream, + AudioStreamCallbackData( + additional_bytes=additional_amount, + additional_samples=additional_amount // sample_size, + total_bytes=total_amount, + total_samples=total_amount // sample_size, + ), + ) + +def get_devices() -> dict[str, AudioDevice]: + """Iterate over the available audio output devices. -def _get_devices(capture: bool) -> Iterator[str]: - """Get audio devices from SDL_GetAudioDeviceName.""" - with tcod.sdl.sys._ScopeInit(tcod.sdl.sys.Subsystem.AUDIO): - device_count = lib.SDL_GetNumAudioDevices(capture) - for i in range(device_count): - yield str(ffi.string(lib.SDL_GetAudioDeviceName(i, capture)), encoding="utf-8") + .. versionchanged:: Unreleased + Now returns a dictionary of :any:`AudioDevice`. + """ + tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) + count = ffi.new("int[1]") + devices_array = ffi.gc(lib.SDL_GetAudioPlaybackDevices(count), lib.SDL_free) + return { + device.name: device + for device in (AudioDevice(ffi.cast("SDL_AudioDeviceID", p)) for p in devices_array[0 : count[0]]) + } -def get_devices() -> Iterator[str]: - """Iterate over the available audio output devices.""" - yield from _get_devices(capture=False) +def get_capture_devices() -> dict[str, AudioDevice]: + """Iterate over the available audio capture devices. + .. versionchanged:: Unreleased + Now returns a dictionary of :any:`AudioDevice`. + """ + tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) + count = ffi.new("int[1]") + devices_array = ffi.gc(lib.SDL_GetAudioRecordingDevices(count), lib.SDL_free) + return { + device.name: device + for device in (AudioDevice(ffi.cast("SDL_AudioDeviceID", p)) for p in devices_array[0 : count[0]]) + } -def get_capture_devices() -> Iterator[str]: - """Iterate over the available audio capture devices.""" - yield from _get_devices(capture=True) +def get_default_playback() -> AudioDevice: + """Return the default playback device. + Example: + playback_device = tcod.sdl.audio.get_default_playback().open() + + .. versionadded:: Unreleased + """ + tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) + return AudioDevice(ffi.cast("SDL_AudioDeviceID", lib.SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK)) + + +def get_default_recording() -> AudioDevice: + """Return the default recording device. + + Example: + recording_device = tcod.sdl.audio.get_default_recording().open() + + .. versionadded:: Unreleased + """ + tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) + return AudioDevice(ffi.cast("SDL_AudioDeviceID", lib.SDL_AUDIO_DEVICE_DEFAULT_RECORDING)) + + +@deprecated("This is no longer used", category=FutureWarning) class AllowedChanges(enum.IntFlag): - """Which parameters are allowed to be changed when the values given are not supported.""" + """Which parameters are allowed to be changed when the values given are not supported. + + .. deprecated:: Unreleased + This is no longer used. + """ NONE = 0 """""" @@ -610,15 +1000,18 @@ class AllowedChanges(enum.IntFlag): """""" -def open( # noqa: PLR0913 +@deprecated( + "This is an outdated method.\nUse 'tcod.sdl.audio.get_default_playback().open()' instead.", category=FutureWarning +) +def open( # noqa: A001, PLR0913 name: str | None = None, - capture: bool = False, + capture: bool = False, # noqa: FBT001, FBT002 *, frequency: int = 44100, - format: DTypeLike = np.float32, + format: DTypeLike = np.float32, # noqa: A002 channels: int = 2, - samples: int = 0, - allowed_changes: AllowedChanges = AllowedChanges.NONE, + samples: int = 0, # noqa: ARG001 + allowed_changes: AllowedChanges = AllowedChanges.NONE, # noqa: ARG001 paused: bool = False, callback: None | Literal[True] | Callable[[AudioDevice, NDArray[Any]], None] = None, ) -> AudioDevice: @@ -630,65 +1023,47 @@ def open( # noqa: PLR0913 frequency: The desired sample rate to open the device with. format: The data format to use for samples as a NumPy dtype. channels: The number of speakers for the device. 1, 2, 4, or 6 are typical options. - samples: The desired size of the audio buffer, must be a power of two. - allowed_changes: - By default if the hardware does not support the desired format than SDL will transparently convert between - formats for you. - Otherwise you can specify which parameters are allowed to be changed to fit the hardware better. + samples: This parameter is ignored. + allowed_changes: This parameter is ignored. paused: If True then the device will begin in a paused state. It can then be unpaused by assigning False to :any:`AudioDevice.paused`. - callback: - If None then this device will be opened in push mode and you'll have to use :any:`AudioDevice.queue_audio` - to send audio data or :any:`AudioDevice.dequeue_audio` to receive it. - If a callback is given then you can change it later, but you can not enable or disable the callback on an - opened device. - If True then a default callback which plays silence will be used, this is useful if you need the audio - device before your callback is ready. + callback: An optional callback to use, this is deprecated. If a callback is given then it will be called with the `AudioDevice` and a Numpy buffer of the data stream. This callback will be run on a separate thread. - Exceptions not handled by the callback become unraiseable and will be handled by :any:`sys.unraisablehook`. - .. seealso:: - https://wiki.libsdl.org/SDL_AudioSpec - https://wiki.libsdl.org/SDL_OpenAudioDevice + .. versionchanged:: Unreleased + SDL3 returns audio devices differently, exact formatting is set with :any:`AudioDevice.new_stream` instead. + + `samples` and `allowed_changes` are ignored. + .. deprecated:: Unreleased + This is an outdated method. + Use :any:`AudioDevice.open` instead, for example: + ``tcod.sdl.audio.get_default_playback().open()`` """ tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) - desired = ffi.new( - "SDL_AudioSpec*", - { - "freq": frequency, - "format": _get_format(format), - "channels": channels, - "samples": samples, - "callback": ffi.NULL, - "userdata": ffi.NULL, - }, - ) - callback_data = _AudioCallbackUserdata() - if callback is not None: - handle = ffi.new_handle(callback_data) - desired.callback = lib._sdl_audio_callback - desired.userdata = handle + if name is None: + device = get_default_playback() if not capture else get_default_recording() else: - handle = None - - obtained = ffi.new("SDL_AudioSpec*") - device_id: int = lib.SDL_OpenAudioDevice( - ffi.NULL if name is None else name.encode("utf-8"), - capture, - desired, - obtained, - allowed_changes, - ) - assert device_id >= 0, _get_error() - device = AudioDevice(device_id, capture, obtained) - if callback is not None: - callback_data.device = device - device._handle = handle - if callback is not True: - device._callback = callback + device = (get_devices() if not capture else get_capture_devices())[name] + assert device.is_capture is capture + device = device.open(frequency=frequency, format=format, channels=channels) device.paused = paused + + if callback is not None and callback is not True: + stream = device.new_stream(format=format, channels=channels, frequency=frequency) + + def _get_callback(stream: AudioStream, data: AudioStreamCallbackData) -> None: + if data.additional_samples <= 0: + return + buffer = np.full( + (data.additional_samples, channels), fill_value=_silence_value_for_format(format), dtype=format + ) + callback(device, buffer) + stream.queue_audio(buffer) + + stream.getter_callback = _get_callback + return device diff --git a/tcod/sdl/constants.py b/tcod/sdl/constants.py new file mode 100644 index 00000000..39d766f4 --- /dev/null +++ b/tcod/sdl/constants.py @@ -0,0 +1,489 @@ +"""SDL private constants.""" + +SDL_PRILL_PREFIX = "ll" +SDL_PRILLX = Ellipsis +SDL_FUNCTION = "???" +SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER = "SDL.thread.create.entry_function" +SDL_PROP_THREAD_CREATE_NAME_STRING = "SDL.thread.create.name" +SDL_PROP_THREAD_CREATE_USERDATA_POINTER = "SDL.thread.create.userdata" +SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER = "SDL.thread.create.stacksize" +SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER = "SDL.iostream.windows.handle" +SDL_PROP_IOSTREAM_STDIO_FILE_POINTER = "SDL.iostream.stdio.file" +SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER = "SDL.iostream.file_descriptor" +SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER = "SDL.iostream.android.aasset" +SDL_PROP_IOSTREAM_MEMORY_POINTER = "SDL.iostream.memory.base" +SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER = "SDL.iostream.memory.size" +SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER = "SDL.iostream.dynamic.memory" +SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER = "SDL.iostream.dynamic.chunksize" +SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT = "SDL.surface.SDR_white_point" +SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT = "SDL.surface.HDR_headroom" +SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING = "SDL.surface.tonemap" +SDL_PROP_SURFACE_HOTSPOT_X_NUMBER = "SDL.surface.hotspot.x" +SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER = "SDL.surface.hotspot.y" +SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER = "SDL.video.wayland.wl_display" +SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN = "SDL.display.HDR_enabled" +SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER = "SDL.display.KMSDRM.panel_orientation" +SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN = "SDL.window.create.always_on_top" +SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN = "SDL.window.create.borderless" +SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN = "SDL.window.create.focusable" +SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN = "SDL.window.create.external_graphics_context" +SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER = "SDL.window.create.flags" +SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN = "SDL.window.create.fullscreen" +SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER = "SDL.window.create.height" +SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN = "SDL.window.create.hidden" +SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN = "SDL.window.create.high_pixel_density" +SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN = "SDL.window.create.maximized" +SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN = "SDL.window.create.menu" +SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN = "SDL.window.create.metal" +SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN = "SDL.window.create.minimized" +SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN = "SDL.window.create.modal" +SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN = "SDL.window.create.mouse_grabbed" +SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN = "SDL.window.create.opengl" +SDL_PROP_WINDOW_CREATE_PARENT_POINTER = "SDL.window.create.parent" +SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN = "SDL.window.create.resizable" +SDL_PROP_WINDOW_CREATE_TITLE_STRING = "SDL.window.create.title" +SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN = "SDL.window.create.transparent" +SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN = "SDL.window.create.tooltip" +SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN = "SDL.window.create.utility" +SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN = "SDL.window.create.vulkan" +SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER = "SDL.window.create.width" +SDL_PROP_WINDOW_CREATE_X_NUMBER = "SDL.window.create.x" +SDL_PROP_WINDOW_CREATE_Y_NUMBER = "SDL.window.create.y" +SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER = "SDL.window.create.cocoa.window" +SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER = "SDL.window.create.cocoa.view" +SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN = "SDL.window.create.wayland.surface_role_custom" +SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN = "SDL.window.create.wayland.create_egl_window" +SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER = "SDL.window.create.wayland.wl_surface" +SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER = "SDL.window.create.win32.hwnd" +SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER = "SDL.window.create.win32.pixel_format_hwnd" +SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER = "SDL.window.create.x11.window" +SDL_PROP_WINDOW_SHAPE_POINTER = "SDL.window.shape" +SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN = "SDL.window.HDR_enabled" +SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT = "SDL.window.SDR_white_level" +SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT = "SDL.window.HDR_headroom" +SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER = "SDL.window.android.window" +SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER = "SDL.window.android.surface" +SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER = "SDL.window.uikit.window" +SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER = "SDL.window.uikit.metal_view_tag" +SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER = "SDL.window.uikit.opengl.framebuffer" +SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER = "SDL.window.uikit.opengl.renderbuffer" +SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER = "SDL.window.uikit.opengl.resolve_framebuffer" +SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER = "SDL.window.kmsdrm.dev_index" +SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER = "SDL.window.kmsdrm.drm_fd" +SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER = "SDL.window.kmsdrm.gbm_dev" +SDL_PROP_WINDOW_COCOA_WINDOW_POINTER = "SDL.window.cocoa.window" +SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER = "SDL.window.cocoa.metal_view_tag" +SDL_PROP_WINDOW_OPENVR_OVERLAY_ID = "SDL.window.openvr.overlay_id" +SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER = "SDL.window.vivante.display" +SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER = "SDL.window.vivante.window" +SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER = "SDL.window.vivante.surface" +SDL_PROP_WINDOW_WIN32_HWND_POINTER = "SDL.window.win32.hwnd" +SDL_PROP_WINDOW_WIN32_HDC_POINTER = "SDL.window.win32.hdc" +SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER = "SDL.window.win32.instance" +SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER = "SDL.window.wayland.display" +SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER = "SDL.window.wayland.surface" +SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER = "SDL.window.wayland.viewport" +SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER = "SDL.window.wayland.egl_window" +SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER = "SDL.window.wayland.xdg_surface" +SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER = "SDL.window.wayland.xdg_toplevel" +SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING = "SDL.window.wayland.xdg_toplevel_export_handle" +SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER = "SDL.window.wayland.xdg_popup" +SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER = "SDL.window.wayland.xdg_positioner" +SDL_PROP_WINDOW_X11_DISPLAY_POINTER = "SDL.window.x11.display" +SDL_PROP_WINDOW_X11_SCREEN_NUMBER = "SDL.window.x11.screen" +SDL_PROP_WINDOW_X11_WINDOW_NUMBER = "SDL.window.x11.window" +SDL_PROP_FILE_DIALOG_FILTERS_POINTER = "SDL.filedialog.filters" +SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER = "SDL.filedialog.nfilters" +SDL_PROP_FILE_DIALOG_WINDOW_POINTER = "SDL.filedialog.window" +SDL_PROP_FILE_DIALOG_LOCATION_STRING = "SDL.filedialog.location" +SDL_PROP_FILE_DIALOG_MANY_BOOLEAN = "SDL.filedialog.many" +SDL_PROP_FILE_DIALOG_TITLE_STRING = "SDL.filedialog.title" +SDL_PROP_FILE_DIALOG_ACCEPT_STRING = "SDL.filedialog.accept" +SDL_PROP_FILE_DIALOG_CANCEL_STRING = "SDL.filedialog.cancel" +SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN = "SDL.joystick.cap.mono_led" +SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN = "SDL.joystick.cap.rgb_led" +SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN = "SDL.joystick.cap.player_led" +SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN = "SDL.joystick.cap.rumble" +SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN = "SDL.joystick.cap.trigger_rumble" +SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN = Ellipsis +SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN = Ellipsis +SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN = Ellipsis +SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN = Ellipsis +SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN = Ellipsis +SDL_PROP_TEXTINPUT_TYPE_NUMBER = "SDL.textinput.type" +SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER = "SDL.textinput.capitalization" +SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN = "SDL.textinput.autocorrect" +SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN = "SDL.textinput.multiline" +SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER = "SDL.textinput.android.inputtype" +SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN = "SDL.gpu.device.create.debugmode" +SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN = "SDL.gpu.device.create.preferlowpower" +SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING = "SDL.gpu.device.create.name" +SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN = "SDL.gpu.device.create.shaders.private" +SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN = "SDL.gpu.device.create.shaders.spirv" +SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN = "SDL.gpu.device.create.shaders.dxbc" +SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN = "SDL.gpu.device.create.shaders.dxil" +SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN = "SDL.gpu.device.create.shaders.msl" +SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN = "SDL.gpu.device.create.shaders.metallib" +SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING = "SDL.gpu.device.create.d3d12.semantic" +SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING = "SDL.gpu.computepipeline.create.name" +SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING = "SDL.gpu.graphicspipeline.create.name" +SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING = "SDL.gpu.sampler.create.name" +SDL_PROP_GPU_SHADER_CREATE_NAME_STRING = "SDL.gpu.shader.create.name" +SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT = "SDL.gpu.texture.create.d3d12.clear.r" +SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT = "SDL.gpu.texture.create.d3d12.clear.g" +SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT = "SDL.gpu.texture.create.d3d12.clear.b" +SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT = "SDL.gpu.texture.create.d3d12.clear.a" +SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT = "SDL.gpu.texture.create.d3d12.clear.depth" +SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER = "SDL.gpu.texture.create.d3d12.clear.stencil" +SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING = "SDL.gpu.texture.create.name" +SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING = "SDL.gpu.buffer.create.name" +SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING = "SDL.gpu.transferbuffer.create.name" +SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED" +SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY = "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY" +SDL_HINT_ANDROID_BLOCK_ON_PAUSE = "SDL_ANDROID_BLOCK_ON_PAUSE" +SDL_HINT_ANDROID_LOW_LATENCY_AUDIO = "SDL_ANDROID_LOW_LATENCY_AUDIO" +SDL_HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON" +SDL_HINT_APP_ID = "SDL_APP_ID" +SDL_HINT_APP_NAME = "SDL_APP_NAME" +SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS" +SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION" +SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE = "SDL_AUDIO_ALSA_DEFAULT_DEVICE" +SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE = "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE" +SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE = "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE" +SDL_HINT_AUDIO_CATEGORY = "SDL_AUDIO_CATEGORY" +SDL_HINT_AUDIO_CHANNELS = "SDL_AUDIO_CHANNELS" +SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME = "SDL_AUDIO_DEVICE_APP_ICON_NAME" +SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES = "SDL_AUDIO_DEVICE_SAMPLE_FRAMES" +SDL_HINT_AUDIO_DEVICE_STREAM_NAME = "SDL_AUDIO_DEVICE_STREAM_NAME" +SDL_HINT_AUDIO_DEVICE_STREAM_ROLE = "SDL_AUDIO_DEVICE_STREAM_ROLE" +SDL_HINT_AUDIO_DISK_INPUT_FILE = "SDL_AUDIO_DISK_INPUT_FILE" +SDL_HINT_AUDIO_DISK_OUTPUT_FILE = "SDL_AUDIO_DISK_OUTPUT_FILE" +SDL_HINT_AUDIO_DISK_TIMESCALE = "SDL_AUDIO_DISK_TIMESCALE" +SDL_HINT_AUDIO_DRIVER = "SDL_AUDIO_DRIVER" +SDL_HINT_AUDIO_DUMMY_TIMESCALE = "SDL_AUDIO_DUMMY_TIMESCALE" +SDL_HINT_AUDIO_FORMAT = "SDL_AUDIO_FORMAT" +SDL_HINT_AUDIO_FREQUENCY = "SDL_AUDIO_FREQUENCY" +SDL_HINT_AUDIO_INCLUDE_MONITORS = "SDL_AUDIO_INCLUDE_MONITORS" +SDL_HINT_AUTO_UPDATE_JOYSTICKS = "SDL_AUTO_UPDATE_JOYSTICKS" +SDL_HINT_AUTO_UPDATE_SENSORS = "SDL_AUTO_UPDATE_SENSORS" +SDL_HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT" +SDL_HINT_CAMERA_DRIVER = "SDL_CAMERA_DRIVER" +SDL_HINT_CPU_FEATURE_MASK = "SDL_CPU_FEATURE_MASK" +SDL_HINT_JOYSTICK_DIRECTINPUT = "SDL_JOYSTICK_DIRECTINPUT" +SDL_HINT_FILE_DIALOG_DRIVER = "SDL_FILE_DIALOG_DRIVER" +SDL_HINT_DISPLAY_USABLE_BOUNDS = "SDL_DISPLAY_USABLE_BOUNDS" +SDL_HINT_EMSCRIPTEN_ASYNCIFY = "SDL_EMSCRIPTEN_ASYNCIFY" +SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR = "SDL_EMSCRIPTEN_CANVAS_SELECTOR" +SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" +SDL_HINT_ENABLE_SCREEN_KEYBOARD = "SDL_ENABLE_SCREEN_KEYBOARD" +SDL_HINT_EVDEV_DEVICES = "SDL_EVDEV_DEVICES" +SDL_HINT_EVENT_LOGGING = "SDL_EVENT_LOGGING" +SDL_HINT_FORCE_RAISEWINDOW = "SDL_FORCE_RAISEWINDOW" +SDL_HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION" +SDL_HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG" +SDL_HINT_GAMECONTROLLERCONFIG_FILE = "SDL_GAMECONTROLLERCONFIG_FILE" +SDL_HINT_GAMECONTROLLERTYPE = "SDL_GAMECONTROLLERTYPE" +SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES = "SDL_GAMECONTROLLER_IGNORE_DEVICES" +SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" +SDL_HINT_GAMECONTROLLER_SENSOR_FUSION = "SDL_GAMECONTROLLER_SENSOR_FUSION" +SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT = "SDL_GDK_TEXTINPUT_DEFAULT_TEXT" +SDL_HINT_GDK_TEXTINPUT_DESCRIPTION = "SDL_GDK_TEXTINPUT_DESCRIPTION" +SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH = "SDL_GDK_TEXTINPUT_MAX_LENGTH" +SDL_HINT_GDK_TEXTINPUT_SCOPE = "SDL_GDK_TEXTINPUT_SCOPE" +SDL_HINT_GDK_TEXTINPUT_TITLE = "SDL_GDK_TEXTINPUT_TITLE" +SDL_HINT_HIDAPI_LIBUSB = "SDL_HIDAPI_LIBUSB" +SDL_HINT_HIDAPI_LIBUSB_WHITELIST = "SDL_HIDAPI_LIBUSB_WHITELIST" +SDL_HINT_HIDAPI_UDEV = "SDL_HIDAPI_UDEV" +SDL_HINT_GPU_DRIVER = "SDL_GPU_DRIVER" +SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS = "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS" +SDL_HINT_HIDAPI_IGNORE_DEVICES = "SDL_HIDAPI_IGNORE_DEVICES" +SDL_HINT_IME_IMPLEMENTED_UI = "SDL_IME_IMPLEMENTED_UI" +SDL_HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR" +SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" +SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES = "SDL_JOYSTICK_ARCADESTICK_DEVICES" +SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED = "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED" +SDL_HINT_JOYSTICK_BLACKLIST_DEVICES = "SDL_JOYSTICK_BLACKLIST_DEVICES" +SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED = "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED" +SDL_HINT_JOYSTICK_DEVICE = "SDL_JOYSTICK_DEVICE" +SDL_HINT_JOYSTICK_ENHANCED_REPORTS = "SDL_JOYSTICK_ENHANCED_REPORTS" +SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES" +SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED" +SDL_HINT_JOYSTICK_GAMEINPUT = "SDL_JOYSTICK_GAMEINPUT" +SDL_HINT_JOYSTICK_GAMECUBE_DEVICES = "SDL_JOYSTICK_GAMECUBE_DEVICES" +SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED = "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED" +SDL_HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI" +SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS" +SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE" +SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE" +SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS = "SDL_JOYSTICK_HIDAPI_JOY_CONS" +SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED" +SDL_HINT_JOYSTICK_HIDAPI_LUNA = "SDL_JOYSTICK_HIDAPI_LUNA" +SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC" +SDL_HINT_JOYSTICK_HIDAPI_PS3 = "SDL_JOYSTICK_HIDAPI_PS3" +SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER = "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER" +SDL_HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4" +SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL = "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL" +SDL_HINT_JOYSTICK_HIDAPI_PS5 = "SDL_JOYSTICK_HIDAPI_PS5" +SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED" +SDL_HINT_JOYSTICK_HIDAPI_SHIELD = "SDL_JOYSTICK_HIDAPI_SHIELD" +SDL_HINT_JOYSTICK_HIDAPI_STADIA = "SDL_JOYSTICK_HIDAPI_STADIA" +SDL_HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM" +SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED = "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED" +SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK = "SDL_JOYSTICK_HIDAPI_STEAMDECK" +SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI = "SDL_JOYSTICK_HIDAPI_STEAM_HORI" +SDL_HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH" +SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED" +SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED" +SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS = "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS" +SDL_HINT_JOYSTICK_HIDAPI_WII = "SDL_JOYSTICK_HIDAPI_WII" +SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED" +SDL_HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX" +SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 = "SDL_JOYSTICK_HIDAPI_XBOX_360" +SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED" +SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS" +SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE = "SDL_JOYSTICK_HIDAPI_XBOX_ONE" +SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED" +SDL_HINT_JOYSTICK_IOKIT = "SDL_JOYSTICK_IOKIT" +SDL_HINT_JOYSTICK_LINUX_CLASSIC = "SDL_JOYSTICK_LINUX_CLASSIC" +SDL_HINT_JOYSTICK_LINUX_DEADZONES = "SDL_JOYSTICK_LINUX_DEADZONES" +SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS = "SDL_JOYSTICK_LINUX_DIGITAL_HATS" +SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES = "SDL_JOYSTICK_LINUX_HAT_DEADZONES" +SDL_HINT_JOYSTICK_MFI = "SDL_JOYSTICK_MFI" +SDL_HINT_JOYSTICK_RAWINPUT = "SDL_JOYSTICK_RAWINPUT" +SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT" +SDL_HINT_JOYSTICK_ROG_CHAKRAM = "SDL_JOYSTICK_ROG_CHAKRAM" +SDL_HINT_JOYSTICK_THREAD = "SDL_JOYSTICK_THREAD" +SDL_HINT_JOYSTICK_THROTTLE_DEVICES = "SDL_JOYSTICK_THROTTLE_DEVICES" +SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED = "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED" +SDL_HINT_JOYSTICK_WGI = "SDL_JOYSTICK_WGI" +SDL_HINT_JOYSTICK_WHEEL_DEVICES = "SDL_JOYSTICK_WHEEL_DEVICES" +SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED = "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED" +SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES = "SDL_JOYSTICK_ZERO_CENTERED_DEVICES" +SDL_HINT_JOYSTICK_HAPTIC_AXES = "SDL_JOYSTICK_HAPTIC_AXES" +SDL_HINT_KEYCODE_OPTIONS = "SDL_KEYCODE_OPTIONS" +SDL_HINT_KMSDRM_DEVICE_INDEX = "SDL_KMSDRM_DEVICE_INDEX" +SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER = "SDL_KMSDRM_REQUIRE_DRM_MASTER" +SDL_HINT_LOGGING = "SDL_LOGGING" +SDL_HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP" +SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" +SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH = "SDL_MAC_OPENGL_ASYNC_DISPATCH" +SDL_HINT_MAC_OPTION_AS_ALT = "SDL_MAC_OPTION_AS_ALT" +SDL_HINT_MAC_SCROLL_MOMENTUM = "SDL_MAC_SCROLL_MOMENTUM" +SDL_HINT_MAIN_CALLBACK_RATE = "SDL_MAIN_CALLBACK_RATE" +SDL_HINT_MOUSE_AUTO_CAPTURE = "SDL_MOUSE_AUTO_CAPTURE" +SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS = "SDL_MOUSE_DOUBLE_CLICK_RADIUS" +SDL_HINT_MOUSE_DOUBLE_CLICK_TIME = "SDL_MOUSE_DOUBLE_CLICK_TIME" +SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR = "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR" +SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE = "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE" +SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH = "SDL_MOUSE_FOCUS_CLICKTHROUGH" +SDL_HINT_MOUSE_NORMAL_SPEED_SCALE = "SDL_MOUSE_NORMAL_SPEED_SCALE" +SDL_HINT_MOUSE_RELATIVE_MODE_CENTER = "SDL_MOUSE_RELATIVE_MODE_CENTER" +SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE" +SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE = "SDL_MOUSE_RELATIVE_SYSTEM_SCALE" +SDL_HINT_MOUSE_RELATIVE_WARP_MOTION = "SDL_MOUSE_RELATIVE_WARP_MOTION" +SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE = "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE" +SDL_HINT_MOUSE_TOUCH_EVENTS = "SDL_MOUSE_TOUCH_EVENTS" +SDL_HINT_MUTE_CONSOLE_KEYBOARD = "SDL_MUTE_CONSOLE_KEYBOARD" +SDL_HINT_NO_SIGNAL_HANDLERS = "SDL_NO_SIGNAL_HANDLERS" +SDL_HINT_OPENGL_LIBRARY = "SDL_OPENGL_LIBRARY" +SDL_HINT_EGL_LIBRARY = "SDL_EGL_LIBRARY" +SDL_HINT_OPENGL_ES_DRIVER = "SDL_OPENGL_ES_DRIVER" +SDL_HINT_OPENVR_LIBRARY = "SDL_OPENVR_LIBRARY" +SDL_HINT_ORIENTATIONS = "SDL_ORIENTATIONS" +SDL_HINT_POLL_SENTINEL = "SDL_POLL_SENTINEL" +SDL_HINT_PREFERRED_LOCALES = "SDL_PREFERRED_LOCALES" +SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE = "SDL_QUIT_ON_LAST_WINDOW_CLOSE" +SDL_HINT_RENDER_DIRECT3D_THREADSAFE = "SDL_RENDER_DIRECT3D_THREADSAFE" +SDL_HINT_RENDER_DIRECT3D11_DEBUG = "SDL_RENDER_DIRECT3D11_DEBUG" +SDL_HINT_RENDER_VULKAN_DEBUG = "SDL_RENDER_VULKAN_DEBUG" +SDL_HINT_RENDER_GPU_DEBUG = "SDL_RENDER_GPU_DEBUG" +SDL_HINT_RENDER_GPU_LOW_POWER = "SDL_RENDER_GPU_LOW_POWER" +SDL_HINT_RENDER_DRIVER = "SDL_RENDER_DRIVER" +SDL_HINT_RENDER_LINE_METHOD = "SDL_RENDER_LINE_METHOD" +SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE = "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE" +SDL_HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC" +SDL_HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME" +SDL_HINT_ROG_GAMEPAD_MICE = "SDL_ROG_GAMEPAD_MICE" +SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED = "SDL_ROG_GAMEPAD_MICE_EXCLUDED" +SDL_HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER" +SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME" +SDL_HINT_SHUTDOWN_DBUS_ON_QUIT = "SDL_SHUTDOWN_DBUS_ON_QUIT" +SDL_HINT_STORAGE_TITLE_DRIVER = "SDL_STORAGE_TITLE_DRIVER" +SDL_HINT_STORAGE_USER_DRIVER = "SDL_STORAGE_USER_DRIVER" +SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL = "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL" +SDL_HINT_THREAD_PRIORITY_POLICY = "SDL_THREAD_PRIORITY_POLICY" +SDL_HINT_TIMER_RESOLUTION = "SDL_TIMER_RESOLUTION" +SDL_HINT_TOUCH_MOUSE_EVENTS = "SDL_TOUCH_MOUSE_EVENTS" +SDL_HINT_TRACKPAD_IS_TOUCH_ONLY = "SDL_TRACKPAD_IS_TOUCH_ONLY" +SDL_HINT_TV_REMOTE_AS_JOYSTICK = "SDL_TV_REMOTE_AS_JOYSTICK" +SDL_HINT_VIDEO_ALLOW_SCREENSAVER = "SDL_VIDEO_ALLOW_SCREENSAVER" +SDL_HINT_VIDEO_DISPLAY_PRIORITY = "SDL_VIDEO_DISPLAY_PRIORITY" +SDL_HINT_VIDEO_DOUBLE_BUFFER = "SDL_VIDEO_DOUBLE_BUFFER" +SDL_HINT_VIDEO_DRIVER = "SDL_VIDEO_DRIVER" +SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES = "SDL_VIDEO_DUMMY_SAVE_FRAMES" +SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK = "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK" +SDL_HINT_VIDEO_FORCE_EGL = "SDL_VIDEO_FORCE_EGL" +SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_VIDEO_MAC_FULLSCREEN_SPACES" +SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY = "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY" +SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" +SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES = "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES" +SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS = "SDL_VIDEO_SYNC_WINDOW_OPERATIONS" +SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR" +SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION = "SDL_VIDEO_WAYLAND_MODE_EMULATION" +SDL_HINT_VIDEO_WAYLAND_MODE_SCALING = "SDL_VIDEO_WAYLAND_MODE_SCALING" +SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR" +SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY = "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY" +SDL_HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER" +SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT = "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT" +SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR" +SDL_HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING" +SDL_HINT_VIDEO_X11_NODIRECTCOLOR = "SDL_VIDEO_X11_NODIRECTCOLOR" +SDL_HINT_VIDEO_X11_SCALING_FACTOR = "SDL_VIDEO_X11_SCALING_FACTOR" +SDL_HINT_VIDEO_X11_VISUALID = "SDL_VIDEO_X11_VISUALID" +SDL_HINT_VIDEO_X11_WINDOW_VISUALID = "SDL_VIDEO_X11_WINDOW_VISUALID" +SDL_HINT_VIDEO_X11_XRANDR = "SDL_VIDEO_X11_XRANDR" +SDL_HINT_VITA_ENABLE_BACK_TOUCH = "SDL_VITA_ENABLE_BACK_TOUCH" +SDL_HINT_VITA_ENABLE_FRONT_TOUCH = "SDL_VITA_ENABLE_FRONT_TOUCH" +SDL_HINT_VITA_MODULE_PATH = "SDL_VITA_MODULE_PATH" +SDL_HINT_VITA_PVR_INIT = "SDL_VITA_PVR_INIT" +SDL_HINT_VITA_RESOLUTION = "SDL_VITA_RESOLUTION" +SDL_HINT_VITA_PVR_OPENGL = "SDL_VITA_PVR_OPENGL" +SDL_HINT_VITA_TOUCH_MOUSE_DEVICE = "SDL_VITA_TOUCH_MOUSE_DEVICE" +SDL_HINT_VULKAN_DISPLAY = "SDL_VULKAN_DISPLAY" +SDL_HINT_VULKAN_LIBRARY = "SDL_VULKAN_LIBRARY" +SDL_HINT_WAVE_FACT_CHUNK = "SDL_WAVE_FACT_CHUNK" +SDL_HINT_WAVE_CHUNK_LIMIT = "SDL_WAVE_CHUNK_LIMIT" +SDL_HINT_WAVE_RIFF_CHUNK_SIZE = "SDL_WAVE_RIFF_CHUNK_SIZE" +SDL_HINT_WAVE_TRUNCATION = "SDL_WAVE_TRUNCATION" +SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED = "SDL_WINDOW_ACTIVATE_WHEN_RAISED" +SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN = "SDL_WINDOW_ACTIVATE_WHEN_SHOWN" +SDL_HINT_WINDOW_ALLOW_TOPMOST = "SDL_WINDOW_ALLOW_TOPMOST" +SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" +SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 = "SDL_WINDOWS_CLOSE_ON_ALT_F4" +SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS = "SDL_WINDOWS_ENABLE_MENU_MNEMONICS" +SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP = "SDL_WINDOWS_ENABLE_MESSAGELOOP" +SDL_HINT_WINDOWS_GAMEINPUT = "SDL_WINDOWS_GAMEINPUT" +SDL_HINT_WINDOWS_RAW_KEYBOARD = "SDL_WINDOWS_RAW_KEYBOARD" +SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL = "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL" +SDL_HINT_WINDOWS_INTRESOURCE_ICON = "SDL_WINDOWS_INTRESOURCE_ICON" +SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" +SDL_HINT_WINDOWS_USE_D3D9EX = "SDL_WINDOWS_USE_D3D9EX" +SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE = "SDL_WINDOWS_ERASE_BACKGROUND_MODE" +SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT = "SDL_X11_FORCE_OVERRIDE_REDIRECT" +SDL_HINT_X11_WINDOW_TYPE = "SDL_X11_WINDOW_TYPE" +SDL_HINT_X11_XCB_LIBRARY = "SDL_X11_XCB_LIBRARY" +SDL_HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED" +SDL_HINT_ASSERT = "SDL_ASSERT" +SDL_HINT_PEN_MOUSE_EVENTS = "SDL_PEN_MOUSE_EVENTS" +SDL_HINT_PEN_TOUCH_EVENTS = "SDL_PEN_TOUCH_EVENTS" +SDL_PROP_APP_METADATA_NAME_STRING = "SDL.app.metadata.name" +SDL_PROP_APP_METADATA_VERSION_STRING = "SDL.app.metadata.version" +SDL_PROP_APP_METADATA_IDENTIFIER_STRING = "SDL.app.metadata.identifier" +SDL_PROP_APP_METADATA_CREATOR_STRING = "SDL.app.metadata.creator" +SDL_PROP_APP_METADATA_COPYRIGHT_STRING = "SDL.app.metadata.copyright" +SDL_PROP_APP_METADATA_URL_STRING = "SDL.app.metadata.url" +SDL_PROP_APP_METADATA_TYPE_STRING = "SDL.app.metadata.type" +SDL_PROP_PROCESS_CREATE_ARGS_POINTER = "SDL.process.create.args" +SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER = "SDL.process.create.environment" +SDL_PROP_PROCESS_CREATE_STDIN_NUMBER = "SDL.process.create.stdin_option" +SDL_PROP_PROCESS_CREATE_STDIN_POINTER = "SDL.process.create.stdin_source" +SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER = "SDL.process.create.stdout_option" +SDL_PROP_PROCESS_CREATE_STDOUT_POINTER = "SDL.process.create.stdout_source" +SDL_PROP_PROCESS_CREATE_STDERR_NUMBER = "SDL.process.create.stderr_option" +SDL_PROP_PROCESS_CREATE_STDERR_POINTER = "SDL.process.create.stderr_source" +SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN = "SDL.process.create.stderr_to_stdout" +SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN = "SDL.process.create.background" +SDL_PROP_PROCESS_PID_NUMBER = "SDL.process.pid" +SDL_PROP_PROCESS_STDIN_POINTER = "SDL.process.stdin" +SDL_PROP_PROCESS_STDOUT_POINTER = "SDL.process.stdout" +SDL_PROP_PROCESS_STDERR_POINTER = "SDL.process.stderr" +SDL_PROP_PROCESS_BACKGROUND_BOOLEAN = "SDL.process.background" +SDL_SOFTWARE_RENDERER = "software" +SDL_PROP_RENDERER_CREATE_NAME_STRING = "SDL.renderer.create.name" +SDL_PROP_RENDERER_CREATE_WINDOW_POINTER = "SDL.renderer.create.window" +SDL_PROP_RENDERER_CREATE_SURFACE_POINTER = "SDL.renderer.create.surface" +SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER = "SDL.renderer.create.output_colorspace" +SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER = "SDL.renderer.create.present_vsync" +SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER = "SDL.renderer.create.vulkan.instance" +SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER = "SDL.renderer.create.vulkan.surface" +SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER = "SDL.renderer.create.vulkan.physical_device" +SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER = "SDL.renderer.create.vulkan.device" +SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER = ( + "SDL.renderer.create.vulkan.graphics_queue_family_index" +) +SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER = ( + "SDL.renderer.create.vulkan.present_queue_family_index" +) +SDL_PROP_RENDERER_NAME_STRING = "SDL.renderer.name" +SDL_PROP_RENDERER_WINDOW_POINTER = "SDL.renderer.window" +SDL_PROP_RENDERER_SURFACE_POINTER = "SDL.renderer.surface" +SDL_PROP_RENDERER_VSYNC_NUMBER = "SDL.renderer.vsync" +SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER = "SDL.renderer.max_texture_size" +SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER = "SDL.renderer.texture_formats" +SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER = "SDL.renderer.output_colorspace" +SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN = "SDL.renderer.HDR_enabled" +SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT = "SDL.renderer.SDR_white_point" +SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT = "SDL.renderer.HDR_headroom" +SDL_PROP_RENDERER_D3D9_DEVICE_POINTER = "SDL.renderer.d3d9.device" +SDL_PROP_RENDERER_D3D11_DEVICE_POINTER = "SDL.renderer.d3d11.device" +SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER = "SDL.renderer.d3d11.swap_chain" +SDL_PROP_RENDERER_D3D12_DEVICE_POINTER = "SDL.renderer.d3d12.device" +SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER = "SDL.renderer.d3d12.swap_chain" +SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER = "SDL.renderer.d3d12.command_queue" +SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER = "SDL.renderer.vulkan.instance" +SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER = "SDL.renderer.vulkan.surface" +SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER = "SDL.renderer.vulkan.physical_device" +SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER = "SDL.renderer.vulkan.device" +SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER = "SDL.renderer.vulkan.graphics_queue_family_index" +SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER = "SDL.renderer.vulkan.present_queue_family_index" +SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER = "SDL.renderer.vulkan.swapchain_image_count" +SDL_PROP_RENDERER_GPU_DEVICE_POINTER = "SDL.renderer.gpu.device" +SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER = "SDL.texture.create.colorspace" +SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER = "SDL.texture.create.format" +SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER = "SDL.texture.create.access" +SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER = "SDL.texture.create.width" +SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER = "SDL.texture.create.height" +SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT = "SDL.texture.create.SDR_white_point" +SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT = "SDL.texture.create.HDR_headroom" +SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER = "SDL.texture.create.d3d11.texture" +SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER = "SDL.texture.create.d3d11.texture_u" +SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER = "SDL.texture.create.d3d11.texture_v" +SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER = "SDL.texture.create.d3d12.texture" +SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER = "SDL.texture.create.d3d12.texture_u" +SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER = "SDL.texture.create.d3d12.texture_v" +SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER = "SDL.texture.create.metal.pixelbuffer" +SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER = "SDL.texture.create.opengl.texture" +SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER = "SDL.texture.create.opengl.texture_uv" +SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER = "SDL.texture.create.opengl.texture_u" +SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER = "SDL.texture.create.opengl.texture_v" +SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER = "SDL.texture.create.opengles2.texture" +SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER = "SDL.texture.create.opengles2.texture_uv" +SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER = "SDL.texture.create.opengles2.texture_u" +SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER = "SDL.texture.create.opengles2.texture_v" +SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER = "SDL.texture.create.vulkan.texture" +SDL_PROP_TEXTURE_COLORSPACE_NUMBER = "SDL.texture.colorspace" +SDL_PROP_TEXTURE_FORMAT_NUMBER = "SDL.texture.format" +SDL_PROP_TEXTURE_ACCESS_NUMBER = "SDL.texture.access" +SDL_PROP_TEXTURE_WIDTH_NUMBER = "SDL.texture.width" +SDL_PROP_TEXTURE_HEIGHT_NUMBER = "SDL.texture.height" +SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT = "SDL.texture.SDR_white_point" +SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT = "SDL.texture.HDR_headroom" +SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER = "SDL.texture.d3d11.texture" +SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER = "SDL.texture.d3d11.texture_u" +SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER = "SDL.texture.d3d11.texture_v" +SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER = "SDL.texture.d3d12.texture" +SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER = "SDL.texture.d3d12.texture_u" +SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER = "SDL.texture.d3d12.texture_v" +SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER = "SDL.texture.opengl.texture" +SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER = "SDL.texture.opengl.texture_uv" +SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER = "SDL.texture.opengl.texture_u" +SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER = "SDL.texture.opengl.texture_v" +SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER = "SDL.texture.opengl.target" +SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT = "SDL.texture.opengl.tex_w" +SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT = "SDL.texture.opengl.tex_h" +SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER = "SDL.texture.opengles2.texture" +SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER = "SDL.texture.opengles2.texture_uv" +SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER = "SDL.texture.opengles2.texture_u" +SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER = "SDL.texture.opengles2.texture_v" +SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER = "SDL.texture.opengles2.target" +SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER = "SDL.texture.vulkan.texture" diff --git a/tcod/sdl/joystick.py b/tcod/sdl/joystick.py index 9015605c..b658c510 100644 --- a/tcod/sdl/joystick.py +++ b/tcod/sdl/joystick.py @@ -11,7 +11,7 @@ import tcod.sdl.sys from tcod.cffi import ffi, lib -from tcod.sdl._internal import _check, _check_p +from tcod.sdl._internal import _check, _check_int, _check_p _HAT_DIRECTIONS: dict[int, tuple[Literal[-1, 0, 1], Literal[-1, 0, 1]]] = { int(lib.SDL_HAT_CENTERED): (0, 0), @@ -29,54 +29,54 @@ class ControllerAxis(enum.IntEnum): """The standard axes for a game controller.""" - INVALID = int(lib.SDL_CONTROLLER_AXIS_INVALID) - LEFTX = int(lib.SDL_CONTROLLER_AXIS_LEFTX) + INVALID = int(lib.SDL_GAMEPAD_AXIS_INVALID) + LEFTX = int(lib.SDL_GAMEPAD_AXIS_LEFTX) """""" - LEFTY = int(lib.SDL_CONTROLLER_AXIS_LEFTY) + LEFTY = int(lib.SDL_GAMEPAD_AXIS_LEFTY) """""" - RIGHTX = int(lib.SDL_CONTROLLER_AXIS_RIGHTX) + RIGHTX = int(lib.SDL_GAMEPAD_AXIS_RIGHTX) """""" - RIGHTY = int(lib.SDL_CONTROLLER_AXIS_RIGHTY) + RIGHTY = int(lib.SDL_GAMEPAD_AXIS_RIGHTY) """""" - TRIGGERLEFT = int(lib.SDL_CONTROLLER_AXIS_TRIGGERLEFT) + TRIGGERLEFT = int(lib.SDL_GAMEPAD_AXIS_LEFT_TRIGGER) """""" - TRIGGERRIGHT = int(lib.SDL_CONTROLLER_AXIS_TRIGGERRIGHT) + TRIGGERRIGHT = int(lib.SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) """""" class ControllerButton(enum.IntEnum): """The standard buttons for a game controller.""" - INVALID = int(lib.SDL_CONTROLLER_BUTTON_INVALID) - A = int(lib.SDL_CONTROLLER_BUTTON_A) + INVALID = int(lib.SDL_GAMEPAD_BUTTON_INVALID) + A = int(lib.SDL_GAMEPAD_BUTTON_SOUTH) """""" - B = int(lib.SDL_CONTROLLER_BUTTON_B) + B = int(lib.SDL_GAMEPAD_BUTTON_EAST) """""" - X = int(lib.SDL_CONTROLLER_BUTTON_X) + X = int(lib.SDL_GAMEPAD_BUTTON_WEST) """""" - Y = int(lib.SDL_CONTROLLER_BUTTON_Y) + Y = int(lib.SDL_GAMEPAD_BUTTON_NORTH) """""" - BACK = int(lib.SDL_CONTROLLER_BUTTON_BACK) + BACK = int(lib.SDL_GAMEPAD_BUTTON_BACK) """""" - GUIDE = int(lib.SDL_CONTROLLER_BUTTON_GUIDE) + GUIDE = int(lib.SDL_GAMEPAD_BUTTON_GUIDE) """""" - START = int(lib.SDL_CONTROLLER_BUTTON_START) + START = int(lib.SDL_GAMEPAD_BUTTON_START) """""" - LEFTSTICK = int(lib.SDL_CONTROLLER_BUTTON_LEFTSTICK) + LEFTSTICK = int(lib.SDL_GAMEPAD_BUTTON_LEFT_STICK) """""" - RIGHTSTICK = int(lib.SDL_CONTROLLER_BUTTON_RIGHTSTICK) + RIGHTSTICK = int(lib.SDL_GAMEPAD_BUTTON_RIGHT_STICK) """""" - LEFTSHOULDER = int(lib.SDL_CONTROLLER_BUTTON_LEFTSHOULDER) + LEFTSHOULDER = int(lib.SDL_GAMEPAD_BUTTON_LEFT_SHOULDER) """""" - RIGHTSHOULDER = int(lib.SDL_CONTROLLER_BUTTON_RIGHTSHOULDER) + RIGHTSHOULDER = int(lib.SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER) """""" - DPAD_UP = int(lib.SDL_CONTROLLER_BUTTON_DPAD_UP) + DPAD_UP = int(lib.SDL_GAMEPAD_BUTTON_DPAD_UP) """""" - DPAD_DOWN = int(lib.SDL_CONTROLLER_BUTTON_DPAD_DOWN) + DPAD_DOWN = int(lib.SDL_GAMEPAD_BUTTON_DPAD_DOWN) """""" - DPAD_LEFT = int(lib.SDL_CONTROLLER_BUTTON_DPAD_LEFT) + DPAD_LEFT = int(lib.SDL_GAMEPAD_BUTTON_DPAD_LEFT) """""" - DPAD_RIGHT = int(lib.SDL_CONTROLLER_BUTTON_DPAD_RIGHT) + DPAD_RIGHT = int(lib.SDL_GAMEPAD_BUTTON_DPAD_RIGHT) """""" MISC1 = 15 """""" @@ -92,29 +92,6 @@ class ControllerButton(enum.IntEnum): """""" -class Power(enum.IntEnum): - """The possible power states of a controller. - - .. seealso:: - :any:`Joystick.get_current_power` - """ - - UNKNOWN = int(lib.SDL_JOYSTICK_POWER_UNKNOWN) - """Power state is unknown.""" - EMPTY = int(lib.SDL_JOYSTICK_POWER_EMPTY) - """<= 5% power.""" - LOW = int(lib.SDL_JOYSTICK_POWER_LOW) - """<= 20% power.""" - MEDIUM = int(lib.SDL_JOYSTICK_POWER_MEDIUM) - """<= 70% power.""" - FULL = int(lib.SDL_JOYSTICK_POWER_FULL) - """<= 100% power.""" - WIRED = int(lib.SDL_JOYSTICK_POWER_WIRED) - """""" - MAX = int(lib.SDL_JOYSTICK_POWER_MAX) - """""" - - class Joystick: """A low-level SDL joystick. @@ -128,19 +105,19 @@ class Joystick: def __init__(self, sdl_joystick_p: Any) -> None: # noqa: ANN401 self.sdl_joystick_p: Final = sdl_joystick_p """The CFFI pointer to an SDL_Joystick struct.""" - self.axes: Final[int] = _check(lib.SDL_JoystickNumAxes(self.sdl_joystick_p)) + self.axes: Final[int] = _check_int(lib.SDL_GetNumJoystickAxes(self.sdl_joystick_p), failure=-1) """The total number of axes.""" - self.balls: Final[int] = _check(lib.SDL_JoystickNumBalls(self.sdl_joystick_p)) + self.balls: Final[int] = _check_int(lib.SDL_GetNumJoystickBalls(self.sdl_joystick_p), failure=-1) """The total number of trackballs.""" - self.buttons: Final[int] = _check(lib.SDL_JoystickNumButtons(self.sdl_joystick_p)) + self.buttons: Final[int] = _check_int(lib.SDL_GetNumJoystickButtons(self.sdl_joystick_p), failure=-1) """The total number of buttons.""" - self.hats: Final[int] = _check(lib.SDL_JoystickNumHats(self.sdl_joystick_p)) + self.hats: Final[int] = _check_int(lib.SDL_GetNumJoystickHats(self.sdl_joystick_p), failure=-1) """The total number of hats.""" - self.name: Final[str] = str(ffi.string(lib.SDL_JoystickName(self.sdl_joystick_p)), encoding="utf-8") + self.name: Final[str] = str(ffi.string(lib.SDL_GetJoystickName(self.sdl_joystick_p)), encoding="utf-8") """The name of this joystick.""" self.guid: Final[str] = self._get_guid() """The GUID of this joystick.""" - self.id: Final[int] = _check(lib.SDL_JoystickInstanceID(self.sdl_joystick_p)) + self.id: Final[int] = _check(lib.SDL_GetJoystickID(self.sdl_joystick_p)) """The instance ID of this joystick. This is not the same as the device ID.""" self._keep_alive: Any = None """The owner of this objects memory if this object does not own itself.""" @@ -150,7 +127,7 @@ def __init__(self, sdl_joystick_p: Any) -> None: # noqa: ANN401 @classmethod def _open(cls, device_index: int) -> Joystick: tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.JOYSTICK) - p = _check_p(ffi.gc(lib.SDL_JoystickOpen(device_index), lib.SDL_JoystickClose)) + p = _check_p(ffi.gc(lib.SDL_OpenJoystick(device_index), lib.SDL_CloseJoystick)) return cls(p) @classmethod @@ -167,30 +144,26 @@ def __hash__(self) -> int: def _get_guid(self) -> str: guid_str = ffi.new("char[33]") - lib.SDL_JoystickGetGUIDString(lib.SDL_JoystickGetGUID(self.sdl_joystick_p), guid_str, len(guid_str)) + lib.SDL_GUIDToString(lib.SDL_GetJoystickGUID(self.sdl_joystick_p), guid_str, len(guid_str)) return str(ffi.string(guid_str), encoding="ascii") - def get_current_power(self) -> Power: - """Return the power level/state of this joystick. See :any:`Power`.""" - return Power(lib.SDL_JoystickCurrentPowerLevel(self.sdl_joystick_p)) - def get_axis(self, axis: int) -> int: """Return the raw value of `axis` in the range -32768 to 32767.""" - return int(lib.SDL_JoystickGetAxis(self.sdl_joystick_p, axis)) + return int(lib.SDL_GetJoystickAxis(self.sdl_joystick_p, axis)) def get_ball(self, ball: int) -> tuple[int, int]: """Return the values (delta_x, delta_y) of `ball` since the last poll.""" xy = ffi.new("int[2]") - _check(lib.SDL_JoystickGetBall(ball, xy, xy + 1)) + _check(lib.SDL_GetJoystickBall(self.sdl_joystick_p, ball, xy, xy + 1)) return int(xy[0]), int(xy[1]) def get_button(self, button: int) -> bool: """Return True if `button` is currently held.""" - return bool(lib.SDL_JoystickGetButton(self.sdl_joystick_p, button)) + return bool(lib.SDL_GetJoystickButton(self.sdl_joystick_p, button)) def get_hat(self, hat: int) -> tuple[Literal[-1, 0, 1], Literal[-1, 0, 1]]: """Return the direction of `hat` as (x, y). With (-1, -1) being in the upper-left.""" - return _HAT_DIRECTIONS[lib.SDL_JoystickGetHat(self.sdl_joystick_p, hat)] + return _HAT_DIRECTIONS[lib.SDL_GetJoystickHat(self.sdl_joystick_p, hat)] class GameController: @@ -201,14 +174,14 @@ class GameController: def __init__(self, sdl_controller_p: Any) -> None: # noqa: ANN401 self.sdl_controller_p: Final = sdl_controller_p - self.joystick: Final = Joystick(lib.SDL_GameControllerGetJoystick(self.sdl_controller_p)) + self.joystick: Final = Joystick(lib.SDL_GetGamepadJoystick(self.sdl_controller_p)) """The :any:`Joystick` associated with this controller.""" self.joystick._keep_alive = self.sdl_controller_p # This objects real owner needs to be kept alive. self._by_instance_id[self.joystick.id] = self @classmethod def _open(cls, joystick_index: int) -> GameController: - return cls(_check_p(ffi.gc(lib.SDL_GameControllerOpen(joystick_index), lib.SDL_GameControllerClose))) + return cls(_check_p(ffi.gc(lib.SDL_OpenGamepad(joystick_index), lib.SDL_CloseGamepad))) @classmethod def _from_instance_id(cls, instance_id: int) -> GameController: @@ -216,7 +189,7 @@ def _from_instance_id(cls, instance_id: int) -> GameController: def get_button(self, button: ControllerButton) -> bool: """Return True if `button` is currently held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, button)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, button)) def get_axis(self, axis: ControllerAxis) -> int: """Return the state of the given `axis`. @@ -224,7 +197,7 @@ def get_axis(self, axis: ControllerAxis) -> int: The state is usually a value from -32768 to 32767, with positive values towards the lower-right direction. Triggers have the range of 0 to 32767 instead. """ - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, axis)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, axis)) def __eq__(self, other: object) -> bool: if isinstance(other, GameController): @@ -238,126 +211,126 @@ def __hash__(self) -> int: @property def _left_x(self) -> int: """Return the position of this axis (-32768 to 32767).""" - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, lib.SDL_CONTROLLER_AXIS_LEFTX)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, lib.SDL_GAMEPAD_AXIS_LEFTX)) @property def _left_y(self) -> int: """Return the position of this axis (-32768 to 32767).""" - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, lib.SDL_CONTROLLER_AXIS_LEFTY)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, lib.SDL_GAMEPAD_AXIS_LEFTY)) @property def _right_x(self) -> int: """Return the position of this axis (-32768 to 32767).""" - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, lib.SDL_CONTROLLER_AXIS_RIGHTX)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, lib.SDL_GAMEPAD_AXIS_RIGHTX)) @property def _right_y(self) -> int: """Return the position of this axis (-32768 to 32767).""" - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, lib.SDL_CONTROLLER_AXIS_RIGHTY)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, lib.SDL_GAMEPAD_AXIS_RIGHTY)) @property def _trigger_left(self) -> int: """Return the position of this trigger (0 to 32767).""" - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, lib.SDL_CONTROLLER_AXIS_TRIGGERLEFT)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, lib.SDL_GAMEPAD_AXIS_LEFT_TRIGGER)) @property def _trigger_right(self) -> int: """Return the position of this trigger (0 to 32767).""" - return int(lib.SDL_GameControllerGetAxis(self.sdl_controller_p, lib.SDL_CONTROLLER_AXIS_TRIGGERRIGHT)) + return int(lib.SDL_GetGamepadAxis(self.sdl_controller_p, lib.SDL_GAMEPAD_AXIS_RIGHT_TRIGGER)) @property def _a(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_A)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_SOUTH)) @property def _b(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_B)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_EAST)) @property def _x(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_X)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_WEST)) @property def _y(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_Y)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_NORTH)) @property def _back(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_BACK)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_BACK)) @property def _guide(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_GUIDE)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_GUIDE)) @property def _start(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_START)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_START)) @property def _left_stick(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_LEFTSTICK)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_LEFT_STICK)) @property def _right_stick(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_RIGHTSTICK)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_RIGHT_STICK)) @property def _left_shoulder(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_LEFTSHOULDER)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_LEFT_SHOULDER)) @property def _right_shoulder(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_RIGHTSHOULDER)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER)) @property def _dpad(self) -> tuple[Literal[-1, 0, 1], Literal[-1, 0, 1]]: return ( - lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_DPAD_RIGHT) - - lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_DPAD_LEFT), - lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_DPAD_DOWN) - - lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_DPAD_UP), - ) + lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_DPAD_RIGHT) + - lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_DPAD_LEFT), + lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_DPAD_DOWN) + - lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_DPAD_UP), + ) # type: ignore[return-value] # Boolean math has predictable values @property def _misc1(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_MISC1)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_MISC1)) @property def _paddle1(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_PADDLE1)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1)) @property def _paddle2(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_PADDLE2)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_LEFT_PADDLE1)) @property def _paddle3(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_PADDLE3)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2)) @property def _paddle4(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_PADDLE4)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_LEFT_PADDLE2)) @property def _touchpad(self) -> bool: """Return True if this button is held.""" - return bool(lib.SDL_GameControllerGetButton(self.sdl_controller_p, lib.SDL_CONTROLLER_BUTTON_TOUCHPAD)) + return bool(lib.SDL_GetGamepadButton(self.sdl_controller_p, lib.SDL_GAMEPAD_BUTTON_TOUCHPAD)) def init() -> None: @@ -371,7 +344,9 @@ def init() -> None: def _get_number() -> int: """Return the number of attached joysticks.""" init() - return _check(lib.SDL_NumJoysticks()) + count = ffi.new("int*") + lib.SDL_GetJoysticks(count) + return int(count[0]) def get_joysticks() -> list[Joystick]: @@ -384,7 +359,7 @@ def get_controllers() -> list[GameController]: This ignores joysticks without a game controller mapping. """ - return [GameController._open(i) for i in range(_get_number()) if lib.SDL_IsGameController(i)] + return [GameController._open(i) for i in range(_get_number()) if lib.SDL_IsGamepad(i)] def _get_all() -> list[Joystick | GameController]: @@ -393,24 +368,30 @@ def _get_all() -> list[Joystick | GameController]: If the joystick has a controller mapping then it is returned as a :any:`GameController`. Otherwise it is returned as a :any:`Joystick`. """ - return [GameController._open(i) if lib.SDL_IsGameController(i) else Joystick._open(i) for i in range(_get_number())] + return [GameController._open(i) if lib.SDL_IsGamepad(i) else Joystick._open(i) for i in range(_get_number())] def joystick_event_state(new_state: bool | None = None) -> bool: """Check or set joystick event polling. .. seealso:: - https://wiki.libsdl.org/SDL_JoystickEventState + https://wiki.libsdl.org/SDL3/SDL_SetJoystickEventsEnabled """ - _OPTIONS = {None: lib.SDL_QUERY, False: lib.SDL_IGNORE, True: lib.SDL_ENABLE} - return bool(_check(lib.SDL_JoystickEventState(_OPTIONS[new_state]))) + if new_state is True: + lib.SDL_SetJoystickEventsEnabled(True) # noqa: FBT003 + elif new_state is False: + lib.SDL_SetJoystickEventsEnabled(False) # noqa: FBT003 + return lib.SDL_JoystickEventsEnabled() def controller_event_state(new_state: bool | None = None) -> bool: """Check or set game controller event polling. .. seealso:: - https://wiki.libsdl.org/SDL_GameControllerEventState + https://wiki.libsdl.org/SDL3/SDL_SetGamepadEventsEnabled """ - _OPTIONS = {None: lib.SDL_QUERY, False: lib.SDL_IGNORE, True: lib.SDL_ENABLE} - return bool(_check(lib.SDL_GameControllerEventState(_OPTIONS[new_state]))) + if new_state is True: + lib.SDL_SetGamepadEventsEnabled(True) # noqa: FBT003 + elif new_state is False: + lib.SDL_SetGamepadEventsEnabled(False) # noqa: FBT003 + return lib.SDL_GamepadEventsEnabled() diff --git a/tcod/sdl/mouse.py b/tcod/sdl/mouse.py index de481427..f4c16ed5 100644 --- a/tcod/sdl/mouse.py +++ b/tcod/sdl/mouse.py @@ -13,6 +13,7 @@ from typing import TYPE_CHECKING, Any import numpy as np +from typing_extensions import deprecated import tcod.event import tcod.sdl.video @@ -41,7 +42,7 @@ def __eq__(self, other: object) -> bool: @classmethod def _claim(cls, sdl_cursor_p: Any) -> Cursor: """Verify and wrap this pointer in a garbage collector before returning a Cursor.""" - return cls(ffi.gc(_check_p(sdl_cursor_p), lib.SDL_FreeCursor)) + return cls(ffi.gc(_check_p(sdl_cursor_p), lib.SDL_DestroyCursor)) class SystemCursor(enum.IntEnum): @@ -174,19 +175,28 @@ def capture(enable: bool) -> None: _check(lib.SDL_CaptureMouse(enable)) +@deprecated("Set 'Window.relative_mouse_mode = value' instead.") def set_relative_mode(enable: bool) -> None: """Enable or disable relative mouse mode which will lock and hide the mouse and only report mouse motion. .. seealso:: :any:`tcod.sdl.mouse.capture` - https://wiki.libsdl.org/SDL_SetRelativeMouseMode + https://wiki.libsdl.org/SDL_SetWindowRelativeMouseMode + + .. deprecated:: Unreleased + Replaced with :any:`tcod.sdl.video.Window.relative_mouse_mode` """ - _check(lib.SDL_SetRelativeMouseMode(enable)) + _check(lib.SDL_SetWindowRelativeMouseMode(lib.SDL_GetMouseFocus(), enable)) +@deprecated("Check 'Window.relative_mouse_mode' instead.") def get_relative_mode() -> bool: - """Return True if relative mouse mode is enabled.""" - return bool(lib.SDL_GetRelativeMouseMode()) + """Return True if relative mouse mode is enabled. + + .. deprecated:: Unreleased + Replaced with :any:`tcod.sdl.video.Window.relative_mouse_mode` + """ + return bool(lib.SDL_GetWindowRelativeMouseMode(lib.SDL_GetMouseFocus())) def get_global_state() -> tcod.event.MouseState: @@ -249,5 +259,8 @@ def show(visible: bool | None = None) -> bool: .. versionadded:: 16.0 """ - _OPTIONS = {None: lib.SDL_QUERY, False: lib.SDL_DISABLE, True: lib.SDL_ENABLE} - return _check(lib.SDL_ShowCursor(_OPTIONS[visible])) == int(lib.SDL_ENABLE) + if visible is True: + lib.SDL_ShowCursor() + elif visible is False: + lib.SDL_HideCursor() + return lib.SDL_CursorVisible() diff --git a/tcod/sdl/render.py b/tcod/sdl/render.py index 83606a03..0a1052e1 100644 --- a/tcod/sdl/render.py +++ b/tcod/sdl/render.py @@ -10,10 +10,12 @@ from typing import TYPE_CHECKING, Any, Final, Literal import numpy as np +from typing_extensions import deprecated +import tcod.sdl.constants import tcod.sdl.video from tcod.cffi import ffi, lib -from tcod.sdl._internal import _check, _check_p, _required_version +from tcod.sdl._internal import Properties, _check, _check_p if TYPE_CHECKING: from numpy.typing import NDArray @@ -41,6 +43,26 @@ class RendererFlip(enum.IntFlag): """Flip the image vertically.""" +class LogicalPresentation(enum.IntEnum): + """SDL logical presentation modes. + + See https://wiki.libsdl.org/SDL3/SDL_RendererLogicalPresentation + + .. versionadded:: Unreleased + """ + + DISABLED = 0 + """""" + STRETCH = 1 + """""" + LETTERBOX = 2 + """""" + OVERSCAN = 3 + """""" + INTEGER_SCALE = 4 + """""" + + class BlendFactor(enum.IntEnum): """SDL blend factors. @@ -155,18 +177,21 @@ def __init__(self, sdl_texture_p: Any, sdl_renderer_p: Any = None) -> None: """Encapsulate an SDL_Texture pointer. This function is private.""" self.p = sdl_texture_p self._sdl_renderer_p = sdl_renderer_p # Keep alive. - query = self._query() - self.format: Final[int] = query[0] + + props = Properties(lib.SDL_GetTextureProperties(self.p)) + self.format: Final[int] = props[(tcod.sdl.constants.SDL_PROP_TEXTURE_FORMAT_NUMBER, int)] """Texture format, read only.""" - self.access: Final[TextureAccess] = TextureAccess(query[1]) + self.access: Final[TextureAccess] = TextureAccess( + props[(tcod.sdl.constants.SDL_PROP_TEXTURE_ACCESS_NUMBER, int)] + ) """Texture access mode, read only. .. versionchanged:: 13.5 Attribute is now a :any:`TextureAccess` value. """ - self.width: Final[int] = query[2] + self.width: Final[int] = props[(tcod.sdl.constants.SDL_PROP_TEXTURE_WIDTH_NUMBER, int)] """Texture pixel width, read only.""" - self.height: Final[int] = query[3] + self.height: Final[int] = props[(tcod.sdl.constants.SDL_PROP_TEXTURE_HEIGHT_NUMBER, int)] """Texture pixel height, read only.""" def __eq__(self, other: object) -> bool: @@ -175,13 +200,6 @@ def __eq__(self, other: object) -> bool: return bool(self.p == other.p) return NotImplemented - def _query(self) -> tuple[int, int, int, int]: - """Return (format, access, width, height).""" - format = ffi.new("uint32_t*") - buffer = ffi.new("int[3]") - lib.SDL_QueryTexture(self.p, format, buffer, buffer + 1, buffer + 2) - return int(format[0]), int(buffer[0]), int(buffer[1]), int(buffer[2]) - def update(self, pixels: NDArray[Any], rect: tuple[int, int, int, int] | None = None) -> None: """Update the pixel data of this texture. @@ -289,7 +307,7 @@ def copy( # noqa: PLR0913 Added the `angle`, `center`, and `flip` parameters. """ _check( - lib.SDL_RenderCopyExF( + lib.SDL_RenderTextureRotated( self.p, texture.p, (source,) if source is not None else ffi.NULL, @@ -393,7 +411,7 @@ def output_size(self) -> tuple[int, int]: .. versionadded:: 13.5 """ out = ffi.new("int[2]") - _check(lib.SDL_GetRendererOutputSize(self.p, out, out + 1)) + _check(lib.SDL_GetCurrentRenderOutputSize(self.p, out, out + 1)) return out[0], out[1] @property @@ -404,50 +422,51 @@ def clip_rect(self) -> tuple[int, int, int, int] | None: .. versionadded:: 13.5 """ - if not lib.SDL_RenderIsClipEnabled(self.p): + if not lib.SDL_RenderClipEnabled(self.p): return None rect = ffi.new("SDL_Rect*") - lib.SDL_RenderGetClipRect(self.p, rect) + lib.SDL_GetRenderClipRect(self.p, rect) return rect.x, rect.y, rect.w, rect.h @clip_rect.setter def clip_rect(self, rect: tuple[int, int, int, int] | None) -> None: rect_p = ffi.NULL if rect is None else ffi.new("SDL_Rect*", rect) - _check(lib.SDL_RenderSetClipRect(self.p, rect_p)) + _check(lib.SDL_SetRenderClipRect(self.p, rect_p)) - @property - def integer_scaling(self) -> bool: - """Get or set if this renderer enforces integer scaling. + def set_logical_presentation(self, resolution: tuple[int, int], mode: LogicalPresentation) -> None: + """Set this renderers device independent resolution. .. seealso:: - https://wiki.libsdl.org/SDL_RenderSetIntegerScale + https://wiki.libsdl.org/SDL3/SDL_SetRenderLogicalPresentation - .. versionadded:: 13.5 + .. versionadded:: Unreleased """ - return bool(lib.SDL_RenderGetIntegerScale(self.p)) - - @integer_scaling.setter - def integer_scaling(self, enable: bool) -> None: - _check(lib.SDL_RenderSetIntegerScale(self.p, enable)) + width, height = resolution + _check(lib.SDL_SetRenderLogicalPresentation(self.p, width, height, mode)) @property def logical_size(self) -> tuple[int, int]: - """Get or set a device independent (width, height) resolution. + """Get current independent (width, height) resolution. Might be (0, 0) if a resolution was never assigned. .. seealso:: - https://wiki.libsdl.org/SDL_RenderSetLogicalSize + https://wiki.libsdl.org/SDL3/SDL_GetRenderLogicalPresentation .. versionadded:: 13.5 + + .. versionchanged:: Unreleased + Setter is deprecated, use :any:`set_logical_presentation` instead. """ out = ffi.new("int[2]") - lib.SDL_RenderGetLogicalSize(self.p, out, out + 1) + lib.SDL_GetRenderLogicalPresentation(self.p, out, out + 1, ffi.NULL) return out[0], out[1] @logical_size.setter + @deprecated("Use set_logical_presentation method to correctly setup logical size.") def logical_size(self, size: tuple[int, int]) -> None: - _check(lib.SDL_RenderSetLogicalSize(self.p, *size)) + width, height = size + _check(lib.SDL_SetRenderLogicalPresentation(self.p, width, height, lib.SDL_LOGICAL_PRESENTATION_STRETCH)) @property def scale(self) -> tuple[float, float]: @@ -459,12 +478,12 @@ def scale(self) -> tuple[float, float]: .. versionadded:: 13.5 """ out = ffi.new("float[2]") - lib.SDL_RenderGetScale(self.p, out, out + 1) + lib.SDL_GetRenderScale(self.p, out, out + 1) return out[0], out[1] @scale.setter def scale(self, scale: tuple[float, float]) -> None: - _check(lib.SDL_RenderSetScale(self.p, *scale)) + _check(lib.SDL_SetRenderScale(self.p, *scale)) @property def viewport(self) -> tuple[int, int, int, int] | None: @@ -476,26 +495,25 @@ def viewport(self) -> tuple[int, int, int, int] | None: .. versionadded:: 13.5 """ rect = ffi.new("SDL_Rect*") - lib.SDL_RenderGetViewport(self.p, rect) + lib.SDL_GetRenderViewport(self.p, rect) return rect.x, rect.y, rect.w, rect.h @viewport.setter def viewport(self, rect: tuple[int, int, int, int] | None) -> None: - _check(lib.SDL_RenderSetViewport(self.p, (rect,))) + _check(lib.SDL_SetRenderViewport(self.p, (rect,))) - @_required_version((2, 0, 18)) def set_vsync(self, enable: bool) -> None: """Enable or disable VSync for this renderer. .. versionadded:: 13.5 """ - _check(lib.SDL_RenderSetVSync(self.p, enable)) + _check(lib.SDL_SetRenderVSync(self.p, enable)) def read_pixels( self, *, rect: tuple[int, int, int, int] | None = None, - format: int | Literal["RGB", "RGBA"] = "RGBA", + format: Literal["RGB", "RGBA"] = "RGBA", # noqa: A002 out: NDArray[np.uint8] | None = None, ) -> NDArray[np.uint8]: """Fetch the pixel contents of the current rendering target to an array. @@ -512,49 +530,37 @@ def read_pixels( This operation is slow due to coping from VRAM to RAM. When reading the main rendering target this should be called after rendering and before :any:`present`. - See https://wiki.libsdl.org/SDL2/SDL_RenderReadPixels + See https://wiki.libsdl.org/SDL3/SDL_RenderReadPixels Returns: The output uint8 array of shape: ``(height, width, channels)`` with the fetched pixels. .. versionadded:: 15.0 + + .. versionchanged:: Unreleased + `format` no longer accepts `int` values. """ - FORMATS: Final = {"RGB": lib.SDL_PIXELFORMAT_RGB24, "RGBA": lib.SDL_PIXELFORMAT_RGBA32} - sdl_format = FORMATS.get(format) if isinstance(format, str) else format - if rect is None: - texture_p = lib.SDL_GetRenderTarget(self.p) - if texture_p: - texture = Texture(texture_p) - rect = (0, 0, texture.width, texture.height) - else: - rect = (0, 0, *self.output_size) - width, height = rect[2:4] + surface = _check_p( + ffi.gc(lib.SDL_RenderReadPixels(self.p, (rect,) if rect is not None else ffi.NULL), lib.SDL_DestroySurface) + ) + width, height = rect[2:4] if rect is not None else (int(surface.w), int(surface.h)) + depth = {"RGB": 3, "RGBA": 4}.get(format) + if depth is None: + msg = f"Pixel format {format!r} not supported by tcod." + raise TypeError(msg) + expected_shape = height, width, depth if out is None: - if sdl_format == lib.SDL_PIXELFORMAT_RGBA32: - out = np.empty((height, width, 4), dtype=np.uint8) - elif sdl_format == lib.SDL_PIXELFORMAT_RGB24: - out = np.empty((height, width, 3), dtype=np.uint8) - else: - msg = f"Pixel format {format!r} not supported by tcod." - raise TypeError(msg) + out = np.empty(expected_shape, dtype=np.uint8) if out.dtype != np.uint8: msg = "`out` must be a uint8 array." raise TypeError(msg) - expected_shape = (height, width, {lib.SDL_PIXELFORMAT_RGB24: 3, lib.SDL_PIXELFORMAT_RGBA32: 4}[sdl_format]) if out.shape != expected_shape: msg = f"Expected `out` to be an array of shape {expected_shape}, got {out.shape} instead." raise TypeError(msg) if not out[0].flags.c_contiguous: msg = "`out` array must be C contiguous." - _check( - lib.SDL_RenderReadPixels( - self.p, - (rect,), - sdl_format, - ffi.cast("void*", out.ctypes.data), - out.strides[0], - ) - ) + out_surface = tcod.sdl.video._TempSurface(out) + _check(lib.SDL_BlitSurface(surface, ffi.NULL, out_surface.p, ffi.NULL)) return out def clear(self) -> None: @@ -569,14 +575,14 @@ def fill_rect(self, rect: tuple[float, float, float, float]) -> None: .. versionadded:: 13.5 """ - _check(lib.SDL_RenderFillRectF(self.p, (rect,))) + _check(lib.SDL_RenderFillRect(self.p, (rect,))) def draw_rect(self, rect: tuple[float, float, float, float]) -> None: """Draw a rectangle outline. .. versionadded:: 13.5 """ - _check(lib.SDL_RenderDrawRectF(self.p, (rect,))) + _check(lib.SDL_RenderFillRects(self.p, (rect,), 1)) def draw_point(self, xy: tuple[float, float]) -> None: """Draw a point. @@ -584,7 +590,7 @@ def draw_point(self, xy: tuple[float, float]) -> None: .. versionadded:: 13.5 """ x, y = xy - _check(lib.SDL_RenderDrawPointF(self.p, x, y)) + _check(lib.SDL_RenderPoint(self.p, x, y)) def draw_line(self, start: tuple[float, float], end: tuple[float, float]) -> None: """Draw a single line. @@ -593,20 +599,15 @@ def draw_line(self, start: tuple[float, float], end: tuple[float, float]) -> Non """ x1, y1 = start x2, y2 = end - _check(lib.SDL_RenderDrawLineF(self.p, x1, y1, x2, y2)) + _check(lib.SDL_RenderLine(self.p, x1, y1, x2, y2)) @staticmethod - def _convert_array( - array: NDArray[np.number] | Sequence[Sequence[float]], item_length: int - ) -> NDArray[np.intc] | NDArray[np.float32]: + def _convert_array(array: NDArray[np.number] | Sequence[Sequence[float]], item_length: int) -> NDArray[np.float32]: """Convert ndarray for a SDL function expecting a C contiguous array of either intc or float32. Array shape is enforced to be (n, item_length) """ - if getattr(array, "dtype", None) in (np.intc, np.int8, np.int16, np.int32, np.uint8, np.uint16): - out = np.ascontiguousarray(array, np.intc) - else: - out = np.ascontiguousarray(array, np.float32) + out = np.ascontiguousarray(array, np.float32) if len(out.shape) != 2: # noqa: PLR2004 msg = f"Array must have 2 axes, but shape is {out.shape!r}" raise TypeError(msg) @@ -624,10 +625,7 @@ def fill_rects(self, rects: NDArray[np.number] | Sequence[tuple[float, float, fl .. versionadded:: 13.5 """ rects = self._convert_array(rects, item_length=4) - if rects.dtype == np.intc: - _check(lib.SDL_RenderFillRects(self.p, tcod.ffi.from_buffer("SDL_Rect*", rects), rects.shape[0])) - return - _check(lib.SDL_RenderFillRectsF(self.p, tcod.ffi.from_buffer("SDL_FRect*", rects), rects.shape[0])) + _check(lib.SDL_RenderFillRects(self.p, tcod.ffi.from_buffer("SDL_FRect*", rects), rects.shape[0])) def draw_rects(self, rects: NDArray[np.number] | Sequence[tuple[float, float, float, float]]) -> None: """Draw multiple outlined rectangles from an array. @@ -640,10 +638,7 @@ def draw_rects(self, rects: NDArray[np.number] | Sequence[tuple[float, float, fl rects = self._convert_array(rects, item_length=4) assert len(rects.shape) == 2 # noqa: PLR2004 assert rects.shape[1] == 4 # noqa: PLR2004 - if rects.dtype == np.intc: - _check(lib.SDL_RenderDrawRects(self.p, tcod.ffi.from_buffer("SDL_Rect*", rects), rects.shape[0])) - return - _check(lib.SDL_RenderDrawRectsF(self.p, tcod.ffi.from_buffer("SDL_FRect*", rects), rects.shape[0])) + _check(lib.SDL_RenderRects(self.p, tcod.ffi.from_buffer("SDL_FRect*", rects), rects.shape[0])) def draw_points(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) -> None: """Draw an array of points. @@ -654,10 +649,7 @@ def draw_points(self, points: NDArray[np.number] | Sequence[tuple[float, float]] .. versionadded:: 13.5 """ points = self._convert_array(points, item_length=2) - if points.dtype == np.intc: - _check(lib.SDL_RenderDrawPoints(self.p, tcod.ffi.from_buffer("SDL_Point*", points), points.shape[0])) - return - _check(lib.SDL_RenderDrawPointsF(self.p, tcod.ffi.from_buffer("SDL_FPoint*", points), points.shape[0])) + _check(lib.SDL_RenderPoints(self.p, tcod.ffi.from_buffer("SDL_FPoint*", points), points.shape[0])) def draw_lines(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) -> None: """Draw a connected series of lines from an array. @@ -668,17 +660,13 @@ def draw_lines(self, points: NDArray[np.number] | Sequence[tuple[float, float]]) .. versionadded:: 13.5 """ points = self._convert_array(points, item_length=2) - if points.dtype == np.intc: - _check(lib.SDL_RenderDrawLines(self.p, tcod.ffi.from_buffer("SDL_Point*", points), points.shape[0] - 1)) - return - _check(lib.SDL_RenderDrawLinesF(self.p, tcod.ffi.from_buffer("SDL_FPoint*", points), points.shape[0] - 1)) + _check(lib.SDL_RenderLines(self.p, tcod.ffi.from_buffer("SDL_FPoint*", points), points.shape[0])) - @_required_version((2, 0, 18)) def geometry( self, texture: Texture | None, xy: NDArray[np.float32] | Sequence[tuple[float, float]], - color: NDArray[np.uint8] | Sequence[tuple[int, int, int, int]], + color: NDArray[np.float32] | Sequence[tuple[float, float, float, float]], uv: NDArray[np.float32] | Sequence[tuple[float, float]], indices: NDArray[np.uint8 | np.uint16 | np.uint32] | None = None, ) -> None: @@ -692,12 +680,15 @@ def geometry( indices: A sequence of indexes referring to the buffered data, every 3 indexes is a triangle to render. .. versionadded:: 13.5 + + .. versionchanged:: Unreleased + `color` now takes float values instead of 8-bit integers. """ xy = np.ascontiguousarray(xy, np.float32) assert len(xy.shape) == 2 # noqa: PLR2004 assert xy.shape[1] == 2 # noqa: PLR2004 - color = np.ascontiguousarray(color, np.uint8) + color = np.ascontiguousarray(color, np.float32) assert len(color.shape) == 2 # noqa: PLR2004 assert color.shape[1] == 4 # noqa: PLR2004 @@ -715,7 +706,7 @@ def geometry( texture.p if texture else ffi.NULL, ffi.cast("float*", xy.ctypes.data), xy.strides[0], - ffi.cast("SDL_Color*", color.ctypes.data), + ffi.cast("SDL_FColor*", color.ctypes.data), color.strides[0], ffi.cast("float*", uv.ctypes.data), uv.strides[0], @@ -730,36 +721,35 @@ def geometry( def new_renderer( window: tcod.sdl.video.Window, *, - driver: int | None = None, - software: bool = False, - vsync: bool = True, - target_textures: bool = False, + driver: str | None = None, + vsync: int = True, ) -> Renderer: """Initialize and return a new SDL Renderer. Args: window: The window that this renderer will be attached to. driver: Force SDL to use a specific video driver. - software: If True then a software renderer will be forced. By default a hardware renderer is used. vsync: If True then Vsync will be enabled. - target_textures: If True then target textures can be used by the renderer. Example:: # Start by creating a window. sdl_window = tcod.sdl.video.new_window(640, 480) # Create a renderer with target texture support. - sdl_renderer = tcod.sdl.render.new_renderer(sdl_window, target_textures=True) + sdl_renderer = tcod.sdl.render.new_renderer(sdl_window) .. seealso:: :func:`tcod.sdl.video.new_window` + + .. versionchanged:: Unreleased + Removed `software` and `target_textures` parameters. + `vsync` now takes an integer. + `driver` now take a string. """ - driver = driver if driver is not None else -1 - flags = 0 - if vsync: - flags |= int(lib.SDL_RENDERER_PRESENTVSYNC) - if target_textures: - flags |= int(lib.SDL_RENDERER_TARGETTEXTURE) - flags |= int(lib.SDL_RENDERER_SOFTWARE) if software else int(lib.SDL_RENDERER_ACCELERATED) - renderer_p = _check_p(ffi.gc(lib.SDL_CreateRenderer(window.p, driver, flags), lib.SDL_DestroyRenderer)) + props = Properties() + props[(tcod.sdl.constants.SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, int)] = vsync + props[(tcod.sdl.constants.SDL_PROP_RENDERER_CREATE_WINDOW_POINTER, tcod.sdl.video.Window)] = window + if driver is not None: + props[(tcod.sdl.constants.SDL_PROP_RENDERER_CREATE_NAME_STRING, str)] = driver + renderer_p = _check_p(ffi.gc(lib.SDL_CreateRendererWithProperties(props.p), lib.SDL_DestroyRenderer)) return Renderer(renderer_p) diff --git a/tcod/sdl/sys.py b/tcod/sdl/sys.py index 7e7b2d88..869d6448 100644 --- a/tcod/sdl/sys.py +++ b/tcod/sdl/sys.py @@ -18,14 +18,16 @@ class Subsystem(enum.IntFlag): GAMECONTROLLER = 0x00002000 EVENTS = 0x00004000 SENSOR = 0x00008000 - EVERYTHING = int(lib.SDL_INIT_EVERYTHING) -def init(flags: int = Subsystem.EVERYTHING) -> None: +def init(flags: int) -> None: _check(lib.SDL_InitSubSystem(flags)) -def quit(flags: int = Subsystem.EVERYTHING) -> None: +def quit(flags: int | None = None) -> None: + if flags is None: + lib.SDL_Quit() + return lib.SDL_QuitSubSystem(flags) diff --git a/tcod/sdl/video.py b/tcod/sdl/video.py index b140aa17..cee02bf5 100644 --- a/tcod/sdl/video.py +++ b/tcod/sdl/video.py @@ -14,9 +14,11 @@ from typing import TYPE_CHECKING, Any import numpy as np +from typing_extensions import Self, deprecated +import tcod.sdl.constants from tcod.cffi import ffi, lib -from tcod.sdl._internal import _check, _check_p, _required_version, _version_at_least +from tcod.sdl._internal import Properties, _check, _check_p, _required_version if TYPE_CHECKING: from numpy.typing import ArrayLike, NDArray @@ -40,12 +42,8 @@ class WindowFlags(enum.IntFlag): FULLSCREEN = int(lib.SDL_WINDOW_FULLSCREEN) """""" - FULLSCREEN_DESKTOP = int(lib.SDL_WINDOW_FULLSCREEN_DESKTOP) - """""" OPENGL = int(lib.SDL_WINDOW_OPENGL) """""" - SHOWN = int(lib.SDL_WINDOW_SHOWN) - """""" HIDDEN = int(lib.SDL_WINDOW_HIDDEN) """""" BORDERLESS = int(lib.SDL_WINDOW_BORDERLESS) @@ -56,22 +54,18 @@ class WindowFlags(enum.IntFlag): """""" MAXIMIZED = int(lib.SDL_WINDOW_MAXIMIZED) """""" - MOUSE_GRABBED = int(lib.SDL_WINDOW_INPUT_GRABBED) + MOUSE_GRABBED = int(lib.SDL_WINDOW_MOUSE_GRABBED) """""" INPUT_FOCUS = int(lib.SDL_WINDOW_INPUT_FOCUS) """""" MOUSE_FOCUS = int(lib.SDL_WINDOW_MOUSE_FOCUS) """""" - FOREIGN = int(lib.SDL_WINDOW_FOREIGN) - """""" - ALLOW_HIGHDPI = int(lib.SDL_WINDOW_ALLOW_HIGHDPI) + ALLOW_HIGHDPI = int(lib.SDL_WINDOW_HIGH_PIXEL_DENSITY) """""" MOUSE_CAPTURE = int(lib.SDL_WINDOW_MOUSE_CAPTURE) """""" ALWAYS_ON_TOP = int(lib.SDL_WINDOW_ALWAYS_ON_TOP) """""" - SKIP_TASKBAR = int(lib.SDL_WINDOW_SKIP_TASKBAR) - """""" UTILITY = int(lib.SDL_WINDOW_UTILITY) """""" TOOLTIP = int(lib.SDL_WINDOW_TOOLTIP) @@ -107,18 +101,16 @@ def __init__(self, pixels: ArrayLike) -> None: msg = f"NumPy array must have RGB or RGBA channels. (got {self._array.shape})" raise TypeError(msg) self.p = ffi.gc( - lib.SDL_CreateRGBSurfaceFrom( - ffi.from_buffer("void*", self._array), - self._array.shape[1], # Width. - self._array.shape[0], # Height. - self._array.shape[2] * 8, # Bit depth. - self._array.strides[1], # Pitch. - 0x000000FF, - 0x0000FF00, - 0x00FF0000, - 0xFF000000 if self._array.shape[2] == 4 else 0, # noqa: PLR2004 + _check_p( + lib.SDL_CreateSurfaceFrom( + self._array.shape[1], + self._array.shape[0], + lib.SDL_PIXELFORMAT_RGBA32 if self._array.shape[2] == 4 else lib.SDL_PIXELFORMAT_RGB24, + ffi.from_buffer("void*", self._array), + self._array.strides[0], + ) ), - lib.SDL_FreeSurface, + lib.SDL_DestroySurface, ) @@ -141,6 +133,13 @@ def __eq__(self, other: object) -> bool: return NotImplemented return bool(self.p == other.p) + def _as_property_pointer(self) -> Any: # noqa: ANN401 + return self.p + + @classmethod + def _from_property_pointer(cls, raw_cffi_pointer: Any, /) -> Self: # noqa: ANN401 + return cls(raw_cffi_pointer) + def set_icon(self, pixels: ArrayLike) -> None: """Set the window icon from an image. @@ -222,24 +221,19 @@ def flags(self) -> WindowFlags: return WindowFlags(lib.SDL_GetWindowFlags(self.p)) @property - def fullscreen(self) -> int: + def fullscreen(self) -> bool: """Get or set the fullscreen status of this window. - Can be set to the :any:`WindowFlags.FULLSCREEN` or :any:`WindowFlags.FULLSCREEN_DESKTOP` flags. - Example:: # Toggle fullscreen. window: tcod.sdl.video.Window - if window.fullscreen: - window.fullscreen = False # Set windowed mode. - else: - window.fullscreen = tcod.sdl.video.WindowFlags.FULLSCREEN_DESKTOP + window.fullscreen = not window.fullscreen """ - return self.flags & (WindowFlags.FULLSCREEN | WindowFlags.FULLSCREEN_DESKTOP) + return bool(self.flags & WindowFlags.FULLSCREEN) @fullscreen.setter - def fullscreen(self, value: int) -> None: + def fullscreen(self, value: bool) -> None: _check(lib.SDL_SetWindowFullscreen(self.p, value)) @property @@ -271,26 +265,51 @@ def opacity(self) -> float: Will error if you try to set this and opacity isn't supported. """ - out = ffi.new("float*") - _check(lib.SDL_GetWindowOpacity(self.p, out)) - return float(out[0]) + return float(lib.SDL_GetWindowOpacity(self.p)) @opacity.setter def opacity(self, value: float) -> None: _check(lib.SDL_SetWindowOpacity(self.p, value)) @property + @deprecated("This attribute as been split into mouse_grab and keyboard_grab") def grab(self) -> bool: """Get or set this windows input grab mode. - .. seealso:: - https://wiki.libsdl.org/SDL_SetWindowGrab + .. deprecated:: Unreleased + This attribute as been split into :any:`mouse_grab` and :any:`keyboard_grab`. """ - return bool(lib.SDL_GetWindowGrab(self.p)) + return self.mouse_grab @grab.setter def grab(self, value: bool) -> None: - lib.SDL_SetWindowGrab(self.p, value) + self.mouse_grab = value + + @property + def mouse_grab(self) -> bool: + """Get or set this windows mouse input grab mode. + + .. versionadded:: Unreleased + """ + return bool(lib.SDL_GetWindowMouseGrab(self.p)) + + @mouse_grab.setter + def mouse_grab(self, value: bool, /) -> None: + lib.SDL_SetWindowMouseGrab(self.p, value) + + @property + def keyboard_grab(self) -> bool: + """Get or set this windows keyboard input grab mode. + + https://wiki.libsdl.org/SDL3/SDL_SetWindowKeyboardGrab + + .. versionadded:: Unreleased + """ + return bool(lib.SDL_GetWindowKeyboardGrab(self.p)) + + @keyboard_grab.setter + def keyboard_grab(self, value: bool, /) -> None: + lib.SDL_SetWindowKeyboardGrab(self.p, value) @property def mouse_rect(self) -> tuple[int, int, int, int] | None: @@ -300,13 +319,11 @@ def mouse_rect(self) -> tuple[int, int, int, int] | None: .. versionadded:: 13.5 """ - _version_at_least((2, 0, 18)) rect = lib.SDL_GetWindowMouseRect(self.p) return (rect.x, rect.y, rect.w, rect.h) if rect else None @mouse_rect.setter def mouse_rect(self, rect: tuple[int, int, int, int] | None) -> None: - _version_at_least((2, 0, 18)) _check(lib.SDL_SetWindowMouseRect(self.p, (rect,) if rect else ffi.NULL)) @_required_version((2, 0, 16)) @@ -338,6 +355,20 @@ def hide(self) -> None: """Hide this window.""" lib.SDL_HideWindow(self.p) + @property + def relative_mouse_mode(self) -> bool: + """Enable or disable relative mouse mode which will lock and hide the mouse and only report mouse motion. + + .. seealso:: + :any:`tcod.sdl.mouse.capture` + https://wiki.libsdl.org/SDL_SetWindowRelativeMouseMode + """ + return bool(lib.SDL_GetWindowRelativeMouseMode(self.p)) + + @relative_mouse_mode.setter + def relative_mouse_mode(self, enable: bool, /) -> None: + _check(lib.SDL_SetWindowRelativeMouseMode(self.p, enable)) + def new_window( # noqa: PLR0913 width: int, @@ -368,11 +399,18 @@ def new_window( # noqa: PLR0913 .. seealso:: :func:`tcod.sdl.render.new_renderer` """ - x = x if x is not None else int(lib.SDL_WINDOWPOS_UNDEFINED) - y = y if y is not None else int(lib.SDL_WINDOWPOS_UNDEFINED) if title is None: title = sys.argv[0] - window_p = ffi.gc(lib.SDL_CreateWindow(title.encode("utf-8"), x, y, width, height, flags), lib.SDL_DestroyWindow) + window_props = Properties() + window_props[(tcod.sdl.constants.SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER, int)] = flags + window_props[(tcod.sdl.constants.SDL_PROP_WINDOW_CREATE_TITLE_STRING, str)] = title + if x is not None: + window_props[(tcod.sdl.constants.SDL_PROP_WINDOW_CREATE_X_NUMBER, int)] = x + if y is not None: + window_props[(tcod.sdl.constants.SDL_PROP_WINDOW_CREATE_Y_NUMBER, int)] = y + window_props[(tcod.sdl.constants.SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER, int)] = width + window_props[(tcod.sdl.constants.SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, int)] = height + window_p = ffi.gc(lib.SDL_CreateWindowWithProperties(window_props.p), lib.SDL_DestroyWindow) return Window(_check_p(window_p)) @@ -406,4 +444,4 @@ def screen_saver_allowed(allow: bool | None = None) -> bool: lib.SDL_EnableScreenSaver() else: lib.SDL_DisableScreenSaver() - return bool(lib.SDL_IsScreenSaverEnabled()) + return bool(lib.SDL_ScreenSaverEnabled()) diff --git a/tcod/tcod.c b/tcod/tcod.c index 75994b85..91f7cc6f 100644 --- a/tcod/tcod.c +++ b/tcod/tcod.c @@ -18,7 +18,7 @@ */ int bresenham(int x1, int y1, int x2, int y2, int n, int* __restrict out) { // Bresenham length is Chebyshev distance. - int length = MAX(abs(x1 - x2), abs(y1 - y2)) + 1; + int length = TCOD_MAX(abs(x1 - x2), abs(y1 - y2)) + 1; if (!out) { return length; } if (n < length) { return TCOD_set_errorv("Bresenham output length mismatched."); } TCOD_bresenham_data_t bresenham; diff --git a/tcod/tileset.py b/tcod/tileset.py index b953cab3..6362c93d 100644 --- a/tcod/tileset.py +++ b/tcod/tileset.py @@ -192,15 +192,14 @@ def render(self, console: tcod.console.Console) -> NDArray[np.uint8]: out: NDArray[np.uint8] = np.empty((height, width, 4), np.uint8) out[:] = 9 surface_p = ffi.gc( - lib.SDL_CreateRGBSurfaceWithFormatFrom( - ffi.from_buffer("void*", out), + lib.SDL_CreateSurfaceFrom( width, height, - 32, - out.strides[0], lib.SDL_PIXELFORMAT_RGBA32, + ffi.from_buffer("void*", out), + out.strides[0], ), - lib.SDL_FreeSurface, + lib.SDL_DestroySurface, ) with surface_p, ffi.new("SDL_Surface**", surface_p) as surface_p_p: _check( diff --git a/tests/test_sdl.py b/tests/test_sdl.py index e29554df..f33f4738 100644 --- a/tests/test_sdl.py +++ b/tests/test_sdl.py @@ -49,15 +49,15 @@ def test_sdl_window_bad_types() -> None: def test_sdl_screen_saver(uses_window: None) -> None: - tcod.sdl.sys.init() + tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.VIDEO) assert tcod.sdl.video.screen_saver_allowed(False) is False assert tcod.sdl.video.screen_saver_allowed(True) is True assert tcod.sdl.video.screen_saver_allowed() is True def test_sdl_render(uses_window: None) -> None: - window = tcod.sdl.video.new_window(1, 1) - render = tcod.sdl.render.new_renderer(window, software=True, vsync=False, target_textures=True) + window = tcod.sdl.video.new_window(4, 4) + render = tcod.sdl.render.new_renderer(window, driver="software", vsync=False) render.clear() render.present() render.clear() @@ -74,9 +74,9 @@ def test_sdl_render(uses_window: None) -> None: with pytest.raises(TypeError): render.upload_texture(np.zeros((8, 8, 5), np.uint8)) - assert (render.read_pixels() == (0, 0, 0, 255)).all() + assert render.read_pixels(rect=(0, 0, 3, 4)).shape == (4, 3, 4) assert (render.read_pixels(format="RGB") == (0, 0, 0)).all() - assert render.read_pixels(rect=(1, 2, 3, 4)).shape == (4, 3, 4) + assert (render.read_pixels() == (0, 0, 0, 255)).all() render.draw_point((0, 0)) render.draw_line((0, 0), (1, 1)) @@ -102,7 +102,7 @@ def test_sdl_render(uses_window: None) -> None: render.geometry( None, np.zeros((1, 2), np.float32), - np.zeros((1, 4), np.uint8), + np.zeros((1, 4), np.float32), np.zeros((1, 2), np.float32), np.zeros((3,), np.uint8), ) diff --git a/tests/test_sdl_audio.py b/tests/test_sdl_audio.py index f7e55093..f8da6155 100644 --- a/tests/test_sdl_audio.py +++ b/tests/test_sdl_audio.py @@ -3,6 +3,7 @@ import contextlib import sys import time +from collections.abc import Callable from typing import Any import numpy as np @@ -14,11 +15,19 @@ # ruff: noqa: D103 +def device_works(device: Callable[[], tcod.sdl.audio.AudioDevice]) -> bool: + try: + device().open().close() + except RuntimeError: + return False + return True + + needs_audio_device = pytest.mark.xfail( - not list(tcod.sdl.audio.get_devices()), reason="This test requires an audio device" + not device_works(tcod.sdl.audio.get_default_playback), reason="This test requires an audio device" ) needs_audio_capture = pytest.mark.xfail( - not list(tcod.sdl.audio.get_capture_devices()), reason="This test requires an audio capture device" + not device_works(tcod.sdl.audio.get_default_recording), reason="This test requires an audio capture device" ) @@ -31,20 +40,14 @@ def test_devices() -> None: def test_audio_device() -> None: with tcod.sdl.audio.open(frequency=44100, format=np.float32, channels=2, paused=True) as device: assert not device.stopped - assert device.convert(np.zeros(4, dtype=np.float32), 22050).shape[0] == 8 # noqa: PLR2004 - assert device.convert(np.zeros((4, 4), dtype=np.float32)).shape == (4, 2) - assert device.convert(np.zeros(4, dtype=np.int8)).shape[0] == 4 # noqa: PLR2004 + device.convert(np.zeros(4, dtype=np.float32), 22050) + assert device.convert(np.zeros((4, 4), dtype=np.float32)).shape[1] == device.channels + device.convert(np.zeros(4, dtype=np.int8)).shape[0] assert device.paused is True device.paused = False assert device.paused is False device.paused = True - assert device.queued_samples == 0 - with pytest.raises(TypeError): - device.callback # noqa: B018 - with pytest.raises(TypeError): - device.callback = lambda _device, _stream: None - with contextlib.closing(tcod.sdl.audio.BasicMixer(device)) as mixer: - assert mixer.daemon + with contextlib.closing(tcod.sdl.audio.BasicMixer(device, frequency=44100, channels=2)) as mixer: assert mixer.play(np.zeros(4, np.float32)).busy mixer.play(np.zeros(0, np.float32)) mixer.play(np.full(1, 0.01, np.float32), on_end=lambda _: None) @@ -59,18 +62,15 @@ def test_audio_device() -> None: @needs_audio_capture def test_audio_capture() -> None: - with tcod.sdl.audio.open(capture=True) as device: - assert not device.stopped - assert isinstance(device.dequeue_audio(), np.ndarray) + with contextlib.closing(tcod.sdl.audio.get_default_recording().open()) as device: + device.new_stream(np.float32, 1, 11025).dequeue_audio() @needs_audio_device def test_audio_device_repr() -> None: - with tcod.sdl.audio.open(format=np.uint16, paused=True, callback=True) as device: + with contextlib.closing(tcod.sdl.audio.get_default_playback().open()) as device: assert not device.stopped - assert "silence=" in repr(device) - assert "callback=" in repr(device) - assert "stopped=" in repr(device) + assert "paused=False" in repr(device) def test_convert_bad_shape() -> None: @@ -83,7 +83,7 @@ def test_convert_bad_shape() -> None: def test_convert_bad_type() -> None: with pytest.raises(TypeError, match=r".*bool"): tcod.sdl.audio.convert_audio(np.zeros(8, bool), 8000, out_rate=8000, out_format=np.float32, out_channels=1) - with pytest.raises(RuntimeError, match=r"Invalid source format"): + with pytest.raises(RuntimeError, match=r"Parameter 'src_spec->format' is invalid"): tcod.sdl.audio.convert_audio(np.zeros(8, np.int64), 8000, out_rate=8000, out_format=np.float32, out_channels=1) @@ -110,7 +110,6 @@ def __call__(self, device: tcod.sdl.audio.AudioDevice, stream: NDArray[Any]) -> check_called = CheckCalled() with tcod.sdl.audio.open(callback=check_called, paused=False) as device: assert not device.stopped - device.callback = device.callback while not check_called.was_called: time.sleep(0.001) diff --git a/tests/test_tcod.py b/tests/test_tcod.py index 8b910c3a..25f60d0e 100644 --- a/tests/test_tcod.py +++ b/tests/test_tcod.py @@ -179,7 +179,6 @@ def test_mouse_repr() -> None: def test_cffi_structs() -> None: # Make sure cffi structures are the correct size. tcod.ffi.new("SDL_Event*") - tcod.ffi.new("SDL_AudioCVT*") @pytest.mark.filterwarnings("ignore") From 869f8ed4c1f62df562261bd67dfe0b8b71fc3c50 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 13 Jun 2025 00:25:14 -0700 Subject: [PATCH 05/16] Pre-commit update Use more specific ruff-check id --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7d3a915..43080c04 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,8 +17,8 @@ repos: - id: fix-byte-order-marker - id: detect-private-key - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.11 + rev: v0.11.13 hooks: - - id: ruff + - id: ruff-check args: [--fix-only, --exit-non-zero-on-fix] - id: ruff-format From 03a9cd044b045a5931824a2fa73a253826e7496b Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 13 Jun 2025 00:36:24 -0700 Subject: [PATCH 06/16] Update SDL to 3.2.16 Note libtcod version as well --- .github/workflows/python-package.yml | 13 +++++++------ CHANGELOG.md | 3 ++- build_sdl.py | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 714520ec..28ef5efc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,6 +14,7 @@ defaults: env: git-depth: 0 # Depth to search for tags. + sdl-version: "3.2.16" # SDL version to bundle jobs: ruff: @@ -48,7 +49,7 @@ jobs: with: install-linux-dependencies: true build-type: "Debug" - version: "3.2.14" + version: ${{ env.sdl-version }} - uses: actions/checkout@v4 with: fetch-depth: ${{ env.git-depth }} @@ -72,7 +73,7 @@ jobs: strategy: matrix: os: ["windows-latest", "macos-latest"] - sdl-version: ["3.2.10"] + sdl-version: ["3.2.16"] fail-fast: true steps: - uses: actions/checkout@v4 @@ -129,7 +130,7 @@ jobs: with: install-linux-dependencies: true build-type: "Release" - version: "3.2.14" + version: ${{ env.sdl-version }} - name: Install Python dependencies run: | python -m pip install --upgrade pip @@ -172,7 +173,7 @@ jobs: with: install-linux-dependencies: true build-type: "Debug" - version: "3.2.14" + version: ${{ env.sdl-version }} - uses: actions/checkout@v4 with: fetch-depth: ${{ env.git-depth }} @@ -214,7 +215,7 @@ jobs: with: install-linux-dependencies: true build-type: "Debug" - version: "3.2.14" + version: ${{ env.sdl-version }} - name: Run tox run: | tox -vv @@ -265,7 +266,7 @@ jobs: systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \ mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \ libdrm-devel mesa-libgbm-devel libusb-devel - git clone --depth 1 --branch release-3.2.10 https://github.com/libsdl-org/SDL.git sdl_repo && + git clone --depth 1 --branch release-${{env.sdl-version}} https://github.com/libsdl-org/SDL.git sdl_repo && cmake -S sdl_repo -B sdl_build && cmake --build sdl_build --config Release && cmake --install sdl_build --config Release --prefix /usr/local && diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3495f7..4cbd924b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version ### Changed -- Switched to SDL3. +- Updated libtcod to 2.1.1 +- Updated SDL to 3.2.16 This will cause several breaking changes such as the names of keyboard constants and other SDL enums. - `tcod.sdl.video.Window.grab` has been split into `.mouse_grab` and `.keyboard_grab` attributes. - `tcod.event.KeySym` single letter symbols are now all uppercase. diff --git a/build_sdl.py b/build_sdl.py index 08a6f667..1f7d05ec 100755 --- a/build_sdl.py +++ b/build_sdl.py @@ -33,9 +33,9 @@ # Reject versions of SDL older than this, update the requirements in the readme if you change this. SDL_MIN_VERSION = (3, 2, 0) # The SDL version to parse and export symbols from. -SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.2.10") +SDL_PARSE_VERSION = os.environ.get("SDL_VERSION", "3.2.16") # The SDL version to include in binary distributions. -SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.2.10") +SDL_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "3.2.16") # Used to remove excessive newlines in debug outputs. From 50721e8e12a9b2395a5df28aa935b40cfe35335f Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 13 Jun 2025 12:30:05 -0700 Subject: [PATCH 07/16] Prepare 19.0.0 release. --- CHANGELOG.md | 5 +++++ tcod/sdl/audio.py | 38 +++++++++++++++++++------------------- tcod/sdl/mouse.py | 4 ++-- tcod/sdl/render.py | 12 ++++++------ tcod/sdl/video.py | 6 +++--- 5 files changed, 35 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cbd924b..2e1eb24b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version ## [Unreleased] +## [19.0.0] - 2025-06-13 + +Finished port to SDL3, this has caused several breaking changes from SDL such as lowercase key constants now being uppercase and mouse events returning `float` instead of `int`. +Be sure to run [Mypy](https://mypy.readthedocs.io/en/stable/getting_started.html) on your projects to catch any issues from this update. + ### Changed - Updated libtcod to 2.1.1 diff --git a/tcod/sdl/audio.py b/tcod/sdl/audio.py index d15abb32..390bc551 100644 --- a/tcod/sdl/audio.py +++ b/tcod/sdl/audio.py @@ -217,7 +217,7 @@ class AudioDevice: .. versionchanged:: 16.0 Can now be used as a context which will close the device on exit. - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 Removed `spec` and `callback` attribute. `queued_samples`, `queue_audio`, and `dequeue_audio` moved to :any:`AudioStream` class. @@ -269,7 +269,7 @@ def __init__( self.is_physical: Final[bool] = bool(lib.SDL_IsAudioDevicePhysical(device_id)) """True of this is a physical device, or False if this is a logical device. - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ def __repr__(self) -> str: @@ -294,7 +294,7 @@ def __repr__(self) -> str: def name(self) -> str: """Name of the device. - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ return str(ffi.string(_check_p(lib.SDL_GetAudioDeviceName(self.device_id))), encoding="utf-8") @@ -304,7 +304,7 @@ def gain(self) -> float: Default is 1.0 but can be set higher or zero. - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ return _check_float(lib.SDL_GetAudioDeviceGain(self.device_id), failure=-1.0) @@ -320,7 +320,7 @@ def open( ) -> Self: """Open a new logical audio device for this device. - .. versionadded:: Unreleased + .. versionadded:: 19.0 .. seealso:: https://wiki.libsdl.org/SDL3/SDL_OpenAudioDevice @@ -349,7 +349,7 @@ def _sample_size(self) -> int: def stopped(self) -> bool: """Is True if the device has failed or was closed. - .. deprecated:: Unreleased + .. deprecated:: 19.0 No longer used by the SDL3 API. """ return bool(not hasattr(self, "device_id")) @@ -417,7 +417,7 @@ def close(self) -> None: def __enter__(self) -> Self: """Return self and enter a managed context. - .. deprecated:: Unreleased + .. deprecated:: 19.0 Use :func:`contextlib.closing` if you want to close this device after a context. """ return self @@ -443,7 +443,7 @@ def new_stream( ) -> AudioStream: """Create, bind, and return a new :any:`AudioStream` for this device. - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ new_stream = AudioStream.new(format=format, channels=channels, frequency=frequency) self.bind((new_stream,)) @@ -463,7 +463,7 @@ def bind(self, streams: Iterable[AudioStream], /) -> None: class AudioStreamCallbackData: """Data provided to AudioStream callbacks. - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ additional_bytes: int @@ -487,7 +487,7 @@ class AudioStream: This class is commonly created with :any:`AudioDevice.new_stream` which creates a new stream bound to the device. - ..versionadded:: Unreleased + ..versionadded:: 19.0 """ __slots__ = ("__weakref__", "_stream_p") @@ -819,10 +819,10 @@ class BasicMixer: .. versionadded:: 13.6 - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 Added `frequency` and `channels` parameters. - .. deprecated:: Unreleased + .. deprecated:: 19.0 Changes in the SDL3 API have made this classes usefulness questionable. This class should be replaced with custom streams. """ @@ -927,7 +927,7 @@ def _sdl_audio_stream_callback(userdata: Any, stream_p: Any, additional_amount: def get_devices() -> dict[str, AudioDevice]: """Iterate over the available audio output devices. - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 Now returns a dictionary of :any:`AudioDevice`. """ tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) @@ -942,7 +942,7 @@ def get_devices() -> dict[str, AudioDevice]: def get_capture_devices() -> dict[str, AudioDevice]: """Iterate over the available audio capture devices. - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 Now returns a dictionary of :any:`AudioDevice`. """ tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) @@ -960,7 +960,7 @@ def get_default_playback() -> AudioDevice: Example: playback_device = tcod.sdl.audio.get_default_playback().open() - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) return AudioDevice(ffi.cast("SDL_AudioDeviceID", lib.SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK)) @@ -972,7 +972,7 @@ def get_default_recording() -> AudioDevice: Example: recording_device = tcod.sdl.audio.get_default_recording().open() - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ tcod.sdl.sys.init(tcod.sdl.sys.Subsystem.AUDIO) return AudioDevice(ffi.cast("SDL_AudioDeviceID", lib.SDL_AUDIO_DEVICE_DEFAULT_RECORDING)) @@ -982,7 +982,7 @@ def get_default_recording() -> AudioDevice: class AllowedChanges(enum.IntFlag): """Which parameters are allowed to be changed when the values given are not supported. - .. deprecated:: Unreleased + .. deprecated:: 19.0 This is no longer used. """ @@ -1033,12 +1033,12 @@ def open( # noqa: A001, PLR0913 If a callback is given then it will be called with the `AudioDevice` and a Numpy buffer of the data stream. This callback will be run on a separate thread. - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 SDL3 returns audio devices differently, exact formatting is set with :any:`AudioDevice.new_stream` instead. `samples` and `allowed_changes` are ignored. - .. deprecated:: Unreleased + .. deprecated:: 19.0 This is an outdated method. Use :any:`AudioDevice.open` instead, for example: ``tcod.sdl.audio.get_default_playback().open()`` diff --git a/tcod/sdl/mouse.py b/tcod/sdl/mouse.py index f4c16ed5..9d9227f7 100644 --- a/tcod/sdl/mouse.py +++ b/tcod/sdl/mouse.py @@ -183,7 +183,7 @@ def set_relative_mode(enable: bool) -> None: :any:`tcod.sdl.mouse.capture` https://wiki.libsdl.org/SDL_SetWindowRelativeMouseMode - .. deprecated:: Unreleased + .. deprecated:: 19.0 Replaced with :any:`tcod.sdl.video.Window.relative_mouse_mode` """ _check(lib.SDL_SetWindowRelativeMouseMode(lib.SDL_GetMouseFocus(), enable)) @@ -193,7 +193,7 @@ def set_relative_mode(enable: bool) -> None: def get_relative_mode() -> bool: """Return True if relative mouse mode is enabled. - .. deprecated:: Unreleased + .. deprecated:: 19.0 Replaced with :any:`tcod.sdl.video.Window.relative_mouse_mode` """ return bool(lib.SDL_GetWindowRelativeMouseMode(lib.SDL_GetMouseFocus())) diff --git a/tcod/sdl/render.py b/tcod/sdl/render.py index 0a1052e1..511b48fc 100644 --- a/tcod/sdl/render.py +++ b/tcod/sdl/render.py @@ -48,7 +48,7 @@ class LogicalPresentation(enum.IntEnum): See https://wiki.libsdl.org/SDL3/SDL_RendererLogicalPresentation - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ DISABLED = 0 @@ -439,7 +439,7 @@ def set_logical_presentation(self, resolution: tuple[int, int], mode: LogicalPre .. seealso:: https://wiki.libsdl.org/SDL3/SDL_SetRenderLogicalPresentation - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ width, height = resolution _check(lib.SDL_SetRenderLogicalPresentation(self.p, width, height, mode)) @@ -455,7 +455,7 @@ def logical_size(self) -> tuple[int, int]: .. versionadded:: 13.5 - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 Setter is deprecated, use :any:`set_logical_presentation` instead. """ out = ffi.new("int[2]") @@ -537,7 +537,7 @@ def read_pixels( .. versionadded:: 15.0 - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 `format` no longer accepts `int` values. """ surface = _check_p( @@ -681,7 +681,7 @@ def geometry( .. versionadded:: 13.5 - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 `color` now takes float values instead of 8-bit integers. """ xy = np.ascontiguousarray(xy, np.float32) @@ -741,7 +741,7 @@ def new_renderer( .. seealso:: :func:`tcod.sdl.video.new_window` - .. versionchanged:: Unreleased + .. versionchanged:: 19.0 Removed `software` and `target_textures` parameters. `vsync` now takes an integer. `driver` now take a string. diff --git a/tcod/sdl/video.py b/tcod/sdl/video.py index cee02bf5..4cc0c371 100644 --- a/tcod/sdl/video.py +++ b/tcod/sdl/video.py @@ -276,7 +276,7 @@ def opacity(self, value: float) -> None: def grab(self) -> bool: """Get or set this windows input grab mode. - .. deprecated:: Unreleased + .. deprecated:: 19.0 This attribute as been split into :any:`mouse_grab` and :any:`keyboard_grab`. """ return self.mouse_grab @@ -289,7 +289,7 @@ def grab(self, value: bool) -> None: def mouse_grab(self) -> bool: """Get or set this windows mouse input grab mode. - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ return bool(lib.SDL_GetWindowMouseGrab(self.p)) @@ -303,7 +303,7 @@ def keyboard_grab(self) -> bool: https://wiki.libsdl.org/SDL3/SDL_SetWindowKeyboardGrab - .. versionadded:: Unreleased + .. versionadded:: 19.0 """ return bool(lib.SDL_GetWindowKeyboardGrab(self.p)) From 7054780028d598fb63f0a666df9ab38b9437b3f0 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 13 Jun 2025 12:51:40 -0700 Subject: [PATCH 08/16] Build SDL3 for ReadTheDocs workflow Note PKG_CONFIG_PATH on pkg-config errors to debug issues with the environment sent to Python setup scripts. --- .readthedocs.yaml | 12 +++++++++++- setup.py | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8d733f5e..098d76db 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,17 @@ build: tools: python: "3.11" apt_packages: - - libsdl3-dev + - build-essential + - make + - pkg-config + - cmake + - ninja-build + jobs: + pre_install: + - git clone --depth 1 --branch release-3.2.16 https://github.com/libsdl-org/SDL.git sdl_repo + - cmake -S sdl_repo -B sdl_build -D CMAKE_INSTALL_PREFIX=~/.local + - cmake --build sdl_build --config Debug + - cmake --install sdl_build submodules: include: all diff --git a/setup.py b/setup.py index 6a835e5b..534cca8b 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from __future__ import annotations +import os import platform import subprocess import sys @@ -55,6 +56,10 @@ def check_sdl_version() -> None: "\nsdl3-config must be on PATH." ) raise RuntimeError(msg) from exc + except subprocess.CalledProcessError as exc: + if sys.version_info >= (3, 11): + exc.add_note(f"Note: {os.environ.get('PKG_CONFIG_PATH')=}") + raise print(f"Found SDL {sdl_version_str}.") sdl_version = tuple(int(s) for s in sdl_version_str.split(".")) if sdl_version < SDL_VERSION_NEEDED: From 03fbcaabe901fcc1376631eb743de432976a16a5 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 13 Jun 2025 16:06:34 -0700 Subject: [PATCH 09/16] Remove leftover item from changelog This meant to mention changes to logical size, but that is already in the changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e1eb24b..3327d110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,6 @@ Be sure to run [Mypy](https://mypy.readthedocs.io/en/stable/getting_started.html - `tcod.event.KeySym` single letter symbols are now all uppercase. - Relative mouse mode is set via `tcod.sdl.video.Window.relative_mouse_mode` instead of `tcod.sdl.mouse.set_relative_mode`. - `tcod.sdl.render.new_renderer`: Removed `software` and `target_textures` parameters, `vsync` takes `int`, `driver` takes `str` instead of `int`. -- SDL renderer logical - `tcod.sdl.render.Renderer`: `integer_scaling` and `logical_size` are now set with `set_logical_presentation` method. - `tcod.sdl.render.Renderer.geometry` now takes float values for `color` instead of 8-bit integers. - `tcod.event.Point` and other mouse/tile coordinate types now use `float` instead of `int`. From f2e03d0d61637742ac48463422bf7723b867bacc Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Thu, 19 Jun 2025 13:01:18 -0700 Subject: [PATCH 10/16] Update pre-commit Apply new Ruff fixes of unused ignores --- .pre-commit-config.yaml | 2 +- build_sdl.py | 2 +- examples/samples_tcod.py | 1 - setup.py | 2 +- tests/conftest.py | 2 -- tests/test_console.py | 2 -- tests/test_deprecated.py | 2 -- tests/test_libtcodpy.py | 2 -- tests/test_noise.py | 2 -- tests/test_parser.py | 2 -- tests/test_random.py | 2 -- tests/test_sdl.py | 2 -- tests/test_sdl_audio.py | 2 -- tests/test_tcod.py | 2 -- tests/test_tileset.py | 2 -- 15 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 43080c04..a294765c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: fix-byte-order-marker - id: detect-private-key - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.13 + rev: v0.12.0 hooks: - id: ruff-check args: [--fix-only, --exit-non-zero-on-fix] diff --git a/build_sdl.py b/build_sdl.py index 1f7d05ec..b073ab77 100755 --- a/build_sdl.py +++ b/build_sdl.py @@ -20,7 +20,7 @@ import requests # This script calls a lot of programs. -# ruff: noqa: S603, S607, T201 +# ruff: noqa: S603, S607 # Ignore f-strings in logging, these will eventually be replaced with t-strings. # ruff: noqa: G004 diff --git a/examples/samples_tcod.py b/examples/samples_tcod.py index 7c08906a..0955f2a0 100755 --- a/examples/samples_tcod.py +++ b/examples/samples_tcod.py @@ -37,7 +37,6 @@ if TYPE_CHECKING: from numpy.typing import NDArray -# ruff: noqa: S311 if not sys.warnoptions: warnings.simplefilter("default") # Show all warnings. diff --git a/setup.py b/setup.py index 534cca8b..eff99ff1 100755 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ def check_sdl_version() -> None: ).strip() except FileNotFoundError: try: - sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607 + sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S607 except FileNotFoundError as exc: msg = ( f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}." diff --git a/tests/conftest.py b/tests/conftest.py index 182cb6d6..79891a38 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,8 +11,6 @@ import tcod from tcod import libtcodpy -# ruff: noqa: D103 - def pytest_addoption(parser: pytest.Parser) -> None: parser.addoption("--no-window", action="store_true", help="Skip tests which need a rendering context.") diff --git a/tests/test_console.py b/tests/test_console.py index 4b8f8435..18668ba6 100644 --- a/tests/test_console.py +++ b/tests/test_console.py @@ -9,8 +9,6 @@ import tcod import tcod.console -# ruff: noqa: D103 - def test_array_read_write() -> None: console = tcod.console.Console(width=12, height=10) diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py index 82001d47..4a960bba 100644 --- a/tests/test_deprecated.py +++ b/tests/test_deprecated.py @@ -14,8 +14,6 @@ with pytest.warns(): import libtcodpy -# ruff: noqa: D103 - def test_deprecate_color() -> None: with pytest.warns(FutureWarning, match=r"\(0, 0, 0\)"): diff --git a/tests/test_libtcodpy.py b/tests/test_libtcodpy.py index 7ace644a..61895c60 100644 --- a/tests/test_libtcodpy.py +++ b/tests/test_libtcodpy.py @@ -11,8 +11,6 @@ import tcod from tcod import libtcodpy -# ruff: noqa: D103 - pytestmark = [ pytest.mark.filterwarnings("ignore::DeprecationWarning"), pytest.mark.filterwarnings("ignore::PendingDeprecationWarning"), diff --git a/tests/test_noise.py b/tests/test_noise.py index 80023f5f..28825328 100644 --- a/tests/test_noise.py +++ b/tests/test_noise.py @@ -9,8 +9,6 @@ import tcod.noise import tcod.random -# ruff: noqa: D103 - @pytest.mark.parametrize("implementation", tcod.noise.Implementation) @pytest.mark.parametrize("algorithm", tcod.noise.Algorithm) diff --git a/tests/test_parser.py b/tests/test_parser.py index 5494b786..73c54b63 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -7,8 +7,6 @@ import tcod as libtcod -# ruff: noqa: D103 - @pytest.mark.filterwarnings("ignore") def test_parser() -> None: diff --git a/tests/test_random.py b/tests/test_random.py index d20045cc..764ae988 100644 --- a/tests/test_random.py +++ b/tests/test_random.py @@ -8,8 +8,6 @@ import tcod.random -# ruff: noqa: D103 - SCRIPT_DIR = Path(__file__).parent diff --git a/tests/test_sdl.py b/tests/test_sdl.py index f33f4738..9d23d0c8 100644 --- a/tests/test_sdl.py +++ b/tests/test_sdl.py @@ -9,8 +9,6 @@ import tcod.sdl.sys import tcod.sdl.video -# ruff: noqa: D103 - def test_sdl_window(uses_window: None) -> None: assert tcod.sdl.video.get_grabbed_window() is None diff --git a/tests/test_sdl_audio.py b/tests/test_sdl_audio.py index f8da6155..38250758 100644 --- a/tests/test_sdl_audio.py +++ b/tests/test_sdl_audio.py @@ -12,8 +12,6 @@ import tcod.sdl.audio -# ruff: noqa: D103 - def device_works(device: Callable[[], tcod.sdl.audio.AudioDevice]) -> bool: try: diff --git a/tests/test_tcod.py b/tests/test_tcod.py index 25f60d0e..02eb6dbb 100644 --- a/tests/test_tcod.py +++ b/tests/test_tcod.py @@ -12,8 +12,6 @@ import tcod.console from tcod import libtcodpy -# ruff: noqa: D103 - def raise_Exception(*_args: object) -> NoReturn: raise RuntimeError("testing exception") # noqa: TRY003, EM101 diff --git a/tests/test_tileset.py b/tests/test_tileset.py index dd272fe7..c7281cef 100644 --- a/tests/test_tileset.py +++ b/tests/test_tileset.py @@ -2,8 +2,6 @@ import tcod.tileset -# ruff: noqa: D103 - def test_proc_block_elements() -> None: tileset = tcod.tileset.Tileset(8, 8) From 740357d8afed162e22d5699486435d3211828e8a Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Thu, 19 Jun 2025 12:43:57 -0700 Subject: [PATCH 11/16] Upgrade cibuildwheel to 3.0.0 Switch to GitHub actions and remove outdated actions Enable PyPy wheels explicitly, required by latest cibuildwheel Configure compile warnings to show but not fail on zlib implicit functions --- .github/workflows/python-package.yml | 19 +++---------------- build_libtcod.py | 1 + pyproject.toml | 3 +++ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 28ef5efc..4dcbd93a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -233,23 +233,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: ${{ env.git-depth }} - - name: Set up QEMU - if: ${{ matrix.arch == 'aarch64' }} - uses: docker/setup-qemu-action@v3 - name: Checkout submodules - run: | - git submodule update --init --recursive --depth 1 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install cibuildwheel==2.23.3 + run: git submodule update --init --recursive --depth 1 - name: Build wheels - run: | - python -m cibuildwheel --output-dir wheelhouse + uses: pypa/cibuildwheel@v3.0.0 env: CIBW_BUILD: ${{ matrix.build }} CIBW_ARCHS_LINUX: ${{ matrix.arch }} @@ -312,7 +299,7 @@ jobs: # Downloads SDL for the later step. run: python build_sdl.py - name: Build wheels - uses: pypa/cibuildwheel@v2.23.3 + uses: pypa/cibuildwheel@v3.0.0 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS_MACOS: x86_64 arm64 universal2 diff --git a/build_libtcod.py b/build_libtcod.py index f9a5e3dd..df4527e0 100755 --- a/build_libtcod.py +++ b/build_libtcod.py @@ -199,6 +199,7 @@ def walk_sources(directory: str) -> Iterator[str]: "-fPIC", "-Wno-deprecated-declarations", "-Wno-discarded-qualifiers", # Ignore discarded restrict qualifiers. + "-Wno-error=implicit-function-declaration", # From zlib sources ], } diff --git a/pyproject.toml b/pyproject.toml index 27a3dc16..6f741af8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,6 +99,9 @@ filterwarnings = [ "ignore:'import tcod as libtcodpy' is preferred.", ] +[tool.cibuildwheel] # https://cibuildwheel.pypa.io/en/stable/options/ +enable = ["pypy"] + [tool.mypy] files = ["."] python_version = "3.10" From 9392a486aa0e5a3bfbd126c5177f86db4ff83c44 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 20 Jun 2025 03:40:16 -0700 Subject: [PATCH 12/16] Fix zlib implicit declarations --- build_libtcod.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_libtcod.py b/build_libtcod.py index df4527e0..6de9c2ff 100755 --- a/build_libtcod.py +++ b/build_libtcod.py @@ -180,8 +180,8 @@ def walk_sources(directory: str) -> Iterator[str]: include_dirs.append("libtcod/src/zlib/") -if sys.platform == "darwin": - # Fix "implicit declaration of function 'close'" in zlib. +if sys.platform != "win32": + # Fix implicit declaration of multiple functions in zlib. define_macros.append(("HAVE_UNISTD_H", 1)) @@ -199,7 +199,6 @@ def walk_sources(directory: str) -> Iterator[str]: "-fPIC", "-Wno-deprecated-declarations", "-Wno-discarded-qualifiers", # Ignore discarded restrict qualifiers. - "-Wno-error=implicit-function-declaration", # From zlib sources ], } From fc0f5b34c73281779e13fd449da9f9d69a78fa50 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Thu, 19 Jun 2025 12:25:52 -0700 Subject: [PATCH 13/16] Build Pyodide wheel Disable link flags to let Emscripten take over for SDL3 Disable Py_LIMITED_API definition to workaround issue with cffi Related to #123 --- .github/workflows/python-package.yml | 27 ++++++++++++++++++++++++++- .vscode/settings.json | 1 + build_libtcod.py | 7 ++++++- build_sdl.py | 12 +++++++----- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 4dcbd93a..b6f15916 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -321,8 +321,33 @@ jobs: retention-days: 7 compression-level: 0 + pyodide: + needs: [ruff, mypy, sdist] + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.git-depth }} + - name: Checkout submodules + run: git submodule update --init --recursive --depth 1 + - uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee + with: + install-linux-dependencies: true + build-type: "Debug" + version: ${{ env.sdl-version }} + - uses: pypa/cibuildwheel@v3.0.0 + env: + CIBW_PLATFORM: pyodide + - name: Archive wheel + uses: actions/upload-artifact@v4 + with: + name: wheels-pyodide + path: wheelhouse/*.whl + retention-days: 30 + compression-level: 0 + publish: - needs: [sdist, build, build-macos, linux-wheels] + needs: [sdist, build, build-macos, linux-wheels, pyodide] runs-on: ubuntu-latest if: github.ref_type == 'tag' environment: diff --git a/.vscode/settings.json b/.vscode/settings.json index 446a6363..2ef44da6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -350,6 +350,7 @@ "pycall", "pycparser", "pyinstaller", + "pyodide", "pypa", "PYPI", "pypiwin", diff --git a/build_libtcod.py b/build_libtcod.py index 6de9c2ff..c7b0d577 100755 --- a/build_libtcod.py +++ b/build_libtcod.py @@ -162,7 +162,12 @@ def walk_sources(directory: str) -> Iterator[str]: libraries: list[str] = [*build_sdl.libraries] library_dirs: list[str] = [*build_sdl.library_dirs] -define_macros: list[tuple[str, Any]] = [("Py_LIMITED_API", Py_LIMITED_API)] +define_macros: list[tuple[str, Any]] = [] + +if "PYODIDE" not in os.environ: + # Unable to apply Py_LIMITED_API to Pyodide in cffi<=1.17.1 + # https://github.com/python-cffi/cffi/issues/179 + define_macros.append(("Py_LIMITED_API", Py_LIMITED_API)) sources += walk_sources("tcod/") sources += walk_sources("libtcod/src/libtcod/") diff --git a/build_sdl.py b/build_sdl.py index b073ab77..459b37b4 100755 --- a/build_sdl.py +++ b/build_sdl.py @@ -350,8 +350,9 @@ def get_cdef() -> tuple[str, dict[str, str]]: libraries: list[str] = [] library_dirs: list[str] = [] - -if sys.platform == "darwin": +if "PYODIDE" in os.environ: + pass +elif sys.platform == "darwin": extra_link_args += ["-framework", "SDL3"] else: libraries += ["SDL3"] @@ -382,6 +383,7 @@ def get_cdef() -> tuple[str, dict[str, str]]: extra_compile_args += ( subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True).strip().split() ) - extra_link_args += ( - subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split() - ) + if "PYODIDE" not in os.environ: + extra_link_args += ( + subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split() + ) From 6d2b2c7928627d4c6e2010c63e86b00690ca82a6 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Tue, 24 Jun 2025 21:18:22 -0700 Subject: [PATCH 14/16] Use alpha builds of Pyodide supporting SDL3 Stable version is too old and only supports SDL2 Try not to bundle win/mac binaries during Pyodide build --- .github/workflows/python-package.yml | 3 ++- .vscode/settings.json | 1 + build_sdl.py | 35 +++++++++++++++++++--------- pyproject.toml | 6 ++++- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b6f15916..1545558e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -334,9 +334,10 @@ jobs: with: install-linux-dependencies: true build-type: "Debug" - version: ${{ env.sdl-version }} + version: "3.2.4" # Should be equal or less than the version used by Emscripten - uses: pypa/cibuildwheel@v3.0.0 env: + CIBW_BUILD: cp313-pyodide_wasm32 CIBW_PLATFORM: pyodide - name: Archive wheel uses: actions/upload-artifact@v4 diff --git a/.vscode/settings.json b/.vscode/settings.json index 2ef44da6..6dbcc428 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -141,6 +141,7 @@ "dunder", "DVLINE", "elif", + "Emscripten", "ENDCALL", "endianness", "epel", diff --git a/build_sdl.py b/build_sdl.py index 459b37b4..cc1fb787 100755 --- a/build_sdl.py +++ b/build_sdl.py @@ -249,16 +249,27 @@ def on_directive_handle( return super().on_directive_handle(directive, tokens, if_passthru, preceding_tokens) +def get_emscripten_include_dir() -> Path: + """Find and return the Emscripten include dir.""" + # None of the EMSDK environment variables exist! Search PATH for Emscripten as a workaround + for path in os.environ["PATH"].split(os.pathsep)[::-1]: + if Path(path).match("upstream/emscripten"): + return Path(path, "system/include").resolve(strict=True) + raise AssertionError(os.environ["PATH"]) + + check_sdl_version() -if sys.platform == "win32" or sys.platform == "darwin": +SDL_PARSE_PATH: Path | None = None +SDL_BUNDLE_PATH: Path | None = None +if (sys.platform == "win32" or sys.platform == "darwin") and "PYODIDE" not in os.environ: SDL_PARSE_PATH = unpack_sdl(SDL_PARSE_VERSION) SDL_BUNDLE_PATH = unpack_sdl(SDL_BUNDLE_VERSION) SDL_INCLUDE: Path -if sys.platform == "win32": +if sys.platform == "win32" and SDL_PARSE_PATH is not None: SDL_INCLUDE = SDL_PARSE_PATH / "include" -elif sys.platform == "darwin": +elif sys.platform == "darwin" and SDL_PARSE_PATH is not None: SDL_INCLUDE = SDL_PARSE_PATH / "Versions/A/Headers" else: # Unix matches = re.findall( @@ -275,6 +286,7 @@ def on_directive_handle( raise AssertionError(matches) assert SDL_INCLUDE +logger.info(f"{SDL_INCLUDE=}") EXTRA_CDEF = """ #define SDLK_SCANCODE_MASK ... @@ -358,7 +370,7 @@ def get_cdef() -> tuple[str, dict[str, str]]: libraries += ["SDL3"] # Bundle the Windows SDL DLL. -if sys.platform == "win32": +if sys.platform == "win32" and SDL_BUNDLE_PATH is not None: include_dirs.append(str(SDL_INCLUDE)) ARCH_MAPPING = {"32bit": "x86", "64bit": "x64"} SDL_LIB_DIR = Path(SDL_BUNDLE_PATH, "lib/", ARCH_MAPPING[BIT_SIZE]) @@ -372,18 +384,19 @@ def get_cdef() -> tuple[str, dict[str, str]]: # Link to the SDL framework on MacOS. # Delocate will bundle the binaries in a later step. -if sys.platform == "darwin": +if sys.platform == "darwin" and SDL_BUNDLE_PATH is not None: include_dirs.append(SDL_INCLUDE) extra_link_args += [f"-F{SDL_BUNDLE_PATH}/.."] extra_link_args += ["-rpath", f"{SDL_BUNDLE_PATH}/.."] extra_link_args += ["-rpath", "/usr/local/opt/llvm/lib/"] -# Use sdl-config to link to SDL on Linux. -if sys.platform not in ["win32", "darwin"]: +if "PYODIDE" in os.environ: + extra_compile_args += ["--use-port=sdl3"] +elif sys.platform not in ["win32", "darwin"]: + # Use sdl-config to link to SDL on Linux. extra_compile_args += ( subprocess.check_output(["pkg-config", "sdl3", "--cflags"], universal_newlines=True).strip().split() ) - if "PYODIDE" not in os.environ: - extra_link_args += ( - subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split() - ) + extra_link_args += ( + subprocess.check_output(["pkg-config", "sdl3", "--libs"], universal_newlines=True).strip().split() + ) diff --git a/pyproject.toml b/pyproject.toml index 6f741af8..46a9285b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,7 +100,11 @@ filterwarnings = [ ] [tool.cibuildwheel] # https://cibuildwheel.pypa.io/en/stable/options/ -enable = ["pypy"] +enable = ["pypy", "pyodide-prerelease"] + +[tool.cibuildwheel.pyodide] +dependency-versions = "latest" # Until pyodide-version is stable on cibuildwheel +pyodide-version = "0.28.0a3" [tool.mypy] files = ["."] From 9c352c541019bd580408caed2ef2eafd98afa853 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Wed, 25 Jun 2025 15:58:29 -0700 Subject: [PATCH 15/16] Remove redundant SDL version check from setup.py This duplicates build_sdl.py and maybe isn't as useful as it used to be. I could import from that module if I really need the check in setup.py. Ensured updated code was moved to build_sdl.py --- build_sdl.py | 19 +++++++++++++------ setup.py | 33 --------------------------------- 2 files changed, 13 insertions(+), 39 deletions(-) diff --git a/build_sdl.py b/build_sdl.py index cc1fb787..28069f2d 100755 --- a/build_sdl.py +++ b/build_sdl.py @@ -134,12 +134,19 @@ def check_sdl_version() -> None: sdl_version_str = subprocess.check_output( ["pkg-config", "sdl3", "--modversion"], universal_newlines=True ).strip() - except FileNotFoundError as exc: - msg = ( - "libsdl3-dev or equivalent must be installed on your system and must be at least version" - f" {needed_version}.\nsdl3-config must be on PATH." - ) - raise RuntimeError(msg) from exc + except FileNotFoundError: + try: + sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() + except FileNotFoundError as exc: + msg = ( + f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}." + "\nsdl3-config must be on PATH." + ) + raise RuntimeError(msg) from exc + except subprocess.CalledProcessError as exc: + if sys.version_info >= (3, 11): + exc.add_note(f"Note: {os.environ.get('PKG_CONFIG_PATH')=}") + raise logger.info(f"Found SDL {sdl_version_str}.") sdl_version = tuple(int(s) for s in sdl_version_str.split(".")) if sdl_version < SDL_MIN_VERSION: diff --git a/setup.py b/setup.py index eff99ff1..3786a1db 100755 --- a/setup.py +++ b/setup.py @@ -3,9 +3,7 @@ from __future__ import annotations -import os import platform -import subprocess import sys from pathlib import Path @@ -37,42 +35,11 @@ def get_package_data() -> list[str]: return files -def check_sdl_version() -> None: - """Check the local SDL version on Linux distributions.""" - if not sys.platform.startswith("linux"): - return - needed_version = "{}.{}.{}".format(*SDL_VERSION_NEEDED) - try: - sdl_version_str = subprocess.check_output( - ["pkg-config", "sdl3", "--modversion"], # noqa: S607 - universal_newlines=True, - ).strip() - except FileNotFoundError: - try: - sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S607 - except FileNotFoundError as exc: - msg = ( - f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}." - "\nsdl3-config must be on PATH." - ) - raise RuntimeError(msg) from exc - except subprocess.CalledProcessError as exc: - if sys.version_info >= (3, 11): - exc.add_note(f"Note: {os.environ.get('PKG_CONFIG_PATH')=}") - raise - print(f"Found SDL {sdl_version_str}.") - sdl_version = tuple(int(s) for s in sdl_version_str.split(".")) - if sdl_version < SDL_VERSION_NEEDED: - msg = f"SDL version must be at least {needed_version}, (found {sdl_version_str})" - raise RuntimeError(msg) - - if not (SETUP_DIR / "libtcod/src").exists(): print("Libtcod submodule is uninitialized.") print("Did you forget to run 'git submodule update --init'?") sys.exit(1) -check_sdl_version() setup( py_modules=["libtcodpy"], From 32553fc6b5dba4c937e7006572fe4971e639266d Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Fri, 27 Jun 2025 16:53:04 -0700 Subject: [PATCH 16/16] Note that TextInput is no longer enabled by default Caused by SDL3 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3327d110..4bdb3102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ Be sure to run [Mypy](https://mypy.readthedocs.io/en/stable/getting_started.html - Sound queueing methods were moved from `AudioDevice` to a new `AudioStream` class. - `BasicMixer` may require manually specifying `frequency` and `channels` to replicate old behavior. - `get_devices` and `get_capture_devices` now return `dict[str, AudioDevice]`. +- `TextInput` events are no longer enabled by default. ### Deprecated