Skip to content

Commit 30bf63f

Browse files
authored
Merge pull request #1406 from Cobrand/master
Rollup of bindgen update to 2.26.0, event.is_touch(), FP render functions
2 parents 22a8c31 + 8b44c79 commit 30bf63f

File tree

14 files changed

+5389
-13354
lines changed

14 files changed

+5389
-13354
lines changed

.github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
5959
build-linux:
6060
name: build linux pkg-config
61-
runs-on: ubuntu-latest
61+
runs-on: ubuntu-24.04
6262
steps:
6363
- uses: actions/checkout@v2
6464
- name: Install dependencies

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ optional = true
3131

3232
[dev-dependencies]
3333
rand = "0.7"
34-
wgpu = { version = "0.19", features = ["spirv"] }
34+
wgpu = { version = "0.20", features = ["spirv"] }
3535
pollster = "0.2.4"
36-
env_logger = "0.9.0"
36+
env_logger = "0.11.0"
3737

3838
[dependencies.raw-window-handle]
3939
version = "0.6.0"

examples/raw-window-handle-with-wgpu/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ fn main() -> Result<(), String> {
3030
..Default::default()
3131
});
3232
let surface = unsafe {
33-
match instance.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::from_window(&window).unwrap()) {
33+
match instance
34+
.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::from_window(&window).unwrap())
35+
{
3436
Ok(s) => s,
3537
Err(e) => return Err(e.to_string()),
3638
}

sdl2-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ path = "src/lib.rs"
2020
libc = "^0.2"
2121

2222
[build-dependencies.bindgen]
23-
version = "^0.53"
23+
version = "^0.69"
2424
optional = true
2525

2626
[build-dependencies.pkg-config]

sdl2-sys/build.rs

+90-90
Original file line numberDiff line numberDiff line change
@@ -756,11 +756,11 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
756756

