mirror of https://github.com/ppy/SDL3-CS.git
Compare commits
86 Commits
2025.629.0
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
3767eb2ab9 | |
|
|
4988d55819 | |
|
|
3c21f68505 | |
|
|
2c185bf63b | |
|
|
508573fe62 | |
|
|
2b556b39ce | |
|
|
40707381f6 | |
|
|
64a12c444b | |
|
|
6e700651b2 | |
|
|
32a04fb36a | |
|
|
227d48fe68 | |
|
|
b20de5fa9c | |
|
|
ddf8f1f478 | |
|
|
4022f0aa04 | |
|
|
3cda196b20 | |
|
|
3427250b38 | |
|
|
a27547bece | |
|
|
c0765ca155 | |
|
|
8838d6792e | |
|
|
9d79ba7ade | |
|
|
95165b55ea | |
|
|
b71f522dfe | |
|
|
9601d75096 | |
|
|
83d7db12b8 | |
|
|
dbbd262631 | |
|
|
d942aece9e | |
|
|
240d008900 | |
|
|
9f1c305ab2 | |
|
|
fb36b24faf | |
|
|
5096d33d1b | |
|
|
2fe9cb8ed5 | |
|
|
4f817f6bce | |
|
|
2d7d0ddecc | |
|
|
565ba9fe41 | |
|
|
fdd9cef146 | |
|
|
95010b0846 | |
|
|
db3993e71b | |
|
|
c42876e0ee | |
|
|
16c954ebc2 | |
|
|
a4781c9b58 | |
|
|
e2ead20a3d | |
|
|
e7bbd4461d | |
|
|
ecd3c1d004 | |
|
|
b59358dbf5 | |
|
|
ab2f57804c | |
|
|
579cf8b380 | |
|
|
d230747cd1 | |
|
|
e865ccc395 | |
|
|
4f19a14331 | |
|
|
e8a54c5506 | |
|
|
742ac35cbc | |
|
|
f57452fd77 | |
|
|
98a962deef | |
|
|
7078b56bcc | |
|
|
a9ec26bcbd | |
|
|
6fc5f872ed | |
|
|
11604347e1 | |
|
|
12d3f7a37f | |
|
|
9165d3b077 | |
|
|
76b0b15d97 | |
|
|
dab8abd1da | |
|
|
8afca73432 | |
|
|
7258fc2aaf | |
|
|
2e68c991fc | |
|
|
9a9cc1576e | |
|
|
01def28739 | |
|
|
5a16446ded | |
|
|
454e23e98f | |
|
|
c483a94aea | |
|
|
523649fd77 | |
|
|
f51f432541 | |
|
|
6d367145ed | |
|
|
8a9ec08e66 | |
|
|
68b514a2bb | |
|
|
d94b725f97 | |
|
|
76dcb21019 | |
|
|
2fdd152592 | |
|
|
73b855b9ba | |
|
|
18df50890a | |
|
|
2a51be187b | |
|
|
bde92020d7 | |
|
|
91b98d57a1 | |
|
|
4813f8dc59 | |
|
|
1f60742d1b | |
|
|
71611c90ab | |
|
|
d12cbe2dec |
|
|
@ -5,6 +5,8 @@ on:
|
|||
# - cron: '0 0 * * *'
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
NDK_VER: 28.2.13676358
|
||||
PLATFORM_VER: 35
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -15,7 +17,7 @@ jobs:
|
|||
matrix:
|
||||
platform:
|
||||
- { name: win-x64, os: windows-latest, flags: -A x64 }
|
||||
- { name: win-x86, os: windows-latest, flags: -A Win32 }
|
||||
- { name: win-x86, os: windows-2022, flags: -A Win32 }
|
||||
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
|
||||
- { name: linux-x64, os: ubuntu-22.04, flags: -GNinja, target_apt_arch: ":amd64" }
|
||||
- { name: linux-x86, os: ubuntu-22.04, flags: -GNinja -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DWAVPACK_ENABLE_ASM=OFF, target_apt_arch: ":i386" }
|
||||
|
|
@ -24,11 +26,32 @@ jobs:
|
|||
- { name: osx-x64, os: macos-13, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 }
|
||||
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
|
||||
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 }
|
||||
- { name: android-arm64, os: ubuntu-22.04, flags: -GNinja, abi: arm64-v8a }
|
||||
- { name: android-arm, os: ubuntu-22.04, flags: -GNinja, abi: armeabi-v7a }
|
||||
- { name: android-x64, os: ubuntu-22.04, flags: -GNinja, abi: x86_64 }
|
||||
- { name: android-x86, os: ubuntu-22.04, flags: -GNinja, abi: x86 }
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup JDK
|
||||
if: contains(matrix.platform.name, 'android')
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: microsoft
|
||||
java-version: 17
|
||||
|
||||
- name: Install Android SDK Manager
|
||||
if: contains(matrix.platform.name, 'android')
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Install Android SDK
|
||||
if: contains(matrix.platform.name, 'android')
|
||||
run: |
|
||||
sdkmanager --install "platforms;android-$PLATFORM_VER"
|
||||
sdkmanager --install "ndk;$NDK_VER"
|
||||
|
||||
- name: Build (Linux ARM)
|
||||
if: contains(matrix.platform.container, 'arm')
|
||||
uses: addnab/docker-run-action@v3
|
||||
|
|
@ -52,6 +75,7 @@ jobs:
|
|||
TARGET_APT_ARCH: ${{ matrix.platform.target_apt_arch }}
|
||||
RUNNER_OS: ${{ runner.os }}
|
||||
FLAGS: ${{ matrix.platform.flags }}
|
||||
ANDROID_ABI: ${{ matrix.platform.abi }}
|
||||
run: ./External/build.sh
|
||||
|
||||
- name: Get Actions user id
|
||||
|
|
@ -66,7 +90,12 @@ jobs:
|
|||
user_id: ${{ steps.get_uid.outputs.uid }}
|
||||
|
||||
- name: Compress native directory
|
||||
run: tar -cf native-${{ matrix.platform.name }}.tar native/${{ matrix.platform.name }}
|
||||
if: ${{ !contains(matrix.platform.name, 'android') }}
|
||||
run: tar -cvf native-${{ matrix.platform.name }}.tar native/${{ matrix.platform.name }}
|
||||
|
||||
- name: Compress native directory (Android)
|
||||
if: contains(matrix.platform.name, 'android')
|
||||
run: tar -cvf native-${{ matrix.platform.name }}.tar native/android/${{ matrix.platform.abi }}
|
||||
|
||||
- name: Upload native artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
@ -77,30 +106,46 @@ jobs:
|
|||
|
||||
build-ios:
|
||||
name: ios
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
submodules: recursive
|
||||
|
||||
# https://github.com/dotnet/macios/issues/19157
|
||||
# https://github.com/actions/runner-images/issues/12758
|
||||
- name: Use Xcode 16.4
|
||||
run: sudo xcode-select -switch /Applications/Xcode_16.4.app
|
||||
|
||||
- name: Build (iOS)
|
||||
run: xcodebuild -project External/SDL/Xcode/SDL/SDL.xcodeproj -target SDL3.xcframework -configuration Release
|
||||
|
||||
- name: Prepare release directory (iOS)
|
||||
run: mkdir -p native/ios
|
||||
|
||||
- name: Prepare release (iOS)
|
||||
run: |
|
||||
mkdir -p native/ios/SDL3.xcframework/ios-arm64/SDL3.framework;
|
||||
mkdir -p native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework;
|
||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/Info.plist native/ios/SDL3.xcframework/Info.plist;
|
||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3;
|
||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist;
|
||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3 native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3;
|
||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist;
|
||||
modules=("SDL3" "SDL3_image" "SDL3_ttf" "SDL3_mixer")
|
||||
architectures=("ios-arm64" "ios-arm64_x86_64-simulator")
|
||||
|
||||
for module in "${modules[@]}"; do
|
||||
module0="${module/SDL3/SDL}"
|
||||
directory="External/${module0}/Xcode"
|
||||
if [ "$module" == "SDL3" ]; then
|
||||
directory+="/SDL"
|
||||
fi
|
||||
|
||||
target="${module}.xcframework"
|
||||
framework="${module}.framework"
|
||||
output_dir="native/ios/${target}"
|
||||
|
||||
xcodebuild -project "${directory}/${module0}.xcodeproj" -target "${target}" -configuration Release
|
||||
build_dir="${directory}/build/${target}"
|
||||
|
||||
for arch in "${architectures[@]}"; do
|
||||
mkdir -p "${output_dir}/${arch}/${framework}"
|
||||
cp "${build_dir}/${arch}/${framework}/${module}" "${output_dir}/${arch}/${framework}/${module}"
|
||||
cp "${build_dir}/${arch}/${framework}/Info.plist" "${output_dir}/${arch}/${framework}/Info.plist"
|
||||
done
|
||||
cp "${build_dir}/Info.plist" "${output_dir}/Info.plist"
|
||||
done
|
||||
|
||||
- name: Compress native directory
|
||||
run: tar -cf native-ios.tar native/ios
|
||||
run: tar -cvf native-ios.tar native/ios
|
||||
|
||||
- name: Upload native artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
@ -109,12 +154,9 @@ jobs:
|
|||
path: native-ios.tar
|
||||
if-no-files-found: error
|
||||
|
||||
build-android:
|
||||
name: android
|
||||
build-android-jar:
|
||||
name: android-jar
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
NDK_VER: 23.1.7779620
|
||||
PLATFORM_VER: android-34
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -130,22 +172,10 @@ jobs:
|
|||
|
||||
- name: Install Android SDK Manager
|
||||
uses: android-actions/setup-android@v3
|
||||
with:
|
||||
packages: ''
|
||||
|
||||
- name: Install Android SDK
|
||||
run: |
|
||||
sdkmanager --install "platform-tools" "platforms;$PLATFORM_VER"
|
||||
sdkmanager --install "ndk;$NDK_VER" --channel=3
|
||||
|
||||
- name: Build (Android)
|
||||
run: |
|
||||
export PATH=$ANDROID_HOME/ndk/$NDK_VER:$PATH
|
||||
export OUTPUT=$PWD/native/android
|
||||
rm -rf $OUTPUT && mkdir -p $OUTPUT
|
||||
|
||||
# Build SDL3
|
||||
./External/SDL/build-scripts/androidbuildlibs.sh APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" NDK_LIBS_OUT="$OUTPUT"
|
||||
sdkmanager --install "platforms;android-$PLATFORM_VER"
|
||||
|
||||
- name: Build SDL3 Android Java
|
||||
run: |
|
||||
|
|
@ -156,19 +186,9 @@ jobs:
|
|||
|
||||
# Build SDL3 Android Java part
|
||||
cd ./External/SDL/android-project/app/src/main/java
|
||||
javac -cp $ANDROID_HOME/platforms/$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
|
||||
javac -cp $ANDROID_HOME/platforms/android-$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
|
||||
jar cvf $OUTPUT/SDL3AndroidBridge.jar org/libsdl/app/*.class
|
||||
|
||||
- name: Compress native directory
|
||||
run: tar -cf native-android.tar native/android
|
||||
|
||||
- name: Upload native artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: native-android
|
||||
path: native-android.tar
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload JAR artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
@ -179,7 +199,7 @@ jobs:
|
|||
make-pr:
|
||||
name: Submit pull request
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, build-ios, build-android ]
|
||||
needs: [ build, build-ios, build-android-jar ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
name: Continuous Integration
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build-only-desktop:
|
||||
name: Build only (Desktop)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
CI_DONT_TARGET_ANDROID: 1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install .NET 8.0.x
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c Debug SDL3-CS.Desktop.slnf
|
||||
|
||||
build-only-android:
|
||||
name: Build only (Android)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: microsoft
|
||||
java-version: 11
|
||||
|
||||
- name: Install .NET 8.0.x
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
|
||||
- name: Install .NET workloads
|
||||
run: dotnet workload install android
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c Debug SDL3-CS.Android.slnf
|
||||
|
||||
build-only-ios:
|
||||
name: Build only (iOS)
|
||||
runs-on: macos-15
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
CI_DONT_TARGET_ANDROID: 1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install .NET 8.0.x
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "8.0.x"
|
||||
|
||||
- name: Install .NET Workloads
|
||||
run: dotnet workload install ios
|
||||
|
||||
# https://github.com/dotnet/macios/issues/19157
|
||||
# https://github.com/actions/runner-images/issues/12758
|
||||
- name: Use Xcode 16.4
|
||||
run: sudo xcode-select -switch /Applications/Xcode_16.4.app
|
||||
|
||||
- name: Build
|
||||
run: dotnet build -c Debug SDL3-CS.iOS.slnf
|
||||
|
|
@ -338,3 +338,5 @@ inspectcodereport.xml
|
|||
inspectcode
|
||||
|
||||
sdl.json
|
||||
|
||||
install_output/
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 9ed83e71f6cc445316e1b599aad98fa79019544d
|
||||
Subproject commit 8e644111c2220e654f53de4ea0aa3afdfc7813c5
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 925c19db4d0bc9809fd3ac25c7e0ef771b668390
|
||||
Subproject commit 13ec6e9be1d69d2a989ec1fc4f09e8743ef3932d
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 30c1301055a35ee87b8679279b6fc88e10d28fa3
|
||||
Subproject commit 7d6e46ad28cc33ad1e87a46df739a7cba47f57fa
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit ffa54ca2ec6b89b4f6dc92ab113484cfa2ccc3a7
|
||||
Subproject commit d929bc0d84bfaf3a71ec7f6be27aeb466380c1a0
|
||||
|
|
@ -5,7 +5,7 @@ set -e
|
|||
pushd "$(dirname "$0")"
|
||||
|
||||
# Check if environment variables are defined
|
||||
if [[ -z $NAME || -z $RUNNER_OS || -z $FLAGS ]]; then
|
||||
if [[ -z $NAME || -z $RUNNER_OS || -z $FLAGS || -z $BUILD_TYPE ]]; then
|
||||
echo "One or more required environment variables are not defined."
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -16,9 +16,18 @@ else
|
|||
SUDO=$(which sudo || exit 0)
|
||||
fi
|
||||
|
||||
if [[ -n $ANDROID_ABI ]]; then
|
||||
BUILD_PLATFORM="Android"
|
||||
else
|
||||
BUILD_PLATFORM="$RUNNER_OS"
|
||||
fi
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
if [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
if [[ $BUILD_PLATFORM != 'Android' ]]; then
|
||||
NATIVE_PATH="$NAME"
|
||||
|
||||
if [[ $BUILD_PLATFORM == 'Linux' ]]; then
|
||||
# Setup Linux dependencies
|
||||
if [[ $TARGET_APT_ARCH == :i386 ]]; then
|
||||
$SUDO dpkg --add-architecture i386
|
||||
|
|
@ -73,96 +82,105 @@ if [[ $RUNNER_OS == 'Linux' ]]; then
|
|||
libpulse-dev$TARGET_APT_ARCH \
|
||||
libpipewire-0.3-dev$TARGET_APT_ARCH \
|
||||
libdecor-0-dev$TARGET_APT_ARCH
|
||||
|
||||
git config --global --add safe.directory /workspace/External/SDL
|
||||
git config --global --add safe.directory /workspace/External/SDL_image
|
||||
git config --global --add safe.directory /workspace/External/SDL_ttf
|
||||
git config --global --add safe.directory /workspace/External/SDL_mixer
|
||||
fi
|
||||
else
|
||||
if [[ -z $ANDROID_HOME || -z $NDK_VER || -z $ANDROID_ABI ]]; then
|
||||
echo "One or more required environment variables are not defined."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Build SDL
|
||||
pushd SDL
|
||||
NATIVE_PATH="android/$ANDROID_ABI"
|
||||
|
||||
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$NDK_VER"
|
||||
export FLAGS="$FLAGS -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_HOME=$ANDROID_HOME \
|
||||
-DANDROID_PLATFORM=21 \
|
||||
-DANDROID_ABI=$ANDROID_ABI \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=include \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_INSTALL_DATAROOTDIR=share \
|
||||
-DSDL_ANDROID_JAR=OFF"
|
||||
|
||||
$SUDO apt-get install -y \
|
||||
git \
|
||||
cmake \
|
||||
ninja-build \
|
||||
meson
|
||||
fi
|
||||
|
||||
if [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
git config --global --add safe.directory $PWD/SDL
|
||||
git config --global --add safe.directory $PWD/SDL_image
|
||||
git config --global --add safe.directory $PWD/SDL_ttf
|
||||
git config --global --add safe.directory $PWD/SDL_mixer
|
||||
fi
|
||||
|
||||
CMAKE_INSTALL_PREFIX="$PWD/install_output"
|
||||
rm -rf $CMAKE_INSTALL_PREFIX
|
||||
|
||||
if [[ $BUILD_PLATFORM == 'Android' ]]; then
|
||||
OUTPUT_LIB="lib/libSDL3variant.so"
|
||||
elif [[ $BUILD_PLATFORM == 'Windows' ]]; then
|
||||
OUTPUT_LIB="bin/SDL3variant.dll"
|
||||
elif [[ $BUILD_PLATFORM == 'Linux' ]]; then
|
||||
OUTPUT_LIB="lib/libSDL3variant.so"
|
||||
elif [[ $BUILD_PLATFORM == 'macOS' ]]; then
|
||||
OUTPUT_LIB="lib/libSDL3variant.dylib"
|
||||
fi
|
||||
|
||||
# Use the correct CMAKE_PREFIX_PATH for SDL_image and SDL_ttf, probably due differences in Cmake versions.
|
||||
if [[ $BUILD_PLATFORM == 'Android' ]]; then
|
||||
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX"
|
||||
elif [[ $BUILD_PLATFORM == 'Windows' ]]; then
|
||||
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX/cmake/"
|
||||
elif [[ $BUILD_PLATFORM == 'Linux' ]]; then
|
||||
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX/lib/cmake/"
|
||||
elif [[ $BUILD_PLATFORM == 'macOS' ]]; then
|
||||
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX/lib/cmake/"
|
||||
fi
|
||||
|
||||
run_cmake() {
|
||||
LIB_NAME=$1
|
||||
LIB_OUTPUT=$2
|
||||
|
||||
pushd $LIB_NAME
|
||||
|
||||
git reset --hard HEAD || echo "Failed to clean up the repository"
|
||||
|
||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
||||
if [[ $BUILD_PLATFORM == 'Windows' && $LIB_NAME == 'SDL' ]]; then
|
||||
echo "Patching SDL to not include gameinput.h"
|
||||
sed -i 's/#include <gameinput.h>/#_include <gameinput.h>/g' CMakeLists.txt
|
||||
fi
|
||||
|
||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
|
||||
cmake --build build/ --config Release
|
||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
||||
popd
|
||||
# Change the minumum Android API level for SDL_mixer to API 24 as opusfile and libflac fail to build on lower versions.
|
||||
if [[ $BUILD_PLATFORM == 'Android' && $LIB_NAME == 'SDL_mixer' ]]; then
|
||||
export FLAGS="${FLAGS/-DANDROID_PLATFORM=21/-DANDROID_PLATFORM=24}"
|
||||
fi
|
||||
|
||||
rm -rf build
|
||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED=ON -DSDL_STATIC=OFF "${@:3}"
|
||||
cmake --build build/ --config $BUILD_TYPE --verbose
|
||||
cmake --install build/ --prefix $CMAKE_INSTALL_PREFIX --config $BUILD_TYPE
|
||||
|
||||
# Move build lib into correct folders
|
||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
||||
cp SDL/install_output/bin/SDL3.dll ../native/$NAME/SDL3.dll
|
||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
cp SDL/install_output/lib/libSDL3.so ../native/$NAME/libSDL3.so
|
||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
||||
cp SDL/install_output/lib/libSDL3.dylib ../native/$NAME/libSDL3.dylib
|
||||
fi
|
||||
cp $CMAKE_INSTALL_PREFIX/$LIB_OUTPUT ../../native/$NATIVE_PATH
|
||||
|
||||
# Use the correct CMAKE_PREFIX_PATH for SDL_image and SDL_ttf, probably due differences in Cmake versions
|
||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
||||
CMAKE_PREFIX_PATH="../SDL/install_output/cmake/"
|
||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/"
|
||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
||||
CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/"
|
||||
fi
|
||||
popd
|
||||
}
|
||||
|
||||
run_cmake SDL ${OUTPUT_LIB/variant/}
|
||||
|
||||
run_cmake SDL_ttf ${OUTPUT_LIB/variant/_ttf} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSDLTTF_VENDORED=ON
|
||||
|
||||
# Build SDL_image
|
||||
pushd SDL_image
|
||||
git reset --hard HEAD
|
||||
# -DSDLIMAGE_AVIF=OFF is used because windows requires special setup to build avif support (nasm)
|
||||
# TODO: Add support for avif on windows (VisualC script uses dynamic imports)
|
||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON
|
||||
cmake --build build/ --config Release
|
||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
||||
popd
|
||||
run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON
|
||||
|
||||
# Move build lib into correct folders
|
||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
||||
cp SDL_image/install_output/bin/SDL3_image.dll ../native/$NAME/SDL3_image.dll
|
||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
cp SDL_image/install_output/lib/libSDL3_image.so ../native/$NAME/libSDL3_image.so
|
||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
||||
cp SDL_image/install_output/lib/libSDL3_image.dylib ../native/$NAME/libSDL3_image.dylib
|
||||
fi
|
||||
|
||||
# Build SDL_ttf
|
||||
pushd SDL_ttf
|
||||
git reset --hard HEAD
|
||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSDLTTF_VENDORED=ON
|
||||
cmake --build build/ --config Release
|
||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
||||
popd
|
||||
|
||||
# Move build lib into correct folders
|
||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
||||
cp SDL_ttf/install_output/bin/SDL3_ttf.dll ../native/$NAME/SDL3_ttf.dll
|
||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
cp SDL_ttf/install_output/lib/libSDL3_ttf.so ../native/$NAME/libSDL3_ttf.so
|
||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
||||
cp SDL_ttf/install_output/lib/libSDL3_ttf.dylib ../native/$NAME/libSDL3_ttf.dylib
|
||||
fi
|
||||
|
||||
# Build SDL_mixer
|
||||
pushd SDL_mixer
|
||||
git reset --hard HEAD
|
||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_VENDORED=ON
|
||||
cmake --build build/ --config Release
|
||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
||||
popd
|
||||
|
||||
# Move build lib into correct folders
|
||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
||||
cp SDL_mixer/install_output/bin/SDL3_mixer.dll ../native/$NAME/SDL3_mixer.dll
|
||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
||||
cp SDL_mixer/install_output/lib/libSDL3_mixer.so ../native/$NAME/libSDL3_mixer.so
|
||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
||||
cp SDL_mixer/install_output/lib/libSDL3_mixer.dylib ../native/$NAME/libSDL3_mixer.dylib
|
||||
fi
|
||||
# -DSDLMIXER_MP3_MPG123=OFF is used because upstream build is broken. Fallback to dr_mp3.
|
||||
# See: https://github.com/libsdl-org/SDL_mixer/pull/744#issuecomment-3180682130
|
||||
# Fixing using the proposed solution causes more issues.
|
||||
run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_MP3_MPG123=OFF -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON
|
||||
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ Contributions to keep the bindings up-to-date with upstream changes are welcome.
|
|||
| Product | `win-x64` | `win-x86` | `win-arm64` | `osx-arm64` | `osx-x64` | `linux-x64` | `linux-x86` | `linux-arm64` | `linux-arm` | `ios` | `android` |
|
||||
|-----------------|-----------|-----------|-------------|-------------|-----------|-------------|-------------|---------------|-------------|---------|-----------|
|
||||
| `SDL3-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| `SDL3_image-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| `SDL3_ttf-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| `SDL3_mixer-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| `SDL3_image-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| `SDL3_ttf-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| `SDL3_mixer-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | API 24+ |
|
||||
|
||||
## Generating bindings
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ Contributions to keep the bindings up-to-date with upstream changes are welcome.
|
|||
| Product | `win-x64` | `win-x86` | `win-arm64` | `osx-arm64` | `osx-x64` | `linux-x64` | `linux-x86` | `linux-arm64` | `linux-arm` | `ios` | `android` |
|
||||
|-----------------|-----------|-----------|-------------|-------------|-----------|-------------|-------------|---------------|-------------|---------|-----------|
|
||||
| `SDL3-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| `SDL3_image-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| `SDL3_ttf-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| `SDL3_mixer-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
|
||||
| `SDL3_image-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| `SDL3_ttf-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||
| `SDL3_mixer-CS` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | API 24+ |
|
||||
|
|
@ -2,12 +2,13 @@
|
|||
"solution": {
|
||||
"path": "SDL3-CS.sln",
|
||||
"projects": [
|
||||
"SDL3-CS\\SDL3-CS.csproj",
|
||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj",
|
||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
||||
"SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj",
|
||||
"SDL3-CS.Tests.Android\\SDL3-CS.Tests.Android.csproj",
|
||||
"SDL3-CS.Tests\\SDL3-CS.Tests.csproj",
|
||||
"SDL3-CS.Tests.Android\\SDL3-CS.Tests.Android.csproj"
|
||||
"SDL3-CS\\SDL3-CS.csproj",
|
||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
||||
"SDL3_mixer-CS\\SDL3_mixer-CS.csproj",
|
||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -2,12 +2,13 @@
|
|||
"solution": {
|
||||
"path": "SDL3-CS.sln",
|
||||
"projects": [
|
||||
"SDL3-CS\\SDL3-CS.csproj",
|
||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj",
|
||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
||||
"SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj",
|
||||
"SDL3-CS.Tests.Desktop\\SDL3-CS.Tests.Desktop.csproj",
|
||||
"SDL3-CS.Tests\\SDL3-CS.Tests.csproj",
|
||||
"SDL3-CS.Tests.Desktop\\SDL3-CS.Tests.Desktop.csproj"
|
||||
"SDL3-CS\\SDL3-CS.csproj",
|
||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
||||
"SDL3_mixer-CS\\SDL3_mixer-CS.csproj",
|
||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ namespace SDL.SourceGeneration
|
|||
{
|
||||
public readonly Dictionary<string, List<GeneratedMethod>> Methods = new Dictionary<string, List<GeneratedMethod>>();
|
||||
|
||||
private static readonly string[] sdlPrefixes = ["SDL_", "TTF_", "IMG_", "Mix_"];
|
||||
private static readonly string[] sdlPrefixes = ["SDL_", "TTF_", "IMG_", "MIX_"];
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the method is from any SDL library.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace SDL.Tests.Android
|
|||
[Activity(Label = "SDL3-CS Android Tests", MainLauncher = true)]
|
||||
public class MainActivity : SDLActivity
|
||||
{
|
||||
protected override string[] GetLibraries() => ["SDL3"];
|
||||
protected override string[] GetLibraries() => ["SDL3", "SDL3_image", "SDL3_ttf", "SDL3_mixer"];
|
||||
|
||||
protected override void Main() => Program.Main();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationId>SDL.Tests.Android</ApplicationId>
|
||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="NuGet">
|
||||
|
|
@ -20,16 +21,16 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\libSDL3.so">
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\*.so">
|
||||
<Abi>armeabi-v7a</Abi>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\arm64-v8a\libSDL3.so">
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\arm64-v8a\*.so">
|
||||
<Abi>arm64-v8a</Abi>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\x86\libSDL3.so">
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\x86\*.so">
|
||||
<Abi>x86</Abi>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\x86_64\libSDL3.so">
|
||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\x86_64\*.so">
|
||||
<Abi>x86_64</Abi>
|
||||
</AndroidNativeLibrary>
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -17,21 +17,12 @@
|
|||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SDLArch>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</SDLArch>
|
||||
|
||||
<!-- If RID is specified -->
|
||||
<SDLNativeLib Condition=" $(RuntimeIdentifier.StartsWith('win')) ">$(RuntimeIdentifier)\SDL3.dll</SDLNativeLib>
|
||||
<SDLNativeLib Condition=" $(RuntimeIdentifier.StartsWith('linux')) ">$(RuntimeIdentifier)\libSDL3.so</SDLNativeLib>
|
||||
<SDLNativeLib Condition=" $(RuntimeIdentifier.StartsWith('osx')) ">$(RuntimeIdentifier)\libSDL3.dylib</SDLNativeLib>
|
||||
|
||||
<!-- If RID is not specified -->
|
||||
<SDLNativeLib Condition=" '$(SDLNativeLib)' == '' And '$([MSBuild]::IsOSPlatform(Windows))' ">win-$(SDLArch.ToLower())\SDL3.dll</SDLNativeLib>
|
||||
<SDLNativeLib Condition=" '$(SDLNativeLib)' == '' And '$([MSBuild]::IsOSPlatform(Linux))' ">linux-$(SDLArch.ToLower())\libSDL3.so</SDLNativeLib>
|
||||
<SDLNativeLib Condition=" '$(SDLNativeLib)' == '' And '$([MSBuild]::IsOSPlatform(OSX))' ">osx-$(SDLArch.ToLower())\libSDL3.dylib</SDLNativeLib>
|
||||
<SDLArch Condition="'$(RuntimeIdentifier)' == ''">$(NETCoreSdkRuntimeIdentifier)</SDLArch>
|
||||
<SDLArch Condition="'$(RuntimeIdentifier)' != ''">$(RuntimeIdentifier)</SDLArch>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\native\$(SDLNativeLib)">
|
||||
<Content Include="$(MSBuildThisFileDirectory)..\native\$(SDLArch)\*">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ public class Program
|
|||
public static unsafe void Main(string[] args)
|
||||
{
|
||||
NativeLibrary.SetDllImportResolver(typeof(SDL3).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3.framework/SDL3", assembly, path));
|
||||
NativeLibrary.SetDllImportResolver(typeof(SDL3_image).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_image.framework/SDL3_image", assembly, path));
|
||||
NativeLibrary.SetDllImportResolver(typeof(SDL3_ttf).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_ttf.framework/SDL3_ttf", assembly, path));
|
||||
NativeLibrary.SetDllImportResolver(typeof(SDL3_mixer).Assembly, (_, assembly, path) => NativeLibrary.Load("@rpath/SDL3_mixer.framework/SDL3_mixer", assembly, path));
|
||||
|
||||
SDL3.SDL_RunApp(0, null, &main, IntPtr.Zero);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
<ItemGroup>
|
||||
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3.xcframework"/>
|
||||
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_image.xcframework"/>
|
||||
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_ttf.xcframework"/>
|
||||
<NativeReference Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_mixer.xcframework"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using static SDL.SDL3_image;
|
||||
using static SDL.SDL3_ttf;
|
||||
using static SDL.SDL3_mixer;
|
||||
using static SDL.SDL3;
|
||||
|
||||
namespace SDL.Tests
|
||||
|
|
@ -25,7 +28,8 @@ namespace SDL.Tests
|
|||
|
||||
using (var window = new MyWindow())
|
||||
{
|
||||
Console.WriteLine($"SDL revision: {SDL_GetRevision()}");
|
||||
// Check if satellite libraries exist.
|
||||
Console.WriteLine($"SDL revision: {SDL_GetRevision()}, IMG {IMG_Version()}, TTF {TTF_Version()}, Mixer {MIX_Version()}");
|
||||
|
||||
printDisplays();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,10 +24,11 @@
|
|||
<ProjectReference Include="..\SDL3-CS\SDL3-CS.csproj"/>
|
||||
<ProjectReference Include="..\SDL3_image-CS\SDL3_image-CS.csproj"/>
|
||||
<ProjectReference Include="..\SDL3_ttf-CS\SDL3_ttf-CS.csproj"/>
|
||||
<ProjectReference Include="..\SDL3_mixer-CS\SDL3_mixer-CS.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\External\SDL_image\test\sample.png">
|
||||
<None Include="..\External\SDL_image\test\sample.png" Condition="Exists('..\External\SDL_image\test\sample.png')">
|
||||
<Link>sample.png</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace SDL.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestError
|
||||
{
|
||||
[Test]
|
||||
public void TestUnsupported()
|
||||
{
|
||||
Assert.That((bool)SDL3.SDL_Unsupported(), Is.False);
|
||||
Assert.That(SDL3.SDL_GetError(), Is.EqualTo("That operation is not supported"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestInvalidParam()
|
||||
{
|
||||
Assert.That((bool)SDL3.SDL_InvalidParamError("test"), Is.False);
|
||||
Assert.That(SDL3.SDL_GetError(), Is.EqualTo("Parameter 'test' is invalid"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using NUnit.Framework;
|
||||
using static SDL.SDL3_mixer;
|
||||
using static SDL.SDL3;
|
||||
|
||||
namespace SDL.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestMixer
|
||||
{
|
||||
[Test]
|
||||
public unsafe void TestBasic()
|
||||
{
|
||||
SDL_Init(0);
|
||||
|
||||
bool init = MIX_Init();
|
||||
|
||||
try
|
||||
{
|
||||
Assert.That(init, Is.True, SDL_GetError);
|
||||
Assert.That(MIX_Version(), Is.EqualTo(SDL_MIXER_VERSION));
|
||||
|
||||
Assume.That(MIX_GetNumAudioDecoders() > 0);
|
||||
string? name = MIX_GetAudioDecoder(0);
|
||||
Assert.That(name, Is.Not.Null, SDL_GetError);
|
||||
|
||||
Assume.That(@"C:\Windows\Media\Windows Logon.wav", Does.Exist);
|
||||
var decoder = MIX_CreateAudioDecoder(@"C:\Windows\Media\Windows Logon.wav", 0);
|
||||
Assert.That(decoder != null, SDL_GetError);
|
||||
MIX_DestroyAudioDecoder(decoder);
|
||||
}
|
||||
finally
|
||||
{
|
||||
MIX_Quit();
|
||||
SDL_Quit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,12 +2,13 @@
|
|||
"solution": {
|
||||
"path": "SDL3-CS.sln",
|
||||
"projects": [
|
||||
"SDL3-CS\\SDL3-CS.csproj",
|
||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj",
|
||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
||||
"SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj",
|
||||
"SDL3-CS.Tests.iOS\\SDL3-CS.Tests.iOS.csproj",
|
||||
"SDL3-CS.Tests\\SDL3-CS.Tests.csproj",
|
||||
"SDL3-CS.Tests.iOS\\SDL3-CS.Tests.iOS.csproj"
|
||||
"SDL3-CS\\SDL3-CS.csproj",
|
||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
||||
"SDL3_mixer-CS\\SDL3_mixer-CS.csproj",
|
||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
|
||||
// https://github.com/JetBrains/JetBrains.Annotations/blob/988289d09aad925b22a5321c075a735cb9597e59/src/Annotations.cs
|
||||
namespace JetBrains.Annotations
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Parameter)]
|
||||
internal sealed class MustDisposeResourceAttribute : Attribute
|
||||
{
|
||||
public MustDisposeResourceAttribute()
|
||||
{
|
||||
Value = true;
|
||||
}
|
||||
|
||||
public MustDisposeResourceAttribute(bool value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When set to <c>false</c>, disposing of the resource is not obligatory.
|
||||
/// The main use-case for explicit <c>[MustDisposeResource(false)]</c> annotation
|
||||
/// is to loosen the annotation for inheritors.
|
||||
/// </summary>
|
||||
public bool Value { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>SDL</RootNamespace>
|
||||
<TargetFrameworks>net8.0;net8.0-android</TargetFrameworks>
|
||||
<TargetFrameworks Condition=" '$(CI_DONT_TARGET_ANDROID)' != '1' ">net8.0;net8.0-android</TargetFrameworks>
|
||||
<TargetFramework Condition=" '$(CI_DONT_TARGET_ANDROID)' == '1' ">net8.0</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
@ -16,6 +17,7 @@
|
|||
<Copyright>Copyright (c) 2024 ppy Pty Ltd</Copyright>
|
||||
<Product>ppy.SDL3-CS</Product>
|
||||
<PackageId>ppy.SDL3-CS</PackageId>
|
||||
<PackageTags>SDL;SDL3;SDL3-CS</PackageTags>
|
||||
<PackageReleaseNotes>Automated release.</PackageReleaseNotes>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/ppy/SDL3-CS</PackageProjectUrl>
|
||||
|
|
@ -32,10 +34,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
<PackageReference Include="libclang" Version="17.0.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,10 @@ namespace SDL
|
|||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_GetAtomicU32(SDL_AtomicU32* a);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_AddAtomicU32(SDL_AtomicU32* a, int v);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_CompareAndSwapAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval);
|
||||
|
|
|
|||
|
|
@ -239,10 +239,6 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_AudioStream* SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetAudioIterationCallbacks(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioIterationCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioDeviceID, SDLBool, void> start, [NativeTypeName("SDL_AudioIterationCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioDeviceID, SDLBool, void> end, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioSpec*, float*, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
|
|
|||
|
|
@ -53,6 +53,13 @@ namespace SDL
|
|||
SDL_CAMERA_POSITION_BACK_FACING,
|
||||
}
|
||||
|
||||
public enum SDL_CameraPermissionState
|
||||
{
|
||||
SDL_CAMERA_PERMISSION_STATE_DENIED = -1,
|
||||
SDL_CAMERA_PERMISSION_STATE_PENDING,
|
||||
SDL_CAMERA_PERMISSION_STATE_APPROVED,
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
|
|
@ -83,7 +90,7 @@ namespace SDL
|
|||
public static extern SDL_Camera* SDL_OpenCamera(SDL_CameraID instance_id, [NativeTypeName("const SDL_CameraSpec *")] SDL_CameraSpec* spec);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetCameraPermissionState(SDL_Camera* camera);
|
||||
public static extern SDL_CameraPermissionState SDL_GetCameraPermissionState(SDL_Camera* camera);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_CameraID SDL_GetCameraID(SDL_Camera* camera);
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@ namespace SDL
|
|||
[return: NativeTypeName("size_t")]
|
||||
public static extern nuint SDL_GetSIMDAlignment();
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_GetSystemPageSize();
|
||||
|
||||
[NativeTypeName("#define SDL_CACHELINE_SIZE 128")]
|
||||
public const int SDL_CACHELINE_SIZE = 128;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ namespace SDL
|
|||
SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED,
|
||||
SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
|
||||
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
|
||||
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED,
|
||||
SDL_EVENT_WINDOW_SHOWN = 0x202,
|
||||
SDL_EVENT_WINDOW_HIDDEN,
|
||||
SDL_EVENT_WINDOW_EXPOSED,
|
||||
|
|
@ -85,6 +86,8 @@ namespace SDL
|
|||
SDL_EVENT_KEYBOARD_ADDED,
|
||||
SDL_EVENT_KEYBOARD_REMOVED,
|
||||
SDL_EVENT_TEXT_EDITING_CANDIDATES,
|
||||
SDL_EVENT_SCREEN_KEYBOARD_SHOWN,
|
||||
SDL_EVENT_SCREEN_KEYBOARD_HIDDEN,
|
||||
SDL_EVENT_MOUSE_MOTION = 0x400,
|
||||
SDL_EVENT_MOUSE_BUTTON_DOWN,
|
||||
SDL_EVENT_MOUSE_BUTTON_UP,
|
||||
|
|
@ -116,6 +119,9 @@ namespace SDL
|
|||
SDL_EVENT_FINGER_UP,
|
||||
SDL_EVENT_FINGER_MOTION,
|
||||
SDL_EVENT_FINGER_CANCELED,
|
||||
SDL_EVENT_PINCH_BEGIN = 0x710,
|
||||
SDL_EVENT_PINCH_UPDATE,
|
||||
SDL_EVENT_PINCH_END,
|
||||
SDL_EVENT_CLIPBOARD_UPDATE = 0x900,
|
||||
SDL_EVENT_DROP_FILE = 0x1000,
|
||||
SDL_EVENT_DROP_TEXT,
|
||||
|
|
@ -758,6 +764,21 @@ namespace SDL
|
|||
public SDL_WindowID windowID;
|
||||
}
|
||||
|
||||
public partial struct SDL_PinchFingerEvent
|
||||
{
|
||||
public SDL_EventType type;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint reserved;
|
||||
|
||||
[NativeTypeName("Uint64")]
|
||||
public ulong timestamp;
|
||||
|
||||
public float scale;
|
||||
|
||||
public SDL_WindowID windowID;
|
||||
}
|
||||
|
||||
public partial struct SDL_PenProximityEvent
|
||||
{
|
||||
public SDL_EventType type;
|
||||
|
|
@ -1069,6 +1090,9 @@ namespace SDL
|
|||
[FieldOffset(0)]
|
||||
public SDL_TouchFingerEvent tfinger;
|
||||
|
||||
[FieldOffset(0)]
|
||||
public SDL_PinchFingerEvent pinch;
|
||||
|
||||
[FieldOffset(0)]
|
||||
public SDL_PenProximityEvent pproximity;
|
||||
|
||||
|
|
|
|||
|
|
@ -1008,10 +1008,10 @@ namespace SDL
|
|||
public byte clear_stencil;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte padding1;
|
||||
public byte mip_level;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte padding2;
|
||||
public byte layer;
|
||||
}
|
||||
|
||||
public partial struct SDL_GPUBlitInfo
|
||||
|
|
@ -1096,6 +1096,30 @@ namespace SDL
|
|||
public byte padding3;
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_GPUVulkanOptions
|
||||
{
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint vulkan_api_version;
|
||||
|
||||
[NativeTypeName("void*")]
|
||||
public IntPtr feature_list;
|
||||
|
||||
[NativeTypeName("void*")]
|
||||
public IntPtr vulkan_10_physical_device_features;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint device_extension_count;
|
||||
|
||||
[NativeTypeName("const char **")]
|
||||
public byte** device_extension_names;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint instance_extension_count;
|
||||
|
||||
[NativeTypeName("const char **")]
|
||||
public byte** instance_extension_names;
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
|
|
@ -1399,6 +1423,12 @@ namespace SDL
|
|||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, [NativeTypeName("Uint32")] uint width, [NativeTypeName("Uint32")] uint height, [NativeTypeName("Uint32")] uint depth_or_layer_count);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PixelFormat SDL_GetPixelFormatFromGPUTextureFormat(SDL_GPUTextureFormat format);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUTextureFormat SDL_GetGPUTextureFormatFromPixelFormat(SDL_PixelFormat format);
|
||||
|
||||
[NativeTypeName("#define SDL_GPU_TEXTUREUSAGE_SAMPLER (1u << 0)")]
|
||||
public const uint SDL_GPU_TEXTUREUSAGE_SAMPLER = (1U << 0);
|
||||
|
||||
|
|
@ -1483,6 +1513,18 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING \"SDL.gpu.device.create.name\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING => "SDL.gpu.device.create.name"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN \"SDL.gpu.device.create.feature.clip_distance\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN => "SDL.gpu.device.create.feature.clip_distance"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN \"SDL.gpu.device.create.feature.depth_clamping\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN => "SDL.gpu.device.create.feature.depth_clamping"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN \"SDL.gpu.device.create.feature.indirect_draw_first_instance\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN => "SDL.gpu.device.create.feature.indirect_draw_first_instance"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN \"SDL.gpu.device.create.feature.anisotropy\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN => "SDL.gpu.device.create.feature.anisotropy"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN \"SDL.gpu.device.create.shaders.private\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN => "SDL.gpu.device.create.shaders.private"u8;
|
||||
|
||||
|
|
@ -1501,20 +1543,17 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN \"SDL.gpu.device.create.shaders.metallib\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN => "SDL.gpu.device.create.shaders.metallib"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN \"SDL.gpu.device.create.d3d12.allowtier1resourcebinding\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN => "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING \"SDL.gpu.device.create.d3d12.semantic\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING => "SDL.gpu.device.create.d3d12.semantic"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SHADERCLIPDISTANCE_BOOLEAN \"SDL.gpu.device.create.vulkan.shaderclipdistance\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SHADERCLIPDISTANCE_BOOLEAN => "SDL.gpu.device.create.vulkan.shaderclipdistance"u8;
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN \"SDL.gpu.device.create.vulkan.requirehardwareacceleration\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN => "SDL.gpu.device.create.vulkan.requirehardwareacceleration"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DEPTHCLAMP_BOOLEAN \"SDL.gpu.device.create.vulkan.depthclamp\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DEPTHCLAMP_BOOLEAN => "SDL.gpu.device.create.vulkan.depthclamp"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DRAWINDIRECTFIRST_BOOLEAN \"SDL.gpu.device.create.vulkan.drawindirectfirstinstance\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_VULKAN_DRAWINDIRECTFIRST_BOOLEAN => "SDL.gpu.device.create.vulkan.drawindirectfirstinstance"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SAMPLERANISOTROPY_BOOLEAN \"SDL.gpu.device.create.vulkan.sampleranisotropy\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_VULKAN_SAMPLERANISOTROPY_BOOLEAN => "SDL.gpu.device.create.vulkan.sampleranisotropy"u8;
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER \"SDL.gpu.device.create.vulkan.options\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER => "SDL.gpu.device.create.vulkan.options"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_GPU_DEVICE_NAME_STRING \"SDL.gpu.device.name\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_GPU_DEVICE_NAME_STRING => "SDL.gpu.device.name"u8;
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_hid_device* SDL_hid_open_path([NativeTypeName("const char *")] byte* path);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID SDL_hid_get_properties(SDL_hid_device* dev);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int SDL_hid_write(SDL_hid_device* dev, [NativeTypeName("const unsigned char *")] byte* data, [NativeTypeName("size_t")] nuint length);
|
||||
|
||||
|
|
@ -152,5 +155,8 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] SDLBool active);
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER \"SDL.hidapi.libusb.device.handle\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER => "SDL.hidapi.libusb.device.handle"u8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE \"SDL_AUDIO_DEVICE_STREAM_ROLE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DEVICE_STREAM_ROLE => "SDL_AUDIO_DEVICE_STREAM_ROLE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_RAW_STREAM \"SDL_AUDIO_DEVICE_RAW_STREAM\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DEVICE_RAW_STREAM => "SDL_AUDIO_DEVICE_RAW_STREAM"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_AUDIO_DISK_INPUT_FILE \"SDL_AUDIO_DISK_INPUT_FILE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DISK_INPUT_FILE => "SDL_AUDIO_DISK_INPUT_FILE"u8;
|
||||
|
||||
|
|
@ -169,6 +172,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_DISPLAY_USABLE_BOUNDS \"SDL_DISPLAY_USABLE_BOUNDS\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_DISPLAY_USABLE_BOUNDS => "SDL_DISPLAY_USABLE_BOUNDS"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_INVALID_PARAM_CHECKS \"SDL_INVALID_PARAM_CHECKS\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_INVALID_PARAM_CHECKS => "SDL_INVALID_PARAM_CHECKS"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_EMSCRIPTEN_ASYNCIFY \"SDL_EMSCRIPTEN_ASYNCIFY\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_EMSCRIPTEN_ASYNCIFY => "SDL_EMSCRIPTEN_ASYNCIFY"u8;
|
||||
|
||||
|
|
@ -178,6 +184,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT \"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT => "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT \"SDL_EMSCRIPTEN_FILL_DOCUMENT\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT => "SDL_EMSCRIPTEN_FILL_DOCUMENT"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_ENABLE_SCREEN_KEYBOARD \"SDL_ENABLE_SCREEN_KEYBOARD\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_ENABLE_SCREEN_KEYBOARD => "SDL_ENABLE_SCREEN_KEYBOARD"u8;
|
||||
|
||||
|
|
@ -352,6 +361,12 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_8BITDO \"SDL_JOYSTICK_HIDAPI_8BITDO\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_8BITDO => "SDL_JOYSTICK_HIDAPI_8BITDO"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SINPUT \"SDL_JOYSTICK_HIDAPI_SINPUT\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SINPUT => "SDL_JOYSTICK_HIDAPI_SINPUT"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_ZUIKI \"SDL_JOYSTICK_HIDAPI_ZUIKI\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_ZUIKI => "SDL_JOYSTICK_HIDAPI_ZUIKI"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI \"SDL_JOYSTICK_HIDAPI_FLYDIGI\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI => "SDL_JOYSTICK_HIDAPI_FLYDIGI"u8;
|
||||
|
||||
|
|
@ -364,6 +379,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED \"SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED => "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 \"SDL_JOYSTICK_HIDAPI_SWITCH2\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 => "SDL_JOYSTICK_HIDAPI_SWITCH2"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS \"SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS => "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"u8;
|
||||
|
||||
|
|
@ -457,6 +475,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER \"SDL_KMSDRM_REQUIRE_DRM_MASTER\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER => "SDL_KMSDRM_REQUIRE_DRM_MASTER"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_KMSDRM_ATOMIC \"SDL_KMSDRM_ATOMIC\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_KMSDRM_ATOMIC => "SDL_KMSDRM_ATOMIC"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_LOGGING \"SDL_LOGGING\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_LOGGING => "SDL_LOGGING"u8;
|
||||
|
||||
|
|
@ -475,6 +496,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_MAC_SCROLL_MOMENTUM \"SDL_MAC_SCROLL_MOMENTUM\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MAC_SCROLL_MOMENTUM => "SDL_MAC_SCROLL_MOMENTUM"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_MAC_PRESS_AND_HOLD \"SDL_MAC_PRESS_AND_HOLD\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MAC_PRESS_AND_HOLD => "SDL_MAC_PRESS_AND_HOLD"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_MAIN_CALLBACK_RATE \"SDL_MAIN_CALLBACK_RATE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_MAIN_CALLBACK_RATE => "SDL_MAIN_CALLBACK_RATE"u8;
|
||||
|
||||
|
|
@ -553,6 +577,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_RENDER_DIRECT3D11_DEBUG \"SDL_RENDER_DIRECT3D11_DEBUG\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_DIRECT3D11_DEBUG => "SDL_RENDER_DIRECT3D11_DEBUG"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_RENDER_DIRECT3D11_WARP \"SDL_RENDER_DIRECT3D11_WARP\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_DIRECT3D11_WARP => "SDL_RENDER_DIRECT3D11_WARP"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_RENDER_VULKAN_DEBUG \"SDL_RENDER_VULKAN_DEBUG\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_VULKAN_DEBUG => "SDL_RENDER_VULKAN_DEBUG"u8;
|
||||
|
||||
|
|
@ -583,6 +610,18 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED \"SDL_ROG_GAMEPAD_MICE_EXCLUDED\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED => "SDL_ROG_GAMEPAD_MICE_EXCLUDED"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_PS2_GS_WIDTH \"SDL_PS2_GS_WIDTH\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_PS2_GS_WIDTH => "SDL_PS2_GS_WIDTH"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_PS2_GS_HEIGHT \"SDL_PS2_GS_HEIGHT\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_PS2_GS_HEIGHT => "SDL_PS2_GS_HEIGHT"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_PS2_GS_PROGRESSIVE \"SDL_PS2_GS_PROGRESSIVE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_PS2_GS_PROGRESSIVE => "SDL_PS2_GS_PROGRESSIVE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_PS2_GS_MODE \"SDL_PS2_GS_MODE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_PS2_GS_MODE => "SDL_PS2_GS_MODE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_RPI_VIDEO_LAYER \"SDL_RPI_VIDEO_LAYER\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_RPI_VIDEO_LAYER => "SDL_RPI_VIDEO_LAYER"u8;
|
||||
|
||||
|
|
@ -643,6 +682,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY \"SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY => "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE \"SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE => "SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE \"SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE => "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"u8;
|
||||
|
||||
|
|
@ -763,6 +805,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_HINT_WINDOWS_RAW_KEYBOARD \"SDL_WINDOWS_RAW_KEYBOARD\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_RAW_KEYBOARD => "SDL_WINDOWS_RAW_KEYBOARD"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS \"SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS => "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL \"SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL\"")]
|
||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL => "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -278,6 +278,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER \"SDL.iostream.memory.size\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER => "SDL.iostream.memory.size"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER \"SDL.iostream.memory.free\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER => "SDL.iostream.memory.free"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER \"SDL.iostream.dynamic.memory\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER => "SDL.iostream.dynamic.memory"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,14 @@ namespace SDL
|
|||
SDL_MOUSEWHEEL_FLIPPED,
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_CursorFrameInfo
|
||||
{
|
||||
public SDL_Surface* surface;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint duration;
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
|
|
@ -117,6 +125,9 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Cursor* SDL_CreateColorCursor(SDL_Surface* surface, int hot_x, int hot_y);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Cursor* SDL_CreateAnimatedCursor(SDL_CursorFrameInfo* frames, int frame_count, int hot_x, int hot_y);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Cursor* SDL_CreateSystemCursor(SDL_SystemCursor id);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SDL
|
||||
{
|
||||
public enum SDL_PenAxis
|
||||
|
|
@ -37,8 +39,19 @@ namespace SDL
|
|||
SDL_PEN_AXIS_COUNT,
|
||||
}
|
||||
|
||||
public enum SDL_PenDeviceType
|
||||
{
|
||||
SDL_PEN_DEVICE_TYPE_INVALID = -1,
|
||||
SDL_PEN_DEVICE_TYPE_UNKNOWN,
|
||||
SDL_PEN_DEVICE_TYPE_DIRECT,
|
||||
SDL_PEN_DEVICE_TYPE_INDIRECT,
|
||||
}
|
||||
|
||||
public static partial class SDL3
|
||||
{
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PenDeviceType SDL_GetPenDeviceType(SDL_PenID instance_id);
|
||||
|
||||
[NativeTypeName("#define SDL_PEN_INPUT_DOWN (1u << 0)")]
|
||||
public const uint SDL_PEN_INPUT_DOWN = (1U << 0);
|
||||
|
||||
|
|
@ -59,5 +72,8 @@ namespace SDL
|
|||
|
||||
[NativeTypeName("#define SDL_PEN_INPUT_ERASER_TIP (1u << 30)")]
|
||||
public const uint SDL_PEN_INPUT_ERASER_TIP = (1U << 30);
|
||||
|
||||
[NativeTypeName("#define SDL_PEN_INPUT_IN_PROXIMITY (1u << 31)")]
|
||||
public const uint SDL_PEN_INPUT_IN_PROXIMITY = (1U << 31);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ namespace SDL
|
|||
SDL_COLORSPACE_BT2020_LIMITED = 0x21102609U,
|
||||
SDL_COLORSPACE_BT2020_FULL = 0x22102609U,
|
||||
SDL_COLORSPACE_RGB_DEFAULT = SDL_COLORSPACE_SRGB,
|
||||
SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_JPEG,
|
||||
SDL_COLORSPACE_YUV_DEFAULT = SDL_COLORSPACE_BT601_LIMITED,
|
||||
}
|
||||
|
||||
public partial struct SDL_Color
|
||||
|
|
|
|||
|
|
@ -117,5 +117,8 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_DestroyProperties(SDL_PropertiesID props);
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_NAME_STRING \"SDL.name\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_NAME_STRING => "SDL.name"u8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,11 +76,8 @@ namespace SDL
|
|||
public int refcount;
|
||||
}
|
||||
|
||||
public unsafe partial struct SDL_GPURenderStateDesc
|
||||
public unsafe partial struct SDL_GPURenderStateCreateInfo
|
||||
{
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint version;
|
||||
|
||||
public SDL_GPUShader* fragment_shader;
|
||||
|
||||
[NativeTypeName("Sint32")]
|
||||
|
|
@ -100,6 +97,8 @@ namespace SDL
|
|||
|
||||
[NativeTypeName("SDL_GPUBuffer *const *")]
|
||||
public SDL_GPUBuffer** storage_buffers;
|
||||
|
||||
public SDL_PropertiesID props;
|
||||
}
|
||||
|
||||
public partial struct SDL_GPURenderState
|
||||
|
|
@ -126,7 +125,10 @@ namespace SDL
|
|||
public static extern SDL_Renderer* SDL_CreateRendererWithProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Renderer* SDL_CreateGPURenderer(SDL_Window* window, SDL_GPUShaderFormat format_flags, SDL_GPUDevice** device);
|
||||
public static extern SDL_Renderer* SDL_CreateGPURenderer(SDL_GPUDevice* device, SDL_Window* window);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPUDevice* SDL_GetGPURendererDevice(SDL_Renderer* renderer);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Renderer* SDL_CreateSoftwareRenderer(SDL_Surface* surface);
|
||||
|
|
@ -171,6 +173,13 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_GetTextureSize(SDL_Texture* texture, float* w, float* h);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetTexturePalette(SDL_Texture* texture, SDL_Palette* palette);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Palette* SDL_GetTexturePalette(SDL_Texture* texture);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetTextureColorMod(SDL_Texture* texture, [NativeTypeName("Uint8")] byte r, [NativeTypeName("Uint8")] byte g, [NativeTypeName("Uint8")] byte b);
|
||||
|
|
@ -471,7 +480,7 @@ namespace SDL
|
|||
public static extern SDLBool SDL_GetDefaultTextureScaleMode(SDL_Renderer* renderer, SDL_ScaleMode* scale_mode);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_GPURenderState* SDL_CreateGPURenderState(SDL_Renderer* renderer, SDL_GPURenderStateDesc* desc);
|
||||
public static extern SDL_GPURenderState* SDL_CreateGPURenderState(SDL_Renderer* renderer, SDL_GPURenderStateCreateInfo* createinfo);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
|
|
@ -479,7 +488,7 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetRenderGPUState(SDL_Renderer* renderer, SDL_GPURenderState* state);
|
||||
public static extern SDLBool SDL_SetGPURenderState(SDL_Renderer* renderer, SDL_GPURenderState* state);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_DestroyGPURenderState(SDL_GPURenderState* state);
|
||||
|
|
@ -487,6 +496,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_SOFTWARE_RENDERER \"software\"")]
|
||||
public static ReadOnlySpan<byte> SDL_SOFTWARE_RENDERER => "software"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_GPU_RENDERER \"gpu\"")]
|
||||
public static ReadOnlySpan<byte> SDL_GPU_RENDERER => "gpu"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_RENDERER_CREATE_NAME_STRING \"SDL.renderer.create.name\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_CREATE_NAME_STRING => "SDL.renderer.create.name"u8;
|
||||
|
||||
|
|
@ -502,6 +514,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER \"SDL.renderer.create.present_vsync\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER => "SDL.renderer.create.present_vsync"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER \"SDL.renderer.create.gpu.device\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER => "SDL.renderer.create.gpu.device"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN \"SDL.renderer.create.gpu.shaders_spirv\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN => "SDL.renderer.create.gpu.shaders_spirv"u8;
|
||||
|
||||
|
|
@ -547,6 +562,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER \"SDL.renderer.texture_formats\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER => "SDL.renderer.texture_formats"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN \"SDL.renderer.texture_wrapping\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN => "SDL.renderer.texture_wrapping"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER \"SDL.renderer.output_colorspace\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER => "SDL.renderer.output_colorspace"u8;
|
||||
|
||||
|
|
@ -616,6 +634,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER \"SDL.texture.create.height\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER => "SDL.texture.create.height"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER \"SDL.texture.create.palette\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER => "SDL.texture.create.palette"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT \"SDL.texture.create.SDR_white_point\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT => "SDL.texture.create.SDR_white_point"u8;
|
||||
|
||||
|
|
@ -670,6 +691,18 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER \"SDL.texture.create.vulkan.texture\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER => "SDL.texture.create.vulkan.texture"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER \"SDL.texture.create.gpu.texture\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER => "SDL.texture.create.gpu.texture"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER \"SDL.texture.create.gpu.texture_uv\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER => "SDL.texture.create.gpu.texture_uv"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER \"SDL.texture.create.gpu.texture_u\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER => "SDL.texture.create.gpu.texture_u"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_POINTER \"SDL.texture.create.gpu.texture_v\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_POINTER => "SDL.texture.create.gpu.texture_v"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_COLORSPACE_NUMBER \"SDL.texture.colorspace\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_COLORSPACE_NUMBER => "SDL.texture.colorspace"u8;
|
||||
|
||||
|
|
@ -748,6 +781,18 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER \"SDL.texture.vulkan.texture\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER => "SDL.texture.vulkan.texture"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER \"SDL.texture.gpu.texture\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER => "SDL.texture.gpu.texture"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER \"SDL.texture.gpu.texture_uv\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER => "SDL.texture.gpu.texture_uv"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER \"SDL.texture.gpu.texture_u\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER => "SDL.texture.gpu.texture_u"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER \"SDL.texture.gpu.texture_v\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER => "SDL.texture.gpu.texture_v"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_RENDERER_VSYNC_DISABLED 0")]
|
||||
public const int SDL_RENDERER_VSYNC_DISABLED = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace SDL
|
|||
SDL_SENSOR_GYRO_L,
|
||||
SDL_SENSOR_ACCEL_R,
|
||||
SDL_SENSOR_GYRO_R,
|
||||
SDL_SENSOR_COUNT,
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace SDL
|
|||
SDL_FLIP_NONE,
|
||||
SDL_FLIP_HORIZONTAL,
|
||||
SDL_FLIP_VERTICAL,
|
||||
SDL_FLIP_HORIZONTAL_AND_VERTICAL = (SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL),
|
||||
}
|
||||
|
||||
public partial struct SDL_Surface
|
||||
|
|
@ -116,6 +117,12 @@ namespace SDL
|
|||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void SDL_UnlockSurface(SDL_Surface* surface);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadSurface_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadSurface([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadBMP_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
|
|
@ -130,6 +137,20 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadPNG_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_LoadPNG([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SavePNG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_SetSurfaceRLE(SDL_Surface* surface, [NativeTypeName("bool")] SDLBool enabled);
|
||||
|
|
@ -186,6 +207,9 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool SDL_FlipSurface(SDL_Surface* surface, SDL_FlipMode flip);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_RotateSurface(SDL_Surface* surface, float angle);
|
||||
|
||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* SDL_DuplicateSurface(SDL_Surface* surface);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_MINOR_VERSION 3")]
|
||||
public const int SDL_MINOR_VERSION = 3;
|
||||
|
||||
[NativeTypeName("#define SDL_MICRO_VERSION 0")]
|
||||
public const int SDL_MICRO_VERSION = 0;
|
||||
[NativeTypeName("#define SDL_MICRO_VERSION 3")]
|
||||
public const int SDL_MICRO_VERSION = 3;
|
||||
|
||||
[NativeTypeName("#define SDL_VERSION SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)")]
|
||||
public const int SDL_VERSION = ((3) * 1000000 + (3) * 1000 + (0));
|
||||
public const int SDL_VERSION = ((3) * 1000000 + (3) * 1000 + (3));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -692,6 +692,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER \"SDL.display.wayland.wl_output\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER => "SDL.display.wayland.wl_output"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER \"SDL.display.windows.hmonitor\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER => "SDL.display.windows.hmonitor"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN \"SDL.window.create.always_on_top\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN => "SDL.window.create.always_on_top"u8;
|
||||
|
||||
|
|
@ -779,6 +782,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER \"SDL.window.create.cocoa.view\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER => "SDL.window.create.cocoa.view"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER \"SDL.window.create.uikit.windowscene\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER => "SDL.window.create.uikit.windowscene"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN \"SDL.window.create.wayland.surface_role_custom\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN => "SDL.window.create.wayland.surface_role_custom"u8;
|
||||
|
||||
|
|
@ -800,6 +806,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING \"SDL.window.create.emscripten.canvas_id\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING => "SDL.window.create.emscripten.canvas_id"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN \"SDL.window.create.emscripten.fill_document\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN => "SDL.window.create.emscripten.fill_document"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING \"SDL.window.create.emscripten.keyboard_element\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING => "SDL.window.create.emscripten.keyboard_element"u8;
|
||||
|
||||
|
|
@ -911,6 +920,9 @@ namespace SDL
|
|||
[NativeTypeName("#define SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING \"SDL.window.emscripten.canvas_id\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING => "SDL.window.emscripten.canvas_id"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN \"SDL.window.emscripten.fill_document\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN => "SDL.window.emscripten.fill_document"u8;
|
||||
|
||||
[NativeTypeName("#define SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING \"SDL.window.emscripten.keyboard_element\"")]
|
||||
public static ReadOnlySpan<byte> SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING => "SDL.window.emscripten.keyboard_element"u8;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ namespace SDL
|
|||
[Macro]
|
||||
public static unsafe SDLBool SDL_Unsupported()
|
||||
{
|
||||
fixed (byte* fmt = "That operation is not supported"u8)
|
||||
fixed (byte* fmt = "That operation is not supported\0"u8)
|
||||
return SDL_SetError(fmt, __arglist());
|
||||
}
|
||||
|
||||
[Macro]
|
||||
public static unsafe SDLBool SDL_InvalidParamError([NativeTypeName("const char *")] byte* param)
|
||||
{
|
||||
fixed (byte* fmt = "Parameter '%s' is invalid"u8)
|
||||
fixed (byte* fmt = "Parameter '%s' is invalid\0"u8)
|
||||
return SDL_SetError(fmt, __arglist(param));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,11 +50,4 @@ namespace SDL
|
|||
SDL_GPU_COLORCOMPONENT_B = (byte)SDL3.SDL_GPU_COLORCOMPONENT_B,
|
||||
SDL_GPU_COLORCOMPONENT_A = (byte)SDL3.SDL_GPU_COLORCOMPONENT_A,
|
||||
}
|
||||
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
public partial struct SDL_GPURenderStateDesc : SDL3.ISDLInterface
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
{
|
||||
uint SDL3.ISDLInterface.version { set => version = value; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ namespace SDL
|
|||
SDL_PEN_INPUT_BUTTON_4 = SDL3.SDL_PEN_INPUT_BUTTON_4,
|
||||
SDL_PEN_INPUT_BUTTON_5 = SDL3.SDL_PEN_INPUT_BUTTON_5,
|
||||
SDL_PEN_INPUT_ERASER_TIP = SDL3.SDL_PEN_INPUT_ERASER_TIP,
|
||||
SDL_PEN_INPUT_IN_PROXIMITY = SDL3.SDL_PEN_INPUT_IN_PROXIMITY,
|
||||
}
|
||||
|
||||
public static partial class SDL3
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@ namespace SDL
|
|||
SDL_WINDOW_INPUT_FOCUS = SDL3.SDL_WINDOW_INPUT_FOCUS,
|
||||
SDL_WINDOW_MOUSE_FOCUS = SDL3.SDL_WINDOW_MOUSE_FOCUS,
|
||||
SDL_WINDOW_EXTERNAL = SDL3.SDL_WINDOW_EXTERNAL,
|
||||
SDL_WINDOW_MODAL = SDL3.SDL_WINDOW_MODAL,
|
||||
SDL_WINDOW_HIGH_PIXEL_DENSITY = SDL3.SDL_WINDOW_HIGH_PIXEL_DENSITY,
|
||||
SDL_WINDOW_MOUSE_CAPTURE = SDL3.SDL_WINDOW_MOUSE_CAPTURE,
|
||||
SDL_WINDOW_MOUSE_RELATIVE_MODE = SDL3.SDL_WINDOW_MOUSE_RELATIVE_MODE,
|
||||
SDL_WINDOW_ALWAYS_ON_TOP = SDL3.SDL_WINDOW_ALWAYS_ON_TOP,
|
||||
SDL_WINDOW_UTILITY = SDL3.SDL_WINDOW_UTILITY,
|
||||
SDL_WINDOW_TOOLTIP = SDL3.SDL_WINDOW_TOOLTIP,
|
||||
|
|
|
|||
|
|
@ -312,7 +312,6 @@ def run_clangsharp(command, header: Header):
|
|||
"--file", header.input_file(),
|
||||
"--output", header.output_file(),
|
||||
"--libraryPath", header.base,
|
||||
|
||||
"--methodClassName", header.base,
|
||||
]
|
||||
|
||||
|
|
@ -374,6 +373,8 @@ def get_string_returning_functions(sdl_api):
|
|||
yield "TTF_GetFontFamilyName"
|
||||
yield "TTF_GetFontStyleName"
|
||||
|
||||
yield "MIX_GetAudioDecoder"
|
||||
|
||||
|
||||
def should_skip(solo_headers: list[Header], header: Header):
|
||||
if len(solo_headers) == 0:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFrameworks Condition=" '$(CI_DONT_TARGET_ANDROID)' != '1' ">net8.0;net8.0-android</TargetFrameworks>
|
||||
<TargetFramework Condition=" '$(CI_DONT_TARGET_ANDROID)' == '1' ">net8.0</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<RootNamespace>SDL</RootNamespace>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
@ -67,9 +69,8 @@
|
|||
<PackagePath>runtimes/linux-arm/native</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
<!-- Todo: Build these platforms with the CI script:
|
||||
<None Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_image.xcframework\**\*">
|
||||
<PackagePath>runtimes/ios/native/SDL3.xcframework</PackagePath>
|
||||
<PackagePath>runtimes/ios/native/SDL3_image.xcframework</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\libSDL3_image.so">
|
||||
|
|
@ -88,7 +89,6 @@
|
|||
<PackagePath>runtimes/android-x86/native</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
-->
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SDL
|
||||
|
|
@ -40,20 +41,36 @@ namespace SDL
|
|||
public int* delays;
|
||||
}
|
||||
|
||||
public partial struct IMG_AnimationEncoder
|
||||
{
|
||||
}
|
||||
|
||||
public enum IMG_AnimationDecoderStatus
|
||||
{
|
||||
IMG_DECODER_STATUS_INVALID = -1,
|
||||
IMG_DECODER_STATUS_OK,
|
||||
IMG_DECODER_STATUS_FAILED,
|
||||
IMG_DECODER_STATUS_COMPLETE,
|
||||
}
|
||||
|
||||
public partial struct IMG_AnimationDecoder
|
||||
{
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3_image
|
||||
{
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int IMG_Version();
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadTyped_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_Load([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_Load_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadTyped_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Texture* IMG_LoadTexture(SDL_Renderer* renderer, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
|
|
@ -64,12 +81,15 @@ namespace SDL
|
|||
public static extern SDL_Texture* IMG_LoadTextureTyped_IO(SDL_Renderer* renderer, SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isAVIF(SDL_IOStream* src);
|
||||
public static extern SDL_Surface* IMG_GetClipboardImage();
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isICO(SDL_IOStream* src);
|
||||
public static extern SDLBool IMG_isANI(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isAVIF(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
|
|
@ -83,6 +103,10 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isGIF(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isICO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isJPG(SDL_IOStream* src);
|
||||
|
|
@ -107,18 +131,22 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isPNM(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isSVG(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isQOI(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isSVG(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isTIF(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isWEBP(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isXCF(SDL_IOStream* src);
|
||||
|
|
@ -131,25 +159,21 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isXV(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_isWEBP(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadAVIF_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadICO_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadCUR_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadBMP_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadCUR_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadGIF_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadICO_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadJPG_IO(SDL_IOStream* src);
|
||||
|
||||
|
|
@ -171,6 +195,9 @@ namespace SDL
|
|||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadSVG_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadSizedSVG_IO(SDL_IOStream* src, int width, int height);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadQOI_IO(SDL_IOStream* src);
|
||||
|
||||
|
|
@ -180,6 +207,9 @@ namespace SDL
|
|||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadTIF_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadWEBP_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadXCF_IO(SDL_IOStream* src);
|
||||
|
||||
|
|
@ -189,18 +219,20 @@ namespace SDL
|
|||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadXV_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadWEBP_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_LoadSizedSVG_IO(SDL_IOStream* src, int width, int height);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_ReadXPMFromArray([NativeTypeName("char **")] byte** xpm);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Surface* IMG_ReadXPMFromArrayToRGB888([NativeTypeName("char **")] byte** xpm);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_Save(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveTyped_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveAVIF(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, int quality);
|
||||
|
|
@ -211,11 +243,35 @@ namespace SDL
|
|||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
public static extern SDLBool IMG_SaveBMP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SavePNG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
public static extern SDLBool IMG_SaveBMP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveCUR(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveCUR_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveGIF(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveGIF_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveICO(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveICO_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
|
|
@ -225,6 +281,30 @@ namespace SDL
|
|||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveJPG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, int quality);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SavePNG(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SavePNG_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveTGA(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveTGA_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveWEBP(SDL_Surface* surface, [NativeTypeName("const char *")] byte* file, float quality);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveWEBP_IO(SDL_Surface* surface, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, float quality);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_Animation* IMG_LoadAnimation([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
|
|
@ -235,7 +315,13 @@ namespace SDL
|
|||
public static extern IMG_Animation* IMG_LoadAnimationTyped_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void IMG_FreeAnimation(IMG_Animation* anim);
|
||||
public static extern IMG_Animation* IMG_LoadANIAnimation_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_Animation* IMG_LoadAPNGAnimation_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_Animation* IMG_LoadAVIFAnimation_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_Animation* IMG_LoadGIFAnimation_IO(SDL_IOStream* src);
|
||||
|
|
@ -243,6 +329,84 @@ namespace SDL
|
|||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_Animation* IMG_LoadWEBPAnimation_IO(SDL_IOStream* src);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveAnimation(IMG_Animation* anim, [NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveAnimationTyped_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveANIAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveAPNGAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveAVIFAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, int quality);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveGIFAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_SaveWEBPAnimation_IO(IMG_Animation* anim, SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, int quality);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_Cursor* IMG_CreateAnimatedCursor(IMG_Animation* anim, int hot_x, int hot_y);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void IMG_FreeAnimation(IMG_Animation* anim);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoder([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoder_IO(SDL_IOStream* dst, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationEncoder* IMG_CreateAnimationEncoderWithProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_AddAnimationEncoderFrame(IMG_AnimationEncoder* encoder, SDL_Surface* surface, [NativeTypeName("Uint64")] ulong duration);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_CloseAnimationEncoder(IMG_AnimationEncoder* encoder);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationDecoder* IMG_CreateAnimationDecoder([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationDecoder* IMG_CreateAnimationDecoder_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, [NativeTypeName("const char *")] byte* type);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationDecoder* IMG_CreateAnimationDecoderWithProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID IMG_GetAnimationDecoderProperties(IMG_AnimationDecoder* decoder);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_GetAnimationDecoderFrame(IMG_AnimationDecoder* decoder, SDL_Surface** frame, [NativeTypeName("Uint64 *")] ulong* duration);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern IMG_AnimationDecoderStatus IMG_GetAnimationDecoderStatus(IMG_AnimationDecoder* decoder);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_ResetAnimationDecoder(IMG_AnimationDecoder* decoder);
|
||||
|
||||
[DllImport("SDL3_image", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool IMG_CloseAnimationDecoder(IMG_AnimationDecoder* decoder);
|
||||
|
||||
[NativeTypeName("#define SDL_IMAGE_MAJOR_VERSION 3")]
|
||||
public const int SDL_IMAGE_MAJOR_VERSION = 3;
|
||||
|
||||
|
|
@ -254,5 +418,65 @@ namespace SDL
|
|||
|
||||
[NativeTypeName("#define SDL_IMAGE_VERSION SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_MICRO_VERSION)")]
|
||||
public const int SDL_IMAGE_VERSION = ((3) * 1000000 + (3) * 1000 + (0));
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING \"SDL_image.animation_encoder.create.filename\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING => "SDL_image.animation_encoder.create.filename"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER \"SDL_image.animation_encoder.create.iostream\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER => "SDL_image.animation_encoder.create.iostream"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_image.animation_encoder.create.iostream.autoclose\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_image.animation_encoder.create.iostream.autoclose"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING \"SDL_image.animation_encoder.create.type\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING => "SDL_image.animation_encoder.create.type"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER \"SDL_image.animation_encoder.create.quality\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER => "SDL_image.animation_encoder.create.quality"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER \"SDL_image.animation_encoder.create.timebase.numerator\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER => "SDL_image.animation_encoder.create.timebase.numerator"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER \"SDL_image.animation_encoder.create.timebase.denominator\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER => "SDL_image.animation_encoder.create.timebase.denominator"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING \"SDL_image.animation_decoder.create.filename\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING => "SDL_image.animation_decoder.create.filename"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER \"SDL_image.animation_decoder.create.iostream\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER => "SDL_image.animation_decoder.create.iostream"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN \"SDL_image.animation_decoder.create.iostream.autoclose\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN => "SDL_image.animation_decoder.create.iostream.autoclose"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_TYPE_STRING \"SDL_image.animation_decoder.create.type\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_DECODER_CREATE_TYPE_STRING => "SDL_image.animation_decoder.create.type"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_NUMERATOR_NUMBER \"SDL_image.animation_decoder.create.timebase.numerator\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_NUMERATOR_NUMBER => "SDL_image.animation_decoder.create.timebase.numerator"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER \"SDL_image.animation_decoder.create.timebase.denominator\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER => "SDL_image.animation_decoder.create.timebase.denominator"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_IGNORE_PROPS_BOOLEAN \"SDL_image.metadata.ignore_props\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_IGNORE_PROPS_BOOLEAN => "SDL_image.metadata.ignore_props"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_DESCRIPTION_STRING \"SDL_image.metadata.description\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_DESCRIPTION_STRING => "SDL_image.metadata.description"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_COPYRIGHT_STRING \"SDL_image.metadata.copyright\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_COPYRIGHT_STRING => "SDL_image.metadata.copyright"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_TITLE_STRING \"SDL_image.metadata.title\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_TITLE_STRING => "SDL_image.metadata.title"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_AUTHOR_STRING \"SDL_image.metadata.author\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_AUTHOR_STRING => "SDL_image.metadata.author"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_CREATION_TIME_STRING \"SDL_image.metadata.creation_time\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_CREATION_TIME_STRING => "SDL_image.metadata.creation_time"u8;
|
||||
|
||||
[NativeTypeName("#define IMG_PROP_METADATA_LOOP_COUNT_NUMBER \"SDL_image.metadata.loop_count\"")]
|
||||
public static ReadOnlySpan<byte> IMG_PROP_METADATA_LOOP_COUNT_NUMBER => "SDL_image.metadata.loop_count"u8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFrameworks Condition=" '$(CI_DONT_TARGET_ANDROID)' != '1' ">net8.0;net8.0-android</TargetFrameworks>
|
||||
<TargetFramework Condition=" '$(CI_DONT_TARGET_ANDROID)' == '1' ">net8.0</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<RootNamespace>SDL</RootNamespace>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
@ -67,9 +69,8 @@
|
|||
<PackagePath>runtimes/linux-arm/native</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
<!-- Todo: Build these platforms with the CI script:
|
||||
<None Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_mixer.xcframework\**\*">
|
||||
<PackagePath>runtimes/ios/native/SDL3.xcframework</PackagePath>
|
||||
<PackagePath>runtimes/ios/native/SDL3_mixer.xcframework</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\libSDL3_mixer.so">
|
||||
|
|
@ -88,7 +89,6 @@
|
|||
<PackagePath>runtimes/android-x86/native</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
-->
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -28,417 +28,443 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace SDL
|
||||
{
|
||||
public unsafe partial struct Mix_Chunk
|
||||
public partial struct MIX_Mixer
|
||||
{
|
||||
public int allocated;
|
||||
|
||||
[NativeTypeName("Uint8 *")]
|
||||
public byte* abuf;
|
||||
|
||||
[NativeTypeName("Uint32")]
|
||||
public uint alen;
|
||||
|
||||
[NativeTypeName("Uint8")]
|
||||
public byte volume;
|
||||
}
|
||||
|
||||
public enum Mix_Fading
|
||||
public partial struct MIX_Audio
|
||||
{
|
||||
MIX_NO_FADING,
|
||||
MIX_FADING_OUT,
|
||||
MIX_FADING_IN,
|
||||
}
|
||||
|
||||
public enum Mix_MusicType
|
||||
public partial struct MIX_Track
|
||||
{
|
||||
MUS_NONE,
|
||||
MUS_WAV,
|
||||
MUS_MOD,
|
||||
MUS_MID,
|
||||
MUS_OGG,
|
||||
MUS_MP3,
|
||||
MUS_FLAC,
|
||||
MUS_OPUS,
|
||||
MUS_WAVPACK,
|
||||
MUS_GME,
|
||||
}
|
||||
|
||||
public partial struct Mix_Music
|
||||
public partial struct MIX_Group
|
||||
{
|
||||
}
|
||||
|
||||
public partial struct MIX_StereoGains
|
||||
{
|
||||
public float left;
|
||||
|
||||
public float right;
|
||||
}
|
||||
|
||||
public partial struct MIX_Point3D
|
||||
{
|
||||
public float x;
|
||||
|
||||
public float y;
|
||||
|
||||
public float z;
|
||||
}
|
||||
|
||||
public partial struct MIX_AudioDecoder
|
||||
{
|
||||
}
|
||||
|
||||
public static unsafe partial class SDL3_mixer
|
||||
{
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_Version();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("MIX_InitFlags")]
|
||||
public static extern uint Mix_Init([NativeTypeName("MIX_InitFlags")] uint flags);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_Quit();
|
||||
public static extern int MIX_Version();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_OpenAudio(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
public static extern SDLBool MIX_Init();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_PauseAudio(int pause_on);
|
||||
public static extern void MIX_Quit();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_QuerySpec(int* frequency, SDL_AudioFormat* format, int* channels);
|
||||
public static extern int MIX_GetNumAudioDecoders();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_AllocateChannels(int numchans);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Chunk* Mix_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Chunk* Mix_LoadWAV([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Music* Mix_LoadMUS([NativeTypeName("const char *")] byte* file);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Music* Mix_LoadMUS_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Music* Mix_LoadMUSType_IO(SDL_IOStream* src, Mix_MusicType type, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Chunk* Mix_QuickLoad_WAV([NativeTypeName("Uint8 *")] byte* mem);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Chunk* Mix_QuickLoad_RAW([NativeTypeName("Uint8 *")] byte* mem, [NativeTypeName("Uint32")] uint len);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_FreeChunk(Mix_Chunk* chunk);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_FreeMusic(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GetNumChunkDecoders();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, EntryPoint = "MIX_GetAudioDecoder", ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetChunkDecoder(int index);
|
||||
public static extern byte* Unsafe_MIX_GetAudioDecoder(int index);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Mixer* MIX_CreateMixerDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Mixer* MIX_CreateMixer([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void MIX_DestroyMixer(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID MIX_GetMixerProperties(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_HasChunkDecoder([NativeTypeName("const char *")] byte* name);
|
||||
public static extern SDLBool MIX_GetMixerFormat(MIX_Mixer* mixer, SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GetNumMusicDecoders();
|
||||
public static extern MIX_Audio* MIX_LoadAudio_IO(MIX_Mixer* mixer, SDL_IOStream* io, [NativeTypeName("bool")] SDLBool predecode, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetMusicDecoder(int index);
|
||||
public static extern MIX_Audio* MIX_LoadAudio(MIX_Mixer* mixer, [NativeTypeName("const char *")] byte* path, [NativeTypeName("bool")] SDLBool predecode);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Audio* MIX_LoadAudioWithProperties(SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Audio* MIX_LoadRawAudio_IO(MIX_Mixer* mixer, SDL_IOStream* io, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Audio* MIX_LoadRawAudio(MIX_Mixer* mixer, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("size_t")] nuint datalen, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Audio* MIX_LoadRawAudioNoCopy(MIX_Mixer* mixer, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("size_t")] nuint datalen, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("bool")] SDLBool free_when_done);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Audio* MIX_CreateSineWaveAudio(MIX_Mixer* mixer, int hz, float amplitude);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID MIX_GetAudioProperties(MIX_Audio* audio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_GetAudioDuration(MIX_Audio* audio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_HasMusicDecoder([NativeTypeName("const char *")] byte* name);
|
||||
public static extern SDLBool MIX_GetAudioFormat(MIX_Audio* audio, SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_MusicType Mix_GetMusicType([NativeTypeName("const Mix_Music *")] Mix_Music* music);
|
||||
public static extern void MIX_DestroyAudio(MIX_Audio* audio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetMusicTitle([NativeTypeName("const Mix_Music *")] Mix_Music* music);
|
||||
public static extern MIX_Track* MIX_CreateTrack(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetMusicTitleTag([NativeTypeName("const Mix_Music *")] Mix_Music* music);
|
||||
public static extern void MIX_DestroyTrack(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetMusicArtistTag([NativeTypeName("const Mix_Music *")] Mix_Music* music);
|
||||
public static extern SDL_PropertiesID MIX_GetTrackProperties(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetMusicAlbumTag([NativeTypeName("const Mix_Music *")] Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetMusicCopyrightTag([NativeTypeName("const Mix_Music *")] Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_SetPostMix([NativeTypeName("Mix_MixCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, int, void> mix_func, [NativeTypeName("void*")] IntPtr arg);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_HookMusic([NativeTypeName("Mix_MixCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, int, void> mix_func, [NativeTypeName("void*")] IntPtr arg);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_HookMusicFinished([NativeTypeName("Mix_MusicFinishedCallback")] delegate* unmanaged[Cdecl]<void> music_finished);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("void*")]
|
||||
public static extern IntPtr Mix_GetMusicHookData();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_ChannelFinished([NativeTypeName("Mix_ChannelFinishedCallback")] delegate* unmanaged[Cdecl]<int, void> channel_finished);
|
||||
public static extern MIX_Mixer* MIX_GetTrackMixer(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_RegisterEffect(int chan, [NativeTypeName("Mix_EffectFunc_t")] delegate* unmanaged[Cdecl]<int, IntPtr, int, IntPtr, void> f, [NativeTypeName("Mix_EffectDone_t")] delegate* unmanaged[Cdecl]<int, IntPtr, void> d, [NativeTypeName("void*")] IntPtr arg);
|
||||
public static extern SDLBool MIX_SetTrackAudio(MIX_Track* track, MIX_Audio* audio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_UnregisterEffect(int channel, [NativeTypeName("Mix_EffectFunc_t")] delegate* unmanaged[Cdecl]<int, IntPtr, int, IntPtr, void> f);
|
||||
public static extern SDLBool MIX_SetTrackAudioStream(MIX_Track* track, SDL_AudioStream* stream);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_UnregisterAllEffects(int channel);
|
||||
public static extern SDLBool MIX_SetTrackIOStream(MIX_Track* track, SDL_IOStream* io, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetPanning(int channel, [NativeTypeName("Uint8")] byte left, [NativeTypeName("Uint8")] byte right);
|
||||
public static extern SDLBool MIX_SetTrackRawIOStream(MIX_Track* track, SDL_IOStream* io, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec, [NativeTypeName("bool")] SDLBool closeio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetPosition(int channel, [NativeTypeName("Sint16")] short angle, [NativeTypeName("Uint8")] byte distance);
|
||||
public static extern SDLBool MIX_TagTrack(MIX_Track* track, [NativeTypeName("const char *")] byte* tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void MIX_UntagTrack(MIX_Track* track, [NativeTypeName("const char *")] byte* tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetDistance(int channel, [NativeTypeName("Uint8")] byte distance);
|
||||
public static extern SDLBool MIX_SetTrackPlaybackPosition(MIX_Track* track, [NativeTypeName("Sint64")] long frames);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_GetTrackPlaybackPosition(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetReverseStereo(int channel, int flip);
|
||||
public static extern SDLBool MIX_TrackLooping(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_ReserveChannels(int num);
|
||||
public static extern MIX_Audio* MIX_GetTrackAudio(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_AudioStream* MIX_GetTrackAudioStream(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_GetTrackRemaining(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_TrackMSToFrames(MIX_Track* track, [NativeTypeName("Sint64")] long ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_TrackFramesToMS(MIX_Track* track, [NativeTypeName("Sint64")] long frames);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_AudioMSToFrames(MIX_Audio* audio, [NativeTypeName("Sint64")] long ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_AudioFramesToMS(MIX_Audio* audio, [NativeTypeName("Sint64")] long frames);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_MSToFrames(int sample_rate, [NativeTypeName("Sint64")] long ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Sint64")]
|
||||
public static extern long MIX_FramesToMS(int sample_rate, [NativeTypeName("Sint64")] long frames);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_GroupChannel(int which, int tag);
|
||||
public static extern SDLBool MIX_PlayTrack(MIX_Track* track, SDL_PropertiesID options);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_GroupChannels(int from, int to, int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GroupAvailable(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GroupCount(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GroupOldest(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GroupNewer(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_PlayChannel(int channel, Mix_Chunk* chunk, int loops);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_PlayChannelTimed(int channel, Mix_Chunk* chunk, int loops, int ticks);
|
||||
public static extern SDLBool MIX_PlayTag(MIX_Mixer* mixer, [NativeTypeName("const char *")] byte* tag, SDL_PropertiesID options);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_PlayMusic(Mix_Music* music, int loops);
|
||||
public static extern SDLBool MIX_PlayAudio(MIX_Mixer* mixer, MIX_Audio* audio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_FadeInMusic(Mix_Music* music, int loops, int ms);
|
||||
public static extern SDLBool MIX_StopTrack(MIX_Track* track, [NativeTypeName("Sint64")] long fade_out_frames);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_FadeInMusicPos(Mix_Music* music, int loops, int ms, double position);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_FadeInChannel(int channel, Mix_Chunk* chunk, int loops, int ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_FadeInChannelTimed(int channel, Mix_Chunk* chunk, int loops, int ms, int ticks);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_Volume(int channel, int volume);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_VolumeChunk(Mix_Chunk* chunk, int volume);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_VolumeMusic(int volume);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GetMusicVolume(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_MasterVolume(int volume);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_HaltChannel(int channel);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_HaltGroup(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_HaltMusic();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_ExpireChannel(int channel, int ticks);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_FadeOutChannel(int which, int ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_FadeOutGroup(int tag, int ms);
|
||||
public static extern SDLBool MIX_StopAllTracks(MIX_Mixer* mixer, [NativeTypeName("Sint64")] long fade_out_ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_FadeOutMusic(int ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Fading Mix_FadingMusic();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Fading Mix_FadingChannel(int which);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_Pause(int channel);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_PauseGroup(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_Resume(int channel);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_ResumeGroup(int tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_Paused(int channel);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_PauseMusic();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_ResumeMusic();
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_RewindMusic();
|
||||
public static extern SDLBool MIX_StopTag(MIX_Mixer* mixer, [NativeTypeName("const char *")] byte* tag, [NativeTypeName("Sint64")] long fade_out_ms);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_PausedMusic();
|
||||
public static extern SDLBool MIX_PauseTrack(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_ModMusicJumpToOrder(int order);
|
||||
public static extern SDLBool MIX_PauseAllTracks(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_StartTrack(Mix_Music* music, int track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_GetNumTracks(Mix_Music* music);
|
||||
public static extern SDLBool MIX_PauseTag(MIX_Mixer* mixer, [NativeTypeName("const char *")] byte* tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetMusicPosition(double position);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern double Mix_GetMusicPosition(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern double Mix_MusicDuration(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern double Mix_GetMusicLoopStartTime(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern double Mix_GetMusicLoopEndTime(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern double Mix_GetMusicLoopLengthTime(Mix_Music* music);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int Mix_Playing(int channel);
|
||||
public static extern SDLBool MIX_ResumeTrack(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_PlayingMusic();
|
||||
public static extern SDLBool MIX_ResumeAllTracks(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetSoundFonts([NativeTypeName("const char *")] byte* paths);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetSoundFonts();
|
||||
public static extern SDLBool MIX_ResumeTag(MIX_Mixer* mixer, [NativeTypeName("const char *")] byte* tag);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_EachSoundFont([NativeTypeName("Mix_EachSoundFontCallback")] delegate* unmanaged[Cdecl]<byte*, IntPtr, SDLBool> function, [NativeTypeName("void*")] IntPtr data);
|
||||
public static extern SDLBool MIX_TrackPlaying(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool Mix_SetTimidityCfg([NativeTypeName("const char *")] byte* path);
|
||||
public static extern SDLBool MIX_TrackPaused(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("const char *")]
|
||||
public static extern byte* Mix_GetTimidityCfg();
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetMasterGain(MIX_Mixer* mixer, float gain);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern Mix_Chunk* Mix_GetChunk(int channel);
|
||||
public static extern float MIX_GetMasterGain(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void Mix_CloseAudio();
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackGain(MIX_Track* track, float gain);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern float MIX_GetTrackGain(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTagGain(MIX_Mixer* mixer, [NativeTypeName("const char *")] byte* tag, float gain);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackFrequencyRatio(MIX_Track* track, float ratio);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern float MIX_GetTrackFrequencyRatio(MIX_Track* track);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackOutputChannelMap(MIX_Track* track, [NativeTypeName("const int *")] int* chmap, int count);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackStereo(MIX_Track* track, [NativeTypeName("const MIX_StereoGains *")] MIX_StereoGains* gains);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrack3DPosition(MIX_Track* track, [NativeTypeName("const MIX_Point3D *")] MIX_Point3D* position);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_GetTrack3DPosition(MIX_Track* track, MIX_Point3D* position);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Group* MIX_CreateGroup(MIX_Mixer* mixer);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void MIX_DestroyGroup(MIX_Group* group);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID MIX_GetGroupProperties(MIX_Group* group);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_Mixer* MIX_GetGroupMixer(MIX_Group* group);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackGroup(MIX_Track* track, MIX_Group* group);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackStoppedCallback(MIX_Track* track, [NativeTypeName("MIX_TrackStoppedCallback")] delegate* unmanaged[Cdecl]<IntPtr, MIX_Track*, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackRawCallback(MIX_Track* track, [NativeTypeName("MIX_TrackMixCallback")] delegate* unmanaged[Cdecl]<IntPtr, MIX_Track*, SDL_AudioSpec*, float*, int, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetTrackCookedCallback(MIX_Track* track, [NativeTypeName("MIX_TrackMixCallback")] delegate* unmanaged[Cdecl]<IntPtr, MIX_Track*, SDL_AudioSpec*, float*, int, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetGroupPostMixCallback(MIX_Group* group, [NativeTypeName("MIX_GroupMixCallback")] delegate* unmanaged[Cdecl]<IntPtr, MIX_Group*, SDL_AudioSpec*, float*, int, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_SetPostMixCallback(MIX_Mixer* mixer, [NativeTypeName("MIX_PostMixCallback")] delegate* unmanaged[Cdecl]<IntPtr, MIX_Mixer*, SDL_AudioSpec*, float*, int, void> cb, [NativeTypeName("void*")] IntPtr userdata);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_Generate(MIX_Mixer* mixer, [NativeTypeName("void*")] IntPtr buffer, int buflen);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_AudioDecoder* MIX_CreateAudioDecoder([NativeTypeName("const char *")] byte* path, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern MIX_AudioDecoder* MIX_CreateAudioDecoder_IO(SDL_IOStream* io, [NativeTypeName("bool")] SDLBool closeio, SDL_PropertiesID props);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern void MIX_DestroyAudioDecoder(MIX_AudioDecoder* audiodecoder);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern SDL_PropertiesID MIX_GetAudioDecoderProperties(MIX_AudioDecoder* audiodecoder);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool MIX_GetAudioDecoderFormat(MIX_AudioDecoder* audiodecoder, SDL_AudioSpec* spec);
|
||||
|
||||
[DllImport("SDL3_mixer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int MIX_DecodeAudio(MIX_AudioDecoder* audiodecoder, [NativeTypeName("void*")] IntPtr buffer, int buflen, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||
|
||||
[NativeTypeName("#define SDL_MIXER_MAJOR_VERSION 3")]
|
||||
public const int SDL_MIXER_MAJOR_VERSION = 3;
|
||||
|
||||
[NativeTypeName("#define SDL_MIXER_MINOR_VERSION 0")]
|
||||
public const int SDL_MIXER_MINOR_VERSION = 0;
|
||||
[NativeTypeName("#define SDL_MIXER_MINOR_VERSION 1")]
|
||||
public const int SDL_MIXER_MINOR_VERSION = 1;
|
||||
|
||||
[NativeTypeName("#define SDL_MIXER_MICRO_VERSION 0")]
|
||||
public const int SDL_MIXER_MICRO_VERSION = 0;
|
||||
|
||||
[NativeTypeName("#define SDL_MIXER_VERSION SDL_VERSIONNUM(SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_MICRO_VERSION)")]
|
||||
public const int SDL_MIXER_VERSION = ((3) * 1000000 + (0) * 1000 + (0));
|
||||
public const int SDL_MIXER_VERSION = ((3) * 1000000 + (1) * 1000 + (0));
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_FLAC 0x00000001")]
|
||||
public const int MIX_INIT_FLAC = 0x00000001;
|
||||
[NativeTypeName("#define MIX_PROP_AUDIO_LOAD_IOSTREAM_POINTER \"SDL_mixer.audio.load.iostream\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_AUDIO_LOAD_IOSTREAM_POINTER => "SDL_mixer.audio.load.iostream"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_MOD 0x00000002")]
|
||||
public const int MIX_INIT_MOD = 0x00000002;
|
||||
[NativeTypeName("#define MIX_PROP_AUDIO_LOAD_CLOSEIO_BOOLEAN \"SDL_mixer.audio.load.closeio\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_AUDIO_LOAD_CLOSEIO_BOOLEAN => "SDL_mixer.audio.load.closeio"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_MP3 0x00000008")]
|
||||
public const int MIX_INIT_MP3 = 0x00000008;
|
||||
[NativeTypeName("#define MIX_PROP_AUDIO_LOAD_PREDECODE_BOOLEAN \"SDL_mixer.audio.load.predecode\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_AUDIO_LOAD_PREDECODE_BOOLEAN => "SDL_mixer.audio.load.predecode"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_OGG 0x00000010")]
|
||||
public const int MIX_INIT_OGG = 0x00000010;
|
||||
[NativeTypeName("#define MIX_PROP_AUDIO_LOAD_PREFERRED_MIXER_POINTER \"SDL_mixer.audio.load.preferred_mixer\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_AUDIO_LOAD_PREFERRED_MIXER_POINTER => "SDL_mixer.audio.load.preferred_mixer"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_MID 0x00000020")]
|
||||
public const int MIX_INIT_MID = 0x00000020;
|
||||
[NativeTypeName("#define MIX_PROP_AUDIO_LOAD_SKIP_METADATA_TAGS_BOOLEAN \"SDL_mixer.audio.load.skip_metadata_tags\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_AUDIO_LOAD_SKIP_METADATA_TAGS_BOOLEAN => "SDL_mixer.audio.load.skip_metadata_tags"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_OPUS 0x00000040")]
|
||||
public const int MIX_INIT_OPUS = 0x00000040;
|
||||
[NativeTypeName("#define MIX_PROP_AUDIO_DECODER_STRING \"SDL_mixer.audio.decoder\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_AUDIO_DECODER_STRING => "SDL_mixer.audio.decoder"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_INIT_WAVPACK 0x00000080")]
|
||||
public const int MIX_INIT_WAVPACK = 0x00000080;
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_TITLE_STRING \"SDL_mixer.metadata.title\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_TITLE_STRING => "SDL_mixer.metadata.title"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_CHANNELS 8")]
|
||||
public const int MIX_CHANNELS = 8;
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_ARTIST_STRING \"SDL_mixer.metadata.artist\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_ARTIST_STRING => "SDL_mixer.metadata.artist"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_DEFAULT_FREQUENCY 44100")]
|
||||
public const int MIX_DEFAULT_FREQUENCY = 44100;
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_ALBUM_STRING \"SDL_mixer.metadata.album\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_ALBUM_STRING => "SDL_mixer.metadata.album"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_DEFAULT_CHANNELS 2")]
|
||||
public const int MIX_DEFAULT_CHANNELS = 2;
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_COPYRIGHT_STRING \"SDL_mixer.metadata.copyright\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_COPYRIGHT_STRING => "SDL_mixer.metadata.copyright"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_MAX_VOLUME 128")]
|
||||
public const int MIX_MAX_VOLUME = 128;
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_TRACK_NUMBER \"SDL_mixer.metadata.track\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_TRACK_NUMBER => "SDL_mixer.metadata.track"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_CHANNEL_POST (-2)")]
|
||||
public const int MIX_CHANNEL_POST = (-2);
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER \"SDL_mixer.metadata.total_tracks\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER => "SDL_mixer.metadata.total_tracks"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_EFFECTSMAXSPEED \"MIX_EFFECTSMAXSPEED\"")]
|
||||
public static ReadOnlySpan<byte> MIX_EFFECTSMAXSPEED => "MIX_EFFECTSMAXSPEED"u8;
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_YEAR_NUMBER \"SDL_mixer.metadata.year\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_YEAR_NUMBER => "SDL_mixer.metadata.year"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_DURATION_FRAMES_NUMBER \"SDL_mixer.metadata.duration_frames\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_DURATION_FRAMES_NUMBER => "SDL_mixer.metadata.duration_frames"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN \"SDL_mixer.metadata.duration_infinite\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN => "SDL_mixer.metadata.duration_infinite"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_DURATION_UNKNOWN -1")]
|
||||
public const int MIX_DURATION_UNKNOWN = -1;
|
||||
|
||||
[NativeTypeName("#define MIX_DURATION_INFINITE -2")]
|
||||
public const int MIX_DURATION_INFINITE = -2;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_LOOPS_NUMBER \"SDL_mixer.play.loops\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_LOOPS_NUMBER => "SDL_mixer.play.loops"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_MAX_FRAME_NUMBER \"SDL_mixer.play.max_frame\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_MAX_FRAME_NUMBER => "SDL_mixer.play.max_frame"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_MAX_MILLISECONDS_NUMBER \"SDL_mixer.play.max_milliseconds\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_MAX_MILLISECONDS_NUMBER => "SDL_mixer.play.max_milliseconds"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_START_FRAME_NUMBER \"SDL_mixer.play.start_frame\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_START_FRAME_NUMBER => "SDL_mixer.play.start_frame"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_START_MILLISECOND_NUMBER \"SDL_mixer.play.start_millisecond\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_START_MILLISECOND_NUMBER => "SDL_mixer.play.start_millisecond"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_LOOP_START_FRAME_NUMBER \"SDL_mixer.play.loop_start_frame\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_LOOP_START_FRAME_NUMBER => "SDL_mixer.play.loop_start_frame"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_LOOP_START_MILLISECOND_NUMBER \"SDL_mixer.play.loop_start_millisecond\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_LOOP_START_MILLISECOND_NUMBER => "SDL_mixer.play.loop_start_millisecond"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_FADE_IN_FRAMES_NUMBER \"SDL_mixer.play.fade_in_frames\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_FADE_IN_FRAMES_NUMBER => "SDL_mixer.play.fade_in_frames"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_FADE_IN_MILLISECONDS_NUMBER \"SDL_mixer.play.fade_in_milliseconds\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_FADE_IN_MILLISECONDS_NUMBER => "SDL_mixer.play.fade_in_milliseconds"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_APPEND_SILENCE_FRAMES_NUMBER \"SDL_mixer.play.append_silence_frames\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_APPEND_SILENCE_FRAMES_NUMBER => "SDL_mixer.play.append_silence_frames"u8;
|
||||
|
||||
[NativeTypeName("#define MIX_PROP_PLAY_APPEND_SILENCE_MILLISECONDS_NUMBER \"SDL_mixer.play.append_silence_milliseconds\"")]
|
||||
public static ReadOnlySpan<byte> MIX_PROP_PLAY_APPEND_SILENCE_MILLISECONDS_NUMBER => "SDL_mixer.play.append_silence_milliseconds"u8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,11 @@ namespace SDL
|
|||
{
|
||||
[Constant]
|
||||
public static readonly SDL_AudioFormat MIX_DEFAULT_FORMAT = SDL_AUDIO_S16;
|
||||
|
||||
[Macro]
|
||||
public static bool SDL_MIXER_VERSION_ATLEAST(int X, int Y, int Z) =>
|
||||
((SDL_MIXER_MAJOR_VERSION >= X) &&
|
||||
(SDL_MIXER_MAJOR_VERSION > X || SDL_MIXER_MINOR_VERSION >= Y) &&
|
||||
(SDL_MIXER_MAJOR_VERSION > X || SDL_MIXER_MINOR_VERSION > Y || SDL_MIXER_MICRO_VERSION >= Z));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFrameworks Condition=" '$(CI_DONT_TARGET_ANDROID)' != '1' ">net8.0;net8.0-android</TargetFrameworks>
|
||||
<TargetFramework Condition=" '$(CI_DONT_TARGET_ANDROID)' == '1' ">net8.0</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<RootNamespace>SDL</RootNamespace>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
@ -67,9 +69,8 @@
|
|||
<PackagePath>runtimes/linux-arm/native</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
<!-- Todo: Build these platforms with the CI script:
|
||||
<None Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3_ttf.xcframework\**\*">
|
||||
<PackagePath>runtimes/ios/native/SDL3.xcframework</PackagePath>
|
||||
<PackagePath>runtimes/ios/native/SDL3_ttf.xcframework</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\libSDL3_ttf.so">
|
||||
|
|
@ -88,7 +89,6 @@
|
|||
<PackagePath>runtimes/android-x86/native</PackagePath>
|
||||
<Pack>true</Pack>
|
||||
</None>
|
||||
-->
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -272,6 +272,13 @@ namespace SDL
|
|||
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern TTF_Direction TTF_GetFontDirection(TTF_Font* font);
|
||||
|
||||
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("bool")]
|
||||
public static extern SDLBool TTF_SetFontCharSpacing(TTF_Font* font, int spacing);
|
||||
|
||||
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
public static extern int TTF_GetFontCharSpacing(TTF_Font* font);
|
||||
|
||||
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||
[return: NativeTypeName("Uint32")]
|
||||
public static extern uint TTF_StringToTag([NativeTypeName("const char *")] byte* @string);
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -4,35 +4,6 @@
|
|||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/Versions/A/SDL3</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/SDL3</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/SDL3</string>
|
||||
|
|
@ -53,6 +24,8 @@
|
|||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/SDL3</string>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
|
|
@ -64,6 +37,39 @@
|
|||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/Versions/A/SDL3</string>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/SDL3</string>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3.framework/SDL3</string>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_image.framework/SDL3_image</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_image.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_image.framework/SDL3_image</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_image.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_image.framework/SDL3_image</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_image.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_image.framework/Versions/A/SDL3_image</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_image.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_image.framework/SDL3_image</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_image.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_mixer.framework/SDL3_mixer</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_mixer.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_mixer.framework/SDL3_mixer</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_mixer.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_mixer.framework/Versions/A/SDL3_mixer</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_mixer.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_mixer.framework/SDL3_mixer</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_mixer.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_mixer.framework/SDL3_mixer</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_mixer.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_ttf.framework/SDL3_ttf</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_ttf.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_ttf.framework/SDL3_ttf</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_ttf.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_ttf.framework/Versions/A/SDL3_ttf</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>macos-arm64_x86_64</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_ttf.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>macos</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_ttf.framework/SDL3_ttf</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>tvos-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_ttf.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>tvos</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>BinaryPath</key>
|
||||
<string>SDL3_ttf.framework/SDL3_ttf</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>SDL3_ttf.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue