mirror of https://github.com/ppy/SDL3-CS.git
Compare commits
No commits in common. "master" and "2024.418.0" have entirely different histories.
master
...
2024.418.0
|
|
@ -22,8 +22,4 @@ App.config text eol=crlf
|
||||||
.gitignore text eol=lf
|
.gitignore text eol=lf
|
||||||
.gitattributes text eol=lf
|
.gitattributes text eol=lf
|
||||||
*.md text eol=lf
|
*.md text eol=lf
|
||||||
.travis.yml text eol=lf
|
.travis.yml text eol=lf
|
||||||
|
|
||||||
# Use lf for files used by ClangSharpPInvokeGenerator
|
|
||||||
*-license-header.txt text eol=lf
|
|
||||||
*.g.cs text eol=lf
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
name: Build Native
|
name: Build Native
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs: {}
|
||||||
# schedule:
|
# schedule:
|
||||||
# - cron: '0 0 * * *'
|
# - cron: '0 0 * * *'
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
NDK_VER: 28.2.13676358
|
|
||||||
PLATFORM_VER: 35
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -16,154 +15,175 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- { name: win-x64, os: windows-latest, flags: -A x64 }
|
- { name: win-x64, os: windows-latest, flags: -A x64 }
|
||||||
- { name: win-x86, os: windows-2022, flags: -A Win32 }
|
- { name: win-x86, os: windows-latest, flags: -A Win32 }
|
||||||
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
|
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
|
||||||
- { name: linux-x64, os: ubuntu-22.04, flags: -GNinja, target_apt_arch: ":amd64" }
|
- { name: linux-x64, os: ubuntu-20.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" }
|
- { name: linux-x86, os: ubuntu-20.04, flags: -GNinja, cmake_configure_env: CFLAGS=-m32 CXXFLAGS=-m32, target_apt_arch: ":i386" }
|
||||||
- { name: linux-arm64, os: ubuntu-22.04-arm, flags: -GNinja, target_apt_arch: ":arm64", container: "arm64v8/ubuntu:22.04" }
|
- { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" }
|
||||||
- { name: linux-arm, os: ubuntu-22.04-arm, flags: -GNinja -DCMAKE_C_FLAGS=-mfpu=neon -DCMAKE_CXX_FLAGS=-mfpu=neon, target_apt_arch: ":armhf", container: "arm32v7/ubuntu:22.04" }
|
|
||||||
- { 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.
|
# 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: 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:
|
steps:
|
||||||
|
- name: Setup Linux dependencies
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
if [[ ${{ matrix.platform.target_apt_arch }} == :i386 ]]; then
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo apt-get update -y -qq
|
||||||
|
|
||||||
|
if [[ ${{ matrix.platform.target_apt_arch }} == :i386 ]]; then
|
||||||
|
# Workaround GitHub's ubuntu-20.04 image issue <https://github.com/actions/virtual-environments/issues/4589>
|
||||||
|
sudo apt-get install -y --allow-downgrades libpcre2-8-0=10.34-7
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo apt-get install -y \
|
||||||
|
gcc-multilib \
|
||||||
|
g++-multilib \
|
||||||
|
cmake \
|
||||||
|
ninja-build \
|
||||||
|
wayland-scanner++ \
|
||||||
|
wayland-protocols \
|
||||||
|
pkg-config${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libasound2-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libdbus-1-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libegl1-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libgl1-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libgles2-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libglu1-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libibus-1.0-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libpulse-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libsndio-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libudev-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libwayland-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libx11-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxcursor-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxext-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxi-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxinerama-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxkbcommon-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxrandr-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxss-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxt-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxv-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libxxf86vm-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libdrm-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libgbm-dev${{ matrix.platform.target_apt_arch }} \
|
||||||
|
libpulse-dev${{ matrix.platform.target_apt_arch }}
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
repository: 'libsdl-org/SDL'
|
||||||
|
ref: 'main'
|
||||||
|
|
||||||
- name: Setup JDK
|
- uses: actions/checkout@v4
|
||||||
if: contains(matrix.platform.name, 'android')
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
with:
|
||||||
distribution: microsoft
|
path: 'SDL3-CS'
|
||||||
java-version: 17
|
|
||||||
|
|
||||||
- name: Install Android SDK Manager
|
- name: Configure CMake
|
||||||
if: contains(matrix.platform.name, 'android')
|
run: ${{ matrix.platform.cmake_configure_env }} cmake -B build ${{ matrix.platform.flags }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
|
||||||
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
|
|
||||||
with:
|
|
||||||
image: ${{ matrix.platform.container }}
|
|
||||||
options: >
|
|
||||||
-v ${{ github.workspace }}:/workspace
|
|
||||||
-e NAME=${{ matrix.platform.name }}
|
|
||||||
-e TARGET_APT_ARCH=${{ matrix.platform.target_apt_arch }}
|
|
||||||
-e RUNNER_OS=${{ runner.os }}
|
|
||||||
-e BUILD_TYPE=${{ env.BUILD_TYPE }}
|
|
||||||
run: |
|
|
||||||
cd /workspace
|
|
||||||
FLAGS="${{ matrix.platform.flags }}" ./External/build.sh
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ !contains(matrix.platform.container, 'arm') }}
|
run: cmake --build build/ --config Release
|
||||||
shell: bash
|
|
||||||
|
- name: Install (Windows)
|
||||||
|
run: cmake --install build/ --prefix install_output --config Release
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: sudo cmake --install build/ --prefix install_output --config Release
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
|
||||||
|
- name: Prepare release directory (Windows)
|
||||||
|
run: mkdir -Force SDL3-CS/native/${{ matrix.platform.name }}
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
|
||||||
|
- name: Prepare release directory
|
||||||
|
run: mkdir -p SDL3-CS/native/${{ matrix.platform.name }}
|
||||||
|
if: runner.os != 'Windows'
|
||||||
|
|
||||||
|
- name: Prepare release (Windows)
|
||||||
|
run: cp install_output/bin/SDL3.dll SDL3-CS/native/${{ matrix.platform.name }}/SDL3.dll
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
|
||||||
|
- name: Prepare release (Linux)
|
||||||
|
run: cp install_output/lib/libSDL3.so SDL3-CS/native/${{ matrix.platform.name }}/libSDL3.so
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
|
||||||
|
- name: Prepare release (macOS)
|
||||||
|
run: cp install_output/lib/libSDL3.dylib SDL3-CS/native/${{ matrix.platform.name }}/libSDL3.dylib
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
|
||||||
|
- name: Create pull request
|
||||||
|
uses: peter-evans/create-pull-request@v6
|
||||||
|
with:
|
||||||
|
commit-message: Update ${{ matrix.platform.name }} SDL binaries
|
||||||
|
title: Update ${{ matrix.platform.name }} SDL binaries
|
||||||
|
body: This PR has been auto-generated to update the ${{ matrix.platform.name }} SDL binaries.
|
||||||
|
branch: update-${{ matrix.platform.name }}-binaries
|
||||||
|
path: 'SDL3-CS'
|
||||||
env:
|
env:
|
||||||
NAME: ${{ matrix.platform.name }}
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
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
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
id: get_uid
|
|
||||||
run: echo "uid=$(id -u $USER)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Correct Ownership in GITHUB_WORKSPACE directory
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
uses: peter-murray/reset-workspace-ownership-action@v1
|
|
||||||
with:
|
|
||||||
user_id: ${{ steps.get_uid.outputs.uid }}
|
|
||||||
|
|
||||||
- name: Compress native directory
|
|
||||||
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
|
|
||||||
with:
|
|
||||||
name: native-${{ matrix.platform.name }}
|
|
||||||
path: native-${{ matrix.platform.name }}.tar
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
build-ios:
|
build-ios:
|
||||||
name: ios
|
name: ios
|
||||||
runs-on: macos-15
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
repository: 'libsdl-org/SDL'
|
||||||
|
ref: 'main'
|
||||||
|
|
||||||
# https://github.com/dotnet/macios/issues/19157
|
- uses: actions/checkout@v4
|
||||||
# https://github.com/actions/runner-images/issues/12758
|
with:
|
||||||
- name: Use Xcode 16.4
|
path: 'SDL3-CS'
|
||||||
run: sudo xcode-select -switch /Applications/Xcode_16.4.app
|
|
||||||
|
|
||||||
- name: Build (iOS)
|
- name: Build (iOS)
|
||||||
|
run: xcodebuild -project Xcode/SDL/SDL.xcodeproj -target SDL3.xcframework -configuration Release
|
||||||
|
|
||||||
|
- name: Prepare release directory (iOS)
|
||||||
|
run: mkdir -p SDL3-CS/native/ios
|
||||||
|
|
||||||
|
- name: Prepare release (iOS)
|
||||||
run: |
|
run: |
|
||||||
modules=("SDL3" "SDL3_image" "SDL3_ttf" "SDL3_mixer")
|
mkdir -p SDL3-CS/native/ios/SDL3.xcframework/ios-arm64/SDL3.framework;
|
||||||
architectures=("ios-arm64" "ios-arm64_x86_64-simulator")
|
mkdir -p SDL3-CS/native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework;
|
||||||
|
cp Xcode/SDL/build/SDL3.xcframework/Info.plist SDL3-CS/native/ios/SDL3.xcframework/Info.plist;
|
||||||
|
cp Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3 SDL3-CS/native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/SDL3;
|
||||||
|
cp Xcode/SDL/build/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist SDL3-CS/native/ios/SDL3.xcframework/ios-arm64/SDL3.framework/Info.plist;
|
||||||
|
cp Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3 SDL3-CS/native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/SDL3;
|
||||||
|
cp Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist SDL3-CS/native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist;
|
||||||
|
|
||||||
for module in "${modules[@]}"; do
|
- name: Create pull request
|
||||||
module0="${module/SDL3/SDL}"
|
uses: peter-evans/create-pull-request@v6
|
||||||
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 -cvf native-ios.tar native/ios
|
|
||||||
|
|
||||||
- name: Upload native artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: native-ios
|
commit-message: Update iOS SDL binaries
|
||||||
path: native-ios.tar
|
title: Update iOS SDL binaries
|
||||||
if-no-files-found: error
|
body: This PR has been auto-generated to update the iOS SDL binaries
|
||||||
|
branch: update-ios-binaries
|
||||||
|
path: 'SDL3-CS'
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
|
|
||||||
build-android-jar:
|
build-android:
|
||||||
name: android-jar
|
name: android
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-20.04
|
||||||
|
env:
|
||||||
|
NDK_VER: 23.1.7779620
|
||||||
|
PLATFORM_VER: android-34
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
repository: 'libsdl-org/SDL'
|
||||||
|
ref: 'main'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: 'SDL3-CS'
|
||||||
|
|
||||||
- name: Setup JDK
|
- name: Setup JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: microsoft
|
distribution: microsoft
|
||||||
java-version: |
|
java-version: |
|
||||||
|
|
@ -172,63 +192,43 @@ jobs:
|
||||||
|
|
||||||
- name: Install Android SDK Manager
|
- name: Install Android SDK Manager
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
with:
|
||||||
|
packages: ''
|
||||||
|
|
||||||
- name: Install Android SDK
|
- name: Install Android SDK
|
||||||
run: |
|
run: |
|
||||||
sdkmanager --install "platforms;android-$PLATFORM_VER"
|
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/SDL3-CS/native/android
|
||||||
|
rm -rf $OUTPUT && mkdir -p $OUTPUT
|
||||||
|
|
||||||
|
# Build SDL3
|
||||||
|
sed -i 's/abi=.*/abi="armeabi-v7a arm64-v8a x86 x86_64"/g' ./build-scripts/androidbuildlibs.sh
|
||||||
|
./build-scripts/androidbuildlibs.sh NDK_LIBS_OUT="$OUTPUT"
|
||||||
|
|
||||||
- name: Build SDL3 Android Java
|
- name: Build SDL3 Android Java
|
||||||
run: |
|
run: |
|
||||||
export JAVA_HOME=$JAVA_HOME_11_X64
|
export JAVA_HOME=$JAVA_HOME_11_X64
|
||||||
export PATH=$JAVA_HOME_11_X64/bin:$PATH
|
export PATH=$JAVA_HOME_11_X64/bin:$PATH
|
||||||
export OUTPUT=$PWD/SDL3-CS/Jars/
|
export OUTPUT=$PWD/SDL3-CS/SDL3-CS.Android/Jars/
|
||||||
rm -rf $OUTPUT && mkdir -p $OUTPUT
|
rm -rf $OUTPUT && mkdir -p $OUTPUT
|
||||||
|
|
||||||
# Build SDL3 Android Java part
|
# Build SDL3 Android Java part
|
||||||
cd ./External/SDL/android-project/app/src/main/java
|
cd android-project/app/src/main/java
|
||||||
javac -cp $ANDROID_HOME/platforms/android-$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
|
javac -cp $ANDROID_HOME/platforms/$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
|
||||||
jar cvf $OUTPUT/SDL3AndroidBridge.jar org/libsdl/app/*.class
|
jar cvf $OUTPUT/SDL3AndroidBridge.jar org/libsdl/app/*.class
|
||||||
|
|
||||||
- name: Upload JAR artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: android-jar
|
|
||||||
path: SDL3-CS/Jars/SDL3AndroidBridge.jar
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
make-pr:
|
|
||||||
name: Submit pull request
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ build, build-ios, build-android-jar ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Download native artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
pattern: native-*
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Decompress native artifacts
|
|
||||||
run: |
|
|
||||||
for file in native-*.tar
|
|
||||||
do
|
|
||||||
tar -xf "$file"
|
|
||||||
done
|
|
||||||
rm native-*.tar
|
|
||||||
|
|
||||||
- name: Download JAR artifact
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: android-jar
|
|
||||||
path: SDL3-CS/Jars/
|
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: peter-evans/create-pull-request@v6
|
uses: peter-evans/create-pull-request@v6
|
||||||
with:
|
with:
|
||||||
commit-message: Update native binaries
|
commit-message: Update Android SDL binaries
|
||||||
title: Update native binaries
|
title: Update Android SDL binaries
|
||||||
body: This PR has been auto-generated to update the native SDL binaries
|
body: This PR has been auto-generated to update the Android SDL binaries
|
||||||
branch: update-native-binaries
|
branch: update-android-binaries
|
||||||
|
path: 'SDL3-CS'
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
|
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -6,7 +6,7 @@ on:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pack:
|
desktop:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -16,30 +16,45 @@ jobs:
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Setup JDK 17
|
- name: Build
|
||||||
uses: actions/setup-java@v4
|
run: dotnet build SDL3-CS.Desktop.slnf -c Release
|
||||||
with:
|
|
||||||
distribution: microsoft
|
|
||||||
java-version: 17
|
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Pack
|
||||||
uses: android-actions/setup-android@v3
|
run: dotnet pack SDL3-CS/SDL3-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD)
|
||||||
|
|
||||||
- name: Install .NET workloads
|
|
||||||
run: dotnet workload restore
|
|
||||||
|
|
||||||
- name: Build & pack
|
|
||||||
run: |
|
|
||||||
dotnet pack SDL3-CS/SDL3-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
||||||
dotnet pack SDL3_image-CS/SDL3_image-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
||||||
dotnet pack SDL3_ttf-CS/SDL3_ttf-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
||||||
dotnet pack SDL3_mixer-CS/SDL3_mixer-CS.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD) -o artifacts
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Packages
|
name: SDL3-CS
|
||||||
path: artifacts/ppy.*.nupkg
|
path: SDL3-CS/bin/Release/ppy.*.nupkg
|
||||||
|
|
||||||
- name: Publish tagged release to nuget.org
|
- name: Publish tagged release to nuget.org
|
||||||
run: dotnet nuget push artifacts/ppy.*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
|
run: dotnet nuget push SDL3-CS/bin/Release/ppy.*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
|
||||||
|
|
||||||
|
android:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
|
- name: Install Android workload
|
||||||
|
run: dotnet workload install android
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build SDL3-CS.Android.slnf -c Release
|
||||||
|
|
||||||
|
- name: Pack
|
||||||
|
run: dotnet pack SDL3-CS.Android/SDL3-CS.Android.csproj -c Release /p:Version=$(git describe --exact-match --tags HEAD)
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: SDL3-CS.Android
|
||||||
|
path: SDL3-CS.Android/bin/Release/ppy.*.nupkg
|
||||||
|
|
||||||
|
- name: Publish tagged release to nuget.org
|
||||||
|
run: dotnet nuget push SDL3-CS.Android/bin/Release/ppy.*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,6 @@ fabric.properties
|
||||||
**/.idea/**/dynamic.xml
|
**/.idea/**/dynamic.xml
|
||||||
**/.idea/**/uiDesigner.xml
|
**/.idea/**/uiDesigner.xml
|
||||||
**/.idea/**/dbnavigator.xml
|
**/.idea/**/dbnavigator.xml
|
||||||
**/.idea/**/deploymentTargetDropDown.xml
|
|
||||||
|
|
||||||
# Rider
|
# Rider
|
||||||
# Rider auto-generates .iml files, and contentModel.xml
|
# Rider auto-generates .iml files, and contentModel.xml
|
||||||
|
|
@ -338,5 +337,3 @@ inspectcodereport.xml
|
||||||
inspectcode
|
inspectcode
|
||||||
|
|
||||||
sdl.json
|
sdl.json
|
||||||
|
|
||||||
install_output/
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
[submodule "SDL"]
|
|
||||||
path = External/SDL
|
|
||||||
url = https://github.com/libsdl-org/SDL
|
|
||||||
[submodule "SDL_image"]
|
|
||||||
path = External/SDL_image
|
|
||||||
url = https://github.com/libsdl-org/SDL_image.git
|
|
||||||
branch = main
|
|
||||||
[submodule "SDL_ttf"]
|
|
||||||
path = External/SDL_ttf
|
|
||||||
url = https://github.com/libsdl-org/SDL_ttf.git
|
|
||||||
branch = main
|
|
||||||
[submodule "SDL_mixer"]
|
|
||||||
path = External/SDL_mixer
|
|
||||||
url = https://github.com/libsdl-org/SDL_mixer.git
|
|
||||||
branch = main
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Android" type="XamarinAndroidProject" factoryName="Xamarin.Android">
|
|
||||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/SDL3-CS.Tests.Android/SDL3-CS.Tests.Android.csproj" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
|
||||||
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
|
|
||||||
<option name="DEPLOY_BEHAVIOUR_NAME" value="Default" />
|
|
||||||
<method v="2">
|
|
||||||
<option name="Build" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Desktop" type="DotNetProject" factoryName=".NET Project">
|
<configuration default="false" name="SDL3-CS.Tests" type="DotNetProject" factoryName=".NET Project">
|
||||||
<option name="EXE_PATH" value="$PROJECT_DIR$/SDL3-CS.Tests.Desktop/bin/Debug/net8.0/SDL3-CS.Tests.Desktop" />
|
<option name="EXE_PATH" value="$PROJECT_DIR$/SDL3-CS.Tests/bin/Debug/net8.0/SDL3-CS.Tests" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/SDL3-CS.Tests.Desktop/bin/Debug/net8.0" />
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/SDL3-CS.Tests/bin/Debug/net8.0" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
<option name="USE_MONO" value="0" />
|
<option name="USE_MONO" value="0" />
|
||||||
<option name="RUNTIME_ARGUMENTS" value="" />
|
<option name="RUNTIME_ARGUMENTS" value="" />
|
||||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/SDL3-CS.Tests.Desktop/SDL3-CS.Tests.Desktop.csproj" />
|
<option name="PROJECT_PATH" value="$PROJECT_DIR$/SDL3-CS.Tests/SDL3-CS.Tests.csproj" />
|
||||||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
||||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="iOS" type="XamarinIOSProject" factoryName="Xamarin.iOS">
|
|
||||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/SDL3-CS.Tests.iOS/SDL3-CS.Tests.iOS.csproj" />
|
|
||||||
<option name="PROGRAM_PARAMETERS" value="" />
|
|
||||||
<option name="IS_PASS_PARENT_ENVS" value="false" />
|
|
||||||
<option name="EXTRA_MLAUNCH_PARAMETERS" value="" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
25
Dockerfile
25
Dockerfile
|
|
@ -1,25 +0,0 @@
|
||||||
FROM ubuntu:24.04
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y dotnet-sdk-8.0 python3 git build-essential
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
COPY .config/dotnet-tools.json .config/dotnet-tools.json
|
|
||||||
COPY SDL3-CS/SDL3-CS.csproj SDL3-CS/SDL3-CS.csproj
|
|
||||||
|
|
||||||
# .NET 8 installed using the distro package does not support the android workload.
|
|
||||||
# Since the project is only used for reference purposes, we'll retarget it to a single framework.
|
|
||||||
# See: https://github.com/dotnet/core/discussions/9258#discussioncomment-9548857
|
|
||||||
RUN sed -i 's/<TargetFrameworks.*$/<TargetFramework>net8.0<\/TargetFramework>/' SDL3-CS/SDL3-CS.csproj
|
|
||||||
|
|
||||||
RUN dotnet tool restore && \
|
|
||||||
dotnet restore --ucr SDL3-CS/SDL3-CS.csproj
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
RUN echo '#!/bin/bash' >> entrypoint.sh && \
|
|
||||||
echo 'export LD_LIBRARY_PATH="$(echo ~/.nuget/packages/libclang.runtime.*/*/runtimes/*/native):$(echo ~/.nuget/packages/libclangsharp.runtime.*/*/runtimes/*/native):${LD_LIBRARY_PATH:-}"' >> entrypoint.sh && \
|
|
||||||
echo 'export CPLUS_INCLUDE_PATH="$(echo /usr/lib/gcc/*/*/include):/usr/include:${CPLUS_INCLUDE_PATH:-}"' >> entrypoint.sh && \
|
|
||||||
echo 'python3 SDL3-CS/generate_bindings.py "$@"' >> entrypoint.sh && \
|
|
||||||
chmod +x entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="UserContentModel">
|
|
||||||
<attachedFolders />
|
|
||||||
<explicitIncludes />
|
|
||||||
<explicitExcludes />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectUserFactors">
|
|
||||||
<factor id="completionFinishedType">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="cancelled" value="31.0" />
|
|
||||||
<observation name="explicitSelect" value="7.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="completionType">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="BASIC" value="31.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="completionUsage">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="count" value="38.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="itemPosition">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="0" value="6.0" />
|
|
||||||
<observation name="86" value="1.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="mnemonicsUsage">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="total" value="7.0" />
|
|
||||||
<observation name="withMnemonics" value="0.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="prefixLength">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="21" value="1.0" />
|
|
||||||
<observation name="24" value="1.0" />
|
|
||||||
<observation name="26" value="1.0" />
|
|
||||||
<observation name="28" value="1.0" />
|
|
||||||
<observation name="29" value="2.0" />
|
|
||||||
<observation name="32" value="1.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="prefixMatchingType">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="GREEDY_WITH_CASE" value="4.0" />
|
|
||||||
<observation name="WORDS_FIRST_CHAR" value="1.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="templatesUsage">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="totalStartingWithPrefix" value="7.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
<factor id="timeBetweenTyping">
|
|
||||||
<dailyData date="26-06-2023">
|
|
||||||
<observation name="average" value="115.76087" />
|
|
||||||
<observation name="count" value="92.0" />
|
|
||||||
</dailyData>
|
|
||||||
</factor>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RiderProjectSettingsUpdater">
|
|
||||||
<option name="singleClickDiffPreview" value="1" />
|
|
||||||
<option name="unhandledExceptionsIgnoreList" value="1" />
|
|
||||||
<option name="vcsConfiguration" value="3" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 8e644111c2220e654f53de4ea0aa3afdfc7813c5
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 13ec6e9be1d69d2a989ec1fc4f09e8743ef3932d
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 7d6e46ad28cc33ad1e87a46df739a7cba47f57fa
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit d929bc0d84bfaf3a71ec7f6be27aeb466380c1a0
|
|
||||||
|
|
@ -1,186 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
pushd "$(dirname "$0")"
|
|
||||||
|
|
||||||
# Check if environment variables are defined
|
|
||||||
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
|
|
||||||
|
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
|
||||||
SUDO=""
|
|
||||||
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 [[ $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
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SUDO apt-get update -y -qq
|
|
||||||
|
|
||||||
if [[ $NAME != 'linux-x86' && $NAME != 'linux-x64' ]]; then
|
|
||||||
GCC="gcc"
|
|
||||||
GPP="g++"
|
|
||||||
else
|
|
||||||
GCC="gcc-multilib"
|
|
||||||
GPP="g++-multilib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SUDO apt-get install -y \
|
|
||||||
$GCC \
|
|
||||||
$GPP \
|
|
||||||
git \
|
|
||||||
cmake \
|
|
||||||
ninja-build \
|
|
||||||
wayland-scanner++ \
|
|
||||||
wayland-protocols \
|
|
||||||
meson \
|
|
||||||
pkg-config$TARGET_APT_ARCH \
|
|
||||||
libasound2-dev$TARGET_APT_ARCH \
|
|
||||||
libdbus-1-dev$TARGET_APT_ARCH \
|
|
||||||
libegl1-mesa-dev$TARGET_APT_ARCH \
|
|
||||||
libgl1-mesa-dev$TARGET_APT_ARCH \
|
|
||||||
libgles2-mesa-dev$TARGET_APT_ARCH \
|
|
||||||
libglu1-mesa-dev$TARGET_APT_ARCH \
|
|
||||||
libgtk-3-dev$TARGET_APT_ARCH \
|
|
||||||
libibus-1.0-dev$TARGET_APT_ARCH \
|
|
||||||
libpango1.0-dev$TARGET_APT_ARCH \
|
|
||||||
libpulse-dev$TARGET_APT_ARCH \
|
|
||||||
libsndio-dev$TARGET_APT_ARCH \
|
|
||||||
libudev-dev$TARGET_APT_ARCH \
|
|
||||||
libwayland-dev$TARGET_APT_ARCH \
|
|
||||||
libx11-dev$TARGET_APT_ARCH \
|
|
||||||
libxcursor-dev$TARGET_APT_ARCH \
|
|
||||||
libxext-dev$TARGET_APT_ARCH \
|
|
||||||
libxi-dev$TARGET_APT_ARCH \
|
|
||||||
libxinerama-dev$TARGET_APT_ARCH \
|
|
||||||
libxkbcommon-dev$TARGET_APT_ARCH \
|
|
||||||
libxrandr-dev$TARGET_APT_ARCH \
|
|
||||||
libxss-dev$TARGET_APT_ARCH \
|
|
||||||
libxt-dev$TARGET_APT_ARCH \
|
|
||||||
libxv-dev$TARGET_APT_ARCH \
|
|
||||||
libxxf86vm-dev$TARGET_APT_ARCH \
|
|
||||||
libdrm-dev$TARGET_APT_ARCH \
|
|
||||||
libgbm-dev$TARGET_APT_ARCH \
|
|
||||||
libpulse-dev$TARGET_APT_ARCH \
|
|
||||||
libpipewire-0.3-dev$TARGET_APT_ARCH \
|
|
||||||
libdecor-0-dev$TARGET_APT_ARCH
|
|
||||||
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
|
|
||||||
|
|
||||||
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 [[ $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
|
|
||||||
|
|
||||||
# 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
|
|
||||||
cp $CMAKE_INSTALL_PREFIX/$LIB_OUTPUT ../../native/$NATIVE_PATH
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# -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)
|
|
||||||
run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON
|
|
||||||
|
|
||||||
# -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
|
|
||||||
33
README.md
33
README.md
|
|
@ -1,34 +1 @@
|
||||||
# SDL3-CS
|
# SDL3-CS
|
||||||
|
|
||||||
C# bindings for the [SDL3](https://github.com/libsdl-org/SDL) family of libraries.
|
|
||||||
|
|
||||||
| Product | Usage | Package |
|
|
||||||
|------------------------------------------------------------------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
|
|
||||||
| [`SDL`](https://github.com/libsdl-org/SDL/tree/main) | `dotnet add package ppy.SDL3-CS` | [](https://www.nuget.org/packages/ppy.SDL3-CS) |
|
|
||||||
| [`SDL_image`](https://github.com/libsdl-org/SDL_image/tree/main) | `dotnet add package ppy.SDL3_image-CS` | [](https://www.nuget.org/packages/ppy.SDL3_image-CS) |
|
|
||||||
| [`SDL_ttf`](https://github.com/libsdl-org/SDL_ttf/tree/main) | `dotnet add package ppy.SDL3_ttf-CS` | [](https://www.nuget.org/packages/ppy.SDL3_ttf-CS) |
|
|
||||||
| [`SDL_mixer`](https://github.com/libsdl-org/SDL_mixer/tree/main) | `dotnet add package ppy.SDL3_mixer-CS` | [](https://www.nuget.org/packages/ppy.SDL3_mixer-CS) |
|
|
||||||
|
|
||||||
Contributions to keep the bindings up-to-date with upstream changes are welcome. If you have improvements or updates, feel free to submit a pull request.
|
|
||||||
|
|
||||||
## Platform support
|
|
||||||
|
|
||||||
| 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` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | API 24+ |
|
|
||||||
|
|
||||||
## Generating bindings
|
|
||||||
|
|
||||||
Bindings are generated via the provided Dockerfile:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
docker build -t 'sdl-gen' .
|
|
||||||
docker run --rm -v .:/app -w /app -it sdl-gen
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This code is released under [MIT](LICENCE).
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
C# bindings for the [SDL3](https://github.com/libsdl-org/SDL) family of libraries.
|
|
||||||
|
|
||||||
| Product | Usage | Package |
|
|
||||||
|------------------------------------------------------------------|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
|
|
||||||
| [`SDL`](https://github.com/libsdl-org/SDL/tree/main) | `dotnet add package ppy.SDL3-CS` | [](https://www.nuget.org/packages/ppy.SDL3-CS) |
|
|
||||||
| [`SDL_image`](https://github.com/libsdl-org/SDL_image/tree/main) | `dotnet add package ppy.SDL3_image-CS` | [](https://www.nuget.org/packages/ppy.SDL3_image-CS) |
|
|
||||||
| [`SDL_ttf`](https://github.com/libsdl-org/SDL_ttf/tree/main) | `dotnet add package ppy.SDL3_ttf-CS` | [](https://www.nuget.org/packages/ppy.SDL3_ttf-CS) |
|
|
||||||
| [`SDL_mixer`](https://github.com/libsdl-org/SDL_mixer/tree/main) | `dotnet add package ppy.SDL3_mixer-CS` | [](https://www.nuget.org/packages/ppy.SDL3_mixer-CS) |
|
|
||||||
|
|
||||||
Contributions to keep the bindings up-to-date with upstream changes are welcome. If you have improvements or updates, feel free to submit a pull request.
|
|
||||||
|
|
||||||
## Platform support
|
|
||||||
|
|
||||||
| 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` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | API 24+ |
|
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
"solution": {
|
"solution": {
|
||||||
"path": "SDL3-CS.sln",
|
"path": "SDL3-CS.sln",
|
||||||
"projects": [
|
"projects": [
|
||||||
"SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj",
|
"SDL3-CS.Android\\SDL3-CS.Android.csproj"
|
||||||
"SDL3-CS.Tests.Android\\SDL3-CS.Tests.Android.csproj",
|
|
||||||
"SDL3-CS.Tests\\SDL3-CS.Tests.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,32 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0-android</TargetFramework>
|
||||||
|
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||||
|
<RootNamespace>SDL3.Android</RootNamespace>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Label="NuGet">
|
||||||
|
<Authors>ppy Pty Ltd</Authors>
|
||||||
|
<Company>ppy Pty Ltd</Company>
|
||||||
|
<Copyright>Copyright (c) 2024 ppy Pty Ltd</Copyright>
|
||||||
|
<Product>ppy.SDL3-CS.Android</Product>
|
||||||
|
<PackageId>ppy.SDL3-CS.Android</PackageId>
|
||||||
|
<PackageReleaseNotes>Automated release.</PackageReleaseNotes>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<PackageProjectUrl>https://github.com/ppy/SDL3-CS</PackageProjectUrl>
|
||||||
|
<RepositoryUrl>https://github.com/ppy/SDL3-CS</RepositoryUrl>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedJar Include="Jars\SDL3AndroidBridge.jar" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedNativeLibrary Include="..\native\android\armeabi-v7a\libSDL3.so" />
|
||||||
|
<EmbeddedNativeLibrary Include="..\native\android\arm64-v8a\libSDL3.so" />
|
||||||
|
<EmbeddedNativeLibrary Include="..\native\android\x86\libSDL3.so" />
|
||||||
|
<EmbeddedNativeLibrary Include="..\native\android\x86_64\libSDL3.so" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
|
@ -2,13 +2,9 @@
|
||||||
"solution": {
|
"solution": {
|
||||||
"path": "SDL3-CS.sln",
|
"path": "SDL3-CS.sln",
|
||||||
"projects": [
|
"projects": [
|
||||||
"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\\SDL3-CS.csproj",
|
"SDL3-CS\\SDL3-CS.csproj",
|
||||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
"SDL3-CS.SourceGeneration\\SDL3-CS.SourceGeneration.csproj",
|
||||||
"SDL3_mixer-CS\\SDL3_mixer-CS.csproj",
|
"SDL3-CS.Tests\\SDL3-CS.Tests.csproj"
|
||||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SDL.SourceGeneration
|
namespace SDL3.SourceGeneration
|
||||||
{
|
{
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum Changes
|
public enum Changes
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ using Microsoft.CodeAnalysis;
|
||||||
using Microsoft.CodeAnalysis.CSharp;
|
using Microsoft.CodeAnalysis.CSharp;
|
||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
|
|
||||||
namespace SDL.SourceGeneration
|
namespace SDL3.SourceGeneration
|
||||||
{
|
{
|
||||||
[Generator]
|
[Generator]
|
||||||
public class FriendlyOverloadGenerator : ISourceGenerator
|
public class FriendlyOverloadGenerator : ISourceGenerator
|
||||||
|
|
@ -32,14 +32,9 @@ using System;
|
||||||
|
|
||||||
foreach (var kvp in finder.Methods)
|
foreach (var kvp in finder.Methods)
|
||||||
{
|
{
|
||||||
if (kvp.Value.Count == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
string filename = kvp.Key;
|
string filename = kvp.Key;
|
||||||
var foundMethods = kvp.Value;
|
var foundMethods = kvp.Value;
|
||||||
|
|
||||||
string className = ClassNameFromMethod(foundMethods.First().NativeMethod);
|
|
||||||
|
|
||||||
var result = new StringBuilder();
|
var result = new StringBuilder();
|
||||||
result.Append(file_header);
|
result.Append(file_header);
|
||||||
result.Append(
|
result.Append(
|
||||||
|
|
@ -47,7 +42,7 @@ using System;
|
||||||
SyntaxFactory.IdentifierName("SDL"))
|
SyntaxFactory.IdentifierName("SDL"))
|
||||||
.WithMembers(
|
.WithMembers(
|
||||||
SyntaxFactory.SingletonList<MemberDeclarationSyntax>(
|
SyntaxFactory.SingletonList<MemberDeclarationSyntax>(
|
||||||
SyntaxFactory.ClassDeclaration(className)
|
SyntaxFactory.ClassDeclaration("SDL3")
|
||||||
.WithModifiers(
|
.WithModifiers(
|
||||||
SyntaxFactory.TokenList(
|
SyntaxFactory.TokenList(
|
||||||
SyntaxFactory.Token(SyntaxKind.UnsafeKeyword),
|
SyntaxFactory.Token(SyntaxKind.UnsafeKeyword),
|
||||||
|
|
@ -59,16 +54,6 @@ using System;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string ClassNameFromMethod(MethodDeclarationSyntax methodNode)
|
|
||||||
{
|
|
||||||
if (methodNode.Parent is ClassDeclarationSyntax classDeclaration)
|
|
||||||
{
|
|
||||||
return classDeclaration.Identifier.Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "SDL3"; // fallback!
|
|
||||||
}
|
|
||||||
|
|
||||||
private static MemberDeclarationSyntax makeFriendlyMethod(GeneratedMethod gm)
|
private static MemberDeclarationSyntax makeFriendlyMethod(GeneratedMethod gm)
|
||||||
{
|
{
|
||||||
var returnType = gm.RequiredChanges.HasFlag(Changes.ChangeReturnTypeToString)
|
var returnType = gm.RequiredChanges.HasFlag(Changes.ChangeReturnTypeToString)
|
||||||
|
|
@ -141,10 +126,7 @@ using System;
|
||||||
if (gm.RequiredChanges.HasFlag(Changes.ChangeReturnTypeToString))
|
if (gm.RequiredChanges.HasFlag(Changes.ChangeReturnTypeToString))
|
||||||
{
|
{
|
||||||
expr = SyntaxFactory.InvocationExpression(
|
expr = SyntaxFactory.InvocationExpression(
|
||||||
SyntaxFactory.MemberAccessExpression(
|
SyntaxFactory.IdentifierName("PtrToStringUTF8"))
|
||||||
SyntaxKind.SimpleMemberAccessExpression,
|
|
||||||
SyntaxFactory.IdentifierName("SDL3"),
|
|
||||||
SyntaxFactory.IdentifierName("PtrToStringUTF8")))
|
|
||||||
.WithArguments(new[]
|
.WithArguments(new[]
|
||||||
{
|
{
|
||||||
SyntaxFactory.Argument(makeFunctionCall(gm)),
|
SyntaxFactory.Argument(makeFunctionCall(gm)),
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
|
|
||||||
namespace SDL.SourceGeneration
|
namespace SDL3.SourceGeneration
|
||||||
{
|
{
|
||||||
public record GeneratedMethod
|
public record GeneratedMethod
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis;
|
||||||
using Microsoft.CodeAnalysis.CSharp;
|
using Microsoft.CodeAnalysis.CSharp;
|
||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
|
|
||||||
namespace SDL.SourceGeneration
|
namespace SDL3.SourceGeneration
|
||||||
{
|
{
|
||||||
public static class Helper
|
public static class Helper
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||||
<IsRoslynComponent>true</IsRoslynComponent>
|
<IsRoslynComponent>true</IsRoslynComponent>
|
||||||
|
|
||||||
<RootNamespace>SDL.SourceGeneration</RootNamespace>
|
<RootNamespace>SDL3.SourceGeneration</RootNamespace>
|
||||||
|
<PackageId>SDL3.SourceGeneration</PackageId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -9,37 +9,20 @@ using Microsoft.CodeAnalysis;
|
||||||
using Microsoft.CodeAnalysis.CSharp;
|
using Microsoft.CodeAnalysis.CSharp;
|
||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||||
|
|
||||||
namespace SDL.SourceGeneration
|
namespace SDL3.SourceGeneration
|
||||||
{
|
{
|
||||||
public class UnfriendlyMethodFinder : ISyntaxReceiver
|
public class UnfriendlyMethodFinder : ISyntaxReceiver
|
||||||
{
|
{
|
||||||
public readonly Dictionary<string, List<GeneratedMethod>> Methods = new Dictionary<string, List<GeneratedMethod>>();
|
public readonly Dictionary<string, List<GeneratedMethod>> Methods = new Dictionary<string, List<GeneratedMethod>>();
|
||||||
|
|
||||||
private static readonly string[] sdlPrefixes = ["SDL_", "TTF_", "IMG_", "MIX_"];
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Checks whether the method is from any SDL library.
|
|
||||||
/// It identifies those by checking the SDL prefix in the method name.
|
|
||||||
/// </summary>
|
|
||||||
private static bool IsMethodFromSDL(MethodDeclarationSyntax methodNode)
|
|
||||||
{
|
|
||||||
foreach (string prefix in sdlPrefixes)
|
|
||||||
{
|
|
||||||
if (methodNode.Identifier.ValueText.StartsWith(prefix, StringComparison.Ordinal))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
|
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
|
||||||
{
|
{
|
||||||
if (syntaxNode is MethodDeclarationSyntax method)
|
if (syntaxNode is MethodDeclarationSyntax method)
|
||||||
{
|
{
|
||||||
string name = method.Identifier.ValueText;
|
string name = method.Identifier.ValueText;
|
||||||
bool isUnsafe = name.StartsWith(Helper.UnsafePrefix, StringComparison.Ordinal);
|
bool isUnsafe = name.StartsWith($"{Helper.UnsafePrefix}SDL_", StringComparison.Ordinal);
|
||||||
|
|
||||||
if (!IsMethodFromSDL(method) && !isUnsafe)
|
if (!name.StartsWith("SDL_", StringComparison.Ordinal) && !isUnsafe)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (method.ParameterList.Parameters.Any(p => p.Identifier.IsKind(SyntaxKind.ArgListKeyword)))
|
if (method.ParameterList.Parameters.Any(p => p.Identifier.IsKind(SyntaxKind.ArgListKeyword)))
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<application android:allowBackup="true" android:supportsRtl="true">
|
|
||||||
</application>
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
</manifest>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
using Org.Libsdl.App;
|
|
||||||
|
|
||||||
namespace SDL.Tests.Android
|
|
||||||
{
|
|
||||||
[Activity(Label = "SDL3-CS Android Tests", MainLauncher = true)]
|
|
||||||
public class MainActivity : SDLActivity
|
|
||||||
{
|
|
||||||
protected override string[] GetLibraries() => ["SDL3", "SDL3_image", "SDL3_ttf", "SDL3_mixer"];
|
|
||||||
|
|
||||||
protected override void Main() => Program.Main();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0-android</TargetFramework>
|
|
||||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
|
||||||
<RootNamespace>SDL.Tests.Android</RootNamespace>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<ApplicationId>SDL.Tests.Android</ApplicationId>
|
|
||||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Label="NuGet">
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\SDL3-CS.Tests\SDL3-CS.Tests.csproj"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\*.so">
|
|
||||||
<Abi>armeabi-v7a</Abi>
|
|
||||||
</AndroidNativeLibrary>
|
|
||||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\arm64-v8a\*.so">
|
|
||||||
<Abi>arm64-v8a</Abi>
|
|
||||||
</AndroidNativeLibrary>
|
|
||||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\x86\*.so">
|
|
||||||
<Abi>x86</Abi>
|
|
||||||
</AndroidNativeLibrary>
|
|
||||||
<AndroidNativeLibrary Include="$(MSBuildThisFileDirectory)..\native\android\x86_64\*.so">
|
|
||||||
<Abi>x86_64</Abi>
|
|
||||||
</AndroidNativeLibrary>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
internal class Program
|
|
||||||
{
|
|
||||||
public static void Main(string[] args)
|
|
||||||
{
|
|
||||||
SDL.Tests.Program.Main();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<RootNamespace>SDL.Tests.Desktop</RootNamespace>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Label="NuGet">
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\SDL3-CS.Tests\SDL3-CS.Tests.csproj"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<SDLArch Condition="'$(RuntimeIdentifier)' == ''">$(NETCoreSdkRuntimeIdentifier)</SDLArch>
|
|
||||||
<SDLArch Condition="'$(RuntimeIdentifier)' != ''">$(RuntimeIdentifier)</SDLArch>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="$(MSBuildThisFileDirectory)..\native\$(SDLArch)\*">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<?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>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<?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>CFBundleDisplayName</key>
|
|
||||||
<string>SDL.Tests.iOS</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>SDL.Tests.iOS</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>UIDeviceFamily</key>
|
|
||||||
<array>
|
|
||||||
<integer>1</integer>
|
|
||||||
<integer>2</integer>
|
|
||||||
</array>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
|
||||||
<array>
|
|
||||||
<string>armv7</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using SDL;
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
|
|
||||||
private static unsafe int main(int argc, byte** argv)
|
|
||||||
{
|
|
||||||
SDL.Tests.Program.Main();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0-ios</TargetFramework>
|
|
||||||
<RootNamespace>SDL.Tests.iOS</RootNamespace>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
|
||||||
<SupportedOSPlatformVersion>13.0</SupportedOSPlatformVersion>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<CodesignKey>iPhone Developer</CodesignKey>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Label="NuGet">
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\SDL3-CS.Tests\SDL3-CS.Tests.csproj" PrivateAssets="all"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
// 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.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Base class for tests that use SDL3 main callbacks.
|
|
||||||
/// See https://wiki.libsdl.org/SDL3/README/main-functions#how-to-use-main-callbacks-in-sdl3.
|
|
||||||
/// </summary>
|
|
||||||
[TestFixture]
|
|
||||||
[Apartment(ApartmentState.STA)]
|
|
||||||
public abstract unsafe class MainCallbacksTest
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void TestEnterMainCallbacks()
|
|
||||||
{
|
|
||||||
var objectHandle = new ObjectHandle<MainCallbacksTest>(this, GCHandleType.Normal);
|
|
||||||
SDL3.SDL_EnterAppMainCallbacks(0, (byte**)objectHandle.Handle, &AppInit, &AppIterate, &AppEvent, &AppQuit);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual SDL_AppResult Init()
|
|
||||||
{
|
|
||||||
SDL3.SDL_SetLogPriorities(SDL_LogPriority.SDL_LOG_PRIORITY_VERBOSE);
|
|
||||||
SDL3.SDL_SetLogOutputFunction(&LogOutput, IntPtr.Zero);
|
|
||||||
return SDL_AppResult.SDL_APP_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual SDL_AppResult Iterate()
|
|
||||||
{
|
|
||||||
Thread.Sleep(10);
|
|
||||||
return SDL_AppResult.SDL_APP_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual SDL_AppResult Event(SDL_Event e)
|
|
||||||
{
|
|
||||||
switch (e.Type)
|
|
||||||
{
|
|
||||||
case SDL_EventType.SDL_EVENT_QUIT:
|
|
||||||
case SDL_EventType.SDL_EVENT_WINDOW_CLOSE_REQUESTED:
|
|
||||||
case SDL_EventType.SDL_EVENT_TERMINATING:
|
|
||||||
case SDL_EventType.SDL_EVENT_KEY_DOWN when e.key.key == SDL_Keycode.SDLK_ESCAPE:
|
|
||||||
return SDL_AppResult.SDL_APP_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
return SDL_AppResult.SDL_APP_CONTINUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual void Quit(SDL_AppResult result)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static void LogOutput(IntPtr userdata, int category, SDL_LogPriority priority, byte* message)
|
|
||||||
{
|
|
||||||
Console.WriteLine(SDL3.PtrToStringUTF8(message));
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static SDL_AppResult AppInit(IntPtr* appState, int argc, byte** argv)
|
|
||||||
{
|
|
||||||
IntPtr handle = (IntPtr)argv;
|
|
||||||
*appState = handle;
|
|
||||||
|
|
||||||
var objectHandle = new ObjectHandle<MainCallbacksTest>(handle, true);
|
|
||||||
if (objectHandle.GetTarget(out var target))
|
|
||||||
return target.Init();
|
|
||||||
|
|
||||||
return SDL_AppResult.SDL_APP_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static SDL_AppResult AppIterate(IntPtr appState)
|
|
||||||
{
|
|
||||||
var objectHandle = new ObjectHandle<MainCallbacksTest>(appState, true);
|
|
||||||
if (objectHandle.GetTarget(out var target))
|
|
||||||
return target.Iterate();
|
|
||||||
|
|
||||||
return SDL_AppResult.SDL_APP_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static SDL_AppResult AppEvent(IntPtr appState, SDL_Event* e)
|
|
||||||
{
|
|
||||||
var objectHandle = new ObjectHandle<MainCallbacksTest>(appState, true);
|
|
||||||
if (objectHandle.GetTarget(out var target))
|
|
||||||
return target.Event(*e);
|
|
||||||
|
|
||||||
return SDL_AppResult.SDL_APP_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static void AppQuit(IntPtr appState, SDL_AppResult result)
|
|
||||||
{
|
|
||||||
using var objectHandle = new ObjectHandle<MainCallbacksTest>(appState, true);
|
|
||||||
if (objectHandle.GetTarget(out var target))
|
|
||||||
target.Quit(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,9 +3,10 @@
|
||||||
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using SDL;
|
||||||
using static SDL.SDL3;
|
using static SDL.SDL3;
|
||||||
|
|
||||||
namespace SDL.Tests
|
namespace SDL3.Tests
|
||||||
{
|
{
|
||||||
public sealed unsafe class MyWindow : IDisposable
|
public sealed unsafe class MyWindow : IDisposable
|
||||||
{
|
{
|
||||||
|
|
@ -19,7 +20,7 @@ namespace SDL.Tests
|
||||||
|
|
||||||
public MyWindow()
|
public MyWindow()
|
||||||
{
|
{
|
||||||
if (!SDL_InitSubSystem(init_flags))
|
if (SDL_InitSubSystem(init_flags) < 0)
|
||||||
throw new InvalidOperationException($"failed to initialise SDL. Error: {SDL_GetError()}");
|
throw new InvalidOperationException($"failed to initialise SDL. Error: {SDL_GetError()}");
|
||||||
|
|
||||||
initSuccess = true;
|
initSuccess = true;
|
||||||
|
|
@ -29,7 +30,7 @@ namespace SDL.Tests
|
||||||
|
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
SDL_SetGamepadEventsEnabled(true);
|
SDL_SetGamepadEventsEnabled(SDL_bool.SDL_TRUE);
|
||||||
SDL_SetEventFilter(&nativeFilter, objectHandle.Handle);
|
SDL_SetEventFilter(&nativeFilter, objectHandle.Handle);
|
||||||
|
|
||||||
if (OperatingSystem.IsWindows())
|
if (OperatingSystem.IsWindows())
|
||||||
|
|
@ -37,7 +38,7 @@ namespace SDL.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
|
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
|
||||||
private static SDLBool wndProc(IntPtr userdata, MSG* message)
|
private static SDL_bool wndProc(IntPtr userdata, MSG* message)
|
||||||
{
|
{
|
||||||
var handle = new ObjectHandle<MyWindow>(userdata);
|
var handle = new ObjectHandle<MyWindow>(userdata);
|
||||||
|
|
||||||
|
|
@ -46,23 +47,23 @@ namespace SDL.Tests
|
||||||
Console.WriteLine($"from {window}, message: {message->message}");
|
Console.WriteLine($"from {window}, message: {message->message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return SDL_TRUE; // sample use of definition from SDL3 class, not SDL_bool enum
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable once UseCollectionExpression
|
// ReSharper disable once UseCollectionExpression
|
||||||
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
|
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
|
||||||
private static SDLBool nativeFilter(IntPtr userdata, SDL_Event* e)
|
private static int nativeFilter(IntPtr userdata, SDL_Event* e)
|
||||||
{
|
{
|
||||||
var handle = new ObjectHandle<MyWindow>(userdata);
|
var handle = new ObjectHandle<MyWindow>(userdata);
|
||||||
if (handle.GetTarget(out var window))
|
if (handle.GetTarget(out var window))
|
||||||
return window.handleEventFromFilter(e);
|
return window.handleEventFromFilter(e);
|
||||||
|
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action<SDL_Event>? EventFilter;
|
public Action<SDL_Event>? EventFilter;
|
||||||
|
|
||||||
private bool handleEventFromFilter(SDL_Event* e)
|
private int handleEventFromFilter(SDL_Event* e)
|
||||||
{
|
{
|
||||||
switch (e->Type)
|
switch (e->Type)
|
||||||
{
|
{
|
||||||
|
|
@ -76,12 +77,12 @@ namespace SDL.Tests
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleKeyFromFilter(SDL_KeyboardEvent e)
|
private void handleKeyFromFilter(SDL_KeyboardEvent e)
|
||||||
{
|
{
|
||||||
if (e.key == SDL_Keycode.SDLK_F)
|
if (e.keysym.sym == SDL_Keycode.SDLK_f)
|
||||||
{
|
{
|
||||||
flash = true;
|
flash = true;
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +91,7 @@ namespace SDL.Tests
|
||||||
public void Create()
|
public void Create()
|
||||||
{
|
{
|
||||||
sdlWindowHandle = SDL_CreateWindow("hello"u8, 800, 600, SDL_WindowFlags.SDL_WINDOW_RESIZABLE | SDL_WindowFlags.SDL_WINDOW_HIGH_PIXEL_DENSITY);
|
sdlWindowHandle = SDL_CreateWindow("hello"u8, 800, 600, SDL_WindowFlags.SDL_WINDOW_RESIZABLE | SDL_WindowFlags.SDL_WINDOW_HIGH_PIXEL_DENSITY);
|
||||||
renderer = SDL_CreateRenderer(sdlWindowHandle, (Utf8String)null);
|
renderer = SDL_CreateRenderer(sdlWindowHandle, null, SDL_RendererFlags.SDL_RENDERER_PRESENTVSYNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleEvent(SDL_Event e)
|
private void handleEvent(SDL_Event e)
|
||||||
|
|
@ -102,27 +103,27 @@ namespace SDL.Tests
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_KEY_DOWN:
|
case SDL_EventType.SDL_EVENT_KEY_DOWN:
|
||||||
switch (e.key.key)
|
switch (e.key.keysym.sym)
|
||||||
{
|
{
|
||||||
case SDL_Keycode.SDLK_R:
|
case SDL_Keycode.SDLK_r:
|
||||||
bool old = SDL_GetWindowRelativeMouseMode(sdlWindowHandle);
|
bool old = SDL_GetRelativeMouseMode() == SDL_bool.SDL_TRUE;
|
||||||
SDL_SetWindowRelativeMouseMode(sdlWindowHandle, !old);
|
SDL_SetRelativeMouseMode(old ? SDL_bool.SDL_FALSE : SDL_bool.SDL_TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_V:
|
case SDL_Keycode.SDLK_v:
|
||||||
string? text = SDL_GetClipboardText();
|
string? text = SDL_GetClipboardText();
|
||||||
Console.WriteLine($"clipboard: {text}");
|
Console.WriteLine($"clipboard: {text}");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_F10:
|
case SDL_Keycode.SDLK_F10:
|
||||||
SDL_SetWindowFullscreen(sdlWindowHandle, false);
|
SDL_SetWindowFullscreen(sdlWindowHandle, SDL_bool.SDL_FALSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_F11:
|
case SDL_Keycode.SDLK_F11:
|
||||||
SDL_SetWindowFullscreen(sdlWindowHandle, true);
|
SDL_SetWindowFullscreen(sdlWindowHandle, SDL_bool.SDL_TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_J:
|
case SDL_Keycode.SDLK_j:
|
||||||
{
|
{
|
||||||
using var gamepads = SDL_GetGamepads();
|
using var gamepads = SDL_GetGamepads();
|
||||||
|
|
||||||
|
|
@ -147,21 +148,17 @@ namespace SDL.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_F1:
|
case SDL_Keycode.SDLK_F1:
|
||||||
SDL_StartTextInput(sdlWindowHandle);
|
SDL_StartTextInput();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_F2:
|
case SDL_Keycode.SDLK_F2:
|
||||||
SDL_StopTextInput(sdlWindowHandle);
|
SDL_StopTextInput();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_M:
|
case SDL_Keycode.SDLK_m:
|
||||||
SDL_Keymod mod = e.key.mod;
|
SDL_Keymod mod = e.key.keysym.Mod;
|
||||||
Console.WriteLine(mod);
|
Console.WriteLine(mod);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_E:
|
|
||||||
Console.WriteLine(SDL_GetEventDescription(e));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -174,8 +171,14 @@ namespace SDL.Tests
|
||||||
Console.WriteLine($"gamepad added: {e.gdevice.which}");
|
Console.WriteLine($"gamepad added: {e.gdevice.which}");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_PEN_PROXIMITY_IN:
|
case SDL_EventType.SDL_EVENT_WINDOW_PEN_ENTER:
|
||||||
Console.WriteLine($"pen proximity in: {e.pproximity.which}");
|
SDL_PenCapabilityInfo info;
|
||||||
|
var cap = (SDL_PEN_CAPABILITIES)SDL_GetPenCapabilities((SDL_PenID)e.window.data1, &info);
|
||||||
|
|
||||||
|
if (cap.HasFlag(SDL_PEN_CAPABILITIES.SDL_PEN_AXIS_XTILT_MASK))
|
||||||
|
Console.WriteLine("has pen xtilt axis");
|
||||||
|
|
||||||
|
Console.WriteLine(info.max_tilt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -193,7 +196,7 @@ namespace SDL.Tests
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
eventsRead = SDL_PeepEvents(events, SDL_EventAction.SDL_GETEVENT, SDL_EventType.SDL_EVENT_FIRST, SDL_EventType.SDL_EVENT_LAST);
|
eventsRead = SDL_PeepEvents(events, SDL_eventaction.SDL_GETEVENT, SDL_EventType.SDL_EVENT_FIRST, SDL_EventType.SDL_EVENT_LAST);
|
||||||
for (int i = 0; i < eventsRead; i++)
|
for (int i = 0; i < eventsRead; i++)
|
||||||
handleEvent(events[i]);
|
handleEvent(events[i]);
|
||||||
} while (eventsRead == events_per_peep);
|
} while (eventsRead == events_per_peep);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL.Tests
|
namespace SDL3.Tests
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wrapper on <see cref="GCHandle" /> that supports the <see cref="IDisposable" /> pattern.
|
/// Wrapper on <see cref="GCHandle" /> that supports the <see cref="IDisposable" /> pattern.
|
||||||
|
|
@ -28,7 +28,7 @@ namespace SDL.Tests
|
||||||
|
|
||||||
private GCHandle handle;
|
private GCHandle handle;
|
||||||
|
|
||||||
private readonly bool canFree;
|
private readonly bool fromPointer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wraps the provided object with a <see cref="GCHandle" />, using the given <see cref="GCHandleType" />.
|
/// Wraps the provided object with a <see cref="GCHandle" />, using the given <see cref="GCHandleType" />.
|
||||||
|
|
@ -38,19 +38,18 @@ namespace SDL.Tests
|
||||||
public ObjectHandle(T target, GCHandleType handleType)
|
public ObjectHandle(T target, GCHandleType handleType)
|
||||||
{
|
{
|
||||||
handle = GCHandle.Alloc(target, handleType);
|
handle = GCHandle.Alloc(target, handleType);
|
||||||
canFree = true;
|
fromPointer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Recreates an <see cref="ObjectHandle{T}" /> based on the passed <see cref="IntPtr" />.
|
/// Recreates an <see cref="ObjectHandle{T}" /> based on the passed <see cref="IntPtr" />.
|
||||||
/// If <paramref name="ownsHandle"/> is <c>true</c>, disposing this object will free the handle.
|
/// Disposing this object will not free the handle, the original object must be disposed instead.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="handle"><see cref="Handle"/> from a previously constructed <see cref="ObjectHandle{T}(T, GCHandleType)"/>.</param>
|
/// <param name="handle">Handle.</param>
|
||||||
/// <param name="ownsHandle">Whether this instance owns the underlying <see cref="GCHandle"/>.</param>
|
public ObjectHandle(IntPtr handle)
|
||||||
public ObjectHandle(IntPtr handle, bool ownsHandle = false)
|
|
||||||
{
|
{
|
||||||
this.handle = GCHandle.FromIntPtr(handle);
|
this.handle = GCHandle.FromIntPtr(handle);
|
||||||
canFree = ownsHandle;
|
fromPointer = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -87,7 +86,7 @@ namespace SDL.Tests
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
if (canFree && handle.IsAllocated)
|
if (!fromPointer && handle.IsAllocated)
|
||||||
handle.Free();
|
handle.Free();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,16 @@
|
||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using static SDL.SDL3_image;
|
using SDL;
|
||||||
using static SDL.SDL3_ttf;
|
|
||||||
using static SDL.SDL3_mixer;
|
|
||||||
using static SDL.SDL3;
|
using static SDL.SDL3;
|
||||||
|
|
||||||
namespace SDL.Tests
|
namespace SDL3.Tests
|
||||||
{
|
{
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsWindows())
|
Console.OutputEncoding = Encoding.UTF8;
|
||||||
Console.OutputEncoding = Encoding.UTF8;
|
|
||||||
|
|
||||||
Console.WriteLine($"false is represented as {SDL_OutOfMemory()} (expected 0x{SDLBool.FALSE_VALUE:x2})");
|
|
||||||
Console.WriteLine($"true is represented as {SDL_ClearError()} (expected 0x{SDLBool.TRUE_VALUE:x2})");
|
|
||||||
|
|
||||||
SDL_SetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, "null byte \0 in string"u8);
|
SDL_SetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4, "null byte \0 in string"u8);
|
||||||
Debug.Assert(SDL_GetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4) == "null byte ");
|
Debug.Assert(SDL_GetHint(SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4) == "null byte ");
|
||||||
|
|
@ -28,16 +22,13 @@ namespace SDL.Tests
|
||||||
|
|
||||||
using (var window = new MyWindow())
|
using (var window = new MyWindow())
|
||||||
{
|
{
|
||||||
// Check if satellite libraries exist.
|
Console.WriteLine($"SDL revision: {SDL_GetRevision()}");
|
||||||
Console.WriteLine($"SDL revision: {SDL_GetRevision()}, IMG {IMG_Version()}, TTF {TTF_Version()}, Mixer {MIX_Version()}");
|
|
||||||
|
|
||||||
printDisplays();
|
printDisplays();
|
||||||
|
|
||||||
window.Setup();
|
window.Setup();
|
||||||
window.Create();
|
window.Create();
|
||||||
|
|
||||||
printWindows();
|
|
||||||
|
|
||||||
const SDL_Keymod state = SDL_Keymod.SDL_KMOD_CAPS | SDL_Keymod.SDL_KMOD_ALT;
|
const SDL_Keymod state = SDL_Keymod.SDL_KMOD_CAPS | SDL_Keymod.SDL_KMOD_ALT;
|
||||||
SDL_SetModState(state);
|
SDL_SetModState(state);
|
||||||
Debug.Assert(SDL_GetModState() == state);
|
Debug.Assert(SDL_GetModState() == state);
|
||||||
|
|
@ -70,17 +61,5 @@ namespace SDL.Tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static unsafe void printWindows()
|
|
||||||
{
|
|
||||||
using var windows = SDL_GetWindows();
|
|
||||||
if (windows == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int i = 0; i < windows.Count; i++)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"Window {i} title: {SDL_GetWindowTitle(windows[i])}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RootNamespace>SDL.Tests</RootNamespace>
|
<RootNamespace>SDL3.Tests</RootNamespace>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<GenerateProgramFile>false</GenerateProgramFile>
|
<GenerateProgramFile>false</GenerateProgramFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="NuGet">
|
|
||||||
<IsPackable>false</IsPackable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
|
||||||
<PackageReference Include="NUnit" Version="3.13.3"/>
|
<PackageReference Include="NUnit" Version="3.13.3"/>
|
||||||
|
|
@ -22,16 +18,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\SDL3-CS\SDL3-CS.csproj"/>
|
<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" Condition="Exists('..\External\SDL_image\test\sample.png')">
|
|
||||||
<Link>sample.png</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
// 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.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class TestClipboard
|
|
||||||
{
|
|
||||||
[SetUp]
|
|
||||||
public void SetUp()
|
|
||||||
{
|
|
||||||
cleanups = 0;
|
|
||||||
requestedMimeTypes.Clear();
|
|
||||||
SDL3.SDL_Init(SDL_InitFlags.SDL_INIT_VIDEO);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TearDown]
|
|
||||||
public void TearDown() => SDL3.SDL_Quit();
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestClipboardData()
|
|
||||||
{
|
|
||||||
var ret = SDL3.SDL_SetClipboardData(&dataCallback, &cleanupCallback, IntPtr.Zero, "test/one", "test/two");
|
|
||||||
Assert.That(ret, SDL3.SDL_GetError);
|
|
||||||
|
|
||||||
Assert.That(SDL3.SDL_HasClipboardData("test/one"));
|
|
||||||
Assert.That(SDL3.SDL_HasClipboardData("test/two"));
|
|
||||||
Assert.That(!SDL3.SDL_HasClipboardData("test/three"));
|
|
||||||
|
|
||||||
UIntPtr size;
|
|
||||||
IntPtr data = SDL3.SDL_GetClipboardData("test/one", &size);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assert.That(data, Is.EqualTo(IntPtr.Zero));
|
|
||||||
Assert.That(size, Is.EqualTo(my_length));
|
|
||||||
Assert.That(requestedMimeTypes.Dequeue(), Is.EqualTo("test/one"));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
SDL3.SDL_free(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = SDL3.SDL_ClearClipboardData();
|
|
||||||
Assert.That(ret, SDL3.SDL_GetError);
|
|
||||||
|
|
||||||
Assert.That(cleanups, Is.EqualTo(1));
|
|
||||||
|
|
||||||
Assert.That(!SDL3.SDL_HasClipboardData("test/one"));
|
|
||||||
Assert.That(!SDL3.SDL_HasClipboardData("test/two"));
|
|
||||||
Assert.That(!SDL3.SDL_HasClipboardData("test/three"));
|
|
||||||
|
|
||||||
data = SDL3.SDL_GetClipboardData("test/two", &size);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assert.That(data, Is.EqualTo(IntPtr.Zero));
|
|
||||||
Assert.That(size, Is.EqualTo((UIntPtr)0));
|
|
||||||
Assert.That(requestedMimeTypes, Has.Count.EqualTo(0));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
SDL3.SDL_free(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static readonly Queue<string?> requestedMimeTypes = [];
|
|
||||||
private static int cleanups;
|
|
||||||
|
|
||||||
private const UIntPtr my_length = 17;
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static unsafe IntPtr dataCallback(IntPtr userdata, byte* mimeType, UIntPtr* length)
|
|
||||||
{
|
|
||||||
requestedMimeTypes.Enqueue(SDL3.PtrToStringUTF8(mimeType));
|
|
||||||
|
|
||||||
*length = my_length;
|
|
||||||
return IntPtr.Zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static void cleanupCallback(IntPtr userdata)
|
|
||||||
{
|
|
||||||
cleanups++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
// 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"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
// 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_image;
|
|
||||||
using static SDL.SDL3;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
public unsafe class TestImage
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void TestBasic()
|
|
||||||
{
|
|
||||||
SDL_Init(0);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assert.That(IMG_Version(), Is.EqualTo(SDL_IMAGE_VERSION));
|
|
||||||
|
|
||||||
Assume.That("sample.png", Does.Exist);
|
|
||||||
var image = IMG_Load("sample.png");
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assert.That(image != null, SDL_GetError);
|
|
||||||
Assert.That(image->w, Is.EqualTo(23));
|
|
||||||
Assert.That(image->h, Is.EqualTo(42));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
SDL_DestroySurface(image);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
SDL_Quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
// 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 TestInterface
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestIOInterface()
|
|
||||||
{
|
|
||||||
SDL_IOStreamInterface iface;
|
|
||||||
|
|
||||||
SDL3.SDL_INIT_INTERFACE(out iface);
|
|
||||||
|
|
||||||
Assert.That(iface.version, Is.EqualTo(sizeof(SDL_IOStreamInterface)));
|
|
||||||
Assert.That(iface.size == null);
|
|
||||||
Assert.That(iface.seek == null);
|
|
||||||
Assert.That(iface.read == null);
|
|
||||||
Assert.That(iface.write == null);
|
|
||||||
Assert.That(iface.flush == null);
|
|
||||||
Assert.That(iface.close == null);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestIOInterfaceManual()
|
|
||||||
{
|
|
||||||
SDL_IOStreamInterface iface = new SDL_IOStreamInterface
|
|
||||||
{
|
|
||||||
version = (uint)sizeof(SDL_IOStreamInterface),
|
|
||||||
};
|
|
||||||
|
|
||||||
Assert.That(iface.version, Is.EqualTo(sizeof(SDL_IOStreamInterface)));
|
|
||||||
Assert.That(iface.size == null);
|
|
||||||
Assert.That(iface.seek == null);
|
|
||||||
Assert.That(iface.read == null);
|
|
||||||
Assert.That(iface.write == null);
|
|
||||||
Assert.That(iface.flush == null);
|
|
||||||
Assert.That(iface.close == null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
// 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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,139 +0,0 @@
|
||||||
// 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.Drawing;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using static SDL.SDL3;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
[Explicit("Uses an interactive window.")]
|
|
||||||
public unsafe class TestPositionalInputVisualisation : MainCallbacksTest
|
|
||||||
{
|
|
||||||
private SDL_Window* window;
|
|
||||||
private SDL_Renderer* renderer;
|
|
||||||
|
|
||||||
protected override SDL_AppResult Init()
|
|
||||||
{
|
|
||||||
// decouple pen, mouse and touch events
|
|
||||||
SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
|
|
||||||
SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
|
|
||||||
|
|
||||||
SDL_Init(SDL_InitFlags.SDL_INIT_VIDEO);
|
|
||||||
|
|
||||||
window = SDL_CreateWindow(nameof(TestPositionalInputVisualisation), 1800, 950, SDL_WindowFlags.SDL_WINDOW_RESIZABLE | SDL_WindowFlags.SDL_WINDOW_HIGH_PIXEL_DENSITY);
|
|
||||||
renderer = SDL_CreateRenderer(window, (Utf8String)null);
|
|
||||||
|
|
||||||
return base.Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly SortedDictionary<(SDL_TouchID TouchID, SDL_FingerID FingerID), PointF> activeTouches = new SortedDictionary<(SDL_TouchID TouchID, SDL_FingerID FingerID), PointF>();
|
|
||||||
private readonly SortedDictionary<SDL_MouseID, PointF> activeMice = new SortedDictionary<SDL_MouseID, PointF>();
|
|
||||||
private readonly SortedDictionary<SDL_PenID, PointF> activePens = new SortedDictionary<SDL_PenID, PointF>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets a random, but stable color for this object.
|
|
||||||
/// </summary>
|
|
||||||
private void setColor(object o, byte alpha)
|
|
||||||
{
|
|
||||||
int color = o.ToString()?.GetHashCode() ?? 0;
|
|
||||||
byte b1 = (byte)color;
|
|
||||||
byte b2 = (byte)(color / 256);
|
|
||||||
byte b3 = (byte)(color / 256 / 256);
|
|
||||||
SDL_SetRenderDrawColor(renderer, b1, b2, b3, alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void fillRect(RectangleF rect)
|
|
||||||
{
|
|
||||||
var r = new SDL_FRect { x = rect.X, y = rect.Y, h = rect.Height, w = rect.Width };
|
|
||||||
SDL_RenderFillRect(renderer, &r);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override SDL_AppResult Iterate()
|
|
||||||
{
|
|
||||||
const float gray = 0.1f;
|
|
||||||
SDL_SetRenderDrawColorFloat(renderer, gray, gray, gray, 1.0f);
|
|
||||||
SDL_RenderClear(renderer);
|
|
||||||
|
|
||||||
// mice are horizontal lines: -
|
|
||||||
foreach (var p in activeMice)
|
|
||||||
{
|
|
||||||
setColor(p.Key, 200);
|
|
||||||
RectangleF rect = new RectangleF(p.Value, SizeF.Empty);
|
|
||||||
rect.Inflate(50, 20);
|
|
||||||
fillRect(rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fingers are vertical lines: |
|
|
||||||
foreach (var p in activeTouches)
|
|
||||||
{
|
|
||||||
setColor(p.Key, 200);
|
|
||||||
RectangleF rect = new RectangleF(p.Value, SizeF.Empty);
|
|
||||||
rect.Inflate(20, 50);
|
|
||||||
fillRect(rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
// pens are squares: □
|
|
||||||
foreach (var p in activePens)
|
|
||||||
{
|
|
||||||
setColor(p.Key, 200);
|
|
||||||
RectangleF rect = new RectangleF(p.Value, SizeF.Empty);
|
|
||||||
rect.Inflate(30, 30);
|
|
||||||
fillRect(rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
SDL_RenderPresent(renderer);
|
|
||||||
|
|
||||||
return base.Iterate();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override SDL_AppResult Event(SDL_Event e)
|
|
||||||
{
|
|
||||||
SDL_ConvertEventToRenderCoordinates(renderer, &e);
|
|
||||||
|
|
||||||
switch (e.Type)
|
|
||||||
{
|
|
||||||
case SDL_EventType.SDL_EVENT_MOUSE_MOTION:
|
|
||||||
activeMice[e.motion.which] = new PointF(e.motion.x, e.motion.y);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_MOUSE_REMOVED:
|
|
||||||
activeMice.Remove(e.mdevice.which);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_FINGER_DOWN:
|
|
||||||
case SDL_EventType.SDL_EVENT_FINGER_MOTION:
|
|
||||||
activeTouches[(e.tfinger.touchID, e.tfinger.fingerID)] = new PointF(e.tfinger.x, e.tfinger.y);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_FINGER_UP:
|
|
||||||
activeTouches.Remove((e.tfinger.touchID, e.tfinger.fingerID));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_PEN_MOTION:
|
|
||||||
activePens[e.pmotion.which] = new PointF(e.pmotion.x, e.pmotion.y);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_EventType.SDL_EVENT_KEY_DOWN:
|
|
||||||
switch (e.key.key)
|
|
||||||
{
|
|
||||||
case SDL_Keycode.SDLK_R:
|
|
||||||
SDL_SetWindowRelativeMouseMode(window, !SDL_GetWindowRelativeMouseMode(window));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_F:
|
|
||||||
SDL_SetWindowFullscreen(window, true);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SDL_Keycode.SDLK_W:
|
|
||||||
SDL_SetWindowFullscreen(window, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return base.Event(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
||||||
// 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.Runtime.InteropServices;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class TestSDLArray
|
|
||||||
{
|
|
||||||
private static unsafe T* CopyToSdl<T>(T[] array)
|
|
||||||
where T : unmanaged
|
|
||||||
{
|
|
||||||
UIntPtr size = (UIntPtr)(Marshal.SizeOf<T>() * array.Length);
|
|
||||||
IntPtr target = SDL3.SDL_malloc(size);
|
|
||||||
|
|
||||||
fixed (T* source = array)
|
|
||||||
{
|
|
||||||
SDL3.SDL_memcpy(target, (IntPtr)source, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (T*)target;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static unsafe T** CopyToSdl<T>(T*[] array)
|
|
||||||
where T : unmanaged
|
|
||||||
{
|
|
||||||
UIntPtr size = (UIntPtr)(sizeof(IntPtr) * array.Length);
|
|
||||||
IntPtr target = SDL3.SDL_malloc(size);
|
|
||||||
|
|
||||||
fixed (T** source = array)
|
|
||||||
{
|
|
||||||
SDL3.SDL_memcpy(target, (IntPtr)source, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (T**)target;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestArrayEnumerator()
|
|
||||||
{
|
|
||||||
int[] values = [10, 20, 30, 40];
|
|
||||||
int* sdlMemory = CopyToSdl(values);
|
|
||||||
|
|
||||||
using var array = new SDLArray<int>(sdlMemory, values.Length);
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
foreach (int i in array)
|
|
||||||
{
|
|
||||||
Assert.AreEqual(values[index++], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestConstOpaquePointerArrayEnumerator()
|
|
||||||
{
|
|
||||||
int a = 10, b = 20, c = 30, d = 40;
|
|
||||||
int*[] values = [&a, &b, &c, &d];
|
|
||||||
int** sdlMemory = null;
|
|
||||||
|
|
||||||
// Const pointer arrays are not freed automatically. Since the
|
|
||||||
// unit test owns the memory, this must be done at the end of the
|
|
||||||
// test.
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
sdlMemory = CopyToSdl(values);
|
|
||||||
|
|
||||||
var array = new SDLConstOpaquePointerArray<int>(sdlMemory, values.Length);
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
foreach (int* i in array)
|
|
||||||
{
|
|
||||||
Assert.AreEqual((IntPtr)values[index++], (IntPtr)i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (sdlMemory != null)
|
|
||||||
SDL3.SDL_free(sdlMemory);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestOpaquePointerArrayEnumerator()
|
|
||||||
{
|
|
||||||
int a = 10, b = 20, c = 30, d = 40;
|
|
||||||
int*[] values = [&a, &b, &c, &d];
|
|
||||||
int** sdlMemory = CopyToSdl(values);
|
|
||||||
|
|
||||||
using var array = new SDLOpaquePointerArray<int>(sdlMemory, values.Length);
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
foreach (int* i in array)
|
|
||||||
{
|
|
||||||
Assert.AreEqual((IntPtr)values[index++], (IntPtr)i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public unsafe void TestPointerArrayEnumerator()
|
|
||||||
{
|
|
||||||
int a = 10, b = 20, c = 30, d = 40;
|
|
||||||
int*[] values = [&a, &b, &c, &d];
|
|
||||||
int** memory = CopyToSdl(values);
|
|
||||||
|
|
||||||
using var array = new SDLPointerArray<int>(memory, values.Length);
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
foreach (int i in array)
|
|
||||||
{
|
|
||||||
Assert.AreEqual(*values[index++], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
// 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.Collections;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class TestSDLBool
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void TestFalse()
|
|
||||||
{
|
|
||||||
Assert.That((bool)SDL3.SDL_OutOfMemory(), Is.EqualTo(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestTrue()
|
|
||||||
{
|
|
||||||
Assert.That((bool)SDL3.SDL_ClearError(), Is.EqualTo(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestStoreLoad([Values] bool value)
|
|
||||||
{
|
|
||||||
var props = SDL3.SDL_CreateProperties();
|
|
||||||
Assume.That(props, Is.Not.EqualTo(0));
|
|
||||||
|
|
||||||
bool ret = SDL3.SDL_SetBooleanProperty(props, "test", value);
|
|
||||||
Assume.That(ret, Is.EqualTo(true));
|
|
||||||
|
|
||||||
Assert.That((bool)SDL3.SDL_GetBooleanProperty(props, "test", !value), Is.EqualTo(value));
|
|
||||||
|
|
||||||
SDL3.SDL_DestroyProperties(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IEnumerable BoolCases()
|
|
||||||
{
|
|
||||||
SDLBool[] values = [new SDLBool(4), true, false];
|
|
||||||
|
|
||||||
foreach (var x in values)
|
|
||||||
{
|
|
||||||
foreach (var y in values)
|
|
||||||
{
|
|
||||||
yield return new object[] { x, y };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCaseSource(typeof(TestSDLBool), nameof(BoolCases))]
|
|
||||||
public void TestEquals(SDLBool first, SDLBool second)
|
|
||||||
{
|
|
||||||
Assert.That((SDLBool)(bool)first, Is.EqualTo(first));
|
|
||||||
|
|
||||||
Assert.That(first.Equals(second), Is.EqualTo((bool)first == (bool)second));
|
|
||||||
Assert.That(first == second, Is.EqualTo((bool)first == (bool)second));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
// 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_ttf;
|
|
||||||
using static SDL.SDL3;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
public unsafe class TestTTF
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void TestBasic()
|
|
||||||
{
|
|
||||||
SDL_Init(0);
|
|
||||||
|
|
||||||
bool init = TTF_Init();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assert.That(init, Is.True, SDL_GetError);
|
|
||||||
Assert.That(TTF_Version(), Is.EqualTo(SDL_TTF_VERSION));
|
|
||||||
|
|
||||||
Assume.That(@"C:\Windows\Fonts\times.ttf", Does.Exist);
|
|
||||||
var font = TTF_OpenFont(@"C:\Windows\Fonts\times.ttf", 12f);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Assert.That(font != null, SDL_GetError);
|
|
||||||
Assert.That(TTF_GetFontFamilyName(font), Is.EqualTo("Times New Roman"));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
TTF_CloseFont(font);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
TTF_Quit();
|
|
||||||
SDL_Quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
// 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;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
[Explicit("Uses an interactive tray icon.")]
|
|
||||||
public unsafe class TestTray : TrayTest
|
|
||||||
{
|
|
||||||
private volatile bool running;
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestBasic()
|
|
||||||
{
|
|
||||||
var checkbox = SDL_InsertTrayEntryAt(RootMenu, -1, "Check box?", SDL_TrayEntryFlags.SDL_TRAYENTRY_CHECKBOX);
|
|
||||||
Assert.That(checkbox != null, SDL_GetError);
|
|
||||||
SetCallback(checkbox, () => Console.WriteLine("Checkbox was toggled."));
|
|
||||||
|
|
||||||
var separator = SDL_InsertTrayEntryAt(RootMenu, -1, (byte*)null, 0);
|
|
||||||
Assert.That(separator != null, SDL_GetError);
|
|
||||||
|
|
||||||
var exit = SDL_InsertTrayEntryAt(RootMenu, -1, "Exit tray", SDL_TrayEntryFlags.SDL_TRAYENTRY_BUTTON);
|
|
||||||
Assert.That(exit != null, SDL_GetError);
|
|
||||||
SetCallback(exit, () => running = false);
|
|
||||||
|
|
||||||
var entries = SDL_GetTrayEntries(RootMenu);
|
|
||||||
Assert.That(entries, Is.Not.Null, SDL_GetError);
|
|
||||||
Assert.That(entries!.Count, Is.EqualTo(3));
|
|
||||||
|
|
||||||
for (int i = 0; i < entries.Count; i++)
|
|
||||||
Console.WriteLine($"{i}. {SDL_GetTrayEntryLabel(entries[i]) ?? "<null>"}");
|
|
||||||
|
|
||||||
running = true;
|
|
||||||
|
|
||||||
while (running)
|
|
||||||
{
|
|
||||||
SDL_PumpEvents();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,9 @@
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using SDL;
|
||||||
|
|
||||||
namespace SDL.Tests
|
namespace SDL3.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestUtf8String
|
public class TestUtf8String
|
||||||
|
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
// 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.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace SDL.Tests
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public abstract unsafe class TrayTest
|
|
||||||
{
|
|
||||||
private SDL_Tray* tray;
|
|
||||||
protected SDL_TrayMenu* RootMenu { get; private set; }
|
|
||||||
|
|
||||||
[SetUp]
|
|
||||||
public void SetUp()
|
|
||||||
{
|
|
||||||
Assert.That(SDL3.SDL_Init(SDL_InitFlags.SDL_INIT_VIDEO), SDL3.SDL_GetError);
|
|
||||||
tray = SDL3.SDL_CreateTray(null, "Test tray");
|
|
||||||
Assert.That(tray != null, SDL3.SDL_GetError);
|
|
||||||
RootMenu = SDL3.SDL_CreateTrayMenu(tray);
|
|
||||||
Assert.That(RootMenu != null, SDL3.SDL_GetError);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static void SetCallback(SDL_TrayEntry* entry, Action callback)
|
|
||||||
{
|
|
||||||
var objectHandle = new ObjectHandle<Action>(callback, GCHandleType.Normal);
|
|
||||||
SDL3.SDL_SetTrayEntryCallback(entry, &nativeOnSelect, objectHandle.Handle); // this is leaking object handles, fine for tests
|
|
||||||
}
|
|
||||||
|
|
||||||
[UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])]
|
|
||||||
private static void nativeOnSelect(IntPtr userdata, SDL_TrayEntry* entry)
|
|
||||||
{
|
|
||||||
var objectHandle = new ObjectHandle<Action>(userdata, true);
|
|
||||||
|
|
||||||
if (objectHandle.GetTarget(out var action))
|
|
||||||
action();
|
|
||||||
else
|
|
||||||
Assert.Fail("Accessing disposed object handle.");
|
|
||||||
}
|
|
||||||
|
|
||||||
[TearDown]
|
|
||||||
public void TearDown()
|
|
||||||
{
|
|
||||||
if (tray != null)
|
|
||||||
SDL3.SDL_DestroyTray(tray);
|
|
||||||
|
|
||||||
SDL3.SDL_Quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"solution": {
|
|
||||||
"path": "SDL3-CS.sln",
|
|
||||||
"projects": [
|
|
||||||
"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\\SDL3-CS.csproj",
|
|
||||||
"SDL3_image-CS\\SDL3_image-CS.csproj",
|
|
||||||
"SDL3_mixer-CS\\SDL3_mixer-CS.csproj",
|
|
||||||
"SDL3_ttf-CS\\SDL3_ttf-CS.csproj"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
40
SDL3-CS.sln
40
SDL3-CS.sln
|
|
@ -19,17 +19,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDL3-CS.SourceGeneration",
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDL3-CS.Tests", "SDL3-CS.Tests\SDL3-CS.Tests.csproj", "{CF980481-8227-4BED-970E-6433C83F64CB}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDL3-CS.Tests", "SDL3-CS.Tests\SDL3-CS.Tests.csproj", "{CF980481-8227-4BED-970E-6433C83F64CB}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL3-CS.Tests.Android", "SDL3-CS.Tests.Android\SDL3-CS.Tests.Android.csproj", "{E8469DA5-E437-4287-9E2A-8B8F4DC21C1A}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL3-CS.Android", "SDL3-CS.Android\SDL3-CS.Android.csproj", "{CA28F49C-D0BE-47D6-9E82-7A0B8C380B8B}"
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL3-CS.Tests.iOS", "SDL3-CS.Tests.iOS\SDL3-CS.Tests.iOS.csproj", "{CCDD11EE-D552-4925-8B68-351AC9317589}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL3-CS.Tests.Desktop", "SDL3-CS.Tests.Desktop\SDL3-CS.Tests.Desktop.csproj", "{7E8D719A-5B69-43B7-A9D5-385B6FE7F411}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDL3_ttf-CS", "SDL3_ttf-CS\SDL3_ttf-CS.csproj", "{8E37EB82-ACC4-4656-A6E5-DB298AE72066}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDL3_image-CS", "SDL3_image-CS\SDL3_image-CS.csproj", "{A0D6FC5F-BA26-4298-ABF0-234D2481E323}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL3_mixer-CS", "SDL3_mixer-CS\SDL3_mixer-CS.csproj", "{421748C4-B51F-4B00-9637-566DBFD96E02}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
@ -49,30 +39,10 @@ Global
|
||||||
{CF980481-8227-4BED-970E-6433C83F64CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{CF980481-8227-4BED-970E-6433C83F64CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{CF980481-8227-4BED-970E-6433C83F64CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{CF980481-8227-4BED-970E-6433C83F64CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{CF980481-8227-4BED-970E-6433C83F64CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
{CF980481-8227-4BED-970E-6433C83F64CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{E8469DA5-E437-4287-9E2A-8B8F4DC21C1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{CA28F49C-D0BE-47D6-9E82-7A0B8C380B8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E8469DA5-E437-4287-9E2A-8B8F4DC21C1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{CA28F49C-D0BE-47D6-9E82-7A0B8C380B8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E8469DA5-E437-4287-9E2A-8B8F4DC21C1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{CA28F49C-D0BE-47D6-9E82-7A0B8C380B8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E8469DA5-E437-4287-9E2A-8B8F4DC21C1A}.Release|Any CPU.Build.0 = Release|Any CPU
|
{CA28F49C-D0BE-47D6-9E82-7A0B8C380B8B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{CCDD11EE-D552-4925-8B68-351AC9317589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{CCDD11EE-D552-4925-8B68-351AC9317589}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{CCDD11EE-D552-4925-8B68-351AC9317589}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{CCDD11EE-D552-4925-8B68-351AC9317589}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{7E8D719A-5B69-43B7-A9D5-385B6FE7F411}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{7E8D719A-5B69-43B7-A9D5-385B6FE7F411}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{7E8D719A-5B69-43B7-A9D5-385B6FE7F411}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{7E8D719A-5B69-43B7-A9D5-385B6FE7F411}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8E37EB82-ACC4-4656-A6E5-DB298AE72066}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8E37EB82-ACC4-4656-A6E5-DB298AE72066}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8E37EB82-ACC4-4656-A6E5-DB298AE72066}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8E37EB82-ACC4-4656-A6E5-DB298AE72066}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{A0D6FC5F-BA26-4298-ABF0-234D2481E323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{A0D6FC5F-BA26-4298-ABF0-234D2481E323}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{A0D6FC5F-BA26-4298-ABF0-234D2481E323}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{A0D6FC5F-BA26-4298-ABF0-234D2481E323}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{421748C4-B51F-4B00-9637-566DBFD96E02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{421748C4-B51F-4B00-9637-566DBFD96E02}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{421748C4-B51F-4B00-9637-566DBFD96E02}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{421748C4-B51F-4B00-9637-566DBFD96E02}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
||||||
|
|
@ -785,6 +785,5 @@ See the LICENCE file in the repository root for full licence text.
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002EMemberReordering_002EMigrations_002ECSharpFileLayoutPatternRemoveIsAttributeUpgrade/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
Binary file not shown.
|
|
@ -1,29 +0,0 @@
|
||||||
// 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; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -4,8 +4,3 @@
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
[assembly: InternalsVisibleTo("SDL3-CS.Tests")]
|
[assembly: InternalsVisibleTo("SDL3-CS.Tests")]
|
||||||
|
|
||||||
// Allow access to internal CodeGen members (e.g. NativeTypeNameAttribute, etc.) for SDL sister projects:
|
|
||||||
[assembly: InternalsVisibleTo("SDL3_ttf-CS")]
|
|
||||||
[assembly: InternalsVisibleTo("SDL3_image-CS")]
|
|
||||||
[assembly: InternalsVisibleTo("SDL3_mixer-CS")]
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
diff --git a/include/SDL3/SDL.h b/include/SDL3/SDL.h
|
||||||
|
index 6cda579f7..bc2952a4e 100644
|
||||||
|
--- a/include/SDL3/SDL.h
|
||||||
|
+++ b/include/SDL3/SDL.h
|
||||||
|
@@ -28,6 +28,8 @@
|
||||||
|
#ifndef SDL_h_
|
||||||
|
#define SDL_h_
|
||||||
|
|
||||||
|
+#error Don't build with enum type changes
|
||||||
|
+
|
||||||
|
#include <SDL3/SDL_stdinc.h>
|
||||||
|
#include <SDL3/SDL_assert.h>
|
||||||
|
#include <SDL3/SDL_atomic.h>
|
||||||
|
diff --git a/include/SDL3/SDL_log.h b/include/SDL3/SDL_log.h
|
||||||
|
index 3ded311ff..42760135f 100644
|
||||||
|
--- a/include/SDL3/SDL_log.h
|
||||||
|
+++ b/include/SDL3/SDL_log.h
|
||||||
|
@@ -372,7 +372,7 @@ extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
|
||||||
|
*
|
||||||
|
* \since This datatype is available since SDL 3.0.0.
|
||||||
|
*/
|
||||||
|
-typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||||
|
+typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, SDL_LogCategory category, SDL_LogPriority priority, const char *message);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current log output function.
|
||||||
|
diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
|
||||||
|
index 00a54a139..847b50ecb 100644
|
||||||
|
--- a/include/SDL3/SDL_stdinc.h
|
||||||
|
+++ b/include/SDL3/SDL_stdinc.h
|
||||||
|
@@ -146,7 +146,7 @@ void *alloca(size_t);
|
||||||
|
*
|
||||||
|
* \sa SDL_bool
|
||||||
|
*/
|
||||||
|
-#define SDL_FALSE 0
|
||||||
|
+#define SDL_FALSE (SDL_bool)0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A boolean true.
|
||||||
|
@@ -155,7 +155,7 @@ void *alloca(size_t);
|
||||||
|
*
|
||||||
|
* \sa SDL_bool
|
||||||
|
*/
|
||||||
|
-#define SDL_TRUE 1
|
||||||
|
+#define SDL_TRUE (SDL_bool)1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A boolean type: true or false.
|
||||||
|
|
||||||
|
base-commit: 0429f5d6a36fc35b551bcc2acd4a40c2db6dab82
|
||||||
|
--
|
||||||
|
2.40.0.windows.1
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RootNamespace>SDL</RootNamespace>
|
<RootNamespace>SDL</RootNamespace>
|
||||||
<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>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<NoWarn>$(NoWarn);SYSLIB1054;CA1401</NoWarn>
|
<NoWarn>$(NoWarn);SYSLIB1054;CA1401</NoWarn>
|
||||||
<DefineConstants>$(DefineConstants);JETBRAINS_ANNOTATIONS</DefineConstants>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="NuGet">
|
<PropertyGroup Label="NuGet">
|
||||||
|
|
@ -17,90 +14,61 @@
|
||||||
<Copyright>Copyright (c) 2024 ppy Pty Ltd</Copyright>
|
<Copyright>Copyright (c) 2024 ppy Pty Ltd</Copyright>
|
||||||
<Product>ppy.SDL3-CS</Product>
|
<Product>ppy.SDL3-CS</Product>
|
||||||
<PackageId>ppy.SDL3-CS</PackageId>
|
<PackageId>ppy.SDL3-CS</PackageId>
|
||||||
<PackageTags>SDL;SDL3;SDL3-CS</PackageTags>
|
|
||||||
<PackageReleaseNotes>Automated release.</PackageReleaseNotes>
|
<PackageReleaseNotes>Automated release.</PackageReleaseNotes>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<PackageProjectUrl>https://github.com/ppy/SDL3-CS</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/ppy/SDL3-CS</PackageProjectUrl>
|
||||||
<PackageReadmeFile>README_nuget.md</PackageReadmeFile>
|
|
||||||
<RepositoryUrl>https://github.com/ppy/SDL3-CS</RepositoryUrl>
|
<RepositoryUrl>https://github.com/ppy/SDL3-CS</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\README_nuget.md" Pack="true" PackagePath="\"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\SDL3-CS.SourceGeneration\SDL3-CS.SourceGeneration.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
<ProjectReference Include="..\SDL3-CS.SourceGeneration\SDL3-CS.SourceGeneration.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="libclang" Version="17.0.4">
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
|
|
||||||
<PackageReference Include="libClangSharp" Version="17.0.4">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\win-x64\SDL3.dll">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\win-x64\SDL3.dll">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/win-x64/native</PackagePath>
|
<PackagePath>runtimes/win-x64/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\win-arm64\SDL3.dll">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\win-arm64\SDL3.dll">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/win-arm64/native</PackagePath>
|
<PackagePath>runtimes/win-arm64/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\win-x86\SDL3.dll">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\win-x86\SDL3.dll">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/win-x86/native</PackagePath>
|
<PackagePath>runtimes/win-x86/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\osx-x64\libSDL3.dylib">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\osx-x64\libSDL3.dylib">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/osx-x64/native</PackagePath>
|
<PackagePath>runtimes/osx-x64/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\osx-arm64\libSDL3.dylib">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\osx-arm64\libSDL3.dylib">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/osx-arm64/native</PackagePath>
|
<PackagePath>runtimes/osx-arm64/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\linux-x64\libSDL3.so">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\linux-x64\libSDL3.so">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/linux-x64/native</PackagePath>
|
<PackagePath>runtimes/linux-x64/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\linux-x86\libSDL3.so">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\linux-x86\libSDL3.so">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
<PackagePath>runtimes/linux-x86/native</PackagePath>
|
<PackagePath>runtimes/linux-x86/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\linux-arm64\libSDL3.so">
|
<Content Include="$(MSBuildThisFileDirectory)..\native\ios\**\*">
|
||||||
<PackagePath>runtimes/linux-arm64/native</PackagePath>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<PackagePath>runtimes/ios/native</PackagePath>
|
||||||
<Pack>true</Pack>
|
<Pack>true</Pack>
|
||||||
</None>
|
</Content>
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\linux-arm\libSDL3.so">
|
|
||||||
<PackagePath>runtimes/linux-arm/native</PackagePath>
|
|
||||||
<Pack>true</Pack>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\ios\SDL3.xcframework\**\*">
|
|
||||||
<PackagePath>runtimes/ios/native/SDL3.xcframework</PackagePath>
|
|
||||||
<Pack>true</Pack>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\armeabi-v7a\libSDL3.so">
|
|
||||||
<PackagePath>runtimes/android-arm/native</PackagePath>
|
|
||||||
<Pack>true</Pack>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\arm64-v8a\libSDL3.so">
|
|
||||||
<PackagePath>runtimes/android-arm64/native</PackagePath>
|
|
||||||
<Pack>true</Pack>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\x86_64\libSDL3.so">
|
|
||||||
<PackagePath>runtimes/android-x64/native</PackagePath>
|
|
||||||
<Pack>true</Pack>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)..\native\android\x86\libSDL3.so">
|
|
||||||
<PackagePath>runtimes/android-x86/native</PackagePath>
|
|
||||||
<Pack>true</Pack>
|
|
||||||
</None>
|
|
||||||
<EmbeddedJar Include="Jars\SDL3AndroidBridge.jar"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
||||||
/*
|
|
||||||
<auto-generated/>
|
|
||||||
C# bindings for Simple DirectMedia Layer.
|
|
||||||
Original copyright notice of input files:
|
|
||||||
|
|
||||||
Simple DirectMedia Layer
|
|
||||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
|
||||||
warranty. In no event will the authors be held liable for any damages
|
|
||||||
arising from the use of this software.
|
|
||||||
|
|
||||||
Permission is granted to anyone to use this software for any purpose,
|
|
||||||
including commercial applications, and to alter it and redistribute it
|
|
||||||
freely, subject to the following restrictions:
|
|
||||||
|
|
||||||
1. The origin of this software must not be misrepresented; you must not
|
|
||||||
claim that you wrote the original software. If you use this software
|
|
||||||
in a product, an acknowledgment in the product documentation would be
|
|
||||||
appreciated but is not required.
|
|
||||||
2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
misrepresented as being the original software.
|
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace SDL
|
|
||||||
{
|
|
||||||
public partial struct SDL_AsyncIO
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum SDL_AsyncIOTaskType
|
|
||||||
{
|
|
||||||
SDL_ASYNCIO_TASK_READ,
|
|
||||||
SDL_ASYNCIO_TASK_WRITE,
|
|
||||||
SDL_ASYNCIO_TASK_CLOSE,
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum SDL_AsyncIOResult
|
|
||||||
{
|
|
||||||
SDL_ASYNCIO_COMPLETE,
|
|
||||||
SDL_ASYNCIO_FAILURE,
|
|
||||||
SDL_ASYNCIO_CANCELED,
|
|
||||||
}
|
|
||||||
|
|
||||||
public unsafe partial struct SDL_AsyncIOOutcome
|
|
||||||
{
|
|
||||||
public SDL_AsyncIO* asyncio;
|
|
||||||
|
|
||||||
public SDL_AsyncIOTaskType type;
|
|
||||||
|
|
||||||
public SDL_AsyncIOResult result;
|
|
||||||
|
|
||||||
[NativeTypeName("void*")]
|
|
||||||
public IntPtr buffer;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong offset;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong bytes_requested;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong bytes_transferred;
|
|
||||||
|
|
||||||
[NativeTypeName("void*")]
|
|
||||||
public IntPtr userdata;
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial struct SDL_AsyncIOQueue
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
|
||||||
{
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern SDL_AsyncIO* SDL_AsyncIOFromFile([NativeTypeName("const char *")] byte* file, [NativeTypeName("const char *")] byte* mode);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("Sint64")]
|
|
||||||
public static extern long SDL_GetAsyncIOSize(SDL_AsyncIO* asyncio);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_ReadAsyncIO(SDL_AsyncIO* asyncio, [NativeTypeName("void*")] IntPtr ptr, [NativeTypeName("Uint64")] ulong offset, [NativeTypeName("Uint64")] ulong size, SDL_AsyncIOQueue* queue, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_WriteAsyncIO(SDL_AsyncIO* asyncio, [NativeTypeName("void*")] IntPtr ptr, [NativeTypeName("Uint64")] ulong offset, [NativeTypeName("Uint64")] ulong size, SDL_AsyncIOQueue* queue, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_CloseAsyncIO(SDL_AsyncIO* asyncio, [NativeTypeName("bool")] SDLBool flush, SDL_AsyncIOQueue* queue, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern SDL_AsyncIOQueue* SDL_CreateAsyncIOQueue();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern void SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue* queue);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_GetAsyncIOResult(SDL_AsyncIOQueue* queue, SDL_AsyncIOOutcome* outcome);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_WaitAsyncIOResult(SDL_AsyncIOQueue* queue, SDL_AsyncIOOutcome* outcome, [NativeTypeName("Sint32")] int timeoutMS);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern void SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue* queue);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_LoadFileAsync([NativeTypeName("const char *")] byte* file, SDL_AsyncIOQueue* queue, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -33,17 +33,10 @@ namespace SDL
|
||||||
public int value;
|
public int value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_AtomicU32
|
|
||||||
{
|
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
||||||
public static extern SDLBool SDL_TryLockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_LockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
public static extern void SDL_LockSpinlock([NativeTypeName("SDL_SpinLock *")] int* @lock);
|
||||||
|
|
@ -58,44 +51,26 @@ namespace SDL
|
||||||
public static extern void SDL_MemoryBarrierAcquireFunction();
|
public static extern void SDL_MemoryBarrierAcquireFunction();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_AtomicCompareAndSwap(SDL_AtomicInt* a, int oldval, int newval);
|
||||||
public static extern SDLBool SDL_CompareAndSwapAtomicInt(SDL_AtomicInt* a, int oldval, int newval);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_SetAtomicInt(SDL_AtomicInt* a, int v);
|
public static extern int SDL_AtomicSet(SDL_AtomicInt* a, int v);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetAtomicInt(SDL_AtomicInt* a);
|
public static extern int SDL_AtomicGet(SDL_AtomicInt* a);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_AddAtomicInt(SDL_AtomicInt* a, int v);
|
public static extern int SDL_AtomicAdd(SDL_AtomicInt* a, int v);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_AtomicCompareAndSwapPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr oldval, [NativeTypeName("void*")] IntPtr newval);
|
||||||
public static extern SDLBool SDL_CompareAndSwapAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint oldval, [NativeTypeName("Uint32")] uint newval);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("Uint32")]
|
|
||||||
public static extern uint SDL_SetAtomicU32(SDL_AtomicU32* a, [NativeTypeName("Uint32")] uint v);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[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);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("void*")]
|
[return: NativeTypeName("void*")]
|
||||||
public static extern IntPtr SDL_SetAtomicPointer([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr v);
|
public static extern IntPtr SDL_AtomicSetPtr([NativeTypeName("void **")] IntPtr* a, [NativeTypeName("void*")] IntPtr v);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("void*")]
|
[return: NativeTypeName("void*")]
|
||||||
public static extern IntPtr SDL_GetAtomicPointer([NativeTypeName("void **")] IntPtr* a);
|
public static extern IntPtr SDL_AtomicGetPtr([NativeTypeName("void **")] IntPtr* a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,19 +28,6 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
public enum SDL_AudioFormat : uint
|
|
||||||
{
|
|
||||||
SDL_AUDIO_UNKNOWN = 0x0000U,
|
|
||||||
SDL_AUDIO_U8 = 0x0008U,
|
|
||||||
SDL_AUDIO_S8 = 0x8008U,
|
|
||||||
SDL_AUDIO_S16LE = 0x8010U,
|
|
||||||
SDL_AUDIO_S16BE = 0x9010U,
|
|
||||||
SDL_AUDIO_S32LE = 0x8020U,
|
|
||||||
SDL_AUDIO_S32BE = 0x9020U,
|
|
||||||
SDL_AUDIO_F32LE = 0x8120U,
|
|
||||||
SDL_AUDIO_F32BE = 0x9120U,
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial struct SDL_AudioSpec
|
public partial struct SDL_AudioSpec
|
||||||
{
|
{
|
||||||
public SDL_AudioFormat format;
|
public SDL_AudioFormat format;
|
||||||
|
|
@ -68,65 +55,41 @@ namespace SDL
|
||||||
public static extern byte* Unsafe_SDL_GetCurrentAudioDriver();
|
public static extern byte* Unsafe_SDL_GetCurrentAudioDriver();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_AudioDeviceID* SDL_GetAudioPlaybackDevices(int* count);
|
public static extern SDL_AudioDeviceID* SDL_GetAudioOutputDevices(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_AudioDeviceID* SDL_GetAudioRecordingDevices(int* count);
|
public static extern SDL_AudioDeviceID* SDL_GetAudioCaptureDevices(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioDeviceName", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioDeviceName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
|
public static extern byte* Unsafe_SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames);
|
||||||
public static extern SDLBool SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec* spec, int* sample_frames);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern int* SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int* count);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
public static extern SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* spec);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
|
||||||
public static extern SDLBool SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
|
||||||
public static extern SDLBool SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_AudioDevicePaused(SDL_AudioDeviceID dev);
|
||||||
public static extern SDLBool SDL_PauseAudioDevice(SDL_AudioDeviceID devid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_ResumeAudioDevice(SDL_AudioDeviceID devid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_AudioDevicePaused(SDL_AudioDeviceID devid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern float SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
|
public static extern void SDL_CloseAudioDevice(SDL_AudioDeviceID devid);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream** streams, int num_streams);
|
||||||
public static extern SDLBool SDL_BindAudioStreams(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioStream *const *")] SDL_AudioStream** streams, int num_streams);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream);
|
||||||
public static extern SDLBool SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_UnbindAudioStreams([NativeTypeName("SDL_AudioStream *const *")] SDL_AudioStream** streams, int num_streams);
|
public static extern void SDL_UnbindAudioStreams(SDL_AudioStream** streams, int num_streams);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_UnbindAudioStream(SDL_AudioStream* stream);
|
public static extern void SDL_UnbindAudioStream(SDL_AudioStream* stream);
|
||||||
|
|
@ -141,52 +104,19 @@ namespace SDL
|
||||||
public static extern SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream* stream);
|
public static extern SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream* stream);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec);
|
||||||
public static extern SDLBool SDL_GetAudioStreamFormat(SDL_AudioStream* stream, SDL_AudioSpec* src_spec, SDL_AudioSpec* dst_spec);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec);
|
||||||
public static extern SDLBool SDL_SetAudioStreamFormat(SDL_AudioStream* stream, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream* stream);
|
public static extern float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream* stream);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio);
|
||||||
public static extern SDLBool SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream* stream, float ratio);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern float SDL_GetAudioStreamGain(SDL_AudioStream* stream);
|
public static extern int SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAudioStreamGain(SDL_AudioStream* stream, float gain);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern int* SDL_GetAudioStreamInputChannelMap(SDL_AudioStream* stream, int* count);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern int* SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream* stream, int* count);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAudioStreamInputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream* stream, [NativeTypeName("const int *")] int* chmap, int count);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_PutAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_PutAudioStreamDataNoCopy(SDL_AudioStream* stream, [NativeTypeName("const void *")] IntPtr buf, int len, [NativeTypeName("SDL_AudioStreamDataCompleteCallback")] delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_PutAudioStreamPlanarData(SDL_AudioStream* stream, [NativeTypeName("const void *const *")] IntPtr* channel_buffers, int num_channels, int num_samples);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("void*")] IntPtr buf, int len);
|
public static extern int SDL_GetAudioStreamData(SDL_AudioStream* stream, [NativeTypeName("void*")] IntPtr buf, int len);
|
||||||
|
|
@ -198,40 +128,22 @@ namespace SDL
|
||||||
public static extern int SDL_GetAudioStreamQueued(SDL_AudioStream* stream);
|
public static extern int SDL_GetAudioStreamQueued(SDL_AudioStream* stream);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_FlushAudioStream(SDL_AudioStream* stream);
|
||||||
public static extern SDLBool SDL_FlushAudioStream(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ClearAudioStream(SDL_AudioStream* stream);
|
||||||
public static extern SDLBool SDL_ClearAudioStream(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_LockAudioStream(SDL_AudioStream* stream);
|
||||||
public static extern SDLBool SDL_PauseAudioStreamDevice(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_UnlockAudioStream(SDL_AudioStream* stream);
|
||||||
public static extern SDLBool SDL_ResumeAudioStreamDevice(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
public static extern SDLBool SDL_AudioStreamDevicePaused(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
public static extern SDLBool SDL_LockAudioStream(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_UnlockAudioStream(SDL_AudioStream* stream);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAudioStreamGetCallback(SDL_AudioStream* stream, [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_SetAudioStreamPutCallback(SDL_AudioStream* stream, [NativeTypeName("SDL_AudioStreamCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioStream*, int, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_DestroyAudioStream(SDL_AudioStream* stream);
|
public static extern void SDL_DestroyAudioStream(SDL_AudioStream* stream);
|
||||||
|
|
@ -240,51 +152,66 @@ namespace SDL
|
||||||
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);
|
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)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, [NativeTypeName("SDL_AudioPostmixCallback")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AudioSpec*, float*, int, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
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);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_LoadWAV_IO(SDL_IOStream* src, SDL_bool closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
||||||
public static extern SDLBool SDL_LoadWAV_IO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
||||||
public static extern SDLBool SDL_LoadWAV([NativeTypeName("const char *")] byte* path, SDL_AudioSpec* spec, [NativeTypeName("Uint8 **")] byte** audio_buf, [NativeTypeName("Uint32 *")] uint* audio_len);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_MixAudioFormat([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, int volume);
|
||||||
public static extern SDLBool SDL_MixAudio([NativeTypeName("Uint8 *")] byte* dst, [NativeTypeName("const Uint8 *")] byte* src, SDL_AudioFormat format, [NativeTypeName("Uint32")] uint len, float volume);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len);
|
||||||
public static extern SDLBool SDL_ConvertAudioSamples([NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* src_spec, [NativeTypeName("const Uint8 *")] byte* src_data, int src_len, [NativeTypeName("const SDL_AudioSpec *")] SDL_AudioSpec* dst_spec, [NativeTypeName("Uint8 **")] byte** dst_data, int* dst_len);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAudioFormatName", ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("const char *")]
|
|
||||||
public static extern byte* Unsafe_SDL_GetAudioFormatName(SDL_AudioFormat format);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);
|
public static extern int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_AUDIO_MASK_BITSIZE (0xFFu)")]
|
[NativeTypeName("#define SDL_AUDIO_MASK_BITSIZE (0xFF)")]
|
||||||
public const uint SDL_AUDIO_MASK_BITSIZE = (0xFFU);
|
public const int SDL_AUDIO_MASK_BITSIZE = (0xFF);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_AUDIO_MASK_FLOAT (1u<<8)")]
|
[NativeTypeName("#define SDL_AUDIO_MASK_FLOAT (1<<8)")]
|
||||||
public const uint SDL_AUDIO_MASK_FLOAT = (1U << 8);
|
public const int SDL_AUDIO_MASK_FLOAT = (1 << 8);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_AUDIO_MASK_BIG_ENDIAN (1u<<12)")]
|
[NativeTypeName("#define SDL_AUDIO_MASK_BIG_ENDIAN (1<<12)")]
|
||||||
public const uint SDL_AUDIO_MASK_BIG_ENDIAN = (1U << 12);
|
public const int SDL_AUDIO_MASK_BIG_ENDIAN = (1 << 12);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_AUDIO_MASK_SIGNED (1u<<15)")]
|
[NativeTypeName("#define SDL_AUDIO_MASK_SIGNED (1<<15)")]
|
||||||
public const uint SDL_AUDIO_MASK_SIGNED = (1U << 15);
|
public const int SDL_AUDIO_MASK_SIGNED = (1 << 15);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK ((SDL_AudioDeviceID) 0xFFFFFFFFu)")]
|
[NativeTypeName("#define SDL_AUDIO_U8 0x0008")]
|
||||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK = ((SDL_AudioDeviceID)(0xFFFFFFFFU));
|
public const int SDL_AUDIO_U8 = 0x0008;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_RECORDING ((SDL_AudioDeviceID) 0xFFFFFFFEu)")]
|
[NativeTypeName("#define SDL_AUDIO_S8 0x8008")]
|
||||||
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_RECORDING = ((SDL_AudioDeviceID)(0xFFFFFFFEU));
|
public const int SDL_AUDIO_S8 = 0x8008;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN \"SDL.audiostream.auto_cleanup\"")]
|
[NativeTypeName("#define SDL_AUDIO_S16LE 0x8010")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN => "SDL.audiostream.auto_cleanup"u8;
|
public const int SDL_AUDIO_S16LE = 0x8010;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_S16BE 0x9010")]
|
||||||
|
public const int SDL_AUDIO_S16BE = 0x9010;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_S32LE 0x8020")]
|
||||||
|
public const int SDL_AUDIO_S32LE = 0x8020;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_S32BE 0x9020")]
|
||||||
|
public const int SDL_AUDIO_S32BE = 0x9020;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_F32LE 0x8120")]
|
||||||
|
public const int SDL_AUDIO_F32LE = 0x8120;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_F32BE 0x9120")]
|
||||||
|
public const int SDL_AUDIO_F32BE = 0x9120;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_OUTPUT ((SDL_AudioDeviceID) 0xFFFFFFFF)")]
|
||||||
|
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_OUTPUT = ((SDL_AudioDeviceID)(0xFFFFFFFF));
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_AUDIO_DEVICE_DEFAULT_CAPTURE ((SDL_AudioDeviceID) 0xFFFFFFFE)")]
|
||||||
|
public const SDL_AudioDeviceID SDL_AUDIO_DEVICE_DEFAULT_CAPTURE = ((SDL_AudioDeviceID)(0xFFFFFFFE));
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_MIX_MAXVOLUME 128")]
|
||||||
|
public const int SDL_MIX_MAXVOLUME = 128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,16 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
|
public enum SDL_BlendMode
|
||||||
|
{
|
||||||
|
SDL_BLENDMODE_NONE = 0x00000000,
|
||||||
|
SDL_BLENDMODE_BLEND = 0x00000001,
|
||||||
|
SDL_BLENDMODE_ADD = 0x00000002,
|
||||||
|
SDL_BLENDMODE_MOD = 0x00000004,
|
||||||
|
SDL_BLENDMODE_MUL = 0x00000008,
|
||||||
|
SDL_BLENDMODE_INVALID = 0x7FFFFFFF,
|
||||||
|
}
|
||||||
|
|
||||||
public enum SDL_BlendOperation
|
public enum SDL_BlendOperation
|
||||||
{
|
{
|
||||||
SDL_BLENDOPERATION_ADD = 0x1,
|
SDL_BLENDOPERATION_ADD = 0x1,
|
||||||
|
|
@ -54,29 +64,5 @@ namespace SDL
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation);
|
public static extern SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_NONE 0x00000000u")]
|
|
||||||
public const uint SDL_BLENDMODE_NONE = 0x00000000U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_BLEND 0x00000001u")]
|
|
||||||
public const uint SDL_BLENDMODE_BLEND = 0x00000001U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_BLEND_PREMULTIPLIED 0x00000010u")]
|
|
||||||
public const uint SDL_BLENDMODE_BLEND_PREMULTIPLIED = 0x00000010U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_ADD 0x00000002u")]
|
|
||||||
public const uint SDL_BLENDMODE_ADD = 0x00000002U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_ADD_PREMULTIPLIED 0x00000020u")]
|
|
||||||
public const uint SDL_BLENDMODE_ADD_PREMULTIPLIED = 0x00000020U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_MOD 0x00000004u")]
|
|
||||||
public const uint SDL_BLENDMODE_MOD = 0x00000004U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_MUL 0x00000008u")]
|
|
||||||
public const uint SDL_BLENDMODE_MUL = 0x00000008U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_BLENDMODE_INVALID 0x7FFFFFFFu")]
|
|
||||||
public const uint SDL_BLENDMODE_INVALID = 0x7FFFFFFFU;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,17 +33,15 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_CameraSpec
|
public partial struct SDL_CameraSpec
|
||||||
{
|
{
|
||||||
public SDL_PixelFormat format;
|
public SDL_PixelFormatEnum format;
|
||||||
|
|
||||||
public SDL_Colorspace colorspace;
|
|
||||||
|
|
||||||
public int width;
|
public int width;
|
||||||
|
|
||||||
public int height;
|
public int height;
|
||||||
|
|
||||||
public int framerate_numerator;
|
public int interval_numerator;
|
||||||
|
|
||||||
public int framerate_denominator;
|
public int interval_denominator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_CameraPosition
|
public enum SDL_CameraPosition
|
||||||
|
|
@ -53,13 +51,6 @@ namespace SDL
|
||||||
SDL_CAMERA_POSITION_BACK_FACING,
|
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
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
|
@ -74,39 +65,38 @@ namespace SDL
|
||||||
public static extern byte* Unsafe_SDL_GetCurrentCameraDriver();
|
public static extern byte* Unsafe_SDL_GetCurrentCameraDriver();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_CameraID* SDL_GetCameras(int* count);
|
public static extern SDL_CameraDeviceID* SDL_GetCameraDevices(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_CameraSpec** SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int* count);
|
public static extern SDL_CameraSpec* SDL_GetCameraDeviceSupportedFormats(SDL_CameraDeviceID devid, int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCameraName", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCameraDeviceName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetCameraName(SDL_CameraID instance_id);
|
public static extern byte* Unsafe_SDL_GetCameraDeviceName(SDL_CameraDeviceID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id);
|
public static extern SDL_CameraPosition SDL_GetCameraDevicePosition(SDL_CameraDeviceID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Camera* SDL_OpenCamera(SDL_CameraID instance_id, [NativeTypeName("const SDL_CameraSpec *")] SDL_CameraSpec* spec);
|
public static extern SDL_Camera* SDL_OpenCameraDevice(SDL_CameraDeviceID instance_id, [NativeTypeName("const SDL_CameraSpec *")] SDL_CameraSpec* spec);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_CameraPermissionState SDL_GetCameraPermissionState(SDL_Camera* camera);
|
public static extern int SDL_GetCameraPermissionState(SDL_Camera* camera);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_CameraID SDL_GetCameraID(SDL_Camera* camera);
|
public static extern SDL_CameraDeviceID SDL_GetCameraInstanceID(SDL_Camera* camera);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera* camera);
|
public static extern SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera* camera);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec);
|
||||||
public static extern SDLBool SDL_GetCameraFormat(SDL_Camera* camera, SDL_CameraSpec* spec);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] ulong* timestampNS);
|
public static extern SDL_Surface* SDL_AcquireCameraFrame(SDL_Camera* camera, [NativeTypeName("Uint64 *")] ulong* timestampNS);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ReleaseCameraFrame(SDL_Camera* camera, SDL_Surface* frame);
|
public static extern int SDL_ReleaseCameraFrame(SDL_Camera* camera, SDL_Surface* frame);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_CloseCamera(SDL_Camera* camera);
|
public static extern void SDL_CloseCamera(SDL_Camera* camera);
|
||||||
|
|
|
||||||
|
|
@ -31,47 +31,36 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetClipboardText([NativeTypeName("const char *")] byte* text);
|
||||||
public static extern SDLBool SDL_SetClipboardText([NativeTypeName("const char *")] byte* text);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetClipboardText", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetClipboardText();
|
public static extern byte* Unsafe_SDL_GetClipboardText();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasClipboardText();
|
||||||
public static extern SDLBool SDL_HasClipboardText();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text);
|
||||||
public static extern SDLBool SDL_SetPrimarySelectionText([NativeTypeName("const char *")] byte* text);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrimarySelectionText", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrimarySelectionText", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetPrimarySelectionText();
|
public static extern byte* Unsafe_SDL_GetPrimarySelectionText();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasPrimarySelectionText();
|
||||||
public static extern SDLBool SDL_HasPrimarySelectionText();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, nuint*, IntPtr> callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types);
|
||||||
public static extern SDLBool SDL_SetClipboardData([NativeTypeName("SDL_ClipboardDataCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, nuint*, IntPtr> callback, [NativeTypeName("SDL_ClipboardCleanupCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> cleanup, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("const char **")] byte** mime_types, [NativeTypeName("size_t")] nuint num_mime_types);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ClearClipboardData();
|
||||||
public static extern SDLBool SDL_ClearClipboardData();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("void*")]
|
[return: NativeTypeName("void*")]
|
||||||
public static extern IntPtr SDL_GetClipboardData([NativeTypeName("const char *")] byte* mime_type, [NativeTypeName("size_t *")] nuint* size);
|
public static extern IntPtr SDL_GetClipboardData([NativeTypeName("const char *")] byte* mime_type, [NativeTypeName("size_t *")] nuint* size);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type);
|
||||||
public static extern SDLBool SDL_HasClipboardData([NativeTypeName("const char *")] byte* mime_type);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("char **")]
|
|
||||||
public static extern byte** SDL_GetClipboardMimeTypes([NativeTypeName("size_t *")] nuint* num_mime_types);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,76 +30,59 @@ namespace SDL
|
||||||
public static partial class SDL3
|
public static partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetNumLogicalCPUCores();
|
public static extern int SDL_GetCPUCount();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetCPUCacheLineSize();
|
public static extern int SDL_GetCPUCacheLineSize();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasAltiVec();
|
||||||
public static extern SDLBool SDL_HasAltiVec();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasMMX();
|
||||||
public static extern SDLBool SDL_HasMMX();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasSSE();
|
||||||
public static extern SDLBool SDL_HasSSE();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasSSE2();
|
||||||
public static extern SDLBool SDL_HasSSE2();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasSSE3();
|
||||||
public static extern SDLBool SDL_HasSSE3();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasSSE41();
|
||||||
public static extern SDLBool SDL_HasSSE41();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasSSE42();
|
||||||
public static extern SDLBool SDL_HasSSE42();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasAVX();
|
||||||
public static extern SDLBool SDL_HasAVX();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasAVX2();
|
||||||
public static extern SDLBool SDL_HasAVX2();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasAVX512F();
|
||||||
public static extern SDLBool SDL_HasAVX512F();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasARMSIMD();
|
||||||
public static extern SDLBool SDL_HasARMSIMD();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasNEON();
|
||||||
public static extern SDLBool SDL_HasNEON();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasLSX();
|
||||||
public static extern SDLBool SDL_HasLSX();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasLASX();
|
||||||
public static extern SDLBool SDL_HasLASX();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetSystemRAM();
|
public static extern int SDL_GetSystemRAM();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("size_t")]
|
[return: NativeTypeName("size_t")]
|
||||||
public static extern nuint SDL_GetSIMDAlignment();
|
public static extern nuint SDL_SIMDGetAlignment();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern int SDL_GetSystemPageSize();
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_CACHELINE_SIZE 128")]
|
[NativeTypeName("#define SDL_CACHELINE_SIZE 128")]
|
||||||
public const int SDL_CACHELINE_SIZE = 128;
|
public const int SDL_CACHELINE_SIZE = 128;
|
||||||
|
|
|
||||||
|
|
@ -37,49 +37,15 @@ namespace SDL
|
||||||
public byte* pattern;
|
public byte* pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_FileDialogType
|
|
||||||
{
|
|
||||||
SDL_FILEDIALOG_OPENFILE,
|
|
||||||
SDL_FILEDIALOG_SAVEFILE,
|
|
||||||
SDL_FILEDIALOG_OPENFOLDER,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many);
|
public static extern void SDL_ShowOpenFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, int nfilters, [NativeTypeName("const char *")] byte* default_location);
|
public static extern void SDL_ShowSaveFileDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const SDL_DialogFileFilter *")] SDL_DialogFileFilter* filters, [NativeTypeName("const char *")] byte* default_location);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, [NativeTypeName("bool")] SDLBool allow_many);
|
public static extern void SDL_ShowOpenFolderDialog([NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_Window* window, [NativeTypeName("const char *")] byte* default_location, SDL_bool allow_many);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern void SDL_ShowFileDialogWithProperties(SDL_FileDialogType type, [NativeTypeName("SDL_DialogFileCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte**, int, void> callback, [NativeTypeName("void*")] IntPtr userdata, SDL_PropertiesID props);
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_FILTERS_POINTER \"SDL.filedialog.filters\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_FILTERS_POINTER => "SDL.filedialog.filters"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER \"SDL.filedialog.nfilters\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER => "SDL.filedialog.nfilters"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_WINDOW_POINTER \"SDL.filedialog.window\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_WINDOW_POINTER => "SDL.filedialog.window"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_LOCATION_STRING \"SDL.filedialog.location\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_LOCATION_STRING => "SDL.filedialog.location"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_MANY_BOOLEAN \"SDL.filedialog.many\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_MANY_BOOLEAN => "SDL.filedialog.many"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_TITLE_STRING \"SDL.filedialog.title\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_TITLE_STRING => "SDL.filedialog.title"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_ACCEPT_STRING \"SDL.filedialog.accept\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_ACCEPT_STRING => "SDL.filedialog.accept"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_FILE_DIALOG_CANCEL_STRING \"SDL.filedialog.cancel\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_FILE_DIALOG_CANCEL_STRING => "SDL.filedialog.cancel"u8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,26 +27,29 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
|
public enum SDL_errorcode
|
||||||
|
{
|
||||||
|
SDL_ENOMEM,
|
||||||
|
SDL_EFREAD,
|
||||||
|
SDL_EFWRITE,
|
||||||
|
SDL_EFSEEK,
|
||||||
|
SDL_UNSUPPORTED,
|
||||||
|
SDL_LASTERROR,
|
||||||
|
}
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist);
|
||||||
public static extern SDLBool SDL_SetError([NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetErrorV([NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_OutOfMemory();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetError", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetError", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetError();
|
public static extern byte* Unsafe_SDL_GetError();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern void SDL_ClearError();
|
||||||
public static extern SDLBool SDL_ClearError();
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern int SDL_Error(SDL_errorcode code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,19 +45,16 @@ namespace SDL
|
||||||
SDL_EVENT_DISPLAY_ADDED,
|
SDL_EVENT_DISPLAY_ADDED,
|
||||||
SDL_EVENT_DISPLAY_REMOVED,
|
SDL_EVENT_DISPLAY_REMOVED,
|
||||||
SDL_EVENT_DISPLAY_MOVED,
|
SDL_EVENT_DISPLAY_MOVED,
|
||||||
SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED,
|
|
||||||
SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED,
|
|
||||||
SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
|
SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
|
||||||
SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED,
|
SDL_EVENT_DISPLAY_HDR_STATE_CHANGED,
|
||||||
SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
|
SDL_EVENT_DISPLAY_FIRST = SDL_EVENT_DISPLAY_ORIENTATION,
|
||||||
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED,
|
SDL_EVENT_DISPLAY_LAST = SDL_EVENT_DISPLAY_HDR_STATE_CHANGED,
|
||||||
SDL_EVENT_WINDOW_SHOWN = 0x202,
|
SDL_EVENT_WINDOW_SHOWN = 0x202,
|
||||||
SDL_EVENT_WINDOW_HIDDEN,
|
SDL_EVENT_WINDOW_HIDDEN,
|
||||||
SDL_EVENT_WINDOW_EXPOSED,
|
SDL_EVENT_WINDOW_EXPOSED,
|
||||||
SDL_EVENT_WINDOW_MOVED,
|
SDL_EVENT_WINDOW_MOVED,
|
||||||
SDL_EVENT_WINDOW_RESIZED,
|
SDL_EVENT_WINDOW_RESIZED,
|
||||||
SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED,
|
SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED,
|
||||||
SDL_EVENT_WINDOW_METAL_VIEW_RESIZED,
|
|
||||||
SDL_EVENT_WINDOW_MINIMIZED,
|
SDL_EVENT_WINDOW_MINIMIZED,
|
||||||
SDL_EVENT_WINDOW_MAXIMIZED,
|
SDL_EVENT_WINDOW_MAXIMIZED,
|
||||||
SDL_EVENT_WINDOW_RESTORED,
|
SDL_EVENT_WINDOW_RESTORED,
|
||||||
|
|
@ -66,18 +63,19 @@ namespace SDL
|
||||||
SDL_EVENT_WINDOW_FOCUS_GAINED,
|
SDL_EVENT_WINDOW_FOCUS_GAINED,
|
||||||
SDL_EVENT_WINDOW_FOCUS_LOST,
|
SDL_EVENT_WINDOW_FOCUS_LOST,
|
||||||
SDL_EVENT_WINDOW_CLOSE_REQUESTED,
|
SDL_EVENT_WINDOW_CLOSE_REQUESTED,
|
||||||
|
SDL_EVENT_WINDOW_TAKE_FOCUS,
|
||||||
SDL_EVENT_WINDOW_HIT_TEST,
|
SDL_EVENT_WINDOW_HIT_TEST,
|
||||||
SDL_EVENT_WINDOW_ICCPROF_CHANGED,
|
SDL_EVENT_WINDOW_ICCPROF_CHANGED,
|
||||||
SDL_EVENT_WINDOW_DISPLAY_CHANGED,
|
SDL_EVENT_WINDOW_DISPLAY_CHANGED,
|
||||||
SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED,
|
SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED,
|
||||||
SDL_EVENT_WINDOW_SAFE_AREA_CHANGED,
|
|
||||||
SDL_EVENT_WINDOW_OCCLUDED,
|
SDL_EVENT_WINDOW_OCCLUDED,
|
||||||
SDL_EVENT_WINDOW_ENTER_FULLSCREEN,
|
SDL_EVENT_WINDOW_ENTER_FULLSCREEN,
|
||||||
SDL_EVENT_WINDOW_LEAVE_FULLSCREEN,
|
SDL_EVENT_WINDOW_LEAVE_FULLSCREEN,
|
||||||
SDL_EVENT_WINDOW_DESTROYED,
|
SDL_EVENT_WINDOW_DESTROYED,
|
||||||
SDL_EVENT_WINDOW_HDR_STATE_CHANGED,
|
SDL_EVENT_WINDOW_PEN_ENTER,
|
||||||
|
SDL_EVENT_WINDOW_PEN_LEAVE,
|
||||||
SDL_EVENT_WINDOW_FIRST = SDL_EVENT_WINDOW_SHOWN,
|
SDL_EVENT_WINDOW_FIRST = SDL_EVENT_WINDOW_SHOWN,
|
||||||
SDL_EVENT_WINDOW_LAST = SDL_EVENT_WINDOW_HDR_STATE_CHANGED,
|
SDL_EVENT_WINDOW_LAST = SDL_EVENT_WINDOW_PEN_LEAVE,
|
||||||
SDL_EVENT_KEY_DOWN = 0x300,
|
SDL_EVENT_KEY_DOWN = 0x300,
|
||||||
SDL_EVENT_KEY_UP,
|
SDL_EVENT_KEY_UP,
|
||||||
SDL_EVENT_TEXT_EDITING,
|
SDL_EVENT_TEXT_EDITING,
|
||||||
|
|
@ -85,9 +83,6 @@ namespace SDL
|
||||||
SDL_EVENT_KEYMAP_CHANGED,
|
SDL_EVENT_KEYMAP_CHANGED,
|
||||||
SDL_EVENT_KEYBOARD_ADDED,
|
SDL_EVENT_KEYBOARD_ADDED,
|
||||||
SDL_EVENT_KEYBOARD_REMOVED,
|
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_MOTION = 0x400,
|
||||||
SDL_EVENT_MOUSE_BUTTON_DOWN,
|
SDL_EVENT_MOUSE_BUTTON_DOWN,
|
||||||
SDL_EVENT_MOUSE_BUTTON_UP,
|
SDL_EVENT_MOUSE_BUTTON_UP,
|
||||||
|
|
@ -118,10 +113,6 @@ namespace SDL
|
||||||
SDL_EVENT_FINGER_DOWN = 0x700,
|
SDL_EVENT_FINGER_DOWN = 0x700,
|
||||||
SDL_EVENT_FINGER_UP,
|
SDL_EVENT_FINGER_UP,
|
||||||
SDL_EVENT_FINGER_MOTION,
|
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_CLIPBOARD_UPDATE = 0x900,
|
||||||
SDL_EVENT_DROP_FILE = 0x1000,
|
SDL_EVENT_DROP_FILE = 0x1000,
|
||||||
SDL_EVENT_DROP_TEXT,
|
SDL_EVENT_DROP_TEXT,
|
||||||
|
|
@ -132,25 +123,17 @@ namespace SDL
|
||||||
SDL_EVENT_AUDIO_DEVICE_REMOVED,
|
SDL_EVENT_AUDIO_DEVICE_REMOVED,
|
||||||
SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED,
|
SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED,
|
||||||
SDL_EVENT_SENSOR_UPDATE = 0x1200,
|
SDL_EVENT_SENSOR_UPDATE = 0x1200,
|
||||||
SDL_EVENT_PEN_PROXIMITY_IN = 0x1300,
|
SDL_EVENT_PEN_DOWN = 0x1300,
|
||||||
SDL_EVENT_PEN_PROXIMITY_OUT,
|
|
||||||
SDL_EVENT_PEN_DOWN,
|
|
||||||
SDL_EVENT_PEN_UP,
|
SDL_EVENT_PEN_UP,
|
||||||
|
SDL_EVENT_PEN_MOTION,
|
||||||
SDL_EVENT_PEN_BUTTON_DOWN,
|
SDL_EVENT_PEN_BUTTON_DOWN,
|
||||||
SDL_EVENT_PEN_BUTTON_UP,
|
SDL_EVENT_PEN_BUTTON_UP,
|
||||||
SDL_EVENT_PEN_MOTION,
|
|
||||||
SDL_EVENT_PEN_AXIS,
|
|
||||||
SDL_EVENT_CAMERA_DEVICE_ADDED = 0x1400,
|
SDL_EVENT_CAMERA_DEVICE_ADDED = 0x1400,
|
||||||
SDL_EVENT_CAMERA_DEVICE_REMOVED,
|
SDL_EVENT_CAMERA_DEVICE_REMOVED,
|
||||||
SDL_EVENT_CAMERA_DEVICE_APPROVED,
|
SDL_EVENT_CAMERA_DEVICE_APPROVED,
|
||||||
SDL_EVENT_CAMERA_DEVICE_DENIED,
|
SDL_EVENT_CAMERA_DEVICE_DENIED,
|
||||||
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000,
|
SDL_EVENT_RENDER_TARGETS_RESET = 0x2000,
|
||||||
SDL_EVENT_RENDER_DEVICE_RESET,
|
SDL_EVENT_RENDER_DEVICE_RESET,
|
||||||
SDL_EVENT_RENDER_DEVICE_LOST,
|
|
||||||
SDL_EVENT_PRIVATE0 = 0x4000,
|
|
||||||
SDL_EVENT_PRIVATE1,
|
|
||||||
SDL_EVENT_PRIVATE2,
|
|
||||||
SDL_EVENT_PRIVATE3,
|
|
||||||
SDL_EVENT_POLL_SENTINEL = 0x7F00,
|
SDL_EVENT_POLL_SENTINEL = 0x7F00,
|
||||||
SDL_EVENT_USER = 0x8000,
|
SDL_EVENT_USER = 0x8000,
|
||||||
SDL_EVENT_LAST = 0xFFFF,
|
SDL_EVENT_LAST = 0xFFFF,
|
||||||
|
|
@ -183,9 +166,6 @@ namespace SDL
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
[NativeTypeName("Sint32")]
|
||||||
public int data1;
|
public int data1;
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
|
||||||
public int data2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_WindowEvent
|
public partial struct SDL_WindowEvent
|
||||||
|
|
@ -234,20 +214,19 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_KeyboardID which;
|
public SDL_KeyboardID which;
|
||||||
|
|
||||||
public SDL_Scancode scancode;
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte state;
|
||||||
|
|
||||||
public SDL_Keycode key;
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte repeat;
|
||||||
|
|
||||||
public SDL_Keymod mod;
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte padding2;
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint8")]
|
||||||
public ushort raw;
|
public byte padding3;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
public SDL_Keysym keysym;
|
||||||
public SDLBool down;
|
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
|
||||||
public SDLBool repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe partial struct SDL_TextEditingEvent
|
public unsafe partial struct SDL_TextEditingEvent
|
||||||
|
|
@ -262,7 +241,7 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_WindowID windowID;
|
public SDL_WindowID windowID;
|
||||||
|
|
||||||
[NativeTypeName("const char *")]
|
[NativeTypeName("char *")]
|
||||||
public byte* text;
|
public byte* text;
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
[NativeTypeName("Sint32")]
|
||||||
|
|
@ -272,40 +251,6 @@ namespace SDL
|
||||||
public int length;
|
public int length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe partial struct SDL_TextEditingCandidatesEvent
|
|
||||||
{
|
|
||||||
public SDL_EventType type;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint reserved;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong timestamp;
|
|
||||||
|
|
||||||
public SDL_WindowID windowID;
|
|
||||||
|
|
||||||
[NativeTypeName("const char *const *")]
|
|
||||||
public byte** candidates;
|
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
|
||||||
public int num_candidates;
|
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
|
||||||
public int selected_candidate;
|
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
|
||||||
public SDLBool horizontal;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
|
||||||
public byte padding1;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
|
||||||
public byte padding2;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
|
||||||
public byte padding3;
|
|
||||||
}
|
|
||||||
|
|
||||||
public unsafe partial struct SDL_TextInputEvent
|
public unsafe partial struct SDL_TextInputEvent
|
||||||
{
|
{
|
||||||
public SDL_EventType type;
|
public SDL_EventType type;
|
||||||
|
|
@ -318,7 +263,7 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_WindowID windowID;
|
public SDL_WindowID windowID;
|
||||||
|
|
||||||
[NativeTypeName("const char *")]
|
[NativeTypeName("char *")]
|
||||||
public byte* text;
|
public byte* text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -349,7 +294,8 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_MouseID which;
|
public SDL_MouseID which;
|
||||||
|
|
||||||
public SDL_MouseButtonFlags state;
|
[NativeTypeName("Uint32")]
|
||||||
|
public uint state;
|
||||||
|
|
||||||
public float x;
|
public float x;
|
||||||
|
|
||||||
|
|
@ -377,8 +323,8 @@ namespace SDL
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte button;
|
public byte button;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[NativeTypeName("Uint8")]
|
||||||
public SDLBool down;
|
public byte state;
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte clicks;
|
public byte clicks;
|
||||||
|
|
@ -414,12 +360,6 @@ namespace SDL
|
||||||
public float mouse_x;
|
public float mouse_x;
|
||||||
|
|
||||||
public float mouse_y;
|
public float mouse_y;
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
|
||||||
public int integer_x;
|
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
|
||||||
public int integer_y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_JoyAxisEvent
|
public partial struct SDL_JoyAxisEvent
|
||||||
|
|
@ -524,8 +464,8 @@ namespace SDL
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte button;
|
public byte button;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[NativeTypeName("Uint8")]
|
||||||
public SDLBool down;
|
public byte state;
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte padding1;
|
public byte padding1;
|
||||||
|
|
@ -610,8 +550,8 @@ namespace SDL
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte button;
|
public byte button;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[NativeTypeName("Uint8")]
|
||||||
public SDLBool down;
|
public byte state;
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte padding1;
|
public byte padding1;
|
||||||
|
|
@ -698,8 +638,8 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_AudioDeviceID which;
|
public SDL_AudioDeviceID which;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[NativeTypeName("Uint8")]
|
||||||
public SDLBool recording;
|
public byte iscapture;
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte padding1;
|
public byte padding1;
|
||||||
|
|
@ -721,20 +661,7 @@ namespace SDL
|
||||||
[NativeTypeName("Uint64")]
|
[NativeTypeName("Uint64")]
|
||||||
public ulong timestamp;
|
public ulong timestamp;
|
||||||
|
|
||||||
public SDL_CameraID which;
|
public SDL_CameraDeviceID which;
|
||||||
}
|
|
||||||
|
|
||||||
public partial struct SDL_RenderEvent
|
|
||||||
{
|
|
||||||
public SDL_EventType type;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint reserved;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong timestamp;
|
|
||||||
|
|
||||||
public SDL_WindowID windowID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_TouchFingerEvent
|
public partial struct SDL_TouchFingerEvent
|
||||||
|
|
@ -764,22 +691,7 @@ namespace SDL
|
||||||
public SDL_WindowID windowID;
|
public SDL_WindowID windowID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_PinchFingerEvent
|
public partial struct SDL_PenTipEvent
|
||||||
{
|
|
||||||
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;
|
public SDL_EventType type;
|
||||||
|
|
||||||
|
|
@ -792,6 +704,28 @@ namespace SDL
|
||||||
public SDL_WindowID windowID;
|
public SDL_WindowID windowID;
|
||||||
|
|
||||||
public SDL_PenID which;
|
public SDL_PenID which;
|
||||||
|
|
||||||
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte tip;
|
||||||
|
|
||||||
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte state;
|
||||||
|
|
||||||
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort pen_state;
|
||||||
|
|
||||||
|
public float x;
|
||||||
|
|
||||||
|
public float y;
|
||||||
|
|
||||||
|
[NativeTypeName("float[6]")]
|
||||||
|
public _axes_e__FixedBuffer axes;
|
||||||
|
|
||||||
|
[InlineArray(6)]
|
||||||
|
public partial struct _axes_e__FixedBuffer
|
||||||
|
{
|
||||||
|
public float e0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_PenMotionEvent
|
public partial struct SDL_PenMotionEvent
|
||||||
|
|
@ -808,38 +742,27 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_PenID which;
|
public SDL_PenID which;
|
||||||
|
|
||||||
public SDL_PenInputFlags pen_state;
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte padding1;
|
||||||
|
|
||||||
public float x;
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte padding2;
|
||||||
|
|
||||||
public float y;
|
[NativeTypeName("Uint16")]
|
||||||
}
|
public ushort pen_state;
|
||||||
|
|
||||||
public partial struct SDL_PenTouchEvent
|
|
||||||
{
|
|
||||||
public SDL_EventType type;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint reserved;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong timestamp;
|
|
||||||
|
|
||||||
public SDL_WindowID windowID;
|
|
||||||
|
|
||||||
public SDL_PenID which;
|
|
||||||
|
|
||||||
public SDL_PenInputFlags pen_state;
|
|
||||||
|
|
||||||
public float x;
|
public float x;
|
||||||
|
|
||||||
public float y;
|
public float y;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[NativeTypeName("float[6]")]
|
||||||
public SDLBool eraser;
|
public _axes_e__FixedBuffer axes;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[InlineArray(6)]
|
||||||
public SDLBool down;
|
public partial struct _axes_e__FixedBuffer
|
||||||
|
{
|
||||||
|
public float e0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_PenButtonEvent
|
public partial struct SDL_PenButtonEvent
|
||||||
|
|
@ -856,42 +779,27 @@ namespace SDL
|
||||||
|
|
||||||
public SDL_PenID which;
|
public SDL_PenID which;
|
||||||
|
|
||||||
public SDL_PenInputFlags pen_state;
|
|
||||||
|
|
||||||
public float x;
|
|
||||||
|
|
||||||
public float y;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint8")]
|
[NativeTypeName("Uint8")]
|
||||||
public byte button;
|
public byte button;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
[NativeTypeName("Uint8")]
|
||||||
public SDLBool down;
|
public byte state;
|
||||||
}
|
|
||||||
|
|
||||||
public partial struct SDL_PenAxisEvent
|
[NativeTypeName("Uint16")]
|
||||||
{
|
public ushort pen_state;
|
||||||
public SDL_EventType type;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint reserved;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
|
||||||
public ulong timestamp;
|
|
||||||
|
|
||||||
public SDL_WindowID windowID;
|
|
||||||
|
|
||||||
public SDL_PenID which;
|
|
||||||
|
|
||||||
public SDL_PenInputFlags pen_state;
|
|
||||||
|
|
||||||
public float x;
|
public float x;
|
||||||
|
|
||||||
public float y;
|
public float y;
|
||||||
|
|
||||||
public SDL_PenAxis axis;
|
[NativeTypeName("float[6]")]
|
||||||
|
public _axes_e__FixedBuffer axes;
|
||||||
|
|
||||||
public float value;
|
[InlineArray(6)]
|
||||||
|
public partial struct _axes_e__FixedBuffer
|
||||||
|
{
|
||||||
|
public float e0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe partial struct SDL_DropEvent
|
public unsafe partial struct SDL_DropEvent
|
||||||
|
|
@ -910,14 +818,14 @@ namespace SDL
|
||||||
|
|
||||||
public float y;
|
public float y;
|
||||||
|
|
||||||
[NativeTypeName("const char *")]
|
[NativeTypeName("char *")]
|
||||||
public byte* source;
|
public byte* source;
|
||||||
|
|
||||||
[NativeTypeName("const char *")]
|
[NativeTypeName("char *")]
|
||||||
public byte* data;
|
public byte* data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe partial struct SDL_ClipboardEvent
|
public partial struct SDL_ClipboardEvent
|
||||||
{
|
{
|
||||||
public SDL_EventType type;
|
public SDL_EventType type;
|
||||||
|
|
||||||
|
|
@ -926,15 +834,6 @@ namespace SDL
|
||||||
|
|
||||||
[NativeTypeName("Uint64")]
|
[NativeTypeName("Uint64")]
|
||||||
public ulong timestamp;
|
public ulong timestamp;
|
||||||
|
|
||||||
[NativeTypeName("bool")]
|
|
||||||
public SDLBool owner;
|
|
||||||
|
|
||||||
[NativeTypeName("Sint32")]
|
|
||||||
public int num_mime_types;
|
|
||||||
|
|
||||||
[NativeTypeName("const char **")]
|
|
||||||
public byte** mime_types;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_SensorEvent
|
public partial struct SDL_SensorEvent
|
||||||
|
|
@ -1021,9 +920,6 @@ namespace SDL
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_TextEditingEvent edit;
|
public SDL_TextEditingEvent edit;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
|
||||||
public SDL_TextEditingCandidatesEvent edit_candidates;
|
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_TextInputEvent text;
|
public SDL_TextInputEvent text;
|
||||||
|
|
||||||
|
|
@ -1091,13 +987,7 @@ namespace SDL
|
||||||
public SDL_TouchFingerEvent tfinger;
|
public SDL_TouchFingerEvent tfinger;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_PinchFingerEvent pinch;
|
public SDL_PenTipEvent ptip;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
|
||||||
public SDL_PenProximityEvent pproximity;
|
|
||||||
|
|
||||||
[FieldOffset(0)]
|
|
||||||
public SDL_PenTouchEvent ptouch;
|
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_PenMotionEvent pmotion;
|
public SDL_PenMotionEvent pmotion;
|
||||||
|
|
@ -1105,12 +995,6 @@ namespace SDL
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_PenButtonEvent pbutton;
|
public SDL_PenButtonEvent pbutton;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
|
||||||
public SDL_PenAxisEvent paxis;
|
|
||||||
|
|
||||||
[FieldOffset(0)]
|
|
||||||
public SDL_RenderEvent render;
|
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_DropEvent drop;
|
public SDL_DropEvent drop;
|
||||||
|
|
||||||
|
|
@ -1128,7 +1012,7 @@ namespace SDL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_EventAction
|
public enum SDL_eventaction
|
||||||
{
|
{
|
||||||
SDL_ADDEVENT,
|
SDL_ADDEVENT,
|
||||||
SDL_PEEKEVENT,
|
SDL_PEEKEVENT,
|
||||||
|
|
@ -1141,15 +1025,13 @@ namespace SDL
|
||||||
public static extern void SDL_PumpEvents();
|
public static extern void SDL_PumpEvents();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_PeepEvents(SDL_Event* events, int numevents, SDL_EventAction action, [NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
public static extern int SDL_PeepEvents(SDL_Event* events, int numevents, SDL_eventaction action, [NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasEvent([NativeTypeName("Uint32")] uint type);
|
||||||
public static extern SDLBool SDL_HasEvent([NativeTypeName("Uint32")] uint type);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||||
public static extern SDLBool SDL_HasEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_FlushEvent([NativeTypeName("Uint32")] uint type);
|
public static extern void SDL_FlushEvent([NativeTypeName("Uint32")] uint type);
|
||||||
|
|
@ -1158,53 +1040,56 @@ namespace SDL
|
||||||
public static extern void SDL_FlushEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
public static extern void SDL_FlushEvents([NativeTypeName("Uint32")] uint minType, [NativeTypeName("Uint32")] uint maxType);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_PollEvent(SDL_Event* @event);
|
||||||
public static extern SDLBool SDL_PollEvent(SDL_Event* @event);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WaitEvent(SDL_Event* @event);
|
||||||
public static extern SDLBool SDL_WaitEvent(SDL_Event* @event);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS);
|
||||||
public static extern SDLBool SDL_WaitEventTimeout(SDL_Event* @event, [NativeTypeName("Sint32")] int timeoutMS);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_PushEvent(SDL_Event* @event);
|
||||||
public static extern SDLBool SDL_PushEvent(SDL_Event* @event);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> filter, [NativeTypeName("void*")] IntPtr userdata);
|
public static extern void SDL_SetEventFilter([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int>* filter, [NativeTypeName("void **")] IntPtr* userdata);
|
||||||
public static extern SDLBool SDL_GetEventFilter([NativeTypeName("SDL_EventFilter *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool>* filter, [NativeTypeName("void **")] IntPtr* userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
public static extern SDLBool SDL_AddEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> filter, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_RemoveEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> filter, [NativeTypeName("void*")] IntPtr userdata);
|
public static extern void SDL_DelEventWatch([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDLBool> filter, [NativeTypeName("void*")] IntPtr userdata);
|
public static extern void SDL_FilterEvents([NativeTypeName("SDL_EventFilter")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> filter, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, [NativeTypeName("bool")] SDLBool enabled);
|
public static extern void SDL_SetEventEnabled([NativeTypeName("Uint32")] uint type, SDL_bool enabled);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_EventEnabled([NativeTypeName("Uint32")] uint type);
|
||||||
public static extern SDLBool SDL_EventEnabled([NativeTypeName("Uint32")] uint type);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint32")]
|
[return: NativeTypeName("Uint32")]
|
||||||
public static extern uint SDL_RegisterEvents(int numevents);
|
public static extern uint SDL_RegisterEvents(int numevents);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Window* SDL_GetWindowFromEvent([NativeTypeName("const SDL_Event *")] SDL_Event* @event);
|
[return: NativeTypeName("void*")]
|
||||||
|
public static extern IntPtr SDL_AllocateEventMemory([NativeTypeName("size_t")] nuint size);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[NativeTypeName("#define SDL_RELEASED 0")]
|
||||||
public static extern int SDL_GetEventDescription([NativeTypeName("const SDL_Event *")] SDL_Event* @event, [NativeTypeName("char *")] byte* buf, int buflen);
|
public const int SDL_RELEASED = 0;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_PRESSED 1")]
|
||||||
|
public const int SDL_PRESSED = 1;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_TEXTEDITINGEVENT_TEXT_SIZE 64")]
|
||||||
|
public const int SDL_TEXTEDITINGEVENT_TEXT_SIZE = 64;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_DROPEVENT_DATA_SIZE 64")]
|
||||||
|
public const int SDL_DROPEVENT_DATA_SIZE = 64;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ namespace SDL
|
||||||
SDL_FOLDER_SCREENSHOTS,
|
SDL_FOLDER_SCREENSHOTS,
|
||||||
SDL_FOLDER_TEMPLATES,
|
SDL_FOLDER_TEMPLATES,
|
||||||
SDL_FOLDER_VIDEOS,
|
SDL_FOLDER_VIDEOS,
|
||||||
SDL_FOLDER_COUNT,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_PathType
|
public enum SDL_PathType
|
||||||
|
|
@ -66,17 +65,10 @@ namespace SDL
|
||||||
public SDL_Time access_time;
|
public SDL_Time access_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_EnumerationResult
|
|
||||||
{
|
|
||||||
SDL_ENUM_CONTINUE,
|
|
||||||
SDL_ENUM_SUCCESS,
|
|
||||||
SDL_ENUM_FAILURE,
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetBasePath", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetBasePath", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetBasePath();
|
public static extern byte* Unsafe_SDL_GetBasePath();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrefPath", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetPrefPath", ExactSpelling = true)]
|
||||||
|
|
@ -84,42 +76,29 @@ namespace SDL
|
||||||
public static extern byte* Unsafe_SDL_GetPrefPath([NativeTypeName("const char *")] byte* org, [NativeTypeName("const char *")] byte* app);
|
public static extern byte* Unsafe_SDL_GetPrefPath([NativeTypeName("const char *")] byte* org, [NativeTypeName("const char *")] byte* app);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetUserFolder", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetUserFolder", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetUserFolder(SDL_Folder folder);
|
public static extern byte* Unsafe_SDL_GetUserFolder(SDL_Folder folder);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_CreateDirectory([NativeTypeName("const char *")] byte* path);
|
||||||
public static extern SDLBool SDL_CreateDirectory([NativeTypeName("const char *")] byte* path);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, int> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
public static extern SDLBool SDL_EnumerateDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("SDL_EnumerateDirectoryCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, SDL_EnumerationResult> callback, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RemovePath([NativeTypeName("const char *")] byte* path);
|
||||||
public static extern SDLBool SDL_RemovePath([NativeTypeName("const char *")] byte* path);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
||||||
public static extern SDLBool SDL_RenamePath([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info);
|
||||||
public static extern SDLBool SDL_CopyFile([NativeTypeName("const char *")] byte* oldpath, [NativeTypeName("const char *")] byte* newpath);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_GetPathInfo([NativeTypeName("const char *")] byte* path, SDL_PathInfo* info);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char **")]
|
[return: NativeTypeName("char **")]
|
||||||
public static extern byte** SDL_GlobDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("const char *")] byte* pattern, SDL_GlobFlags flags, int* count);
|
public static extern byte** SDL_GlobDirectory([NativeTypeName("const char *")] byte* path, [NativeTypeName("const char *")] byte* pattern, [NativeTypeName("Uint32")] uint flags, int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetCurrentDirectory", ExactSpelling = true)]
|
[NativeTypeName("#define SDL_GLOB_CASEINSENSITIVE (1 << 0)")]
|
||||||
[return: NativeTypeName("char *")]
|
public const int SDL_GLOB_CASEINSENSITIVE = (1 << 0);
|
||||||
public static extern byte* Unsafe_SDL_GetCurrentDirectory();
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_GLOB_CASEINSENSITIVE (1u << 0)")]
|
|
||||||
public const uint SDL_GLOB_CASEINSENSITIVE = (1U << 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,7 @@ namespace SDL
|
||||||
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
|
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
|
||||||
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
|
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
|
||||||
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR,
|
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR,
|
||||||
SDL_GAMEPAD_TYPE_GAMECUBE,
|
SDL_GAMEPAD_TYPE_MAX,
|
||||||
SDL_GAMEPAD_TYPE_COUNT,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_GamepadButton
|
public enum SDL_GamepadButton
|
||||||
|
|
@ -78,7 +77,7 @@ namespace SDL
|
||||||
SDL_GAMEPAD_BUTTON_MISC4,
|
SDL_GAMEPAD_BUTTON_MISC4,
|
||||||
SDL_GAMEPAD_BUTTON_MISC5,
|
SDL_GAMEPAD_BUTTON_MISC5,
|
||||||
SDL_GAMEPAD_BUTTON_MISC6,
|
SDL_GAMEPAD_BUTTON_MISC6,
|
||||||
SDL_GAMEPAD_BUTTON_COUNT,
|
SDL_GAMEPAD_BUTTON_MAX,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_GamepadButtonLabel
|
public enum SDL_GamepadButtonLabel
|
||||||
|
|
@ -103,7 +102,7 @@ namespace SDL
|
||||||
SDL_GAMEPAD_AXIS_RIGHTY,
|
SDL_GAMEPAD_AXIS_RIGHTY,
|
||||||
SDL_GAMEPAD_AXIS_LEFT_TRIGGER,
|
SDL_GAMEPAD_AXIS_LEFT_TRIGGER,
|
||||||
SDL_GAMEPAD_AXIS_RIGHT_TRIGGER,
|
SDL_GAMEPAD_AXIS_RIGHT_TRIGGER,
|
||||||
SDL_GAMEPAD_AXIS_COUNT,
|
SDL_GAMEPAD_AXIS_MAX,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_GamepadBindingType
|
public enum SDL_GamepadBindingType
|
||||||
|
|
@ -118,12 +117,12 @@ namespace SDL
|
||||||
{
|
{
|
||||||
public SDL_GamepadBindingType input_type;
|
public SDL_GamepadBindingType input_type;
|
||||||
|
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L267_C5")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L196_C5")]
|
||||||
public _input_e__Union input;
|
public _input_e__Union input;
|
||||||
|
|
||||||
public SDL_GamepadBindingType output_type;
|
public SDL_GamepadBindingType output_type;
|
||||||
|
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L287_C5")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L216_C5")]
|
||||||
public _output_e__Union output;
|
public _output_e__Union output;
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Explicit)]
|
[StructLayout(LayoutKind.Explicit)]
|
||||||
|
|
@ -133,11 +132,11 @@ namespace SDL
|
||||||
public int button;
|
public int button;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L271_C9")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L200_C9")]
|
||||||
public _axis_e__Struct axis;
|
public _axis_e__Struct axis;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L278_C9")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L207_C9")]
|
||||||
public _hat_e__Struct hat;
|
public _hat_e__Struct hat;
|
||||||
|
|
||||||
public partial struct _axis_e__Struct
|
public partial struct _axis_e__Struct
|
||||||
|
|
@ -164,7 +163,7 @@ namespace SDL
|
||||||
public SDL_GamepadButton button;
|
public SDL_GamepadButton button;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L291_C9")]
|
[NativeTypeName("__AnonymousRecord_SDL_gamepad_L220_C9")]
|
||||||
public _axis_e__Struct axis;
|
public _axis_e__Struct axis;
|
||||||
|
|
||||||
public partial struct _axis_e__Struct
|
public partial struct _axis_e__Struct
|
||||||
|
|
@ -184,14 +183,13 @@ namespace SDL
|
||||||
public static extern int SDL_AddGamepadMapping([NativeTypeName("const char *")] byte* mapping);
|
public static extern int SDL_AddGamepadMapping([NativeTypeName("const char *")] byte* mapping);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, [NativeTypeName("bool")] SDLBool closeio);
|
public static extern int SDL_AddGamepadMappingsFromIO(SDL_IOStream* src, SDL_bool closeio);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_AddGamepadMappingsFromFile([NativeTypeName("const char *")] byte* file);
|
public static extern int SDL_AddGamepadMappingsFromFile([NativeTypeName("const char *")] byte* file);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ReloadGamepadMappings();
|
||||||
public static extern SDLBool SDL_ReloadGamepadMappings();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char **")]
|
[return: NativeTypeName("char **")]
|
||||||
|
|
@ -199,68 +197,66 @@ namespace SDL
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMappingForGUID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMappingForGUID", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadMappingForGUID(SDL_GUID guid);
|
public static extern byte* Unsafe_SDL_GetGamepadMappingForGUID([NativeTypeName("SDL_JoystickGUID")] SDL_GUID guid);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMapping", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMapping", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadMapping(SDL_Gamepad* gamepad);
|
public static extern byte* Unsafe_SDL_GetGamepadMapping(SDL_Gamepad* gamepad);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping);
|
||||||
public static extern SDLBool SDL_SetGamepadMapping(SDL_JoystickID instance_id, [NativeTypeName("const char *")] byte* mapping);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasGamepad();
|
||||||
public static extern SDLBool SDL_HasGamepad();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_JoystickID* SDL_GetGamepads(int* count);
|
public static extern SDL_JoystickID* SDL_GetGamepads(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_IsGamepad(SDL_JoystickID instance_id);
|
||||||
public static extern SDLBool SDL_IsGamepad(SDL_JoystickID instance_id);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadNameForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadInstanceName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadNameForID(SDL_JoystickID instance_id);
|
public static extern byte* Unsafe_SDL_GetGamepadInstanceName(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadPathForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadInstancePath", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadPathForID(SDL_JoystickID instance_id);
|
public static extern byte* Unsafe_SDL_GetGamepadInstancePath(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id);
|
public static extern int SDL_GetGamepadInstancePlayerIndex(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GUID SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id);
|
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||||
|
public static extern SDL_GUID SDL_GetGamepadInstanceGUID(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
public static extern ushort SDL_GetGamepadVendorForID(SDL_JoystickID instance_id);
|
public static extern ushort SDL_GetGamepadInstanceVendor(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
public static extern ushort SDL_GetGamepadProductForID(SDL_JoystickID instance_id);
|
public static extern ushort SDL_GetGamepadInstanceProduct(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
public static extern ushort SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id);
|
public static extern ushort SDL_GetGamepadInstanceProductVersion(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GamepadType SDL_GetGamepadTypeForID(SDL_JoystickID instance_id);
|
public static extern SDL_GamepadType SDL_GetGamepadInstanceType(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GamepadType SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id);
|
public static extern SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadMappingForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadInstanceMapping", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("char *")]
|
[return: NativeTypeName("char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);
|
public static extern byte* Unsafe_SDL_GetGamepadInstanceMapping(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Gamepad* SDL_OpenGamepad(SDL_JoystickID instance_id);
|
public static extern SDL_Gamepad* SDL_OpenGamepad(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Gamepad* SDL_GetGamepadFromID(SDL_JoystickID instance_id);
|
public static extern SDL_Gamepad* SDL_GetGamepadFromInstanceID(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Gamepad* SDL_GetGamepadFromPlayerIndex(int player_index);
|
public static extern SDL_Gamepad* SDL_GetGamepadFromPlayerIndex(int player_index);
|
||||||
|
|
@ -269,7 +265,7 @@ namespace SDL
|
||||||
public static extern SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad* gamepad);
|
public static extern SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad* gamepad);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad* gamepad);
|
public static extern SDL_JoystickID SDL_GetGamepadInstanceID(SDL_Gamepad* gamepad);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadName", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetGamepadName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
|
|
@ -289,8 +285,7 @@ namespace SDL
|
||||||
public static extern int SDL_GetGamepadPlayerIndex(SDL_Gamepad* gamepad);
|
public static extern int SDL_GetGamepadPlayerIndex(SDL_Gamepad* gamepad);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index);
|
||||||
public static extern SDLBool SDL_SetGamepadPlayerIndex(SDL_Gamepad* gamepad, int player_index);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
|
|
@ -323,18 +318,16 @@ namespace SDL
|
||||||
public static extern SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad* gamepad, int* percent);
|
public static extern SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad* gamepad, int* percent);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GamepadConnected(SDL_Gamepad* gamepad);
|
||||||
public static extern SDLBool SDL_GamepadConnected(SDL_Gamepad* gamepad);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Joystick* SDL_GetGamepadJoystick(SDL_Gamepad* gamepad);
|
public static extern SDL_Joystick* SDL_GetGamepadJoystick(SDL_Gamepad* gamepad);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_SetGamepadEventsEnabled([NativeTypeName("bool")] SDLBool enabled);
|
public static extern void SDL_SetGamepadEventsEnabled(SDL_bool enabled);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GamepadEventsEnabled();
|
||||||
public static extern SDLBool SDL_GamepadEventsEnabled();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad* gamepad, int* count);
|
public static extern SDL_GamepadBinding** SDL_GetGamepadBindings(SDL_Gamepad* gamepad, int* count);
|
||||||
|
|
@ -357,8 +350,7 @@ namespace SDL
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);
|
public static extern byte* Unsafe_SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis);
|
||||||
public static extern SDLBool SDL_GamepadHasAxis(SDL_Gamepad* gamepad, SDL_GamepadAxis axis);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Sint16")]
|
[return: NativeTypeName("Sint16")]
|
||||||
|
|
@ -372,12 +364,11 @@ namespace SDL
|
||||||
public static extern byte* Unsafe_SDL_GetGamepadStringForButton(SDL_GamepadButton button);
|
public static extern byte* Unsafe_SDL_GetGamepadStringForButton(SDL_GamepadButton button);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button);
|
||||||
public static extern SDLBool SDL_GamepadHasButton(SDL_Gamepad* gamepad, SDL_GamepadButton button);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
[return: NativeTypeName("Uint8")]
|
||||||
public static extern SDLBool SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button);
|
public static extern byte SDL_GetGamepadButton(SDL_Gamepad* gamepad, SDL_GamepadButton button);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button);
|
public static extern SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button);
|
||||||
|
|
@ -392,43 +383,34 @@ namespace SDL
|
||||||
public static extern int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad* gamepad, int touchpad);
|
public static extern int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad* gamepad, int touchpad);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, [NativeTypeName("Uint8 *")] byte* state, float* x, float* y, float* pressure);
|
||||||
public static extern SDLBool SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, [NativeTypeName("bool *")] SDLBool* down, float* x, float* y, float* pressure);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||||
public static extern SDLBool SDL_GamepadHasSensor(SDL_Gamepad* gamepad, SDL_SensorType type);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, SDL_bool enabled);
|
||||||
public static extern SDLBool SDL_SetGamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type, [NativeTypeName("bool")] SDLBool enabled);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||||
public static extern SDLBool SDL_GamepadSensorEnabled(SDL_Gamepad* gamepad, SDL_SensorType type);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern float SDL_GetGamepadSensorDataRate(SDL_Gamepad* gamepad, SDL_SensorType type);
|
public static extern float SDL_GetGamepadSensorDataRate(SDL_Gamepad* gamepad, SDL_SensorType type);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values);
|
||||||
public static extern SDLBool SDL_GetGamepadSensorData(SDL_Gamepad* gamepad, SDL_SensorType type, float* data, int num_values);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
||||||
public static extern SDLBool SDL_RumbleGamepad(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
||||||
public static extern SDLBool SDL_RumbleGamepadTriggers(SDL_Gamepad* gamepad, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue);
|
||||||
public static extern SDLBool SDL_SetGamepadLED(SDL_Gamepad* gamepad, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size);
|
||||||
public static extern SDLBool SDL_SendGamepadEffect(SDL_Gamepad* gamepad, [NativeTypeName("const void *")] IntPtr data, int size);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_CloseGamepad(SDL_Gamepad* gamepad);
|
public static extern void SDL_CloseGamepad(SDL_Gamepad* gamepad);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -43,9 +43,9 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_GUIDToString(SDL_GUID guid, [NativeTypeName("char *")] byte* pszGUID, int cbGUID);
|
public static extern int SDL_GUIDToString(SDL_GUID guid, [NativeTypeName("char *")] byte* pszGUID, int cbGUID);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GUID SDL_StringToGUID([NativeTypeName("const char *")] byte* pchGUID);
|
public static extern SDL_GUID SDL_GUIDFromString([NativeTypeName("const char *")] byte* pchGUID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_HapticDirection
|
public partial struct SDL_HapticDirection
|
||||||
{
|
{
|
||||||
public SDL_HapticDirectionType type;
|
[NativeTypeName("Uint8")]
|
||||||
|
public byte type;
|
||||||
|
|
||||||
[NativeTypeName("Sint32[3]")]
|
[NativeTypeName("Sint32[3]")]
|
||||||
public _dir_e__FixedBuffer dir;
|
public _dir_e__FixedBuffer dir;
|
||||||
|
|
@ -48,7 +49,8 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_HapticConstant
|
public partial struct SDL_HapticConstant
|
||||||
{
|
{
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
public SDL_HapticDirection direction;
|
public SDL_HapticDirection direction;
|
||||||
|
|
||||||
|
|
@ -82,7 +84,8 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_HapticPeriodic
|
public partial struct SDL_HapticPeriodic
|
||||||
{
|
{
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
public SDL_HapticDirection direction;
|
public SDL_HapticDirection direction;
|
||||||
|
|
||||||
|
|
@ -125,7 +128,8 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_HapticCondition
|
public partial struct SDL_HapticCondition
|
||||||
{
|
{
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
public SDL_HapticDirection direction;
|
public SDL_HapticDirection direction;
|
||||||
|
|
||||||
|
|
@ -198,7 +202,8 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_HapticRamp
|
public partial struct SDL_HapticRamp
|
||||||
{
|
{
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
public SDL_HapticDirection direction;
|
public SDL_HapticDirection direction;
|
||||||
|
|
||||||
|
|
@ -235,7 +240,8 @@ namespace SDL
|
||||||
|
|
||||||
public partial struct SDL_HapticLeftRight
|
public partial struct SDL_HapticLeftRight
|
||||||
{
|
{
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
[NativeTypeName("Uint32")]
|
[NativeTypeName("Uint32")]
|
||||||
public uint length;
|
public uint length;
|
||||||
|
|
@ -249,7 +255,8 @@ namespace SDL
|
||||||
|
|
||||||
public unsafe partial struct SDL_HapticCustom
|
public unsafe partial struct SDL_HapticCustom
|
||||||
{
|
{
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
public SDL_HapticDirection direction;
|
public SDL_HapticDirection direction;
|
||||||
|
|
||||||
|
|
@ -294,7 +301,8 @@ namespace SDL
|
||||||
public partial struct SDL_HapticEffect
|
public partial struct SDL_HapticEffect
|
||||||
{
|
{
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_HapticEffectType type;
|
[NativeTypeName("Uint16")]
|
||||||
|
public ushort type;
|
||||||
|
|
||||||
[FieldOffset(0)]
|
[FieldOffset(0)]
|
||||||
public SDL_HapticConstant constant;
|
public SDL_HapticConstant constant;
|
||||||
|
|
@ -320,33 +328,31 @@ namespace SDL
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_HapticID* SDL_GetHaptics(int* count);
|
public static extern SDL_HapticID* SDL_GetHaptics(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticNameForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticInstanceName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetHapticNameForID(SDL_HapticID instance_id);
|
public static extern byte* Unsafe_SDL_GetHapticInstanceName(SDL_HapticID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Haptic* SDL_OpenHaptic(SDL_HapticID instance_id);
|
public static extern SDL_Haptic* SDL_OpenHaptic(SDL_HapticID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Haptic* SDL_GetHapticFromID(SDL_HapticID instance_id);
|
public static extern SDL_Haptic* SDL_GetHapticFromInstanceID(SDL_HapticID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_HapticID SDL_GetHapticID(SDL_Haptic* haptic);
|
public static extern SDL_HapticID SDL_GetHapticInstanceID(SDL_Haptic* haptic);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticName", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetHapticName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetHapticName(SDL_Haptic* haptic);
|
public static extern byte* Unsafe_SDL_GetHapticName(SDL_Haptic* haptic);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_IsMouseHaptic();
|
||||||
public static extern SDLBool SDL_IsMouseHaptic();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Haptic* SDL_OpenHapticFromMouse();
|
public static extern SDL_Haptic* SDL_OpenHapticFromMouse();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_IsJoystickHaptic(SDL_Joystick* joystick);
|
||||||
public static extern SDLBool SDL_IsJoystickHaptic(SDL_Joystick* joystick);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Haptic* SDL_OpenHapticFromJoystick(SDL_Joystick* joystick);
|
public static extern SDL_Haptic* SDL_OpenHapticFromJoystick(SDL_Joystick* joystick);
|
||||||
|
|
@ -368,69 +374,52 @@ namespace SDL
|
||||||
public static extern int SDL_GetNumHapticAxes(SDL_Haptic* haptic);
|
public static extern int SDL_GetNumHapticAxes(SDL_Haptic* haptic);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
||||||
public static extern SDLBool SDL_HapticEffectSupported(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_HapticEffectID SDL_CreateHapticEffect(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
public static extern int SDL_CreateHapticEffect(SDL_Haptic* haptic, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* effect);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_UpdateHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data);
|
||||||
public static extern SDLBool SDL_UpdateHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect, [NativeTypeName("const SDL_HapticEffect *")] SDL_HapticEffect* data);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RunHapticEffect(SDL_Haptic* haptic, int effect, [NativeTypeName("Uint32")] uint iterations);
|
||||||
public static extern SDLBool SDL_RunHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect, [NativeTypeName("Uint32")] uint iterations);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_StopHapticEffect(SDL_Haptic* haptic, int effect);
|
||||||
public static extern SDLBool SDL_StopHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_DestroyHapticEffect(SDL_Haptic* haptic, SDL_HapticEffectID effect);
|
public static extern void SDL_DestroyHapticEffect(SDL_Haptic* haptic, int effect);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetHapticEffectStatus(SDL_Haptic* haptic, int effect);
|
||||||
public static extern SDLBool SDL_GetHapticEffectStatus(SDL_Haptic* haptic, SDL_HapticEffectID effect);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetHapticGain(SDL_Haptic* haptic, int gain);
|
||||||
public static extern SDLBool SDL_SetHapticGain(SDL_Haptic* haptic, int gain);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter);
|
||||||
public static extern SDLBool SDL_SetHapticAutocenter(SDL_Haptic* haptic, int autocenter);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_PauseHaptic(SDL_Haptic* haptic);
|
||||||
public static extern SDLBool SDL_PauseHaptic(SDL_Haptic* haptic);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ResumeHaptic(SDL_Haptic* haptic);
|
||||||
public static extern SDLBool SDL_ResumeHaptic(SDL_Haptic* haptic);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_StopHapticEffects(SDL_Haptic* haptic);
|
||||||
public static extern SDLBool SDL_StopHapticEffects(SDL_Haptic* haptic);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HapticRumbleSupported(SDL_Haptic* haptic);
|
||||||
public static extern SDLBool SDL_HapticRumbleSupported(SDL_Haptic* haptic);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_InitHapticRumble(SDL_Haptic* haptic);
|
||||||
public static extern SDLBool SDL_InitHapticRumble(SDL_Haptic* haptic);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length);
|
||||||
public static extern SDLBool SDL_PlayHapticRumble(SDL_Haptic* haptic, float strength, [NativeTypeName("Uint32")] uint length);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_StopHapticRumble(SDL_Haptic* haptic);
|
||||||
public static extern SDLBool SDL_StopHapticRumble(SDL_Haptic* haptic);
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAPTIC_INFINITY 4294967295U")]
|
|
||||||
public const uint SDL_HAPTIC_INFINITY = 4294967295U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAPTIC_CONSTANT (1u<<0)")]
|
[NativeTypeName("#define SDL_HAPTIC_CONSTANT (1u<<0)")]
|
||||||
public const uint SDL_HAPTIC_CONSTANT = (1U << 0);
|
public const uint SDL_HAPTIC_CONSTANT = (1U << 0);
|
||||||
|
|
@ -438,8 +427,8 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HAPTIC_SINE (1u<<1)")]
|
[NativeTypeName("#define SDL_HAPTIC_SINE (1u<<1)")]
|
||||||
public const uint SDL_HAPTIC_SINE = (1U << 1);
|
public const uint SDL_HAPTIC_SINE = (1U << 1);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAPTIC_SQUARE (1u<<2)")]
|
[NativeTypeName("#define SDL_HAPTIC_SQUARE (1<<2)")]
|
||||||
public const uint SDL_HAPTIC_SQUARE = (1U << 2);
|
public const int SDL_HAPTIC_SQUARE = (1 << 2);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAPTIC_TRIANGLE (1u<<3)")]
|
[NativeTypeName("#define SDL_HAPTIC_TRIANGLE (1u<<3)")]
|
||||||
public const uint SDL_HAPTIC_TRIANGLE = (1U << 3);
|
public const uint SDL_HAPTIC_TRIANGLE = (1U << 3);
|
||||||
|
|
@ -503,5 +492,8 @@ namespace SDL
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAPTIC_STEERING_AXIS 3")]
|
[NativeTypeName("#define SDL_HAPTIC_STEERING_AXIS 3")]
|
||||||
public const int SDL_HAPTIC_STEERING_AXIS = 3;
|
public const int SDL_HAPTIC_STEERING_AXIS = 3;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HAPTIC_INFINITY 4294967295U")]
|
||||||
|
public const uint SDL_HAPTIC_INFINITY = 4294967295U;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,9 +108,6 @@ namespace SDL
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_hid_device* SDL_hid_open_path([NativeTypeName("const char *")] byte* path);
|
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)]
|
[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);
|
public static extern int SDL_hid_write(SDL_hid_device* dev, [NativeTypeName("const unsigned char *")] byte* data, [NativeTypeName("size_t")] nuint length);
|
||||||
|
|
||||||
|
|
@ -154,9 +151,6 @@ namespace SDL
|
||||||
public static extern int SDL_hid_get_report_descriptor(SDL_hid_device* dev, [NativeTypeName("unsigned char *")] byte* buf, [NativeTypeName("size_t")] nuint buf_size);
|
public static extern int SDL_hid_get_report_descriptor(SDL_hid_device* dev, [NativeTypeName("unsigned char *")] byte* buf, [NativeTypeName("size_t")] nuint buf_size);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_hid_ble_scan([NativeTypeName("bool")] SDLBool active);
|
public static extern void SDL_hid_ble_scan(SDL_bool 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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,13 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority);
|
||||||
public static extern SDLBool SDL_SetHintWithPriority([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value, SDL_HintPriority priority);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
||||||
public static extern SDLBool SDL_SetHint([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ResetHint([NativeTypeName("const char *")] byte* name);
|
||||||
public static extern SDLBool SDL_ResetHint([NativeTypeName("const char *")] byte* name);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ResetHints();
|
public static extern void SDL_ResetHints();
|
||||||
|
|
@ -57,15 +54,13 @@ namespace SDL
|
||||||
public static extern byte* Unsafe_SDL_GetHint([NativeTypeName("const char *")] byte* name);
|
public static extern byte* Unsafe_SDL_GetHint([NativeTypeName("const char *")] byte* name);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, SDL_bool default_value);
|
||||||
public static extern SDLBool SDL_GetHintBoolean([NativeTypeName("const char *")] byte* name, [NativeTypeName("bool")] SDLBool default_value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
public static extern SDLBool SDL_AddHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_RemoveHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
public static extern void SDL_DelHintCallback([NativeTypeName("const char *")] byte* name, [NativeTypeName("SDL_HintCallback")] delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED \"SDL_ALLOW_ALT_TAB_WHILE_GRABBED\"")]
|
[NativeTypeName("#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED \"SDL_ALLOW_ALT_TAB_WHILE_GRABBED\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED => "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED => "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"u8;
|
||||||
|
|
@ -76,8 +71,8 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE \"SDL_ANDROID_BLOCK_ON_PAUSE\"")]
|
[NativeTypeName("#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE \"SDL_ANDROID_BLOCK_ON_PAUSE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_BLOCK_ON_PAUSE => "SDL_ANDROID_BLOCK_ON_PAUSE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_BLOCK_ON_PAUSE => "SDL_ANDROID_BLOCK_ON_PAUSE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_ANDROID_LOW_LATENCY_AUDIO \"SDL_ANDROID_LOW_LATENCY_AUDIO\"")]
|
[NativeTypeName("#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO \"SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_LOW_LATENCY_AUDIO => "SDL_ANDROID_LOW_LATENCY_AUDIO"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO => "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON \"SDL_ANDROID_TRAP_BACK_BUTTON\"")]
|
[NativeTypeName("#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON \"SDL_ANDROID_TRAP_BACK_BUTTON\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_TRAP_BACK_BUTTON => "SDL_ANDROID_TRAP_BACK_BUTTON"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_ANDROID_TRAP_BACK_BUTTON => "SDL_ANDROID_TRAP_BACK_BUTTON"u8;
|
||||||
|
|
@ -94,23 +89,11 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION \"SDL_APPLE_TV_REMOTE_ALLOW_ROTATION\"")]
|
[NativeTypeName("#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION \"SDL_APPLE_TV_REMOTE_ALLOW_ROTATION\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION => "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION => "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE \"SDL_AUDIO_ALSA_DEFAULT_DEVICE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE => "SDL_AUDIO_ALSA_DEFAULT_DEVICE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE \"SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE => "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE \"SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE => "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_CATEGORY \"SDL_AUDIO_CATEGORY\"")]
|
[NativeTypeName("#define SDL_HINT_AUDIO_CATEGORY \"SDL_AUDIO_CATEGORY\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_CATEGORY => "SDL_AUDIO_CATEGORY"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_CATEGORY => "SDL_AUDIO_CATEGORY"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_CHANNELS \"SDL_AUDIO_CHANNELS\"")]
|
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_APP_NAME \"SDL_AUDIO_DEVICE_APP_NAME\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_CHANNELS => "SDL_AUDIO_CHANNELS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DEVICE_APP_NAME => "SDL_AUDIO_DEVICE_APP_NAME"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME \"SDL_AUDIO_DEVICE_APP_ICON_NAME\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME => "SDL_AUDIO_DEVICE_APP_ICON_NAME"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES \"SDL_AUDIO_DEVICE_SAMPLE_FRAMES\"")]
|
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES \"SDL_AUDIO_DEVICE_SAMPLE_FRAMES\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES => "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES => "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"u8;
|
||||||
|
|
@ -121,30 +104,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE \"SDL_AUDIO_DEVICE_STREAM_ROLE\"")]
|
[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;
|
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;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DISK_OUTPUT_FILE \"SDL_AUDIO_DISK_OUTPUT_FILE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DISK_OUTPUT_FILE => "SDL_AUDIO_DISK_OUTPUT_FILE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DISK_TIMESCALE \"SDL_AUDIO_DISK_TIMESCALE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DISK_TIMESCALE => "SDL_AUDIO_DISK_TIMESCALE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DRIVER \"SDL_AUDIO_DRIVER\"")]
|
[NativeTypeName("#define SDL_HINT_AUDIO_DRIVER \"SDL_AUDIO_DRIVER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DRIVER => "SDL_AUDIO_DRIVER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DRIVER => "SDL_AUDIO_DRIVER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_DUMMY_TIMESCALE \"SDL_AUDIO_DUMMY_TIMESCALE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_DUMMY_TIMESCALE => "SDL_AUDIO_DUMMY_TIMESCALE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_FORMAT \"SDL_AUDIO_FORMAT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_FORMAT => "SDL_AUDIO_FORMAT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_FREQUENCY \"SDL_AUDIO_FREQUENCY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_FREQUENCY => "SDL_AUDIO_FREQUENCY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_AUDIO_INCLUDE_MONITORS \"SDL_AUDIO_INCLUDE_MONITORS\"")]
|
[NativeTypeName("#define SDL_HINT_AUDIO_INCLUDE_MONITORS \"SDL_AUDIO_INCLUDE_MONITORS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_INCLUDE_MONITORS => "SDL_AUDIO_INCLUDE_MONITORS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_AUDIO_INCLUDE_MONITORS => "SDL_AUDIO_INCLUDE_MONITORS"u8;
|
||||||
|
|
||||||
|
|
@ -172,9 +134,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_DISPLAY_USABLE_BOUNDS \"SDL_DISPLAY_USABLE_BOUNDS\"")]
|
[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;
|
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\"")]
|
[NativeTypeName("#define SDL_HINT_EMSCRIPTEN_ASYNCIFY \"SDL_EMSCRIPTEN_ASYNCIFY\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_EMSCRIPTEN_ASYNCIFY => "SDL_EMSCRIPTEN_ASYNCIFY"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_EMSCRIPTEN_ASYNCIFY => "SDL_EMSCRIPTEN_ASYNCIFY"u8;
|
||||||
|
|
||||||
|
|
@ -184,15 +143,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT \"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\"")]
|
[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;
|
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\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_HINT_ENABLE_SCREEN_KEYBOARD => "SDL_ENABLE_SCREEN_KEYBOARD"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_EVDEV_DEVICES \"SDL_EVDEV_DEVICES\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_EVDEV_DEVICES => "SDL_EVDEV_DEVICES"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_EVENT_LOGGING \"SDL_EVENT_LOGGING\"")]
|
[NativeTypeName("#define SDL_HINT_EVENT_LOGGING \"SDL_EVENT_LOGGING\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_EVENT_LOGGING => "SDL_EVENT_LOGGING"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_EVENT_LOGGING => "SDL_EVENT_LOGGING"u8;
|
||||||
|
|
||||||
|
|
@ -235,26 +188,17 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_GDK_TEXTINPUT_TITLE \"SDL_GDK_TEXTINPUT_TITLE\"")]
|
[NativeTypeName("#define SDL_HINT_GDK_TEXTINPUT_TITLE \"SDL_GDK_TEXTINPUT_TITLE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_GDK_TEXTINPUT_TITLE => "SDL_GDK_TEXTINPUT_TITLE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_GDK_TEXTINPUT_TITLE => "SDL_GDK_TEXTINPUT_TITLE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_HIDAPI_LIBUSB \"SDL_HIDAPI_LIBUSB\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_LIBUSB => "SDL_HIDAPI_LIBUSB"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_HIDAPI_LIBUSB_WHITELIST \"SDL_HIDAPI_LIBUSB_WHITELIST\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_LIBUSB_WHITELIST => "SDL_HIDAPI_LIBUSB_WHITELIST"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_HIDAPI_UDEV \"SDL_HIDAPI_UDEV\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_UDEV => "SDL_HIDAPI_UDEV"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_GPU_DRIVER \"SDL_GPU_DRIVER\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_GPU_DRIVER => "SDL_GPU_DRIVER"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS \"SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS\"")]
|
[NativeTypeName("#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS \"SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS => "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS => "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_HIDAPI_IGNORE_DEVICES \"SDL_HIDAPI_IGNORE_DEVICES\"")]
|
[NativeTypeName("#define SDL_HINT_HIDAPI_IGNORE_DEVICES \"SDL_HIDAPI_IGNORE_DEVICES\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_IGNORE_DEVICES => "SDL_HIDAPI_IGNORE_DEVICES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_HIDAPI_IGNORE_DEVICES => "SDL_HIDAPI_IGNORE_DEVICES"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_IME_IMPLEMENTED_UI \"SDL_IME_IMPLEMENTED_UI\"")]
|
[NativeTypeName("#define SDL_HINT_IME_INTERNAL_EDITING \"SDL_IME_INTERNAL_EDITING\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_IME_IMPLEMENTED_UI => "SDL_IME_IMPLEMENTED_UI"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_IME_INTERNAL_EDITING => "SDL_IME_INTERNAL_EDITING"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_IME_SHOW_UI \"SDL_IME_SHOW_UI\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_IME_SHOW_UI => "SDL_IME_SHOW_UI"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_IOS_HIDE_HOME_INDICATOR \"SDL_IOS_HIDE_HOME_INDICATOR\"")]
|
[NativeTypeName("#define SDL_HINT_IOS_HIDE_HOME_INDICATOR \"SDL_IOS_HIDE_HOME_INDICATOR\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_IOS_HIDE_HOME_INDICATOR => "SDL_IOS_HIDE_HOME_INDICATOR"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_IOS_HIDE_HOME_INDICATOR => "SDL_IOS_HIDE_HOME_INDICATOR"u8;
|
||||||
|
|
@ -277,18 +221,12 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_DEVICE \"SDL_JOYSTICK_DEVICE\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_DEVICE \"SDL_JOYSTICK_DEVICE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_DEVICE => "SDL_JOYSTICK_DEVICE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_DEVICE => "SDL_JOYSTICK_DEVICE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_ENHANCED_REPORTS \"SDL_JOYSTICK_ENHANCED_REPORTS\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_ENHANCED_REPORTS => "SDL_JOYSTICK_ENHANCED_REPORTS"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES \"SDL_JOYSTICK_FLIGHTSTICK_DEVICES\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES \"SDL_JOYSTICK_FLIGHTSTICK_DEVICES\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES => "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES => "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED \"SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED \"SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED => "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED => "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_GAMEINPUT \"SDL_JOYSTICK_GAMEINPUT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_GAMEINPUT => "SDL_JOYSTICK_GAMEINPUT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES \"SDL_JOYSTICK_GAMECUBE_DEVICES\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES \"SDL_JOYSTICK_GAMECUBE_DEVICES\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_GAMECUBE_DEVICES => "SDL_JOYSTICK_GAMECUBE_DEVICES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_GAMECUBE_DEVICES => "SDL_JOYSTICK_GAMECUBE_DEVICES"u8;
|
||||||
|
|
||||||
|
|
@ -328,8 +266,8 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS4 \"SDL_JOYSTICK_HIDAPI_PS4\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS4 \"SDL_JOYSTICK_HIDAPI_PS4\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS4 => "SDL_JOYSTICK_HIDAPI_PS4"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS4 => "SDL_JOYSTICK_HIDAPI_PS4"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL \"SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE \"SDL_JOYSTICK_HIDAPI_PS4_RUMBLE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL => "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE => "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS5 \"SDL_JOYSTICK_HIDAPI_PS5\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS5 \"SDL_JOYSTICK_HIDAPI_PS5\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS5 => "SDL_JOYSTICK_HIDAPI_PS5"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS5 => "SDL_JOYSTICK_HIDAPI_PS5"u8;
|
||||||
|
|
@ -337,6 +275,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED \"SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED \"SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED => "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED => "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE \"SDL_JOYSTICK_HIDAPI_PS5_RUMBLE\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE => "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD \"SDL_JOYSTICK_HIDAPI_SHIELD\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD \"SDL_JOYSTICK_HIDAPI_SHIELD\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SHIELD => "SDL_JOYSTICK_HIDAPI_SHIELD"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SHIELD => "SDL_JOYSTICK_HIDAPI_SHIELD"u8;
|
||||||
|
|
||||||
|
|
@ -346,30 +287,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM \"SDL_JOYSTICK_HIDAPI_STEAM\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM \"SDL_JOYSTICK_HIDAPI_STEAM\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAM => "SDL_JOYSTICK_HIDAPI_STEAM"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAM => "SDL_JOYSTICK_HIDAPI_STEAM"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED \"SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED => "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK \"SDL_JOYSTICK_HIDAPI_STEAMDECK\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK \"SDL_JOYSTICK_HIDAPI_STEAMDECK\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK => "SDL_JOYSTICK_HIDAPI_STEAMDECK"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK => "SDL_JOYSTICK_HIDAPI_STEAMDECK"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI \"SDL_JOYSTICK_HIDAPI_STEAM_HORI\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI => "SDL_JOYSTICK_HIDAPI_STEAM_HORI"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_LG4FF \"SDL_JOYSTICK_HIDAPI_LG4FF\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_LG4FF => "SDL_JOYSTICK_HIDAPI_LG4FF"u8;
|
|
||||||
|
|
||||||
[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;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH \"SDL_JOYSTICK_HIDAPI_SWITCH\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH \"SDL_JOYSTICK_HIDAPI_SWITCH\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SWITCH => "SDL_JOYSTICK_HIDAPI_SWITCH"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_SWITCH => "SDL_JOYSTICK_HIDAPI_SWITCH"u8;
|
||||||
|
|
||||||
|
|
@ -379,9 +299,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED \"SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED\"")]
|
[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;
|
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\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS => "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"u8;
|
||||||
|
|
||||||
|
|
@ -409,12 +326,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED \"SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED \"SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED => "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED => "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_GIP \"SDL_JOYSTICK_HIDAPI_GIP\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_GIP => "SDL_JOYSTICK_HIDAPI_GIP"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA \"SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA => "SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_IOKIT \"SDL_JOYSTICK_IOKIT\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_IOKIT \"SDL_JOYSTICK_IOKIT\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_IOKIT => "SDL_JOYSTICK_IOKIT"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_IOKIT => "SDL_JOYSTICK_IOKIT"u8;
|
||||||
|
|
||||||
|
|
@ -463,21 +374,12 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES \"SDL_JOYSTICK_ZERO_CENTERED_DEVICES\"")]
|
[NativeTypeName("#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES \"SDL_JOYSTICK_ZERO_CENTERED_DEVICES\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES => "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES => "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_JOYSTICK_HAPTIC_AXES \"SDL_JOYSTICK_HAPTIC_AXES\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_JOYSTICK_HAPTIC_AXES => "SDL_JOYSTICK_HAPTIC_AXES"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_KEYCODE_OPTIONS \"SDL_KEYCODE_OPTIONS\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_KEYCODE_OPTIONS => "SDL_KEYCODE_OPTIONS"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_KMSDRM_DEVICE_INDEX \"SDL_KMSDRM_DEVICE_INDEX\"")]
|
[NativeTypeName("#define SDL_HINT_KMSDRM_DEVICE_INDEX \"SDL_KMSDRM_DEVICE_INDEX\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_KMSDRM_DEVICE_INDEX => "SDL_KMSDRM_DEVICE_INDEX"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_KMSDRM_DEVICE_INDEX => "SDL_KMSDRM_DEVICE_INDEX"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER \"SDL_KMSDRM_REQUIRE_DRM_MASTER\"")]
|
[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;
|
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\"")]
|
[NativeTypeName("#define SDL_HINT_LOGGING \"SDL_LOGGING\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_LOGGING => "SDL_LOGGING"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_LOGGING => "SDL_LOGGING"u8;
|
||||||
|
|
||||||
|
|
@ -490,15 +392,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH \"SDL_MAC_OPENGL_ASYNC_DISPATCH\"")]
|
[NativeTypeName("#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH \"SDL_MAC_OPENGL_ASYNC_DISPATCH\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH => "SDL_MAC_OPENGL_ASYNC_DISPATCH"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH => "SDL_MAC_OPENGL_ASYNC_DISPATCH"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MAC_OPTION_AS_ALT \"SDL_MAC_OPTION_AS_ALT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MAC_OPTION_AS_ALT => "SDL_MAC_OPTION_AS_ALT"u8;
|
|
||||||
|
|
||||||
[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\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_HINT_MAIN_CALLBACK_RATE => "SDL_MAIN_CALLBACK_RATE"u8;
|
||||||
|
|
||||||
|
|
@ -511,12 +404,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME \"SDL_MOUSE_DOUBLE_CLICK_TIME\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME \"SDL_MOUSE_DOUBLE_CLICK_TIME\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_DOUBLE_CLICK_TIME => "SDL_MOUSE_DOUBLE_CLICK_TIME"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_DOUBLE_CLICK_TIME => "SDL_MOUSE_DOUBLE_CLICK_TIME"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR \"SDL_MOUSE_DEFAULT_SYSTEM_CURSOR\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR => "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE \"SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE => "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH \"SDL_MOUSE_FOCUS_CLICKTHROUGH\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH \"SDL_MOUSE_FOCUS_CLICKTHROUGH\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH => "SDL_MOUSE_FOCUS_CLICKTHROUGH"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH => "SDL_MOUSE_FOCUS_CLICKTHROUGH"u8;
|
||||||
|
|
||||||
|
|
@ -526,6 +413,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER \"SDL_MOUSE_RELATIVE_MODE_CENTER\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER \"SDL_MOUSE_RELATIVE_MODE_CENTER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_MODE_CENTER => "SDL_MOUSE_RELATIVE_MODE_CENTER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_MODE_CENTER => "SDL_MOUSE_RELATIVE_MODE_CENTER"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP \"SDL_MOUSE_RELATIVE_MODE_WARP\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_MODE_WARP => "SDL_MOUSE_RELATIVE_MODE_WARP"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE \"SDL_MOUSE_RELATIVE_SPEED_SCALE\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE \"SDL_MOUSE_RELATIVE_SPEED_SCALE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE => "SDL_MOUSE_RELATIVE_SPEED_SCALE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE => "SDL_MOUSE_RELATIVE_SPEED_SCALE"u8;
|
||||||
|
|
||||||
|
|
@ -535,32 +425,23 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION \"SDL_MOUSE_RELATIVE_WARP_MOTION\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION \"SDL_MOUSE_RELATIVE_WARP_MOTION\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_WARP_MOTION => "SDL_MOUSE_RELATIVE_WARP_MOTION"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_WARP_MOTION => "SDL_MOUSE_RELATIVE_WARP_MOTION"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE \"SDL_MOUSE_RELATIVE_CURSOR_VISIBLE\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE => "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MOUSE_TOUCH_EVENTS \"SDL_MOUSE_TOUCH_EVENTS\"")]
|
[NativeTypeName("#define SDL_HINT_MOUSE_TOUCH_EVENTS \"SDL_MOUSE_TOUCH_EVENTS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_TOUCH_EVENTS => "SDL_MOUSE_TOUCH_EVENTS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_MOUSE_TOUCH_EVENTS => "SDL_MOUSE_TOUCH_EVENTS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_MUTE_CONSOLE_KEYBOARD \"SDL_MUTE_CONSOLE_KEYBOARD\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_MUTE_CONSOLE_KEYBOARD => "SDL_MUTE_CONSOLE_KEYBOARD"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_NO_SIGNAL_HANDLERS \"SDL_NO_SIGNAL_HANDLERS\"")]
|
[NativeTypeName("#define SDL_HINT_NO_SIGNAL_HANDLERS \"SDL_NO_SIGNAL_HANDLERS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_NO_SIGNAL_HANDLERS => "SDL_NO_SIGNAL_HANDLERS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_NO_SIGNAL_HANDLERS => "SDL_NO_SIGNAL_HANDLERS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_OPENGL_LIBRARY \"SDL_OPENGL_LIBRARY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_OPENGL_LIBRARY => "SDL_OPENGL_LIBRARY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_EGL_LIBRARY \"SDL_EGL_LIBRARY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_EGL_LIBRARY => "SDL_EGL_LIBRARY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_OPENGL_ES_DRIVER \"SDL_OPENGL_ES_DRIVER\"")]
|
[NativeTypeName("#define SDL_HINT_OPENGL_ES_DRIVER \"SDL_OPENGL_ES_DRIVER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_OPENGL_ES_DRIVER => "SDL_OPENGL_ES_DRIVER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_OPENGL_ES_DRIVER => "SDL_OPENGL_ES_DRIVER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_OPENVR_LIBRARY \"SDL_OPENVR_LIBRARY\"")]
|
[NativeTypeName("#define SDL_HINT_ORIENTATIONS \"SDL_IOS_ORIENTATIONS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_OPENVR_LIBRARY => "SDL_OPENVR_LIBRARY"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_ORIENTATIONS => "SDL_IOS_ORIENTATIONS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_ORIENTATIONS \"SDL_ORIENTATIONS\"")]
|
[NativeTypeName("#define SDL_HINT_PEN_DELAY_MOUSE_BUTTON \"SDL_PEN_DELAY_MOUSE_BUTTON\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_ORIENTATIONS => "SDL_ORIENTATIONS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_PEN_DELAY_MOUSE_BUTTON => "SDL_PEN_DELAY_MOUSE_BUTTON"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_PEN_NOT_MOUSE \"SDL_PEN_NOT_MOUSE\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_PEN_NOT_MOUSE => "SDL_PEN_NOT_MOUSE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_POLL_SENTINEL \"SDL_POLL_SENTINEL\"")]
|
[NativeTypeName("#define SDL_HINT_POLL_SENTINEL \"SDL_POLL_SENTINEL\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_POLL_SENTINEL => "SDL_POLL_SENTINEL"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_POLL_SENTINEL => "SDL_POLL_SENTINEL"u8;
|
||||||
|
|
@ -577,18 +458,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_RENDER_DIRECT3D11_DEBUG \"SDL_RENDER_DIRECT3D11_DEBUG\"")]
|
[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;
|
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\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_HINT_RENDER_VULKAN_DEBUG => "SDL_RENDER_VULKAN_DEBUG"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_RENDER_GPU_DEBUG \"SDL_RENDER_GPU_DEBUG\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_GPU_DEBUG => "SDL_RENDER_GPU_DEBUG"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_RENDER_GPU_LOW_POWER \"SDL_RENDER_GPU_LOW_POWER\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_GPU_LOW_POWER => "SDL_RENDER_GPU_LOW_POWER"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_RENDER_DRIVER \"SDL_RENDER_DRIVER\"")]
|
[NativeTypeName("#define SDL_HINT_RENDER_DRIVER \"SDL_RENDER_DRIVER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_DRIVER => "SDL_RENDER_DRIVER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_RENDER_DRIVER => "SDL_RENDER_DRIVER"u8;
|
||||||
|
|
||||||
|
|
@ -598,6 +470,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE \"SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE\"")]
|
[NativeTypeName("#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE \"SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE => "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE => "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC \"SDL_RENDER_PS2_DYNAMIC_VSYNC\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC => "SDL_RENDER_PS2_DYNAMIC_VSYNC"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_RENDER_VSYNC \"SDL_RENDER_VSYNC\"")]
|
[NativeTypeName("#define SDL_HINT_RENDER_VSYNC \"SDL_RENDER_VSYNC\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_RENDER_VSYNC => "SDL_RENDER_VSYNC"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_RENDER_VSYNC => "SDL_RENDER_VSYNC"u8;
|
||||||
|
|
||||||
|
|
@ -610,18 +485,6 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED \"SDL_ROG_GAMEPAD_MICE_EXCLUDED\"")]
|
[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;
|
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\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_HINT_RPI_VIDEO_LAYER => "SDL_RPI_VIDEO_LAYER"u8;
|
||||||
|
|
||||||
|
|
@ -658,20 +521,14 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER \"SDL_VIDEO_ALLOW_SCREENSAVER\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER \"SDL_VIDEO_ALLOW_SCREENSAVER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_ALLOW_SCREENSAVER => "SDL_VIDEO_ALLOW_SCREENSAVER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_ALLOW_SCREENSAVER => "SDL_VIDEO_ALLOW_SCREENSAVER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_DISPLAY_PRIORITY \"SDL_VIDEO_DISPLAY_PRIORITY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_DISPLAY_PRIORITY => "SDL_VIDEO_DISPLAY_PRIORITY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_DOUBLE_BUFFER \"SDL_VIDEO_DOUBLE_BUFFER\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_DOUBLE_BUFFER \"SDL_VIDEO_DOUBLE_BUFFER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_DOUBLE_BUFFER => "SDL_VIDEO_DOUBLE_BUFFER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_DOUBLE_BUFFER => "SDL_VIDEO_DOUBLE_BUFFER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_DRIVER \"SDL_VIDEO_DRIVER\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_DRIVER \"SDL_VIDEO_DRIVER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_DRIVER => "SDL_VIDEO_DRIVER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_DRIVER => "SDL_VIDEO_DRIVER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES \"SDL_VIDEO_DUMMY_SAVE_FRAMES\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK \"SDL_VIDEO_EGL_GETDISPLAY_FALLBACK\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES => "SDL_VIDEO_DUMMY_SAVE_FRAMES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK => "SDL_VIDEO_EGL_GETDISPLAY_FALLBACK"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK \"SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK => "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_FORCE_EGL \"SDL_VIDEO_FORCE_EGL\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_FORCE_EGL \"SDL_VIDEO_FORCE_EGL\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_FORCE_EGL => "SDL_VIDEO_FORCE_EGL"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_FORCE_EGL => "SDL_VIDEO_FORCE_EGL"u8;
|
||||||
|
|
@ -679,27 +536,18 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES \"SDL_VIDEO_MAC_FULLSCREEN_SPACES\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES \"SDL_VIDEO_MAC_FULLSCREEN_SPACES\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES => "SDL_VIDEO_MAC_FULLSCREEN_SPACES"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES => "SDL_VIDEO_MAC_FULLSCREEN_SPACES"u8;
|
||||||
|
|
||||||
[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;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS \"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS \"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS => "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS => "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES \"SDL_VIDEO_OFFSCREEN_SAVE_FRAMES\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES => "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS \"SDL_VIDEO_SYNC_WINDOW_OPERATIONS\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS \"SDL_VIDEO_SYNC_WINDOW_OPERATIONS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS => "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS => "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR \"SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR \"SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR => "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR => "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP \"SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP => "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION \"SDL_VIDEO_WAYLAND_MODE_EMULATION\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION \"SDL_VIDEO_WAYLAND_MODE_EMULATION\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION => "SDL_VIDEO_WAYLAND_MODE_EMULATION"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION => "SDL_VIDEO_WAYLAND_MODE_EMULATION"u8;
|
||||||
|
|
||||||
|
|
@ -715,63 +563,27 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_WIN_D3DCOMPILER \"SDL_VIDEO_WIN_D3DCOMPILER\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_WIN_D3DCOMPILER \"SDL_VIDEO_WIN_D3DCOMPILER\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WIN_D3DCOMPILER => "SDL_VIDEO_WIN_D3DCOMPILER"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_WIN_D3DCOMPILER => "SDL_VIDEO_WIN_D3DCOMPILER"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT \"SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT => "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR \"SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR \"SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR => "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR => "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_NET_WM_PING \"SDL_VIDEO_X11_NET_WM_PING\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_X11_NET_WM_PING \"SDL_VIDEO_X11_NET_WM_PING\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_NET_WM_PING => "SDL_VIDEO_X11_NET_WM_PING"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_NET_WM_PING => "SDL_VIDEO_X11_NET_WM_PING"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_NODIRECTCOLOR \"SDL_VIDEO_X11_NODIRECTCOLOR\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_NODIRECTCOLOR => "SDL_VIDEO_X11_NODIRECTCOLOR"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_SCALING_FACTOR \"SDL_VIDEO_X11_SCALING_FACTOR\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_X11_SCALING_FACTOR \"SDL_VIDEO_X11_SCALING_FACTOR\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_SCALING_FACTOR => "SDL_VIDEO_X11_SCALING_FACTOR"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_SCALING_FACTOR => "SDL_VIDEO_X11_SCALING_FACTOR"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_VISUALID \"SDL_VIDEO_X11_VISUALID\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_VISUALID => "SDL_VIDEO_X11_VISUALID"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID \"SDL_VIDEO_X11_WINDOW_VISUALID\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID \"SDL_VIDEO_X11_WINDOW_VISUALID\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_WINDOW_VISUALID => "SDL_VIDEO_X11_WINDOW_VISUALID"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_WINDOW_VISUALID => "SDL_VIDEO_X11_WINDOW_VISUALID"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VIDEO_X11_XRANDR \"SDL_VIDEO_X11_XRANDR\"")]
|
[NativeTypeName("#define SDL_HINT_VIDEO_X11_XRANDR \"SDL_VIDEO_X11_XRANDR\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_XRANDR => "SDL_VIDEO_X11_XRANDR"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VIDEO_X11_XRANDR => "SDL_VIDEO_X11_XRANDR"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_ENABLE_BACK_TOUCH \"SDL_VITA_ENABLE_BACK_TOUCH\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_ENABLE_BACK_TOUCH => "SDL_VITA_ENABLE_BACK_TOUCH"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_ENABLE_FRONT_TOUCH \"SDL_VITA_ENABLE_FRONT_TOUCH\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_ENABLE_FRONT_TOUCH => "SDL_VITA_ENABLE_FRONT_TOUCH"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_MODULE_PATH \"SDL_VITA_MODULE_PATH\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_MODULE_PATH => "SDL_VITA_MODULE_PATH"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_PVR_INIT \"SDL_VITA_PVR_INIT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_PVR_INIT => "SDL_VITA_PVR_INIT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_RESOLUTION \"SDL_VITA_RESOLUTION\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_RESOLUTION => "SDL_VITA_RESOLUTION"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_PVR_OPENGL \"SDL_VITA_PVR_OPENGL\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_PVR_OPENGL => "SDL_VITA_PVR_OPENGL"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE \"SDL_VITA_TOUCH_MOUSE_DEVICE\"")]
|
[NativeTypeName("#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE \"SDL_VITA_TOUCH_MOUSE_DEVICE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VITA_TOUCH_MOUSE_DEVICE => "SDL_VITA_TOUCH_MOUSE_DEVICE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_VITA_TOUCH_MOUSE_DEVICE => "SDL_VITA_TOUCH_MOUSE_DEVICE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VULKAN_DISPLAY \"SDL_VULKAN_DISPLAY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VULKAN_DISPLAY => "SDL_VULKAN_DISPLAY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_VULKAN_LIBRARY \"SDL_VULKAN_LIBRARY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_VULKAN_LIBRARY => "SDL_VULKAN_LIBRARY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WAVE_FACT_CHUNK \"SDL_WAVE_FACT_CHUNK\"")]
|
[NativeTypeName("#define SDL_HINT_WAVE_FACT_CHUNK \"SDL_WAVE_FACT_CHUNK\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WAVE_FACT_CHUNK => "SDL_WAVE_FACT_CHUNK"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_WAVE_FACT_CHUNK => "SDL_WAVE_FACT_CHUNK"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WAVE_CHUNK_LIMIT \"SDL_WAVE_CHUNK_LIMIT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WAVE_CHUNK_LIMIT => "SDL_WAVE_CHUNK_LIMIT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE \"SDL_WAVE_RIFF_CHUNK_SIZE\"")]
|
[NativeTypeName("#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE \"SDL_WAVE_RIFF_CHUNK_SIZE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WAVE_RIFF_CHUNK_SIZE => "SDL_WAVE_RIFF_CHUNK_SIZE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_WAVE_RIFF_CHUNK_SIZE => "SDL_WAVE_RIFF_CHUNK_SIZE"u8;
|
||||||
|
|
||||||
|
|
@ -799,14 +611,11 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP \"SDL_WINDOWS_ENABLE_MESSAGELOOP\"")]
|
[NativeTypeName("#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP \"SDL_WINDOWS_ENABLE_MESSAGELOOP\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP => "SDL_WINDOWS_ENABLE_MESSAGELOOP"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP => "SDL_WINDOWS_ENABLE_MESSAGELOOP"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WINDOWS_GAMEINPUT \"SDL_WINDOWS_GAMEINPUT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_GAMEINPUT => "SDL_WINDOWS_GAMEINPUT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WINDOWS_RAW_KEYBOARD \"SDL_WINDOWS_RAW_KEYBOARD\"")]
|
[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;
|
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\"")]
|
[NativeTypeName("#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS \"SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS => "SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS => "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL \"SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL => "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"u8;
|
||||||
|
|
@ -820,8 +629,14 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_WINDOWS_USE_D3D9EX \"SDL_WINDOWS_USE_D3D9EX\"")]
|
[NativeTypeName("#define SDL_HINT_WINDOWS_USE_D3D9EX \"SDL_WINDOWS_USE_D3D9EX\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_USE_D3D9EX => "SDL_WINDOWS_USE_D3D9EX"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_USE_D3D9EX => "SDL_WINDOWS_USE_D3D9EX"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE \"SDL_WINDOWS_ERASE_BACKGROUND_MODE\"")]
|
[NativeTypeName("#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON \"SDL_WINRT_HANDLE_BACK_BUTTON\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE => "SDL_WINDOWS_ERASE_BACKGROUND_MODE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_WINRT_HANDLE_BACK_BUTTON => "SDL_WINRT_HANDLE_BACK_BUTTON"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL \"SDL_WINRT_PRIVACY_POLICY_LABEL\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_WINRT_PRIVACY_POLICY_LABEL => "SDL_WINRT_PRIVACY_POLICY_LABEL"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_HINT_WINRT_PRIVACY_POLICY_URL \"SDL_WINRT_PRIVACY_POLICY_URL\"")]
|
||||||
|
public static ReadOnlySpan<byte> SDL_HINT_WINRT_PRIVACY_POLICY_URL => "SDL_WINRT_PRIVACY_POLICY_URL"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT \"SDL_X11_FORCE_OVERRIDE_REDIRECT\"")]
|
[NativeTypeName("#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT \"SDL_X11_FORCE_OVERRIDE_REDIRECT\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT => "SDL_X11_FORCE_OVERRIDE_REDIRECT"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT => "SDL_X11_FORCE_OVERRIDE_REDIRECT"u8;
|
||||||
|
|
@ -829,19 +644,7 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_HINT_X11_WINDOW_TYPE \"SDL_X11_WINDOW_TYPE\"")]
|
[NativeTypeName("#define SDL_HINT_X11_WINDOW_TYPE \"SDL_X11_WINDOW_TYPE\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_X11_WINDOW_TYPE => "SDL_X11_WINDOW_TYPE"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_X11_WINDOW_TYPE => "SDL_X11_WINDOW_TYPE"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_X11_XCB_LIBRARY \"SDL_X11_XCB_LIBRARY\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_X11_XCB_LIBRARY => "SDL_X11_XCB_LIBRARY"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_XINPUT_ENABLED \"SDL_XINPUT_ENABLED\"")]
|
[NativeTypeName("#define SDL_HINT_XINPUT_ENABLED \"SDL_XINPUT_ENABLED\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_XINPUT_ENABLED => "SDL_XINPUT_ENABLED"u8;
|
public static ReadOnlySpan<byte> SDL_HINT_XINPUT_ENABLED => "SDL_XINPUT_ENABLED"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_ASSERT \"SDL_ASSERT\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_ASSERT => "SDL_ASSERT"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_PEN_MOUSE_EVENTS \"SDL_PEN_MOUSE_EVENTS\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_PEN_MOUSE_EVENTS => "SDL_PEN_MOUSE_EVENTS"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HINT_PEN_TOUCH_EVENTS \"SDL_PEN_TOUCH_EVENTS\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_HINT_PEN_TOUCH_EVENTS => "SDL_PEN_TOUCH_EVENTS"u8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,95 +28,36 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
public enum SDL_AppResult
|
[Flags]
|
||||||
|
public enum SDL_InitFlags
|
||||||
{
|
{
|
||||||
SDL_APP_CONTINUE,
|
SDL_INIT_TIMER = 0x00000001,
|
||||||
SDL_APP_SUCCESS,
|
SDL_INIT_AUDIO = 0x00000010,
|
||||||
SDL_APP_FAILURE,
|
SDL_INIT_VIDEO = 0x00000020,
|
||||||
|
SDL_INIT_JOYSTICK = 0x00000200,
|
||||||
|
SDL_INIT_HAPTIC = 0x00001000,
|
||||||
|
SDL_INIT_GAMEPAD = 0x00002000,
|
||||||
|
SDL_INIT_EVENTS = 0x00004000,
|
||||||
|
SDL_INIT_SENSOR = 0x00008000,
|
||||||
|
SDL_INIT_CAMERA = 0x00010000,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_Init([NativeTypeName("Uint32")] uint flags);
|
||||||
public static extern SDLBool SDL_Init(SDL_InitFlags flags);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_InitSubSystem([NativeTypeName("Uint32")] uint flags);
|
||||||
public static extern SDLBool SDL_InitSubSystem(SDL_InitFlags flags);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_QuitSubSystem(SDL_InitFlags flags);
|
public static extern void SDL_QuitSubSystem([NativeTypeName("Uint32")] uint flags);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_InitFlags SDL_WasInit(SDL_InitFlags flags);
|
[return: NativeTypeName("Uint32")]
|
||||||
|
public static extern uint SDL_WasInit([NativeTypeName("Uint32")] uint flags);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_Quit();
|
public static extern void SDL_Quit();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_IsMainThread();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_RunOnMainThread([NativeTypeName("SDL_MainThreadCallback")] delegate* unmanaged[Cdecl]<IntPtr, void> callback, [NativeTypeName("void*")] IntPtr userdata, [NativeTypeName("bool")] SDLBool wait_complete);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAppMetadata([NativeTypeName("const char *")] byte* appname, [NativeTypeName("const char *")] byte* appversion, [NativeTypeName("const char *")] byte* appidentifier);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetAppMetadataProperty([NativeTypeName("const char *")] byte* name, [NativeTypeName("const char *")] byte* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetAppMetadataProperty", ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("const char *")]
|
|
||||||
public static extern byte* Unsafe_SDL_GetAppMetadataProperty([NativeTypeName("const char *")] byte* name);
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_AUDIO 0x00000010u")]
|
|
||||||
public const uint SDL_INIT_AUDIO = 0x00000010U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_VIDEO 0x00000020u")]
|
|
||||||
public const uint SDL_INIT_VIDEO = 0x00000020U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_JOYSTICK 0x00000200u")]
|
|
||||||
public const uint SDL_INIT_JOYSTICK = 0x00000200U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_HAPTIC 0x00001000u")]
|
|
||||||
public const uint SDL_INIT_HAPTIC = 0x00001000U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_GAMEPAD 0x00002000u")]
|
|
||||||
public const uint SDL_INIT_GAMEPAD = 0x00002000U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_EVENTS 0x00004000u")]
|
|
||||||
public const uint SDL_INIT_EVENTS = 0x00004000U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_SENSOR 0x00008000u")]
|
|
||||||
public const uint SDL_INIT_SENSOR = 0x00008000U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_INIT_CAMERA 0x00010000u")]
|
|
||||||
public const uint SDL_INIT_CAMERA = 0x00010000U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_NAME_STRING \"SDL.app.metadata.name\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_NAME_STRING => "SDL.app.metadata.name"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_VERSION_STRING \"SDL.app.metadata.version\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_VERSION_STRING => "SDL.app.metadata.version"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_IDENTIFIER_STRING \"SDL.app.metadata.identifier\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_IDENTIFIER_STRING => "SDL.app.metadata.identifier"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_CREATOR_STRING \"SDL.app.metadata.creator\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_CREATOR_STRING => "SDL.app.metadata.creator"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_COPYRIGHT_STRING \"SDL.app.metadata.copyright\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_COPYRIGHT_STRING => "SDL.app.metadata.copyright"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_URL_STRING \"SDL.app.metadata.url\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_URL_STRING => "SDL.app.metadata.url"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_APP_METADATA_TYPE_STRING \"SDL.app.metadata.type\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_APP_METADATA_TYPE_STRING => "SDL.app.metadata.type"u8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,23 +38,13 @@ namespace SDL
|
||||||
SDL_IO_STATUS_WRITEONLY,
|
SDL_IO_STATUS_WRITEONLY,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_IOWhence
|
|
||||||
{
|
|
||||||
SDL_IO_SEEK_SET,
|
|
||||||
SDL_IO_SEEK_CUR,
|
|
||||||
SDL_IO_SEEK_END,
|
|
||||||
}
|
|
||||||
|
|
||||||
public unsafe partial struct SDL_IOStreamInterface
|
public unsafe partial struct SDL_IOStreamInterface
|
||||||
{
|
{
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint version;
|
|
||||||
|
|
||||||
[NativeTypeName("Sint64 (*)(void *)")]
|
[NativeTypeName("Sint64 (*)(void *)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, long> size;
|
public delegate* unmanaged[Cdecl]<IntPtr, long> size;
|
||||||
|
|
||||||
[NativeTypeName("Sint64 (*)(void *, Sint64, SDL_IOWhence)")]
|
[NativeTypeName("Sint64 (*)(void *, Sint64, int)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, long, SDL_IOWhence, long> seek;
|
public delegate* unmanaged[Cdecl]<IntPtr, long, int, long> seek;
|
||||||
|
|
||||||
[NativeTypeName("size_t (*)(void *, void *, size_t, SDL_IOStatus *)")]
|
[NativeTypeName("size_t (*)(void *, void *, size_t, SDL_IOStatus *)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, nuint, SDL_IOStatus*, nuint> read;
|
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, nuint, SDL_IOStatus*, nuint> read;
|
||||||
|
|
@ -62,11 +52,8 @@ namespace SDL
|
||||||
[NativeTypeName("size_t (*)(void *, const void *, size_t, SDL_IOStatus *)")]
|
[NativeTypeName("size_t (*)(void *, const void *, size_t, SDL_IOStatus *)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, nuint, SDL_IOStatus*, nuint> write;
|
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, nuint, SDL_IOStatus*, nuint> write;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *, SDL_IOStatus *)")]
|
[NativeTypeName("int (*)(void *)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, SDL_IOStatus*, SDLBool> flush;
|
public delegate* unmanaged[Cdecl]<IntPtr, int> close;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *)")]
|
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, SDLBool> close;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_IOStream
|
public partial struct SDL_IOStream
|
||||||
|
|
@ -91,8 +78,7 @@ namespace SDL
|
||||||
public static extern SDL_IOStream* SDL_OpenIO([NativeTypeName("const SDL_IOStreamInterface *")] SDL_IOStreamInterface* iface, [NativeTypeName("void*")] IntPtr userdata);
|
public static extern SDL_IOStream* SDL_OpenIO([NativeTypeName("const SDL_IOStreamInterface *")] SDL_IOStreamInterface* iface, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_CloseIO(SDL_IOStream* context);
|
||||||
public static extern SDLBool SDL_CloseIO(SDL_IOStream* context);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream* context);
|
public static extern SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream* context);
|
||||||
|
|
@ -106,7 +92,7 @@ namespace SDL
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Sint64")]
|
[return: NativeTypeName("Sint64")]
|
||||||
public static extern long SDL_SeekIO(SDL_IOStream* context, [NativeTypeName("Sint64")] long offset, SDL_IOWhence whence);
|
public static extern long SDL_SeekIO(SDL_IOStream* context, [NativeTypeName("Sint64")] long offset, int whence);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Sint64")]
|
[return: NativeTypeName("Sint64")]
|
||||||
|
|
@ -128,137 +114,91 @@ namespace SDL
|
||||||
[return: NativeTypeName("size_t")]
|
[return: NativeTypeName("size_t")]
|
||||||
public static extern nuint SDL_IOvprintf(SDL_IOStream* context, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
|
public static extern nuint SDL_IOvprintf(SDL_IOStream* context, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_FlushIO(SDL_IOStream* context);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("void*")]
|
[return: NativeTypeName("void*")]
|
||||||
public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, [NativeTypeName("bool")] SDLBool closeio);
|
public static extern IntPtr SDL_LoadFile_IO(SDL_IOStream* src, [NativeTypeName("size_t *")] nuint* datasize, SDL_bool closeio);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("void*")]
|
[return: NativeTypeName("void*")]
|
||||||
public static extern IntPtr SDL_LoadFile([NativeTypeName("const char *")] byte* file, [NativeTypeName("size_t *")] nuint* datasize);
|
public static extern IntPtr SDL_LoadFile([NativeTypeName("const char *")] byte* file, [NativeTypeName("size_t *")] nuint* datasize);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value);
|
||||||
public static extern SDLBool SDL_SaveFile_IO(SDL_IOStream* src, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("size_t")] nuint datasize, [NativeTypeName("bool")] SDLBool closeio);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
||||||
public static extern SDLBool SDL_SaveFile([NativeTypeName("const char *")] byte* file, [NativeTypeName("const void *")] IntPtr data, [NativeTypeName("size_t")] nuint datasize);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
||||||
public static extern SDLBool SDL_ReadU8(SDL_IOStream* src, [NativeTypeName("Uint8 *")] byte* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
||||||
public static extern SDLBool SDL_ReadS8(SDL_IOStream* src, [NativeTypeName("Sint8 *")] sbyte* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
||||||
public static extern SDLBool SDL_ReadU16LE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
||||||
public static extern SDLBool SDL_ReadS16LE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
||||||
public static extern SDLBool SDL_ReadU16BE(SDL_IOStream* src, [NativeTypeName("Uint16 *")] ushort* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
||||||
public static extern SDLBool SDL_ReadS16BE(SDL_IOStream* src, [NativeTypeName("Sint16 *")] short* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
||||||
public static extern SDLBool SDL_ReadU32LE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
||||||
public static extern SDLBool SDL_ReadS32LE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
||||||
public static extern SDLBool SDL_ReadU32BE(SDL_IOStream* src, [NativeTypeName("Uint32 *")] uint* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
||||||
public static extern SDLBool SDL_ReadS32BE(SDL_IOStream* src, [NativeTypeName("Sint32 *")] int* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
||||||
public static extern SDLBool SDL_ReadU64LE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value);
|
||||||
public static extern SDLBool SDL_ReadS64LE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
||||||
public static extern SDLBool SDL_ReadU64BE(SDL_IOStream* src, [NativeTypeName("Uint64 *")] ulong* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
||||||
public static extern SDLBool SDL_ReadS64BE(SDL_IOStream* src, [NativeTypeName("Sint64 *")] long* value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
||||||
public static extern SDLBool SDL_WriteU8(SDL_IOStream* dst, [NativeTypeName("Uint8")] byte value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
||||||
public static extern SDLBool SDL_WriteS8(SDL_IOStream* dst, [NativeTypeName("Sint8")] sbyte value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
||||||
public static extern SDLBool SDL_WriteU16LE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
||||||
public static extern SDLBool SDL_WriteS16LE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
||||||
public static extern SDLBool SDL_WriteU16BE(SDL_IOStream* dst, [NativeTypeName("Uint16")] ushort value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
||||||
public static extern SDLBool SDL_WriteS16BE(SDL_IOStream* dst, [NativeTypeName("Sint16")] short value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
||||||
public static extern SDLBool SDL_WriteU32LE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
||||||
public static extern SDLBool SDL_WriteS32LE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
||||||
public static extern SDLBool SDL_WriteU32BE(SDL_IOStream* dst, [NativeTypeName("Uint32")] uint value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
||||||
public static extern SDLBool SDL_WriteS32BE(SDL_IOStream* dst, [NativeTypeName("Sint32")] int value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_WriteU64LE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_WriteS64LE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_WriteU64BE(SDL_IOStream* dst, [NativeTypeName("Uint64")] ulong value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_WriteS64BE(SDL_IOStream* dst, [NativeTypeName("Sint64")] long value);
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER \"SDL.iostream.windows.handle\"")]
|
[NativeTypeName("#define SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER \"SDL.iostream.windows.handle\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => "SDL.iostream.windows.handle"u8;
|
||||||
|
|
@ -266,25 +206,22 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_STDIO_FILE_POINTER \"SDL.iostream.stdio.file\"")]
|
[NativeTypeName("#define SDL_PROP_IOSTREAM_STDIO_FILE_POINTER \"SDL.iostream.stdio.file\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_STDIO_FILE_POINTER => "SDL.iostream.stdio.file"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_STDIO_FILE_POINTER => "SDL.iostream.stdio.file"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER \"SDL.iostream.file_descriptor\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER => "SDL.iostream.file_descriptor"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER \"SDL.iostream.android.aasset\"")]
|
[NativeTypeName("#define SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER \"SDL.iostream.android.aasset\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER => "SDL.iostream.android.aasset"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER => "SDL.iostream.android.aasset"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_MEMORY_POINTER \"SDL.iostream.memory.base\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_MEMORY_POINTER => "SDL.iostream.memory.base"u8;
|
|
||||||
|
|
||||||
[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\"")]
|
[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;
|
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER => "SDL.iostream.dynamic.memory"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER \"SDL.iostream.dynamic.chunksize\"")]
|
[NativeTypeName("#define SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER \"SDL.iostream.dynamic.chunksize\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER => "SDL.iostream.dynamic.chunksize"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER => "SDL.iostream.dynamic.chunksize"u8;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_IO_SEEK_SET 0")]
|
||||||
|
public const int SDL_IO_SEEK_SET = 0;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_IO_SEEK_CUR 1")]
|
||||||
|
public const int SDL_IO_SEEK_CUR = 1;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_IO_SEEK_END 2")]
|
||||||
|
public const int SDL_IO_SEEK_END = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
|
|
@ -45,7 +44,6 @@ namespace SDL
|
||||||
SDL_JOYSTICK_TYPE_DRUM_KIT,
|
SDL_JOYSTICK_TYPE_DRUM_KIT,
|
||||||
SDL_JOYSTICK_TYPE_ARCADE_PAD,
|
SDL_JOYSTICK_TYPE_ARCADE_PAD,
|
||||||
SDL_JOYSTICK_TYPE_THROTTLE,
|
SDL_JOYSTICK_TYPE_THROTTLE,
|
||||||
SDL_JOYSTICK_TYPE_COUNT,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum SDL_JoystickConnectionState
|
public enum SDL_JoystickConnectionState
|
||||||
|
|
@ -56,65 +54,28 @@ namespace SDL
|
||||||
SDL_JOYSTICK_CONNECTION_WIRELESS,
|
SDL_JOYSTICK_CONNECTION_WIRELESS,
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_VirtualJoystickTouchpadDesc
|
|
||||||
{
|
|
||||||
[NativeTypeName("Uint16")]
|
|
||||||
public ushort nfingers;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint16[3]")]
|
|
||||||
public _padding_e__FixedBuffer padding;
|
|
||||||
|
|
||||||
[InlineArray(3)]
|
|
||||||
public partial struct _padding_e__FixedBuffer
|
|
||||||
{
|
|
||||||
public ushort e0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial struct SDL_VirtualJoystickSensorDesc
|
|
||||||
{
|
|
||||||
public SDL_SensorType type;
|
|
||||||
|
|
||||||
public float rate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public unsafe partial struct SDL_VirtualJoystickDesc
|
public unsafe partial struct SDL_VirtualJoystickDesc
|
||||||
{
|
{
|
||||||
[NativeTypeName("Uint32")]
|
|
||||||
public uint version;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint16")]
|
||||||
public ushort type;
|
public ushort type;
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
|
||||||
public ushort padding;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
|
||||||
public ushort vendor_id;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
|
||||||
public ushort product_id;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint16")]
|
||||||
public ushort naxes;
|
public ushort naxes;
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint16")]
|
||||||
public ushort nbuttons;
|
public ushort nbuttons;
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
|
||||||
public ushort nballs;
|
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint16")]
|
||||||
public ushort nhats;
|
public ushort nhats;
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint16")]
|
||||||
public ushort ntouchpads;
|
public ushort vendor_id;
|
||||||
|
|
||||||
[NativeTypeName("Uint16")]
|
[NativeTypeName("Uint16")]
|
||||||
public ushort nsensors;
|
public ushort product_id;
|
||||||
|
|
||||||
[NativeTypeName("Uint16[2]")]
|
[NativeTypeName("Uint16")]
|
||||||
public _padding2_e__FixedBuffer padding2;
|
public ushort padding;
|
||||||
|
|
||||||
[NativeTypeName("Uint32")]
|
[NativeTypeName("Uint32")]
|
||||||
public uint button_mask;
|
public uint button_mask;
|
||||||
|
|
@ -125,12 +86,6 @@ namespace SDL
|
||||||
[NativeTypeName("const char *")]
|
[NativeTypeName("const char *")]
|
||||||
public byte* name;
|
public byte* name;
|
||||||
|
|
||||||
[NativeTypeName("const SDL_VirtualJoystickTouchpadDesc *")]
|
|
||||||
public SDL_VirtualJoystickTouchpadDesc* touchpads;
|
|
||||||
|
|
||||||
[NativeTypeName("const SDL_VirtualJoystickSensorDesc *")]
|
|
||||||
public SDL_VirtualJoystickSensorDesc* sensors;
|
|
||||||
|
|
||||||
[NativeTypeName("void*")]
|
[NativeTypeName("void*")]
|
||||||
public IntPtr userdata;
|
public IntPtr userdata;
|
||||||
|
|
||||||
|
|
@ -140,29 +95,17 @@ namespace SDL
|
||||||
[NativeTypeName("void (*)(void *, int)")]
|
[NativeTypeName("void (*)(void *, int)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, int, void> SetPlayerIndex;
|
public delegate* unmanaged[Cdecl]<IntPtr, int, void> SetPlayerIndex;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *, Uint16, Uint16)")]
|
[NativeTypeName("int (*)(void *, Uint16, Uint16)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, SDLBool> Rumble;
|
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, int> Rumble;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *, Uint16, Uint16)")]
|
[NativeTypeName("int (*)(void *, Uint16, Uint16)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, SDLBool> RumbleTriggers;
|
public delegate* unmanaged[Cdecl]<IntPtr, ushort, ushort, int> RumbleTriggers;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *, Uint8, Uint8, Uint8)")]
|
[NativeTypeName("int (*)(void *, Uint8, Uint8, Uint8)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, byte, byte, byte, SDLBool> SetLED;
|
public delegate* unmanaged[Cdecl]<IntPtr, byte, byte, byte, int> SetLED;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *, const void *, int)")]
|
[NativeTypeName("int (*)(void *, const void *, int)")]
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, SDLBool> SendEffect;
|
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int> SendEffect;
|
||||||
|
|
||||||
[NativeTypeName("bool (*)(void *, bool)")]
|
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, SDLBool, SDLBool> SetSensorsEnabled;
|
|
||||||
|
|
||||||
[NativeTypeName("void (*)(void *)")]
|
|
||||||
public delegate* unmanaged[Cdecl]<IntPtr, void> Cleanup;
|
|
||||||
|
|
||||||
[InlineArray(2)]
|
|
||||||
public partial struct _padding2_e__FixedBuffer
|
|
||||||
{
|
|
||||||
public ushort e0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
|
|
@ -174,84 +117,70 @@ namespace SDL
|
||||||
public static extern void SDL_UnlockJoysticks();
|
public static extern void SDL_UnlockJoysticks();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasJoystick();
|
||||||
public static extern SDLBool SDL_HasJoystick();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_JoystickID* SDL_GetJoysticks(int* count);
|
public static extern SDL_JoystickID* SDL_GetJoysticks(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickNameForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickInstanceName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetJoystickNameForID(SDL_JoystickID instance_id);
|
public static extern byte* Unsafe_SDL_GetJoystickInstanceName(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickPathForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetJoystickInstancePath", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetJoystickPathForID(SDL_JoystickID instance_id);
|
public static extern byte* Unsafe_SDL_GetJoystickInstancePath(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id);
|
public static extern int SDL_GetJoystickInstancePlayerIndex(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_GUID SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id);
|
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||||
|
public static extern SDL_GUID SDL_GetJoystickInstanceGUID(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
public static extern ushort SDL_GetJoystickVendorForID(SDL_JoystickID instance_id);
|
public static extern ushort SDL_GetJoystickInstanceVendor(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
public static extern ushort SDL_GetJoystickProductForID(SDL_JoystickID instance_id);
|
public static extern ushort SDL_GetJoystickInstanceProduct(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint16")]
|
[return: NativeTypeName("Uint16")]
|
||||||
public static extern ushort SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id);
|
public static extern ushort SDL_GetJoystickInstanceProductVersion(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id);
|
public static extern SDL_JoystickType SDL_GetJoystickInstanceType(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Joystick* SDL_OpenJoystick(SDL_JoystickID instance_id);
|
public static extern SDL_Joystick* SDL_OpenJoystick(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Joystick* SDL_GetJoystickFromID(SDL_JoystickID instance_id);
|
public static extern SDL_Joystick* SDL_GetJoystickFromInstanceID(SDL_JoystickID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Joystick* SDL_GetJoystickFromPlayerIndex(int player_index);
|
public static extern SDL_Joystick* SDL_GetJoystickFromPlayerIndex(int player_index);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_JoystickID SDL_AttachVirtualJoystick([NativeTypeName("const SDL_VirtualJoystickDesc *")] SDL_VirtualJoystickDesc* desc);
|
public static extern SDL_JoystickID SDL_AttachVirtualJoystick(SDL_JoystickType type, int naxes, int nbuttons, int nhats);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_JoystickID SDL_AttachVirtualJoystickEx([NativeTypeName("const SDL_VirtualJoystickDesc *")] SDL_VirtualJoystickDesc* desc);
|
||||||
public static extern SDLBool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_DetachVirtualJoystick(SDL_JoystickID instance_id);
|
||||||
public static extern SDLBool SDL_IsJoystickVirtual(SDL_JoystickID instance_id);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id);
|
||||||
public static extern SDLBool SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetJoystickVirtualAxis(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16")] short value);
|
||||||
public static extern SDLBool SDL_SetJoystickVirtualBall(SDL_Joystick* joystick, int ball, [NativeTypeName("Sint16")] short xrel, [NativeTypeName("Sint16")] short yrel);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("Uint8")] byte value);
|
||||||
public static extern SDLBool SDL_SetJoystickVirtualButton(SDL_Joystick* joystick, int button, [NativeTypeName("bool")] SDLBool down);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value);
|
||||||
public static extern SDLBool SDL_SetJoystickVirtualHat(SDL_Joystick* joystick, int hat, [NativeTypeName("Uint8")] byte value);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetJoystickVirtualTouchpad(SDL_Joystick* joystick, int touchpad, int finger, [NativeTypeName("bool")] SDLBool down, float x, float y, float pressure);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SendJoystickVirtualSensorData(SDL_Joystick* joystick, SDL_SensorType type, [NativeTypeName("Uint64")] ulong sensor_timestamp, [NativeTypeName("const float *")] float* data, int num_values);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick* joystick);
|
public static extern SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick* joystick);
|
||||||
|
|
@ -268,10 +197,10 @@ namespace SDL
|
||||||
public static extern int SDL_GetJoystickPlayerIndex(SDL_Joystick* joystick);
|
public static extern int SDL_GetJoystickPlayerIndex(SDL_Joystick* joystick);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index);
|
||||||
public static extern SDLBool SDL_SetJoystickPlayerIndex(SDL_Joystick* joystick, int player_index);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||||
public static extern SDL_GUID SDL_GetJoystickGUID(SDL_Joystick* joystick);
|
public static extern SDL_GUID SDL_GetJoystickGUID(SDL_Joystick* joystick);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
|
@ -298,14 +227,20 @@ namespace SDL
|
||||||
public static extern SDL_JoystickType SDL_GetJoystickType(SDL_Joystick* joystick);
|
public static extern SDL_JoystickType SDL_GetJoystickType(SDL_Joystick* joystick);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_GetJoystickGUIDInfo(SDL_GUID guid, [NativeTypeName("Uint16 *")] ushort* vendor, [NativeTypeName("Uint16 *")] ushort* product, [NativeTypeName("Uint16 *")] ushort* version, [NativeTypeName("Uint16 *")] ushort* crc16);
|
public static extern int SDL_GetJoystickGUIDString([NativeTypeName("SDL_JoystickGUID")] SDL_GUID guid, [NativeTypeName("char *")] byte* pszGUID, int cbGUID);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
[return: NativeTypeName("SDL_JoystickGUID")]
|
||||||
public static extern SDLBool SDL_JoystickConnected(SDL_Joystick* joystick);
|
public static extern SDL_GUID SDL_GetJoystickGUIDFromString([NativeTypeName("const char *")] byte* pchGUID);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_JoystickID SDL_GetJoystickID(SDL_Joystick* joystick);
|
public static extern void SDL_GetJoystickGUIDInfo([NativeTypeName("SDL_JoystickGUID")] SDL_GUID guid, [NativeTypeName("Uint16 *")] ushort* vendor, [NativeTypeName("Uint16 *")] ushort* product, [NativeTypeName("Uint16 *")] ushort* version, [NativeTypeName("Uint16 *")] ushort* crc16);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_bool SDL_JoystickConnected(SDL_Joystick* joystick);
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern SDL_JoystickID SDL_GetJoystickInstanceID(SDL_Joystick* joystick);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_GetNumJoystickAxes(SDL_Joystick* joystick);
|
public static extern int SDL_GetNumJoystickAxes(SDL_Joystick* joystick);
|
||||||
|
|
@ -320,11 +255,10 @@ namespace SDL
|
||||||
public static extern int SDL_GetNumJoystickButtons(SDL_Joystick* joystick);
|
public static extern int SDL_GetNumJoystickButtons(SDL_Joystick* joystick);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_SetJoystickEventsEnabled([NativeTypeName("bool")] SDLBool enabled);
|
public static extern void SDL_SetJoystickEventsEnabled(SDL_bool enabled);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_JoystickEventsEnabled();
|
||||||
public static extern SDLBool SDL_JoystickEventsEnabled();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_UpdateJoysticks();
|
public static extern void SDL_UpdateJoysticks();
|
||||||
|
|
@ -334,36 +268,30 @@ namespace SDL
|
||||||
public static extern short SDL_GetJoystickAxis(SDL_Joystick* joystick, int axis);
|
public static extern short SDL_GetJoystickAxis(SDL_Joystick* joystick, int axis);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state);
|
||||||
public static extern SDLBool SDL_GetJoystickAxisInitialState(SDL_Joystick* joystick, int axis, [NativeTypeName("Sint16 *")] short* state);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy);
|
||||||
public static extern SDLBool SDL_GetJoystickBall(SDL_Joystick* joystick, int ball, int* dx, int* dy);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("Uint8")]
|
[return: NativeTypeName("Uint8")]
|
||||||
public static extern byte SDL_GetJoystickHat(SDL_Joystick* joystick, int hat);
|
public static extern byte SDL_GetJoystickHat(SDL_Joystick* joystick, int hat);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
[return: NativeTypeName("Uint8")]
|
||||||
public static extern SDLBool SDL_GetJoystickButton(SDL_Joystick* joystick, int button);
|
public static extern byte SDL_GetJoystickButton(SDL_Joystick* joystick, int button);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
||||||
public static extern SDLBool SDL_RumbleJoystick(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort low_frequency_rumble, [NativeTypeName("Uint16")] ushort high_frequency_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
||||||
public static extern SDLBool SDL_RumbleJoystickTriggers(SDL_Joystick* joystick, [NativeTypeName("Uint16")] ushort left_rumble, [NativeTypeName("Uint16")] ushort right_rumble, [NativeTypeName("Uint32")] uint duration_ms);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue);
|
||||||
public static extern SDLBool SDL_SetJoystickLED(SDL_Joystick* joystick, [NativeTypeName("Uint8")] byte red, [NativeTypeName("Uint8")] byte green, [NativeTypeName("Uint8")] byte blue);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size);
|
||||||
public static extern SDLBool SDL_SendJoystickEffect(SDL_Joystick* joystick, [NativeTypeName("const void *")] IntPtr data, int size);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_CloseJoystick(SDL_Joystick* joystick);
|
public static extern void SDL_CloseJoystick(SDL_Joystick* joystick);
|
||||||
|
|
@ -380,6 +308,9 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_JOYSTICK_AXIS_MIN -32768")]
|
[NativeTypeName("#define SDL_JOYSTICK_AXIS_MIN -32768")]
|
||||||
public const int SDL_JOYSTICK_AXIS_MIN = -32768;
|
public const int SDL_JOYSTICK_AXIS_MIN = -32768;
|
||||||
|
|
||||||
|
[NativeTypeName("#define SDL_IPHONE_MAX_GFORCE 5.0")]
|
||||||
|
public const double SDL_IPHONE_MAX_GFORCE = 5.0;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN \"SDL.joystick.cap.mono_led\"")]
|
[NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN \"SDL.joystick.cap.mono_led\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN => "SDL.joystick.cap.mono_led"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN => "SDL.joystick.cap.mono_led"u8;
|
||||||
|
|
||||||
|
|
@ -395,31 +326,31 @@ namespace SDL
|
||||||
[NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN \"SDL.joystick.cap.trigger_rumble\"")]
|
[NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN \"SDL.joystick.cap.trigger_rumble\"")]
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN => "SDL.joystick.cap.trigger_rumble"u8;
|
public static ReadOnlySpan<byte> SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN => "SDL.joystick.cap.trigger_rumble"u8;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_CENTERED 0x00u")]
|
[NativeTypeName("#define SDL_HAT_CENTERED 0x00")]
|
||||||
public const uint SDL_HAT_CENTERED = 0x00U;
|
public const int SDL_HAT_CENTERED = 0x00;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_UP 0x01u")]
|
[NativeTypeName("#define SDL_HAT_UP 0x01")]
|
||||||
public const uint SDL_HAT_UP = 0x01U;
|
public const int SDL_HAT_UP = 0x01;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_RIGHT 0x02u")]
|
[NativeTypeName("#define SDL_HAT_RIGHT 0x02")]
|
||||||
public const uint SDL_HAT_RIGHT = 0x02U;
|
public const int SDL_HAT_RIGHT = 0x02;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_DOWN 0x04u")]
|
[NativeTypeName("#define SDL_HAT_DOWN 0x04")]
|
||||||
public const uint SDL_HAT_DOWN = 0x04U;
|
public const int SDL_HAT_DOWN = 0x04;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_LEFT 0x08u")]
|
[NativeTypeName("#define SDL_HAT_LEFT 0x08")]
|
||||||
public const uint SDL_HAT_LEFT = 0x08U;
|
public const int SDL_HAT_LEFT = 0x08;
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)")]
|
[NativeTypeName("#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)")]
|
||||||
public const uint SDL_HAT_RIGHTUP = (0x02U | 0x01U);
|
public const int SDL_HAT_RIGHTUP = (0x02 | 0x01);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)")]
|
[NativeTypeName("#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)")]
|
||||||
public const uint SDL_HAT_RIGHTDOWN = (0x02U | 0x04U);
|
public const int SDL_HAT_RIGHTDOWN = (0x02 | 0x04);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)")]
|
[NativeTypeName("#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)")]
|
||||||
public const uint SDL_HAT_LEFTUP = (0x08U | 0x01U);
|
public const int SDL_HAT_LEFTUP = (0x08 | 0x01);
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)")]
|
[NativeTypeName("#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)")]
|
||||||
public const uint SDL_HAT_LEFTDOWN = (0x08U | 0x04U);
|
public const int SDL_HAT_LEFTDOWN = (0x08 | 0x04);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,51 +23,41 @@
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
public enum SDL_TextInputType
|
public partial struct SDL_Keysym
|
||||||
{
|
{
|
||||||
SDL_TEXTINPUT_TYPE_TEXT,
|
public SDL_Scancode scancode;
|
||||||
SDL_TEXTINPUT_TYPE_TEXT_NAME,
|
|
||||||
SDL_TEXTINPUT_TYPE_TEXT_EMAIL,
|
|
||||||
SDL_TEXTINPUT_TYPE_TEXT_USERNAME,
|
|
||||||
SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN,
|
|
||||||
SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE,
|
|
||||||
SDL_TEXTINPUT_TYPE_NUMBER,
|
|
||||||
SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN,
|
|
||||||
SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE,
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum SDL_Capitalization
|
public SDL_Keycode sym;
|
||||||
{
|
|
||||||
SDL_CAPITALIZE_NONE,
|
[NativeTypeName("Uint16")]
|
||||||
SDL_CAPITALIZE_SENTENCES,
|
public ushort mod;
|
||||||
SDL_CAPITALIZE_WORDS,
|
|
||||||
SDL_CAPITALIZE_LETTERS,
|
[NativeTypeName("Uint32")]
|
||||||
|
public uint unused;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasKeyboard();
|
||||||
public static extern SDLBool SDL_HasKeyboard();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count);
|
public static extern SDL_KeyboardID* SDL_GetKeyboards(int* count);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetKeyboardNameForID", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetKeyboardInstanceName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
public static extern byte* Unsafe_SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id);
|
public static extern byte* Unsafe_SDL_GetKeyboardInstanceName(SDL_KeyboardID instance_id);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Window* SDL_GetKeyboardFocus();
|
public static extern SDL_Window* SDL_GetKeyboardFocus();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const bool *")]
|
[return: NativeTypeName("const Uint8 *")]
|
||||||
public static extern SDLBool* SDL_GetKeyboardState(int* numkeys);
|
public static extern byte* SDL_GetKeyboardState(int* numkeys);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ResetKeyboard();
|
public static extern void SDL_ResetKeyboard();
|
||||||
|
|
@ -79,14 +69,10 @@ namespace SDL
|
||||||
public static extern void SDL_SetModState(SDL_Keymod modstate);
|
public static extern void SDL_SetModState(SDL_Keymod modstate);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, [NativeTypeName("bool")] SDLBool key_event);
|
public static extern SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod* modstate);
|
public static extern SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetScancodeName(SDL_Scancode scancode, [NativeTypeName("const char *")] byte* name);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName", ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GetScancodeName", ExactSpelling = true)]
|
||||||
[return: NativeTypeName("const char *")]
|
[return: NativeTypeName("const char *")]
|
||||||
|
|
@ -103,54 +89,24 @@ namespace SDL
|
||||||
public static extern SDL_Keycode SDL_GetKeyFromName([NativeTypeName("const char *")] byte* name);
|
public static extern SDL_Keycode SDL_GetKeyFromName([NativeTypeName("const char *")] byte* name);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern void SDL_StartTextInput();
|
||||||
public static extern SDLBool SDL_StartTextInput(SDL_Window* window);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_TextInputActive();
|
||||||
public static extern SDLBool SDL_StartTextInputWithProperties(SDL_Window* window, SDL_PropertiesID props);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern void SDL_StopTextInput();
|
||||||
public static extern SDLBool SDL_TextInputActive(SDL_Window* window);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern void SDL_ClearComposition();
|
||||||
public static extern SDLBool SDL_StopTextInput(SDL_Window* window);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_SetTextInputRect([NativeTypeName("const SDL_Rect *")] SDL_Rect* rect);
|
||||||
public static extern SDLBool SDL_ClearComposition(SDL_Window* window);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_HasScreenKeyboardSupport();
|
||||||
public static extern SDLBool SDL_SetTextInputArea(SDL_Window* window, [NativeTypeName("const SDL_Rect *")] SDL_Rect* rect, int cursor);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern SDL_bool SDL_ScreenKeyboardShown(SDL_Window* window);
|
||||||
public static extern SDLBool SDL_GetTextInputArea(SDL_Window* window, SDL_Rect* rect, int* cursor);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_HasScreenKeyboardSupport();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_ScreenKeyboardShown(SDL_Window* window);
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_TEXTINPUT_TYPE_NUMBER \"SDL.textinput.type\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTINPUT_TYPE_NUMBER => "SDL.textinput.type"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER \"SDL.textinput.capitalization\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER => "SDL.textinput.capitalization"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN \"SDL.textinput.autocorrect\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN => "SDL.textinput.autocorrect"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN \"SDL.textinput.multiline\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN => "SDL.textinput.multiline"u8;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER \"SDL.textinput.android.inputtype\"")]
|
|
||||||
public static ReadOnlySpan<byte> SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER => "SDL.textinput.android.inputtype"u8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -28,20 +28,17 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
public partial struct SDL_SharedObject
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_SharedObject* SDL_LoadObject([NativeTypeName("const char *")] byte* sofile);
|
[return: NativeTypeName("void*")]
|
||||||
|
public static extern IntPtr SDL_LoadObject([NativeTypeName("const char *")] byte* sofile);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("SDL_FunctionPointer")]
|
[return: NativeTypeName("SDL_FunctionPointer")]
|
||||||
public static extern IntPtr SDL_LoadFunction(SDL_SharedObject* handle, [NativeTypeName("const char *")] byte* name);
|
public static extern IntPtr SDL_LoadFunction([NativeTypeName("void*")] IntPtr handle, [NativeTypeName("const char *")] byte* name);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_UnloadObject(SDL_SharedObject* handle);
|
public static extern void SDL_UnloadObject([NativeTypeName("void*")] IntPtr handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,6 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_Locale** SDL_GetPreferredLocales(int* count);
|
public static extern SDL_Locale* SDL_GetPreferredLocales();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ namespace SDL
|
||||||
SDL_LOG_CATEGORY_RENDER,
|
SDL_LOG_CATEGORY_RENDER,
|
||||||
SDL_LOG_CATEGORY_INPUT,
|
SDL_LOG_CATEGORY_INPUT,
|
||||||
SDL_LOG_CATEGORY_TEST,
|
SDL_LOG_CATEGORY_TEST,
|
||||||
SDL_LOG_CATEGORY_GPU,
|
SDL_LOG_CATEGORY_RESERVED1,
|
||||||
SDL_LOG_CATEGORY_RESERVED2,
|
SDL_LOG_CATEGORY_RESERVED2,
|
||||||
SDL_LOG_CATEGORY_RESERVED3,
|
SDL_LOG_CATEGORY_RESERVED3,
|
||||||
SDL_LOG_CATEGORY_RESERVED4,
|
SDL_LOG_CATEGORY_RESERVED4,
|
||||||
|
|
@ -54,41 +54,32 @@ namespace SDL
|
||||||
|
|
||||||
public enum SDL_LogPriority
|
public enum SDL_LogPriority
|
||||||
{
|
{
|
||||||
SDL_LOG_PRIORITY_INVALID,
|
SDL_LOG_PRIORITY_VERBOSE = 1,
|
||||||
SDL_LOG_PRIORITY_TRACE,
|
|
||||||
SDL_LOG_PRIORITY_VERBOSE,
|
|
||||||
SDL_LOG_PRIORITY_DEBUG,
|
SDL_LOG_PRIORITY_DEBUG,
|
||||||
SDL_LOG_PRIORITY_INFO,
|
SDL_LOG_PRIORITY_INFO,
|
||||||
SDL_LOG_PRIORITY_WARN,
|
SDL_LOG_PRIORITY_WARN,
|
||||||
SDL_LOG_PRIORITY_ERROR,
|
SDL_LOG_PRIORITY_ERROR,
|
||||||
SDL_LOG_PRIORITY_CRITICAL,
|
SDL_LOG_PRIORITY_CRITICAL,
|
||||||
SDL_LOG_PRIORITY_COUNT,
|
SDL_NUM_LOG_PRIORITIES,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_SetLogPriorities(SDL_LogPriority priority);
|
public static extern void SDL_LogSetAllPriority(SDL_LogPriority priority);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_SetLogPriority(int category, SDL_LogPriority priority);
|
public static extern void SDL_LogSetPriority(int category, SDL_LogPriority priority);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern SDL_LogPriority SDL_GetLogPriority(int category);
|
public static extern SDL_LogPriority SDL_LogGetPriority(int category);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_ResetLogPriorities();
|
public static extern void SDL_LogResetPriorities();
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
public static extern SDLBool SDL_SetLogPriorityPrefix(SDL_LogPriority priority, [NativeTypeName("const char *")] byte* prefix);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_Log([NativeTypeName("const char *")] byte* fmt, __arglist);
|
public static extern void SDL_Log([NativeTypeName("const char *")] byte* fmt, __arglist);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern void SDL_LogTrace(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_LogVerbose(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
public static extern void SDL_LogVerbose(int category, [NativeTypeName("const char *")] byte* fmt, __arglist);
|
||||||
|
|
||||||
|
|
@ -114,13 +105,9 @@ namespace SDL
|
||||||
public static extern void SDL_LogMessageV(int category, SDL_LogPriority priority, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
|
public static extern void SDL_LogMessageV(int category, SDL_LogPriority priority, [NativeTypeName("const char *")] byte* fmt, [NativeTypeName("va_list")] byte* ap);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("SDL_LogOutputFunction")]
|
public static extern void SDL_GetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction *")] delegate* unmanaged[Cdecl]<IntPtr, SDL_LogCategory, SDL_LogPriority, byte*, void>* callback, [NativeTypeName("void **")] IntPtr* userdata);
|
||||||
public static extern delegate* unmanaged[Cdecl]<IntPtr, int, SDL_LogPriority, byte*, void> SDL_GetDefaultLogOutputFunction();
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void SDL_GetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction *")] delegate* unmanaged[Cdecl]<IntPtr, int, SDL_LogPriority, byte*, void>* callback, [NativeTypeName("void **")] IntPtr* userdata);
|
public static extern void SDL_SetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction")] delegate* unmanaged[Cdecl]<IntPtr, SDL_LogCategory, SDL_LogPriority, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern void SDL_SetLogOutputFunction([NativeTypeName("SDL_LogOutputFunction")] delegate* unmanaged[Cdecl]<IntPtr, int, SDL_LogPriority, byte*, void> callback, [NativeTypeName("void*")] IntPtr userdata);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,15 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
|
||||||
[SupportedOSPlatform("Windows")]
|
[SupportedOSPlatform("Windows")]
|
||||||
public static extern SDLBool SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst);
|
public static extern int SDL_RegisterApp([NativeTypeName("const char *")] byte* name, [NativeTypeName("Uint32")] uint style, [NativeTypeName("void*")] IntPtr hInst);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[SupportedOSPlatform("Windows")]
|
[SupportedOSPlatform("Windows")]
|
||||||
public static extern void SDL_UnregisterApp();
|
public static extern void SDL_UnregisterApp();
|
||||||
|
|
||||||
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
[SupportedOSPlatform("Windows")]
|
||||||
|
public static extern void SDL_GDKSuspendComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,6 @@ namespace SDL
|
||||||
public static extern int SDL_RunApp(int argc, [NativeTypeName("char *[]")] byte** argv, [NativeTypeName("SDL_main_func")] delegate* unmanaged[Cdecl]<int, byte**, int> mainFunction, [NativeTypeName("void*")] IntPtr reserved);
|
public static extern int SDL_RunApp(int argc, [NativeTypeName("char *[]")] byte** argv, [NativeTypeName("SDL_main_func")] delegate* unmanaged[Cdecl]<int, byte**, int> mainFunction, [NativeTypeName("void*")] IntPtr reserved);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int SDL_EnterAppMainCallbacks(int argc, [NativeTypeName("char *[]")] byte** argv, [NativeTypeName("SDL_AppInit_func")] delegate* unmanaged[Cdecl]<IntPtr*, int, byte**, SDL_AppResult> appinit, [NativeTypeName("SDL_AppIterate_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AppResult> appiter, [NativeTypeName("SDL_AppEvent_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, SDL_AppResult> appevent, [NativeTypeName("SDL_AppQuit_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_AppResult, void> appquit);
|
public static extern int SDL_EnterAppMainCallbacks(int argc, [NativeTypeName("char *[]")] byte** argv, [NativeTypeName("SDL_AppInit_func")] delegate* unmanaged[Cdecl]<IntPtr*, int, byte**, int> appinit, [NativeTypeName("SDL_AppIterate_func")] delegate* unmanaged[Cdecl]<IntPtr, int> appiter, [NativeTypeName("SDL_AppEvent_func")] delegate* unmanaged[Cdecl]<IntPtr, SDL_Event*, int> appevent, [NativeTypeName("SDL_AppQuit_func")] delegate* unmanaged[Cdecl]<IntPtr, void> appquit);
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
|
||||||
public static extern void SDL_GDKSuspendComplete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,33 @@
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace SDL
|
namespace SDL
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
|
public enum SDL_MessageBoxFlags
|
||||||
|
{
|
||||||
|
SDL_MESSAGEBOX_ERROR = 0x00000010,
|
||||||
|
SDL_MESSAGEBOX_WARNING = 0x00000020,
|
||||||
|
SDL_MESSAGEBOX_INFORMATION = 0x00000040,
|
||||||
|
SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080,
|
||||||
|
SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100,
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum SDL_MessageBoxButtonFlags
|
||||||
|
{
|
||||||
|
SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,
|
||||||
|
SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002,
|
||||||
|
}
|
||||||
|
|
||||||
public unsafe partial struct SDL_MessageBoxButtonData
|
public unsafe partial struct SDL_MessageBoxButtonData
|
||||||
{
|
{
|
||||||
public SDL_MessageBoxButtonFlags flags;
|
[NativeTypeName("Uint32")]
|
||||||
|
public uint flags;
|
||||||
|
|
||||||
public int buttonID;
|
public int buttonID;
|
||||||
|
|
||||||
|
|
@ -57,7 +76,7 @@ namespace SDL
|
||||||
SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
|
SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,
|
||||||
SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
|
SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,
|
||||||
SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
|
SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,
|
||||||
SDL_MESSAGEBOX_COLOR_COUNT,
|
SDL_MESSAGEBOX_COLOR_MAX,
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial struct SDL_MessageBoxColorScheme
|
public partial struct SDL_MessageBoxColorScheme
|
||||||
|
|
@ -74,7 +93,8 @@ namespace SDL
|
||||||
|
|
||||||
public unsafe partial struct SDL_MessageBoxData
|
public unsafe partial struct SDL_MessageBoxData
|
||||||
{
|
{
|
||||||
public SDL_MessageBoxFlags flags;
|
[NativeTypeName("Uint32")]
|
||||||
|
public uint flags;
|
||||||
|
|
||||||
public SDL_Window* window;
|
public SDL_Window* window;
|
||||||
|
|
||||||
|
|
@ -96,32 +116,9 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid);
|
||||||
public static extern SDLBool SDL_ShowMessageBox([NativeTypeName("const SDL_MessageBoxData *")] SDL_MessageBoxData* messageboxdata, int* buttonid);
|
|
||||||
|
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_ShowSimpleMessageBox([NativeTypeName("Uint32")] uint flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window);
|
||||||
public static extern SDLBool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, [NativeTypeName("const char *")] byte* title, [NativeTypeName("const char *")] byte* message, SDL_Window* window);
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_ERROR 0x00000010u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_ERROR = 0x00000010U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_WARNING 0x00000020u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_WARNING = 0x00000020U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_INFORMATION 0x00000040u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_INFORMATION = 0x00000040U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT 0x00000080u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT 0x00000100u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT 0x00000001u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001U;
|
|
||||||
|
|
||||||
[NativeTypeName("#define SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT 0x00000002u")]
|
|
||||||
public const uint SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002U;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ namespace SDL
|
||||||
public static unsafe partial class SDL3
|
public static unsafe partial class SDL3
|
||||||
{
|
{
|
||||||
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: NativeTypeName("bool")]
|
public static extern int SDL_OpenURL([NativeTypeName("const char *")] byte* url);
|
||||||
public static extern SDLBool SDL_OpenURL([NativeTypeName("const char *")] byte* url);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue