Skip to content

Commit

Permalink
Merge pull request #1406 from Cobrand/master
Browse files Browse the repository at this point in the history
Rollup of bindgen update to 2.26.0, event.is_touch(), FP render functions
  • Loading branch information
Cobrand authored Jun 13, 2024
2 parents 22a8c31 + 8b44c79 commit 30bf63f
Show file tree
Hide file tree
Showing 14 changed files with 5,389 additions and 13,354 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
build-linux:
name: build linux pkg-config
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ optional = true

[dev-dependencies]
rand = "0.7"
wgpu = { version = "0.19", features = ["spirv"] }
wgpu = { version = "0.20", features = ["spirv"] }
pollster = "0.2.4"
env_logger = "0.9.0"
env_logger = "0.11.0"

[dependencies.raw-window-handle]
version = "0.6.0"
Expand Down
4 changes: 3 additions & 1 deletion examples/raw-window-handle-with-wgpu/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ fn main() -> Result<(), String> {
..Default::default()
});
let surface = unsafe {
match instance.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::from_window(&window).unwrap()) {
match instance
.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::from_window(&window).unwrap())
{
Ok(s) => s,
Err(e) => return Err(e.to_string()),
}
Expand Down
2 changes: 1 addition & 1 deletion sdl2-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = "src/lib.rs"
libc = "^0.2"

[build-dependencies.bindgen]
version = "^0.53"
version = "^0.69"
optional = true

[build-dependencies.pkg-config]
Expand Down
180 changes: 90 additions & 90 deletions sdl2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,11 +756,11 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {

let bindings = bindings
.header("wrapper.h")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.derive_debug(false)
.generate()
.expect("Unable to generate bindings!");
Expand All @@ -774,16 +774,16 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
if cfg!(feature = "image") {
let image_bindings = image_bindings
.header("wrapper_image.h")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.whitelist_type("IMG.*")
.whitelist_function("IMG.*")
.whitelist_var("IMG.*")
.blacklist_type("SDL_.*")
.blacklist_type("_IO.*|FILE")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.allowlist_type("IMG.*")
.allowlist_function("IMG.*")
.allowlist_var("IMG.*")
.blocklist_type("SDL_.*")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate image_bindings!");

Expand All @@ -797,16 +797,16 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
if cfg!(feature = "ttf") {
let ttf_bindings = ttf_bindings
.header("wrapper_ttf.h")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.whitelist_type("TTF.*")
.whitelist_function("TTF.*")
.whitelist_var("TTF.*")
.blacklist_type("SDL_.*")
.blacklist_type("_IO.*|FILE")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.allowlist_type("TTF.*")
.allowlist_function("TTF.*")
.allowlist_var("TTF.*")
.blocklist_type("SDL_.*")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate ttf_bindings!");

Expand All @@ -820,19 +820,19 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
if cfg!(feature = "mixer") {
let mixer_bindings = mixer_bindings
.header("wrapper_mixer.h")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.whitelist_type("MIX.*")
.whitelist_type("Mix.*")
.whitelist_type("MUS.*")
.whitelist_function("Mix.*")
.whitelist_var("MIX.*")
.whitelist_var("MUS.*")
.blacklist_type("SDL_.*")
.blacklist_type("_IO.*|FILE")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.allowlist_type("MIX.*")
.allowlist_type("Mix.*")
.allowlist_type("MUS.*")
.allowlist_function("Mix.*")
.allowlist_var("MIX.*")
.allowlist_var("MUS.*")
.blocklist_type("SDL_.*")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate mixer_bindings!");

Expand All @@ -846,15 +846,15 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
if cfg!(feature = "gfx") {
let gfx_framerate_bindings = gfx_framerate_bindings
.header("wrapper_gfx_framerate.h")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.whitelist_type("FPS.*")
.whitelist_function("SDL_.*rame.*")
.whitelist_var("FPS.*")
.blacklist_type("_IO.*|FILE")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.allowlist_type("FPS.*")
.allowlist_function("SDL_.*rame.*")
.allowlist_var("FPS.*")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate gfx_framerate_bindings!");

Expand All @@ -866,31 +866,31 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {

let gfx_primitives_bindings = gfx_primitives_bindings
.header("wrapper_gfx_primitives.h")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.blacklist_type("SDL_.*")
.whitelist_function("pixel.*")
.whitelist_function("rectangle.*")
.whitelist_function("rounded.*")
.whitelist_function("box.*")
.whitelist_function(".*line(Color|RGBA).*")
.whitelist_function("thick.*")
.whitelist_function(".*circle.*")
.whitelist_function("arc.*")
.whitelist_function("filled.*")
.whitelist_function(".*ellipse.*")
.whitelist_function("pie.*")
.whitelist_function(".*trigon.*")
.whitelist_function(".*polygon.*")
.whitelist_function("textured.*")
.whitelist_function("bezier.*")
.whitelist_function("character.*")
.whitelist_function("string.*")
.whitelist_function("gfx.*")
.blacklist_type("_IO.*|FILE")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.blocklist_type("SDL_.*")
.allowlist_function("pixel.*")
.allowlist_function("rectangle.*")
.allowlist_function("rounded.*")
.allowlist_function("box.*")
.allowlist_function(".*line(Color|RGBA).*")
.allowlist_function("thick.*")
.allowlist_function(".*circle.*")
.allowlist_function("arc.*")
.allowlist_function("filled.*")
.allowlist_function(".*ellipse.*")
.allowlist_function("pie.*")
.allowlist_function(".*trigon.*")
.allowlist_function(".*polygon.*")
.allowlist_function("textured.*")
.allowlist_function("bezier.*")
.allowlist_function("character.*")
.allowlist_function("string.*")
.allowlist_function("gfx.*")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate gfx_primitives_bindings!");

Expand All @@ -902,13 +902,13 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {

let gfx_imagefilter_bindings = gfx_imagefilter_bindings
.header("wrapper_gfx_imagefilter.h")
.whitelist_function("SDL_image.*")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.blacklist_type("_IO.*|FILE")
.allowlist_function("SDL_image.*")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate gfx_imagefilter_bindings!");

Expand All @@ -920,17 +920,17 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {

let gfx_rotozoom_bindings = gfx_rotozoom_bindings
.header("wrapper_gfx_rotozoom.h")
.blacklist_type("SDL_.*")
.whitelist_function("rotozoom.*")
.whitelist_function("zoom.*")
.whitelist_function("shrink.*")
.whitelist_function("rotate.*")
.blacklist_type("FP_NAN")
.blacklist_type("FP_INFINITE")
.blacklist_type("FP_ZERO")
.blacklist_type("FP_SUBNORMAL")
.blacklist_type("FP_NORMAL")
.blacklist_type("_IO.*|FILE")
.blocklist_type("SDL_.*")
.allowlist_function("rotozoom.*")
.allowlist_function("zoom.*")
.allowlist_function("shrink.*")
.allowlist_function("rotate.*")
.blocklist_item("FP_NAN")
.blocklist_item("FP_INFINITE")
.blocklist_item("FP_ZERO")
.blocklist_item("FP_SUBNORMAL")
.blocklist_item("FP_NORMAL")
.blocklist_type("_IO.*|FILE")
.generate()
.expect("Unable to generate gfx_rotozoom_bindings!");

Expand Down
Loading

0 comments on commit 30bf63f

Please sign in to comment.