757757
let bindings = bindings
758758
.header("wrapper.h")
759-
.blacklist_type("FP_NAN")
760-
.blacklist_type("FP_INFINITE")
761-
.blacklist_type("FP_ZERO")
762-
.blacklist_type("FP_SUBNORMAL")
763-
.blacklist_type("FP_NORMAL")
759+
.blocklist_item("FP_NAN")
760+
.blocklist_item("FP_INFINITE")
761+
.blocklist_item("FP_ZERO")
762+
.blocklist_item("FP_SUBNORMAL")
763+
.blocklist_item("FP_NORMAL")
764764
.derive_debug(false)
765765
.generate()
766766
.expect("Unable to generate bindings!");
@@ -774,16 +774,16 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
774774
if cfg!(feature = "image") {
775775
let image_bindings = image_bindings
776776
.header("wrapper_image.h")
777-
.blacklist_type("FP_NAN")
778-
.blacklist_type("FP_INFINITE")
779-
.blacklist_type("FP_ZERO")
780-
.blacklist_type("FP_SUBNORMAL")
781-
.blacklist_type("FP_NORMAL")
782-
.whitelist_type("IMG.*")
783-
.whitelist_function("IMG.*")
784-
.whitelist_var("IMG.*")
785-
.blacklist_type("SDL_.*")
786-
.blacklist_type("_IO.*|FILE")
777+
.blocklist_item("FP_NAN")
778+
.blocklist_item("FP_INFINITE")
779+
.blocklist_item("FP_ZERO")
780+
.blocklist_item("FP_SUBNORMAL")
781+
.blocklist_item("FP_NORMAL")
782+
.allowlist_type("IMG.*")
783+
.allowlist_function("IMG.*")
784+
.allowlist_var("IMG.*")
785+
.blocklist_type("SDL_.*")
786+
.blocklist_type("_IO.*|FILE")
787787
.generate()
788788
.expect("Unable to generate image_bindings!");
789789

@@ -797,16 +797,16 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
797797
if cfg!(feature = "ttf") {
798798
let ttf_bindings = ttf_bindings
799799
.header("wrapper_ttf.h")
800-
.blacklist_type("FP_NAN")
801-
.blacklist_type("FP_INFINITE")
802-
.blacklist_type("FP_ZERO")
803-
.blacklist_type("FP_SUBNORMAL")
804-
.blacklist_type("FP_NORMAL")
805-
.whitelist_type("TTF.*")
806-
.whitelist_function("TTF.*")
807-
.whitelist_var("TTF.*")
808-
.blacklist_type("SDL_.*")
809-
.blacklist_type("_IO.*|FILE")
800+
.blocklist_item("FP_NAN")
801+
.blocklist_item("FP_INFINITE")
802+
.blocklist_item("FP_ZERO")
803+
.blocklist_item("FP_SUBNORMAL")
804+
.blocklist_item("FP_NORMAL")
805+
.allowlist_type("TTF.*")
806+
.allowlist_function("TTF.*")
807+
.allowlist_var("TTF.*")
808+
.blocklist_type("SDL_.*")
809+
.blocklist_type("_IO.*|FILE")
810810
.generate()
811811
.expect("Unable to generate ttf_bindings!");
812812

@@ -820,19 +820,19 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
820820
if cfg!(feature = "mixer") {
821821
let mixer_bindings = mixer_bindings
822822
.header("wrapper_mixer.h")
823-
.blacklist_type("FP_NAN")
824-
.blacklist_type("FP_INFINITE")
825-
.blacklist_type("FP_ZERO")
826-
.blacklist_type("FP_SUBNORMAL")
827-
.blacklist_type("FP_NORMAL")
828-
.whitelist_type("MIX.*")
829-
.whitelist_type("Mix.*")
830-
.whitelist_type("MUS.*")
831-
.whitelist_function("Mix.*")
832-
.whitelist_var("MIX.*")
833-
.whitelist_var("MUS.*")
834-
.blacklist_type("SDL_.*")
835-
.blacklist_type("_IO.*|FILE")
823+
.blocklist_item("FP_NAN")
824+
.blocklist_item("FP_INFINITE")
825+
.blocklist_item("FP_ZERO")
826+
.blocklist_item("FP_SUBNORMAL")
827+
.blocklist_item("FP_NORMAL")
828+
.allowlist_type("MIX.*")
829+
.allowlist_type("Mix.*")
830+
.allowlist_type("MUS.*")
831+
.allowlist_function("Mix.*")
832+
.allowlist_var("MIX.*")
833+
.allowlist_var("MUS.*")
834+
.blocklist_type("SDL_.*")
835+
.blocklist_type("_IO.*|FILE")
836836
.generate()
837837
.expect("Unable to generate mixer_bindings!");
838838

@@ -846,15 +846,15 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
846846
if cfg!(feature = "gfx") {
847847
let gfx_framerate_bindings = gfx_framerate_bindings
848848
.header("wrapper_gfx_framerate.h")
849-
.blacklist_type("FP_NAN")
850-
.blacklist_type("FP_INFINITE")
851-
.blacklist_type("FP_ZERO")
852-
.blacklist_type("FP_SUBNORMAL")
853-
.blacklist_type("FP_NORMAL")
854-
.whitelist_type("FPS.*")
855-
.whitelist_function("SDL_.*rame.*")
856-
.whitelist_var("FPS.*")
857-
.blacklist_type("_IO.*|FILE")
849+
.blocklist_item("FP_NAN")
850+
.blocklist_item("FP_INFINITE")
851+
.blocklist_item("FP_ZERO")
852+
.blocklist_item("FP_SUBNORMAL")
853+
.blocklist_item("FP_NORMAL")
854+
.allowlist_type("FPS.*")
855+
.allowlist_function("SDL_.*rame.*")
856+
.allowlist_var("FPS.*")
857+
.blocklist_type("_IO.*|FILE")
858858
.generate()
859859
.expect("Unable to generate gfx_framerate_bindings!");
860860

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

867867
let gfx_primitives_bindings = gfx_primitives_bindings
868868
.header("wrapper_gfx_primitives.h")
869-
.blacklist_type("FP_NAN")
870-
.blacklist_type("FP_INFINITE")
871-
.blacklist_type("FP_ZERO")
872-
.blacklist_type("FP_SUBNORMAL")
873-
.blacklist_type("FP_NORMAL")
874-
.blacklist_type("SDL_.*")
875-
.whitelist_function("pixel.*")
876-
.whitelist_function("rectangle.*")
877-
.whitelist_function("rounded.*")
878-
.whitelist_function("box.*")
879-
.whitelist_function(".*line(Color|RGBA).*")
880-
.whitelist_function("thick.*")
881-
.whitelist_function(".*circle.*")
882-
.whitelist_function("arc.*")
883-
.whitelist_function("filled.*")
884-
.whitelist_function(".*ellipse.*")
885-
.whitelist_function("pie.*")
886-
.whitelist_function(".*trigon.*")
887-
.whitelist_function(".*polygon.*")
888-
.whitelist_function("textured.*")
889-
.whitelist_function("bezier.*")
890-
.whitelist_function("character.*")
891-
.whitelist_function("string.*")
892-
.whitelist_function("gfx.*")
893-
.blacklist_type("_IO.*|FILE")
869+
.blocklist_item("FP_NAN")
870+
.blocklist_item("FP_INFINITE")
871+
.blocklist_item("FP_ZERO")
872+
.blocklist_item("FP_SUBNORMAL")
873+
.blocklist_item("FP_NORMAL")
874+
.blocklist_type("SDL_.*")
875+
.allowlist_function("pixel.*")
876+
.allowlist_function("rectangle.*")
877+
.allowlist_function("rounded.*")
878+
.allowlist_function("box.*")
879+
.allowlist_function(".*line(Color|RGBA).*")
880+
.allowlist_function("thick.*")
881+
.allowlist_function(".*circle.*")
882+
.allowlist_function("arc.*")
883+
.allowlist_function("filled.*")
884+
.allowlist_function(".*ellipse.*")
885+
.allowlist_function("pie.*")
886+
.allowlist_function(".*trigon.*")
887+
.allowlist_function(".*polygon.*")
888+
.allowlist_function("textured.*")
889+
.allowlist_function("bezier.*")
890+
.allowlist_function("character.*")
891+
.allowlist_function("string.*")
892+
.allowlist_function("gfx.*")
893+
.blocklist_type("_IO.*|FILE")
894894
.generate()
895895
.expect("Unable to generate gfx_primitives_bindings!");
896896

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

903903
let gfx_imagefilter_bindings = gfx_imagefilter_bindings
904904
.header("wrapper_gfx_imagefilter.h")
905-
.whitelist_function("SDL_image.*")
906-
.blacklist_type("FP_NAN")
907-
.blacklist_type("FP_INFINITE")
908-
.blacklist_type("FP_ZERO")
909-
.blacklist_type("FP_SUBNORMAL")
910-
.blacklist_type("FP_NORMAL")
911-
.blacklist_type("_IO.*|FILE")
905+
.allowlist_function("SDL_image.*")
906+
.blocklist_item("FP_NAN")
907+
.blocklist_item("FP_INFINITE")
908+
.blocklist_item("FP_ZERO")
909+
.blocklist_item("FP_SUBNORMAL")
910+
.blocklist_item("FP_NORMAL")
911+
.blocklist_type("_IO.*|FILE")
912912
.generate()
913913
.expect("Unable to generate gfx_imagefilter_bindings!");
914914

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

921921
let gfx_rotozoom_bindings = gfx_rotozoom_bindings
922922
.header("wrapper_gfx_rotozoom.h")
923-
.blacklist_type("SDL_.*")
924-
.whitelist_function("rotozoom.*")
925-
.whitelist_function("zoom.*")
926-
.whitelist_function("shrink.*")
927-
.whitelist_function("rotate.*")
928-
.blacklist_type("FP_NAN")
929-
.blacklist_type("FP_INFINITE")
930-
.blacklist_type("FP_ZERO")
931-
.blacklist_type("FP_SUBNORMAL")
932-
.blacklist_type("FP_NORMAL")
933-
.blacklist_type("_IO.*|FILE")
923+
.blocklist_type("SDL_.*")
924+
.allowlist_function("rotozoom.*")
925+
.allowlist_function("zoom.*")
926+
.allowlist_function("shrink.*")
927+
.allowlist_function("rotate.*")
928+
.blocklist_item("FP_NAN")
929+
.blocklist_item("FP_INFINITE")
930+
.blocklist_item("FP_ZERO")
931+
.blocklist_item("FP_SUBNORMAL")
932+
.blocklist_item("FP_NORMAL")
933+
.blocklist_type("_IO.*|FILE")
934934
.generate()
935935
.expect("Unable to generate gfx_rotozoom_bindings!");
936936

0 commit comments

Comments
 (0)