From a8e0349d2a5635b5c129678a93326bd820fc8c23 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sun, 30 Sep 2018 07:05:02 -0500 Subject: [PATCH] for some reason still can't get it to do full screen --- Cargo.lock | 804 +- Cargo.toml | 10 +- imlib2-sys/build.rs | 3 - imlib2-sys/lib.rs | 14917 ----------------- imlib2/Cargo.toml | 9 + {imlib2-sys => imlib2/imlib2-sys}/Cargo.toml | 1 + imlib2/imlib2-sys/build.rs | 20 + imlib2/imlib2-sys/lib.rs | 5 + imlib2/imlib2-sys/wrapper.h | 1 + {src/imlib2 => imlib2/src}/errors.rs | 0 {src/imlib2 => imlib2/src}/image.rs | 12 +- src/imlib2/mod.rs => imlib2/src/lib.rs | 21 +- src/capture.rs | 1 + src/gui.rs | 263 +- src/lib.rs | 21 +- src/main.rs | 12 - src/window.rs | 17 - src/xlib/gc.rs | 2 - src/xlib/mod.rs | 30 - xlib/Cargo.toml | 9 + {src/xlib => xlib/src}/cursor.rs | 0 {src/xlib => xlib/src}/cursorfont.rs | 0 {src/xlib => xlib/src}/display.rs | 2 +- {src/xlib => xlib/src}/drawable.rs | 2 +- {src/xlib => xlib/src}/errors.rs | 0 {src/xlib => xlib/src}/event.rs | 2 +- {src/xlib => xlib/src}/image.rs | 8 +- xlib/src/lib.rs | 33 + {src/xlib => xlib/src}/rect.rs | 0 {src/xlib => xlib/src}/visual.rs | 2 +- {src/xlib => xlib/src}/window.rs | 16 +- 31 files changed, 1172 insertions(+), 15051 deletions(-) delete mode 100644 imlib2-sys/build.rs delete mode 100644 imlib2-sys/lib.rs create mode 100644 imlib2/Cargo.toml rename {imlib2-sys => imlib2/imlib2-sys}/Cargo.toml (90%) create mode 100644 imlib2/imlib2-sys/build.rs create mode 100644 imlib2/imlib2-sys/lib.rs create mode 100644 imlib2/imlib2-sys/wrapper.h rename {src/imlib2 => imlib2/src}/errors.rs (100%) rename {src/imlib2 => imlib2/src}/image.rs (85%) rename src/imlib2/mod.rs => imlib2/src/lib.rs (53%) delete mode 100644 src/main.rs delete mode 100644 src/window.rs delete mode 100644 src/xlib/gc.rs delete mode 100644 src/xlib/mod.rs create mode 100644 xlib/Cargo.toml rename {src/xlib => xlib/src}/cursor.rs (100%) rename {src/xlib => xlib/src}/cursorfont.rs (100%) rename {src/xlib => xlib/src}/display.rs (98%) rename {src/xlib => xlib/src}/drawable.rs (92%) rename {src/xlib => xlib/src}/errors.rs (100%) rename {src/xlib => xlib/src}/event.rs (97%) rename {src/xlib => xlib/src}/image.rs (93%) create mode 100644 xlib/src/lib.rs rename {src/xlib => xlib/src}/rect.rs (100%) rename {src/xlib => xlib/src}/visual.rs (95%) rename {src/xlib => xlib/src}/window.rs (87%) diff --git a/Cargo.lock b/Cargo.lock index d4d4ade..79066e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,12 +3,25 @@ name = "adler32" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "aho-corasick" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "android_glue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -16,9 +29,9 @@ name = "atty" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -28,9 +41,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -39,7 +52,27 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bindgen" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -47,6 +80,11 @@ name = "bitflags" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "1.2.6" @@ -57,11 +95,38 @@ name = "cc" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cexpr" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cfg-if" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "cgl" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gleam 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clang-sys" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "clap" version = "2.31.2" @@ -76,6 +141,51 @@ dependencies = [ "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cocoa" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "core-graphics" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "deflate" version = "0.7.18" @@ -85,6 +195,31 @@ dependencies = [ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dlib" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "downcast-rs" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "env_logger" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" version = "0.1.1" @@ -104,9 +239,109 @@ dependencies = [ "synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "gl" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gl_generator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "gleam" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "glob" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "glutin" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winit 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "humantime" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "imlib2" +version = "0.1.0" +dependencies = [ + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "imlib2-sys 0.1.0", + "xlib 0.1.0", +] + [[package]] name = "imlib2-sys" version = "0.1.0" +dependencies = [ + "bindgen 0.40.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "inflate" @@ -117,10 +352,119 @@ dependencies = [ ] [[package]] -name = "libc" -version = "0.2.40" +name = "khronos_api" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazy_static" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "libc" +version = "0.2.43" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libloading" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lock_api" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memchr" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memchr" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "memmap" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nanovg" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nanovg-sys 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nanovg-sys" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nix" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nom" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -143,6 +487,61 @@ name = "num-traits" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "objc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "osmesa-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "owning_ref" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pkg-config" version = "0.3.14" @@ -159,6 +558,14 @@ dependencies = [ "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro2" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro2" version = "0.4.19" @@ -167,11 +574,24 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "quick-error" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "quote" version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "quote" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "quote" version = "0.6.8" @@ -180,6 +600,23 @@ dependencies = [ "proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "redox_syscall" version = "0.1.37" @@ -193,24 +630,110 @@ dependencies = [ "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "regex" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "screenshot" version = "0.3.0" dependencies = [ "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "imlib2-sys 0.1.0", - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "gl 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glutin 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "imlib2 0.1.0", + "nanovg 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)", + "xlib 0.1.0", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "shared_library" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "smallvec" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-protocols 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "strsim" version = "0.7.0" @@ -272,12 +795,20 @@ dependencies = [ "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "termcolor" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "termion" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -290,16 +821,29 @@ dependencies = [ "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "thread_local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "time" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ucd-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-width" version = "0.1.4" @@ -315,14 +859,95 @@ name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "utf8-ranges" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "vec_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wayland-client" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-scanner 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wayland-commons" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wayland-protocols" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-commons 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-scanner 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-sys 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wayland-scanner" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wayland-sys" +version = "0.20.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "which" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -334,47 +959,172 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winit" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "cocoa 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "core-graphics 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smithay-client-toolkit 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wayland-client 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "x11" version = "2.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "x11-dl" +version = "2.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "xlib" +version = "0.1.0" +dependencies = [ + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "xml-rs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" +"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" +"checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" "checksum backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea58cd16fd6c9d120b5bcb01d63883ae4cc7ba2aed35c1841b862a3c7ef6639" "checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" +"checksum bindgen 0.40.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8f4c4ffe91e0f26bdcc5a8dd58cbf0358ad772b8ec1ae274a11a0ba54ec175f4" "checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" +"checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" "checksum cc 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "0ebb87d1116151416c0cf66a0e3fb6430cccd120fd6300794b4dfaa050ac40ba" +"checksum cexpr 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42aac45e9567d97474a834efdee3081b3c942b2205be932092f53354ce503d6c" "checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18" +"checksum cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "55e7ec0b74fe5897894cbc207092c577e87c52f8a59e8ca8d97ef37551f60a49" +"checksum clang-sys 0.23.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d7f7c04e52c35222fffcc3a115b5daf5f7e2bfb71c13c4e2321afe1fc71859c2" "checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum cocoa 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cd1afb83b2de9c41e5dfedb2bcccb779d433b958404876009ae4b01746ff23" +"checksum core-foundation 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "58667b9a618a37ea8c4c4cb5298703e5dfadcd3698c79f54fc43e6a2e94733ea" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" +"checksum core-graphics 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92801c908ea6301ae619ed842a72e01098085fc321b9c2f3f833dad555bba055" "checksum deflate 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "32c8120d981901a9970a3a1c97cf8b630e0fa8c3ca31e75b6fd6fd5f9f427b31" +"checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a" +"checksum downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "18df8ce4470c189d18aa926022da57544f31e154631eb4cfe796aea97051fe6c" +"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" "checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" "checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum gl 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81457bb802910ad5b535eb48541c51830a761804aa5b7087adbc9d049aa57aca" +"checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" +"checksum gleam 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ba6539d49223f6bca4f076d9490c001bdbfe07d59cb0ad4079033c75bdc92d" +"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +"checksum glutin 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0be84b852c1dcccde4b1329be778e5bd9c0801b8bbb8766ea327a3f813c6eafe" +"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" "checksum inflate 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6f53b811ee8e2057ccf9643ca6b4277de90efaf5e61e55fd5254576926bb4245" -"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b" +"checksum khronos_api 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "037ab472c33f67b5fbd3e9163a2645319e5356fcd355efa6d4eb7fff4bbcb554" +"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" +"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" +"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" +"checksum lock_api 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "775751a3e69bde4df9b38dd00a1b5d6ac13791e4223d4a0506577f0dd27cfb7a" +"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" +"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" +"checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d" +"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" +"checksum nanovg 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1d9e6da9031cb3f36614160ac7424e65ad5cc86b25ca3b6f17f7053b18905d4" +"checksum nanovg-sys 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2930972e68f3956b728b005ec6995dda334f19c764fdb919fc32462b89ad76e" +"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" +"checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" "checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe" +"checksum objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9833ab0efe5361b1e2122a0544a5d3359576911a42cb098c2e59be8650807367" +"checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b" +"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" +"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" +"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b" +"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" "checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901" +"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" +"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dd636425967c33af890042c483632d33fa7a18f19ad1d7ea72e8998c6ef8dea5" +"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" +"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" +"checksum regex 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2069749032ea3ec200ca51e4a31df41759190a88edca0d2d86ee8bedf7073341" +"checksum regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "747ba3b235651f6e2f67dfa8bcdcd073ddb7c243cb21c442fc12395dfcac212d" "checksum rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "76d7ba1feafada44f2d38eed812bd2489a03c0f5abb975799251518b68848649" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" +"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d" +"checksum smithay-client-toolkit 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f1609083d6bca3991a3c648d80ae16e1764d70881c3321bee1c915149073d605" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" "checksum structopt 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8e9ad6a11096cbecdcca0cc6aa403fdfdbaeda2fb3323a39c98e6a166a1e45a" "checksum structopt-derive 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4cbce8ccdc62166bd594c14396a3242bf94c337a51dbfa9be1076dd74b3db2af" @@ -382,14 +1132,32 @@ dependencies = [ "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" +"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" +"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" +"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum wayland-client 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e7516a23419a55bd2e6d466c75a6a52c85718e5013660603289c2b8bee794b12" +"checksum wayland-commons 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d8609d59b95bf198bae4f3b064d55a712f2d529eec6aac98cc1f6e9cc911d47a" +"checksum wayland-protocols 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bd4d31a96be6ecdbaddbf35200f5af2daee01be592afecd8feaf443d417e9230" +"checksum wayland-scanner 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)" = "e674d85ae9c67cbbc590374d8f2e20a7a02fff87ce3a31fc52213afece8d05ad" +"checksum wayland-sys 0.20.12 (registry+https://github.com/rust-lang/crates.io-index)" = "87c82ee658aa657fdfd7061f22e442030d921cfefc5bad68bcf41973e67922f7" +"checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" +"checksum winit 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ba44cf306b981badc781894ab5d6fda54764a0512cbbf8db4685d329014143fa" "checksum x11 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39697e3123f715483d311b5826e254b6f3cfebdd83cf7ef3358f579c3d68e235" +"checksum x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)" = "940586acb859ea05c53971ac231685799a7ec1dee66ac0bccc0e6ad96e06b4e3" +"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2" diff --git a/Cargo.toml b/Cargo.toml index 8c21337..725982f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,16 +5,18 @@ version = "0.3.0" authors = ["Michael Zhang "] [workspace] -members = [".", "imlib2-sys"] +members = [".", "imlib2", "imlib2/imlib2-sys", "xlib"] [lib] crate-type = ["dylib", "rlib"] [dependencies] failure = "0.1" +gl = "0.10" +glutin = "0.18" +imlib2 = { path = "imlib2" } +nanovg = { version = "1.0.2", features = ["gl3"] } png = "0.12" -imlib2-sys = { path = "imlib2-sys" } -libc = "0.2" structopt = "0.2" time = "0.1" -x11 = { version = "2.18", features = ["xlib"] } +xlib = { path = "xlib" } diff --git a/imlib2-sys/build.rs b/imlib2-sys/build.rs deleted file mode 100644 index 2715bc8..0000000 --- a/imlib2-sys/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("cargo:rustc-link-lib=Imlib2"); -} diff --git a/imlib2-sys/lib.rs b/imlib2-sys/lib.rs deleted file mode 100644 index a3166e8..0000000 --- a/imlib2-sys/lib.rs +++ /dev/null @@ -1,14917 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub const __IMLIB_API_H: u32 = 1; -pub const XlibSpecificationRelease: u32 = 6; -pub const _SYS_TYPES_H: u32 = 1; -pub const _FEATURES_H: u32 = 1; -pub const _DEFAULT_SOURCE: u32 = 1; -pub const __USE_ISOC11: u32 = 1; -pub const __USE_ISOC99: u32 = 1; -pub const __USE_ISOC95: u32 = 1; -pub const __USE_POSIX_IMPLICITLY: u32 = 1; -pub const _POSIX_SOURCE: u32 = 1; -pub const _POSIX_C_SOURCE: u32 = 200809; -pub const __USE_POSIX: u32 = 1; -pub const __USE_POSIX2: u32 = 1; -pub const __USE_POSIX199309: u32 = 1; -pub const __USE_POSIX199506: u32 = 1; -pub const __USE_XOPEN2K: u32 = 1; -pub const __USE_XOPEN2K8: u32 = 1; -pub const _ATFILE_SOURCE: u32 = 1; -pub const __USE_MISC: u32 = 1; -pub const __USE_ATFILE: u32 = 1; -pub const __USE_FORTIFY_LEVEL: u32 = 0; -pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; -pub const _STDC_PREDEF_H: u32 = 1; -pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_ISO_10646__: u32 = 201706; -pub const __GNU_LIBRARY__: u32 = 6; -pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 28; -pub const _SYS_CDEFS_H: u32 = 1; -pub const __glibc_c99_flexarr_available: u32 = 1; -pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; -pub const __SYSCALL_WORDSIZE: u32 = 64; -pub const __HAVE_GENERIC_SELECTION: u32 = 1; -pub const _BITS_TYPES_H: u32 = 1; -pub const _BITS_TYPESIZES_H: u32 = 1; -pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; -pub const __INO_T_MATCHES_INO64_T: u32 = 1; -pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; -pub const __FD_SETSIZE: u32 = 1024; -pub const __clock_t_defined: u32 = 1; -pub const __clockid_t_defined: u32 = 1; -pub const __time_t_defined: u32 = 1; -pub const __timer_t_defined: u32 = 1; -pub const _BITS_STDINT_INTN_H: u32 = 1; -pub const __BIT_TYPES_DEFINED__: u32 = 1; -pub const _ENDIAN_H: u32 = 1; -pub const __LITTLE_ENDIAN: u32 = 1234; -pub const __BIG_ENDIAN: u32 = 4321; -pub const __PDP_ENDIAN: u32 = 3412; -pub const __BYTE_ORDER: u32 = 1234; -pub const __FLOAT_WORD_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const _BITS_BYTESWAP_H: u32 = 1; -pub const _BITS_UINTN_IDENTITY_H: u32 = 1; -pub const _SYS_SELECT_H: u32 = 1; -pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0"; -pub const __sigset_t_defined: u32 = 1; -pub const __timeval_defined: u32 = 1; -pub const _STRUCT_TIMESPEC: u32 = 1; -pub const FD_SETSIZE: u32 = 1024; -pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; -pub const _THREAD_SHARED_TYPES_H: u32 = 1; -pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; -pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; -pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; -pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; -pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; -pub const __PTHREAD_MUTEX_LOCK_ELISION: u32 = 1; -pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND: u32 = 0; -pub const __PTHREAD_MUTEX_USE_UNION: u32 = 0; -pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: u32 = 1; -pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; -pub const __have_pthread_attr_t: u32 = 1; -pub const X_PROTOCOL: u32 = 11; -pub const X_PROTOCOL_REVISION: u32 = 0; -pub const None: u32 = 0; -pub const ParentRelative: u32 = 1; -pub const CopyFromParent: u32 = 0; -pub const PointerWindow: u32 = 0; -pub const InputFocus: u32 = 1; -pub const PointerRoot: u32 = 1; -pub const AnyPropertyType: u32 = 0; -pub const AnyKey: u32 = 0; -pub const AnyButton: u32 = 0; -pub const AllTemporary: u32 = 0; -pub const CurrentTime: u32 = 0; -pub const NoSymbol: u32 = 0; -pub const NoEventMask: u32 = 0; -pub const KeyPressMask: u32 = 1; -pub const KeyReleaseMask: u32 = 2; -pub const ButtonPressMask: u32 = 4; -pub const ButtonReleaseMask: u32 = 8; -pub const EnterWindowMask: u32 = 16; -pub const LeaveWindowMask: u32 = 32; -pub const PointerMotionMask: u32 = 64; -pub const PointerMotionHintMask: u32 = 128; -pub const Button1MotionMask: u32 = 256; -pub const Button2MotionMask: u32 = 512; -pub const Button3MotionMask: u32 = 1024; -pub const Button4MotionMask: u32 = 2048; -pub const Button5MotionMask: u32 = 4096; -pub const ButtonMotionMask: u32 = 8192; -pub const KeymapStateMask: u32 = 16384; -pub const ExposureMask: u32 = 32768; -pub const VisibilityChangeMask: u32 = 65536; -pub const StructureNotifyMask: u32 = 131072; -pub const ResizeRedirectMask: u32 = 262144; -pub const SubstructureNotifyMask: u32 = 524288; -pub const SubstructureRedirectMask: u32 = 1048576; -pub const FocusChangeMask: u32 = 2097152; -pub const PropertyChangeMask: u32 = 4194304; -pub const ColormapChangeMask: u32 = 8388608; -pub const OwnerGrabButtonMask: u32 = 16777216; -pub const KeyPress: u32 = 2; -pub const KeyRelease: u32 = 3; -pub const ButtonPress: u32 = 4; -pub const ButtonRelease: u32 = 5; -pub const MotionNotify: u32 = 6; -pub const EnterNotify: u32 = 7; -pub const LeaveNotify: u32 = 8; -pub const FocusIn: u32 = 9; -pub const FocusOut: u32 = 10; -pub const KeymapNotify: u32 = 11; -pub const Expose: u32 = 12; -pub const GraphicsExpose: u32 = 13; -pub const NoExpose: u32 = 14; -pub const VisibilityNotify: u32 = 15; -pub const CreateNotify: u32 = 16; -pub const DestroyNotify: u32 = 17; -pub const UnmapNotify: u32 = 18; -pub const MapNotify: u32 = 19; -pub const MapRequest: u32 = 20; -pub const ReparentNotify: u32 = 21; -pub const ConfigureNotify: u32 = 22; -pub const ConfigureRequest: u32 = 23; -pub const GravityNotify: u32 = 24; -pub const ResizeRequest: u32 = 25; -pub const CirculateNotify: u32 = 26; -pub const CirculateRequest: u32 = 27; -pub const PropertyNotify: u32 = 28; -pub const SelectionClear: u32 = 29; -pub const SelectionRequest: u32 = 30; -pub const SelectionNotify: u32 = 31; -pub const ColormapNotify: u32 = 32; -pub const ClientMessage: u32 = 33; -pub const MappingNotify: u32 = 34; -pub const GenericEvent: u32 = 35; -pub const LASTEvent: u32 = 36; -pub const ShiftMask: u32 = 1; -pub const LockMask: u32 = 2; -pub const ControlMask: u32 = 4; -pub const Mod1Mask: u32 = 8; -pub const Mod2Mask: u32 = 16; -pub const Mod3Mask: u32 = 32; -pub const Mod4Mask: u32 = 64; -pub const Mod5Mask: u32 = 128; -pub const ShiftMapIndex: u32 = 0; -pub const LockMapIndex: u32 = 1; -pub const ControlMapIndex: u32 = 2; -pub const Mod1MapIndex: u32 = 3; -pub const Mod2MapIndex: u32 = 4; -pub const Mod3MapIndex: u32 = 5; -pub const Mod4MapIndex: u32 = 6; -pub const Mod5MapIndex: u32 = 7; -pub const Button1Mask: u32 = 256; -pub const Button2Mask: u32 = 512; -pub const Button3Mask: u32 = 1024; -pub const Button4Mask: u32 = 2048; -pub const Button5Mask: u32 = 4096; -pub const AnyModifier: u32 = 32768; -pub const Button1: u32 = 1; -pub const Button2: u32 = 2; -pub const Button3: u32 = 3; -pub const Button4: u32 = 4; -pub const Button5: u32 = 5; -pub const NotifyNormal: u32 = 0; -pub const NotifyGrab: u32 = 1; -pub const NotifyUngrab: u32 = 2; -pub const NotifyWhileGrabbed: u32 = 3; -pub const NotifyHint: u32 = 1; -pub const NotifyAncestor: u32 = 0; -pub const NotifyVirtual: u32 = 1; -pub const NotifyInferior: u32 = 2; -pub const NotifyNonlinear: u32 = 3; -pub const NotifyNonlinearVirtual: u32 = 4; -pub const NotifyPointer: u32 = 5; -pub const NotifyPointerRoot: u32 = 6; -pub const NotifyDetailNone: u32 = 7; -pub const VisibilityUnobscured: u32 = 0; -pub const VisibilityPartiallyObscured: u32 = 1; -pub const VisibilityFullyObscured: u32 = 2; -pub const PlaceOnTop: u32 = 0; -pub const PlaceOnBottom: u32 = 1; -pub const FamilyInternet: u32 = 0; -pub const FamilyDECnet: u32 = 1; -pub const FamilyChaos: u32 = 2; -pub const FamilyInternet6: u32 = 6; -pub const FamilyServerInterpreted: u32 = 5; -pub const PropertyNewValue: u32 = 0; -pub const PropertyDelete: u32 = 1; -pub const ColormapUninstalled: u32 = 0; -pub const ColormapInstalled: u32 = 1; -pub const GrabModeSync: u32 = 0; -pub const GrabModeAsync: u32 = 1; -pub const GrabSuccess: u32 = 0; -pub const AlreadyGrabbed: u32 = 1; -pub const GrabInvalidTime: u32 = 2; -pub const GrabNotViewable: u32 = 3; -pub const GrabFrozen: u32 = 4; -pub const AsyncPointer: u32 = 0; -pub const SyncPointer: u32 = 1; -pub const ReplayPointer: u32 = 2; -pub const AsyncKeyboard: u32 = 3; -pub const SyncKeyboard: u32 = 4; -pub const ReplayKeyboard: u32 = 5; -pub const AsyncBoth: u32 = 6; -pub const SyncBoth: u32 = 7; -pub const RevertToParent: u32 = 2; -pub const Success: u32 = 0; -pub const BadRequest: u32 = 1; -pub const BadValue: u32 = 2; -pub const BadWindow: u32 = 3; -pub const BadPixmap: u32 = 4; -pub const BadAtom: u32 = 5; -pub const BadCursor: u32 = 6; -pub const BadFont: u32 = 7; -pub const BadMatch: u32 = 8; -pub const BadDrawable: u32 = 9; -pub const BadAccess: u32 = 10; -pub const BadAlloc: u32 = 11; -pub const BadColor: u32 = 12; -pub const BadGC: u32 = 13; -pub const BadIDChoice: u32 = 14; -pub const BadName: u32 = 15; -pub const BadLength: u32 = 16; -pub const BadImplementation: u32 = 17; -pub const FirstExtensionError: u32 = 128; -pub const LastExtensionError: u32 = 255; -pub const InputOutput: u32 = 1; -pub const InputOnly: u32 = 2; -pub const CWBackPixmap: u32 = 1; -pub const CWBackPixel: u32 = 2; -pub const CWBorderPixmap: u32 = 4; -pub const CWBorderPixel: u32 = 8; -pub const CWBitGravity: u32 = 16; -pub const CWWinGravity: u32 = 32; -pub const CWBackingStore: u32 = 64; -pub const CWBackingPlanes: u32 = 128; -pub const CWBackingPixel: u32 = 256; -pub const CWOverrideRedirect: u32 = 512; -pub const CWSaveUnder: u32 = 1024; -pub const CWEventMask: u32 = 2048; -pub const CWDontPropagate: u32 = 4096; -pub const CWColormap: u32 = 8192; -pub const CWCursor: u32 = 16384; -pub const CWX: u32 = 1; -pub const CWY: u32 = 2; -pub const CWWidth: u32 = 4; -pub const CWHeight: u32 = 8; -pub const CWBorderWidth: u32 = 16; -pub const CWSibling: u32 = 32; -pub const CWStackMode: u32 = 64; -pub const ForgetGravity: u32 = 0; -pub const NorthWestGravity: u32 = 1; -pub const NorthGravity: u32 = 2; -pub const NorthEastGravity: u32 = 3; -pub const WestGravity: u32 = 4; -pub const CenterGravity: u32 = 5; -pub const EastGravity: u32 = 6; -pub const SouthWestGravity: u32 = 7; -pub const SouthGravity: u32 = 8; -pub const SouthEastGravity: u32 = 9; -pub const StaticGravity: u32 = 10; -pub const UnmapGravity: u32 = 0; -pub const NotUseful: u32 = 0; -pub const WhenMapped: u32 = 1; -pub const Always: u32 = 2; -pub const IsUnmapped: u32 = 0; -pub const IsUnviewable: u32 = 1; -pub const IsViewable: u32 = 2; -pub const SetModeInsert: u32 = 0; -pub const SetModeDelete: u32 = 1; -pub const DestroyAll: u32 = 0; -pub const RetainPermanent: u32 = 1; -pub const RetainTemporary: u32 = 2; -pub const Above: u32 = 0; -pub const Below: u32 = 1; -pub const TopIf: u32 = 2; -pub const BottomIf: u32 = 3; -pub const Opposite: u32 = 4; -pub const RaiseLowest: u32 = 0; -pub const LowerHighest: u32 = 1; -pub const PropModeReplace: u32 = 0; -pub const PropModePrepend: u32 = 1; -pub const PropModeAppend: u32 = 2; -pub const GXclear: u32 = 0; -pub const GXand: u32 = 1; -pub const GXandReverse: u32 = 2; -pub const GXcopy: u32 = 3; -pub const GXandInverted: u32 = 4; -pub const GXnoop: u32 = 5; -pub const GXxor: u32 = 6; -pub const GXor: u32 = 7; -pub const GXnor: u32 = 8; -pub const GXequiv: u32 = 9; -pub const GXinvert: u32 = 10; -pub const GXorReverse: u32 = 11; -pub const GXcopyInverted: u32 = 12; -pub const GXorInverted: u32 = 13; -pub const GXnand: u32 = 14; -pub const GXset: u32 = 15; -pub const LineSolid: u32 = 0; -pub const LineOnOffDash: u32 = 1; -pub const LineDoubleDash: u32 = 2; -pub const CapNotLast: u32 = 0; -pub const CapButt: u32 = 1; -pub const CapRound: u32 = 2; -pub const CapProjecting: u32 = 3; -pub const JoinMiter: u32 = 0; -pub const JoinRound: u32 = 1; -pub const JoinBevel: u32 = 2; -pub const FillSolid: u32 = 0; -pub const FillTiled: u32 = 1; -pub const FillStippled: u32 = 2; -pub const FillOpaqueStippled: u32 = 3; -pub const EvenOddRule: u32 = 0; -pub const WindingRule: u32 = 1; -pub const ClipByChildren: u32 = 0; -pub const IncludeInferiors: u32 = 1; -pub const Unsorted: u32 = 0; -pub const YSorted: u32 = 1; -pub const YXSorted: u32 = 2; -pub const YXBanded: u32 = 3; -pub const CoordModeOrigin: u32 = 0; -pub const CoordModePrevious: u32 = 1; -pub const Complex: u32 = 0; -pub const Nonconvex: u32 = 1; -pub const Convex: u32 = 2; -pub const ArcChord: u32 = 0; -pub const ArcPieSlice: u32 = 1; -pub const GCFunction: u32 = 1; -pub const GCPlaneMask: u32 = 2; -pub const GCForeground: u32 = 4; -pub const GCBackground: u32 = 8; -pub const GCLineWidth: u32 = 16; -pub const GCLineStyle: u32 = 32; -pub const GCCapStyle: u32 = 64; -pub const GCJoinStyle: u32 = 128; -pub const GCFillStyle: u32 = 256; -pub const GCFillRule: u32 = 512; -pub const GCTile: u32 = 1024; -pub const GCStipple: u32 = 2048; -pub const GCTileStipXOrigin: u32 = 4096; -pub const GCTileStipYOrigin: u32 = 8192; -pub const GCFont: u32 = 16384; -pub const GCSubwindowMode: u32 = 32768; -pub const GCGraphicsExposures: u32 = 65536; -pub const GCClipXOrigin: u32 = 131072; -pub const GCClipYOrigin: u32 = 262144; -pub const GCClipMask: u32 = 524288; -pub const GCDashOffset: u32 = 1048576; -pub const GCDashList: u32 = 2097152; -pub const GCArcMode: u32 = 4194304; -pub const GCLastBit: u32 = 22; -pub const FontLeftToRight: u32 = 0; -pub const FontRightToLeft: u32 = 1; -pub const FontChange: u32 = 255; -pub const XYBitmap: u32 = 0; -pub const XYPixmap: u32 = 1; -pub const ZPixmap: u32 = 2; -pub const AllocNone: u32 = 0; -pub const AllocAll: u32 = 1; -pub const DoRed: u32 = 1; -pub const DoGreen: u32 = 2; -pub const DoBlue: u32 = 4; -pub const CursorShape: u32 = 0; -pub const TileShape: u32 = 1; -pub const StippleShape: u32 = 2; -pub const AutoRepeatModeOff: u32 = 0; -pub const AutoRepeatModeOn: u32 = 1; -pub const AutoRepeatModeDefault: u32 = 2; -pub const LedModeOff: u32 = 0; -pub const LedModeOn: u32 = 1; -pub const KBKeyClickPercent: u32 = 1; -pub const KBBellPercent: u32 = 2; -pub const KBBellPitch: u32 = 4; -pub const KBBellDuration: u32 = 8; -pub const KBLed: u32 = 16; -pub const KBLedMode: u32 = 32; -pub const KBKey: u32 = 64; -pub const KBAutoRepeatMode: u32 = 128; -pub const MappingSuccess: u32 = 0; -pub const MappingBusy: u32 = 1; -pub const MappingFailed: u32 = 2; -pub const MappingModifier: u32 = 0; -pub const MappingKeyboard: u32 = 1; -pub const MappingPointer: u32 = 2; -pub const DontPreferBlanking: u32 = 0; -pub const PreferBlanking: u32 = 1; -pub const DefaultBlanking: u32 = 2; -pub const DisableScreenSaver: u32 = 0; -pub const DisableScreenInterval: u32 = 0; -pub const DontAllowExposures: u32 = 0; -pub const AllowExposures: u32 = 1; -pub const DefaultExposures: u32 = 2; -pub const ScreenSaverReset: u32 = 0; -pub const ScreenSaverActive: u32 = 1; -pub const HostInsert: u32 = 0; -pub const HostDelete: u32 = 1; -pub const EnableAccess: u32 = 1; -pub const DisableAccess: u32 = 0; -pub const StaticGray: u32 = 0; -pub const GrayScale: u32 = 1; -pub const StaticColor: u32 = 2; -pub const PseudoColor: u32 = 3; -pub const TrueColor: u32 = 4; -pub const DirectColor: u32 = 5; -pub const LSBFirst: u32 = 0; -pub const MSBFirst: u32 = 1; -pub const NeedFunctionPrototypes: u32 = 1; -pub const NeedVarargsPrototypes: u32 = 1; -pub const NeedNestedPrototypes: u32 = 1; -pub const FUNCPROTO: u32 = 15; -pub const NeedWidePrototypes: u32 = 0; -pub const X_HAVE_UTF8_STRING: u32 = 1; -pub const True: u32 = 1; -pub const False: u32 = 0; -pub const QueuedAlready: u32 = 0; -pub const QueuedAfterReading: u32 = 1; -pub const QueuedAfterFlush: u32 = 2; -pub const XNRequiredCharSet: &'static [u8; 16usize] = b"requiredCharSet\0"; -pub const XNQueryOrientation: &'static [u8; 17usize] = b"queryOrientation\0"; -pub const XNBaseFontName: &'static [u8; 13usize] = b"baseFontName\0"; -pub const XNOMAutomatic: &'static [u8; 12usize] = b"omAutomatic\0"; -pub const XNMissingCharSet: &'static [u8; 15usize] = b"missingCharSet\0"; -pub const XNDefaultString: &'static [u8; 14usize] = b"defaultString\0"; -pub const XNOrientation: &'static [u8; 12usize] = b"orientation\0"; -pub const XNDirectionalDependentDrawing: &'static [u8; 28usize] = b"directionalDependentDrawing\0"; -pub const XNContextualDrawing: &'static [u8; 18usize] = b"contextualDrawing\0"; -pub const XNFontInfo: &'static [u8; 9usize] = b"fontInfo\0"; -pub const XIMPreeditArea: u32 = 1; -pub const XIMPreeditCallbacks: u32 = 2; -pub const XIMPreeditPosition: u32 = 4; -pub const XIMPreeditNothing: u32 = 8; -pub const XIMPreeditNone: u32 = 16; -pub const XIMStatusArea: u32 = 256; -pub const XIMStatusCallbacks: u32 = 512; -pub const XIMStatusNothing: u32 = 1024; -pub const XIMStatusNone: u32 = 2048; -pub const XNVaNestedList: &'static [u8; 15usize] = b"XNVaNestedList\0"; -pub const XNQueryInputStyle: &'static [u8; 16usize] = b"queryInputStyle\0"; -pub const XNClientWindow: &'static [u8; 13usize] = b"clientWindow\0"; -pub const XNInputStyle: &'static [u8; 11usize] = b"inputStyle\0"; -pub const XNFocusWindow: &'static [u8; 12usize] = b"focusWindow\0"; -pub const XNResourceName: &'static [u8; 13usize] = b"resourceName\0"; -pub const XNResourceClass: &'static [u8; 14usize] = b"resourceClass\0"; -pub const XNGeometryCallback: &'static [u8; 17usize] = b"geometryCallback\0"; -pub const XNDestroyCallback: &'static [u8; 16usize] = b"destroyCallback\0"; -pub const XNFilterEvents: &'static [u8; 13usize] = b"filterEvents\0"; -pub const XNPreeditStartCallback: &'static [u8; 21usize] = b"preeditStartCallback\0"; -pub const XNPreeditDoneCallback: &'static [u8; 20usize] = b"preeditDoneCallback\0"; -pub const XNPreeditDrawCallback: &'static [u8; 20usize] = b"preeditDrawCallback\0"; -pub const XNPreeditCaretCallback: &'static [u8; 21usize] = b"preeditCaretCallback\0"; -pub const XNPreeditStateNotifyCallback: &'static [u8; 27usize] = b"preeditStateNotifyCallback\0"; -pub const XNPreeditAttributes: &'static [u8; 18usize] = b"preeditAttributes\0"; -pub const XNStatusStartCallback: &'static [u8; 20usize] = b"statusStartCallback\0"; -pub const XNStatusDoneCallback: &'static [u8; 19usize] = b"statusDoneCallback\0"; -pub const XNStatusDrawCallback: &'static [u8; 19usize] = b"statusDrawCallback\0"; -pub const XNStatusAttributes: &'static [u8; 17usize] = b"statusAttributes\0"; -pub const XNArea: &'static [u8; 5usize] = b"area\0"; -pub const XNAreaNeeded: &'static [u8; 11usize] = b"areaNeeded\0"; -pub const XNSpotLocation: &'static [u8; 13usize] = b"spotLocation\0"; -pub const XNColormap: &'static [u8; 9usize] = b"colorMap\0"; -pub const XNStdColormap: &'static [u8; 12usize] = b"stdColorMap\0"; -pub const XNForeground: &'static [u8; 11usize] = b"foreground\0"; -pub const XNBackground: &'static [u8; 11usize] = b"background\0"; -pub const XNBackgroundPixmap: &'static [u8; 17usize] = b"backgroundPixmap\0"; -pub const XNFontSet: &'static [u8; 8usize] = b"fontSet\0"; -pub const XNLineSpace: &'static [u8; 10usize] = b"lineSpace\0"; -pub const XNCursor: &'static [u8; 7usize] = b"cursor\0"; -pub const XNQueryIMValuesList: &'static [u8; 18usize] = b"queryIMValuesList\0"; -pub const XNQueryICValuesList: &'static [u8; 18usize] = b"queryICValuesList\0"; -pub const XNVisiblePosition: &'static [u8; 16usize] = b"visiblePosition\0"; -pub const XNR6PreeditCallback: &'static [u8; 18usize] = b"r6PreeditCallback\0"; -pub const XNStringConversionCallback: &'static [u8; 25usize] = b"stringConversionCallback\0"; -pub const XNStringConversion: &'static [u8; 17usize] = b"stringConversion\0"; -pub const XNResetState: &'static [u8; 11usize] = b"resetState\0"; -pub const XNHotKey: &'static [u8; 7usize] = b"hotKey\0"; -pub const XNHotKeyState: &'static [u8; 12usize] = b"hotKeyState\0"; -pub const XNPreeditState: &'static [u8; 13usize] = b"preeditState\0"; -pub const XNSeparatorofNestedList: &'static [u8; 22usize] = b"separatorofNestedList\0"; -pub const XBufferOverflow: i32 = -1; -pub const XLookupNone: u32 = 1; -pub const XLookupChars: u32 = 2; -pub const XLookupKeySym: u32 = 3; -pub const XLookupBoth: u32 = 4; -pub const XIMReverse: u32 = 1; -pub const XIMUnderline: u32 = 2; -pub const XIMHighlight: u32 = 4; -pub const XIMPrimary: u32 = 32; -pub const XIMSecondary: u32 = 64; -pub const XIMTertiary: u32 = 128; -pub const XIMVisibleToForward: u32 = 256; -pub const XIMVisibleToBackword: u32 = 512; -pub const XIMVisibleToCenter: u32 = 1024; -pub const XIMPreeditUnKnown: u32 = 0; -pub const XIMPreeditEnable: u32 = 1; -pub const XIMPreeditDisable: u32 = 2; -pub const XIMInitialState: u32 = 1; -pub const XIMPreserveState: u32 = 2; -pub const XIMStringConversionLeftEdge: u32 = 1; -pub const XIMStringConversionRightEdge: u32 = 2; -pub const XIMStringConversionTopEdge: u32 = 4; -pub const XIMStringConversionBottomEdge: u32 = 8; -pub const XIMStringConversionConcealed: u32 = 16; -pub const XIMStringConversionWrapped: u32 = 32; -pub const XIMStringConversionBuffer: u32 = 1; -pub const XIMStringConversionLine: u32 = 2; -pub const XIMStringConversionWord: u32 = 3; -pub const XIMStringConversionChar: u32 = 4; -pub const XIMStringConversionSubstitution: u32 = 1; -pub const XIMStringConversionRetrieval: u32 = 2; -pub const XIMHotKeyStateON: u32 = 1; -pub const XIMHotKeyStateOFF: u32 = 2; -pub type __u_char = ::std::os::raw::c_uchar; -pub type __u_short = ::std::os::raw::c_ushort; -pub type __u_int = ::std::os::raw::c_uint; -pub type __u_long = ::std::os::raw::c_ulong; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_long; -pub type __uint64_t = ::std::os::raw::c_ulong; -pub type __int_least8_t = __int8_t; -pub type __uint_least8_t = __uint8_t; -pub type __int_least16_t = __int16_t; -pub type __uint_least16_t = __uint16_t; -pub type __int_least32_t = __int32_t; -pub type __uint_least32_t = __uint32_t; -pub type __int_least64_t = __int64_t; -pub type __uint_least64_t = __uint64_t; -pub type __quad_t = ::std::os::raw::c_long; -pub type __u_quad_t = ::std::os::raw::c_ulong; -pub type __intmax_t = ::std::os::raw::c_long; -pub type __uintmax_t = ::std::os::raw::c_ulong; -pub type __dev_t = ::std::os::raw::c_ulong; -pub type __uid_t = ::std::os::raw::c_uint; -pub type __gid_t = ::std::os::raw::c_uint; -pub type __ino_t = ::std::os::raw::c_ulong; -pub type __ino64_t = ::std::os::raw::c_ulong; -pub type __mode_t = ::std::os::raw::c_uint; -pub type __nlink_t = ::std::os::raw::c_ulong; -pub type __off_t = ::std::os::raw::c_long; -pub type __off64_t = ::std::os::raw::c_long; -pub type __pid_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __fsid_t { - pub __val: [::std::os::raw::c_int; 2usize], -} -#[test] -fn bindgen_test_layout___fsid_t() { - assert_eq!( - ::std::mem::size_of::<__fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) - ); -} -pub type __clock_t = ::std::os::raw::c_long; -pub type __rlim_t = ::std::os::raw::c_ulong; -pub type __rlim64_t = ::std::os::raw::c_ulong; -pub type __id_t = ::std::os::raw::c_uint; -pub type __time_t = ::std::os::raw::c_long; -pub type __useconds_t = ::std::os::raw::c_uint; -pub type __suseconds_t = ::std::os::raw::c_long; -pub type __daddr_t = ::std::os::raw::c_int; -pub type __key_t = ::std::os::raw::c_int; -pub type __clockid_t = ::std::os::raw::c_int; -pub type __timer_t = *mut ::std::os::raw::c_void; -pub type __blksize_t = ::std::os::raw::c_long; -pub type __blkcnt_t = ::std::os::raw::c_long; -pub type __blkcnt64_t = ::std::os::raw::c_long; -pub type __fsblkcnt_t = ::std::os::raw::c_ulong; -pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; -pub type __fsword_t = ::std::os::raw::c_long; -pub type __ssize_t = ::std::os::raw::c_long; -pub type __syscall_slong_t = ::std::os::raw::c_long; -pub type __syscall_ulong_t = ::std::os::raw::c_ulong; -pub type __loff_t = __off64_t; -pub type __caddr_t = *mut ::std::os::raw::c_char; -pub type __intptr_t = ::std::os::raw::c_long; -pub type __socklen_t = ::std::os::raw::c_uint; -pub type __sig_atomic_t = ::std::os::raw::c_int; -pub type u_char = __u_char; -pub type u_short = __u_short; -pub type u_int = __u_int; -pub type u_long = __u_long; -pub type quad_t = __quad_t; -pub type u_quad_t = __u_quad_t; -pub type fsid_t = __fsid_t; -pub type loff_t = __loff_t; -pub type ino_t = __ino_t; -pub type dev_t = __dev_t; -pub type gid_t = __gid_t; -pub type mode_t = __mode_t; -pub type nlink_t = __nlink_t; -pub type uid_t = __uid_t; -pub type off_t = __off_t; -pub type pid_t = __pid_t; -pub type id_t = __id_t; -pub type daddr_t = __daddr_t; -pub type caddr_t = __caddr_t; -pub type key_t = __key_t; -pub type clock_t = __clock_t; -pub type clockid_t = __clockid_t; -pub type time_t = __time_t; -pub type timer_t = __timer_t; -pub type ulong = ::std::os::raw::c_ulong; -pub type ushort = ::std::os::raw::c_ushort; -pub type uint = ::std::os::raw::c_uint; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulong; -pub type register_t = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sigset_t { - pub __val: [::std::os::raw::c_ulong; 16usize], -} -#[test] -fn bindgen_test_layout___sigset_t() { - assert_eq!( - ::std::mem::size_of::<__sigset_t>(), - 128usize, - concat!("Size of: ", stringify!(__sigset_t)) - ); - assert_eq!( - ::std::mem::align_of::<__sigset_t>(), - 8usize, - concat!("Alignment of ", stringify!(__sigset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) - ); -} -pub type sigset_t = __sigset_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __time_t, - pub tv_usec: __suseconds_t, -} -#[test] -fn bindgen_test_layout_timeval() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -pub type suseconds_t = __suseconds_t; -pub type __fd_mask = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_set { - pub __fds_bits: [__fd_mask; 16usize], -} -#[test] -fn bindgen_test_layout_fd_set() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) - ); -} -pub type fd_mask = __fd_mask; -extern "C" { - pub fn select( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *mut timeval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pselect( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *const timespec, - __sigmask: *const __sigset_t, - ) -> ::std::os::raw::c_int; -} -pub type blksize_t = __blksize_t; -pub type blkcnt_t = __blkcnt_t; -pub type fsblkcnt_t = __fsblkcnt_t; -pub type fsfilcnt_t = __fsfilcnt_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_rwlock_arch_t { - pub __readers: ::std::os::raw::c_uint, - pub __writers: ::std::os::raw::c_uint, - pub __wrphase_futex: ::std::os::raw::c_uint, - pub __writers_futex: ::std::os::raw::c_uint, - pub __pad3: ::std::os::raw::c_uint, - pub __pad4: ::std::os::raw::c_uint, - pub __cur_writer: ::std::os::raw::c_int, - pub __shared: ::std::os::raw::c_int, - pub __rwelision: ::std::os::raw::c_schar, - pub __pad1: [::std::os::raw::c_uchar; 7usize], - pub __pad2: ::std::os::raw::c_ulong, - pub __flags: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___pthread_rwlock_arch_t() { - assert_eq!( - ::std::mem::size_of::<__pthread_rwlock_arch_t>(), - 56usize, - concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_rwlock_arch_t>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__readers as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__readers) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__wrphase_futex as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__wrphase_futex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers_futex as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__writers_futex) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad3 as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad4 as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__cur_writer as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__cur_writer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__shared as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__shared) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__rwelision as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__rwelision) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad1 as *const _ as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad2 as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__flags as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__pthread_rwlock_arch_t), - "::", - stringify!(__flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_list { - pub __prev: *mut __pthread_internal_list, - pub __next: *mut __pthread_internal_list, -} -#[test] -fn bindgen_test_layout___pthread_internal_list() { - assert_eq!( - ::std::mem::size_of::<__pthread_internal_list>(), - 16usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_internal_list>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) - ); -} -pub type __pthread_list_t = __pthread_internal_list; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_mutex_s { - pub __lock: ::std::os::raw::c_int, - pub __count: ::std::os::raw::c_uint, - pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, - pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_short, - pub __elision: ::std::os::raw::c_short, - pub __list: __pthread_list_t, -} -#[test] -fn bindgen_test_layout___pthread_mutex_s() { - assert_eq!( - ::std::mem::size_of::<__pthread_mutex_s>(), - 40usize, - concat!("Size of: ", stringify!(__pthread_mutex_s)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_mutex_s>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_mutex_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__lock as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__count as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__owner as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__owner) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__nusers as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__nusers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__kind as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__kind) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__spins as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__spins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__elision as *const _ as usize }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__elision) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__list as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_mutex_s), - "::", - stringify!(__list) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __pthread_cond_s { - pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, - pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, - pub __g_refs: [::std::os::raw::c_uint; 2usize], - pub __g_size: [::std::os::raw::c_uint; 2usize], - pub __g1_orig_size: ::std::os::raw::c_uint, - pub __wrefs: ::std::os::raw::c_uint, - pub __g_signals: [::std::os::raw::c_uint; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __pthread_cond_s__bindgen_ty_1 { - pub __wseq: ::std::os::raw::c_ulonglong, - pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__low - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__low) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__high - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__high) - ) - ); -} -#[test] -fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_1), - "::", - stringify!(__wseq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq32 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_1), - "::", - stringify!(__wseq32) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __pthread_cond_s__bindgen_ty_2 { - pub __g1_start: ::std::os::raw::c_ulonglong, - pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), - 4usize, - concat!( - "Alignment of ", - stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__low - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(__low) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__high - as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1), - "::", - stringify!(__high) - ) - ); -} -#[test] -fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(), - 8usize, - concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_2)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_2), - "::", - stringify!(__g1_start) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start32 as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s__bindgen_ty_2), - "::", - stringify!(__g1_start32) - ) - ); -} -#[test] -fn bindgen_test_layout___pthread_cond_s() { - assert_eq!( - ::std::mem::size_of::<__pthread_cond_s>(), - 48usize, - concat!("Size of: ", stringify!(__pthread_cond_s)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_cond_s>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_cond_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_refs as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_refs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_size as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g1_orig_size as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g1_orig_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__wrefs as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__wrefs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_signals as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cond_s), - "::", - stringify!(__g_signals) - ) - ); -} -pub type pthread_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutexattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_mutexattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_condattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_condattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) - ); -} -pub type pthread_key_t = ::std::os::raw::c_uint; -pub type pthread_once_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_attr_t { - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[test] -fn bindgen_test_layout_pthread_attr_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutex_t { - pub __data: __pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 40usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 5usize], -} -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_cond_t { - pub __data: __pthread_cond_s, - pub __size: [::std::os::raw::c_char; 48usize], - pub __align: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 6usize], -} -#[test] -fn bindgen_test_layout_pthread_cond_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlock_t { - pub __data: __pthread_rwlock_arch_t, - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlockattr_t { - pub __size: [::std::os::raw::c_char; 8usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_pthread_rwlockattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) - ); -} -pub type pthread_spinlock_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrier_t { - pub __size: [::std::os::raw::c_char; 32usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 4usize], -} -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrierattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_barrierattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) - ); -} -pub type XID = ::std::os::raw::c_ulong; -pub type Mask = ::std::os::raw::c_ulong; -pub type Atom = ::std::os::raw::c_ulong; -pub type VisualID = ::std::os::raw::c_ulong; -pub type Time = ::std::os::raw::c_ulong; -pub type Window = XID; -pub type Drawable = XID; -pub type Font = XID; -pub type Pixmap = XID; -pub type Cursor = XID; -pub type Colormap = XID; -pub type GContext = XID; -pub type KeySym = XID; -pub type KeyCode = ::std::os::raw::c_uchar; -pub type wchar_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct max_align_t { - pub __clang_max_align_nonce1: ::std::os::raw::c_longlong, - pub __bindgen_padding_0: u64, - pub __clang_max_align_nonce2: f64, -} -#[test] -fn bindgen_test_layout_max_align_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(max_align_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__clang_max_align_nonce1 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__clang_max_align_nonce2 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) - ); -} -extern "C" { - pub fn _Xmblen( - str: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -pub type XPointer = *mut ::std::os::raw::c_char; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XExtData { - pub number: ::std::os::raw::c_int, - pub next: *mut _XExtData, - pub free_private: ::std::option::Option< - unsafe extern "C" fn(extension: *mut _XExtData) -> ::std::os::raw::c_int, - >, - pub private_data: XPointer, -} -#[test] -fn bindgen_test_layout__XExtData() { - assert_eq!( - ::std::mem::size_of::<_XExtData>(), - 32usize, - concat!("Size of: ", stringify!(_XExtData)) - ); - assert_eq!( - ::std::mem::align_of::<_XExtData>(), - 8usize, - concat!("Alignment of ", stringify!(_XExtData)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XExtData>())).number as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XExtData), - "::", - stringify!(number) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XExtData>())).next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XExtData), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XExtData>())).free_private as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XExtData), - "::", - stringify!(free_private) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XExtData>())).private_data as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XExtData), - "::", - stringify!(private_data) - ) - ); -} -pub type XExtData = _XExtData; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XExtCodes { - pub extension: ::std::os::raw::c_int, - pub major_opcode: ::std::os::raw::c_int, - pub first_event: ::std::os::raw::c_int, - pub first_error: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XExtCodes() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XExtCodes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(XExtCodes)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extension as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XExtCodes), - "::", - stringify!(extension) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major_opcode as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XExtCodes), - "::", - stringify!(major_opcode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).first_event as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XExtCodes), - "::", - stringify!(first_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).first_error as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XExtCodes), - "::", - stringify!(first_error) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XPixmapFormatValues { - pub depth: ::std::os::raw::c_int, - pub bits_per_pixel: ::std::os::raw::c_int, - pub scanline_pad: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XPixmapFormatValues() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(XPixmapFormatValues)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(XPixmapFormatValues)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XPixmapFormatValues), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bits_per_pixel as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XPixmapFormatValues), - "::", - stringify!(bits_per_pixel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).scanline_pad as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XPixmapFormatValues), - "::", - stringify!(scanline_pad) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XGCValues { - pub function: ::std::os::raw::c_int, - pub plane_mask: ::std::os::raw::c_ulong, - pub foreground: ::std::os::raw::c_ulong, - pub background: ::std::os::raw::c_ulong, - pub line_width: ::std::os::raw::c_int, - pub line_style: ::std::os::raw::c_int, - pub cap_style: ::std::os::raw::c_int, - pub join_style: ::std::os::raw::c_int, - pub fill_style: ::std::os::raw::c_int, - pub fill_rule: ::std::os::raw::c_int, - pub arc_mode: ::std::os::raw::c_int, - pub tile: Pixmap, - pub stipple: Pixmap, - pub ts_x_origin: ::std::os::raw::c_int, - pub ts_y_origin: ::std::os::raw::c_int, - pub font: Font, - pub subwindow_mode: ::std::os::raw::c_int, - pub graphics_exposures: ::std::os::raw::c_int, - pub clip_x_origin: ::std::os::raw::c_int, - pub clip_y_origin: ::std::os::raw::c_int, - pub clip_mask: Pixmap, - pub dash_offset: ::std::os::raw::c_int, - pub dashes: ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XGCValues() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(XGCValues)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XGCValues)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).function as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(function) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).plane_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(plane_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).foreground as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(foreground) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).background as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(background) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_width as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(line_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_style as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(line_style) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cap_style as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(cap_style) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).join_style as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(join_style) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fill_style as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(fill_style) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fill_rule as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(fill_rule) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arc_mode as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(arc_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tile as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(tile) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stipple as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(stipple) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ts_x_origin as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(ts_x_origin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ts_y_origin as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(ts_y_origin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(font) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subwindow_mode as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(subwindow_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).graphics_exposures as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(graphics_exposures) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clip_x_origin as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(clip_x_origin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clip_y_origin as *const _ as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(clip_y_origin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clip_mask as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(clip_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dash_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(dash_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dashes as *const _ as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(XGCValues), - "::", - stringify!(dashes) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XGC { - _unused: [u8; 0], -} -pub type GC = *mut _XGC; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Visual { - pub ext_data: *mut XExtData, - pub visualid: VisualID, - pub class: ::std::os::raw::c_int, - pub red_mask: ::std::os::raw::c_ulong, - pub green_mask: ::std::os::raw::c_ulong, - pub blue_mask: ::std::os::raw::c_ulong, - pub bits_per_rgb: ::std::os::raw::c_int, - pub map_entries: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_Visual() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(Visual)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Visual)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ext_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(ext_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).visualid as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(visualid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).class as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(class) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).red_mask as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(red_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).green_mask as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(green_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blue_mask as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(blue_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bits_per_rgb as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(bits_per_rgb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).map_entries as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(Visual), - "::", - stringify!(map_entries) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Depth { - pub depth: ::std::os::raw::c_int, - pub nvisuals: ::std::os::raw::c_int, - pub visuals: *mut Visual, -} -#[test] -fn bindgen_test_layout_Depth() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Depth)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Depth)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Depth), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nvisuals as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(Depth), - "::", - stringify!(nvisuals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).visuals as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Depth), - "::", - stringify!(visuals) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XDisplay { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Screen { - pub ext_data: *mut XExtData, - pub display: *mut _XDisplay, - pub root: Window, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub mwidth: ::std::os::raw::c_int, - pub mheight: ::std::os::raw::c_int, - pub ndepths: ::std::os::raw::c_int, - pub depths: *mut Depth, - pub root_depth: ::std::os::raw::c_int, - pub root_visual: *mut Visual, - pub default_gc: GC, - pub cmap: Colormap, - pub white_pixel: ::std::os::raw::c_ulong, - pub black_pixel: ::std::os::raw::c_ulong, - pub max_maps: ::std::os::raw::c_int, - pub min_maps: ::std::os::raw::c_int, - pub backing_store: ::std::os::raw::c_int, - pub save_unders: ::std::os::raw::c_int, - pub root_input_mask: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_Screen() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(Screen)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Screen)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ext_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(ext_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mwidth as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(mwidth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mheight as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(mheight) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ndepths as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(ndepths) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depths as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(depths) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root_depth as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(root_depth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root_visual as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(root_visual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).default_gc as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(default_gc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cmap as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(cmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).white_pixel as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(white_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).black_pixel as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(black_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_maps as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(max_maps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_maps as *const _ as usize }, - 108usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(min_maps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).backing_store as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(backing_store) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).save_unders as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(save_unders) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root_input_mask as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(Screen), - "::", - stringify!(root_input_mask) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ScreenFormat { - pub ext_data: *mut XExtData, - pub depth: ::std::os::raw::c_int, - pub bits_per_pixel: ::std::os::raw::c_int, - pub scanline_pad: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_ScreenFormat() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(ScreenFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ScreenFormat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ext_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ScreenFormat), - "::", - stringify!(ext_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ScreenFormat), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bits_per_pixel as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(ScreenFormat), - "::", - stringify!(bits_per_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).scanline_pad as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(ScreenFormat), - "::", - stringify!(scanline_pad) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XSetWindowAttributes { - pub background_pixmap: Pixmap, - pub background_pixel: ::std::os::raw::c_ulong, - pub border_pixmap: Pixmap, - pub border_pixel: ::std::os::raw::c_ulong, - pub bit_gravity: ::std::os::raw::c_int, - pub win_gravity: ::std::os::raw::c_int, - pub backing_store: ::std::os::raw::c_int, - pub backing_planes: ::std::os::raw::c_ulong, - pub backing_pixel: ::std::os::raw::c_ulong, - pub save_under: ::std::os::raw::c_int, - pub event_mask: ::std::os::raw::c_long, - pub do_not_propagate_mask: ::std::os::raw::c_long, - pub override_redirect: ::std::os::raw::c_int, - pub colormap: Colormap, - pub cursor: Cursor, -} -#[test] -fn bindgen_test_layout_XSetWindowAttributes() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(XSetWindowAttributes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XSetWindowAttributes)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).background_pixmap as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(background_pixmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).background_pixel as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(background_pixel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).border_pixmap as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(border_pixmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).border_pixel as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(border_pixel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_gravity as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(bit_gravity) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win_gravity as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(win_gravity) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).backing_store as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(backing_store) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).backing_planes as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(backing_planes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).backing_pixel as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(backing_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).save_under as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(save_under) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event_mask as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(event_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).do_not_propagate_mask as *const _ - as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(do_not_propagate_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).override_redirect as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(override_redirect) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).colormap as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(colormap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cursor as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(XSetWindowAttributes), - "::", - stringify!(cursor) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XWindowAttributes { - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub border_width: ::std::os::raw::c_int, - pub depth: ::std::os::raw::c_int, - pub visual: *mut Visual, - pub root: Window, - pub class: ::std::os::raw::c_int, - pub bit_gravity: ::std::os::raw::c_int, - pub win_gravity: ::std::os::raw::c_int, - pub backing_store: ::std::os::raw::c_int, - pub backing_planes: ::std::os::raw::c_ulong, - pub backing_pixel: ::std::os::raw::c_ulong, - pub save_under: ::std::os::raw::c_int, - pub colormap: Colormap, - pub map_installed: ::std::os::raw::c_int, - pub map_state: ::std::os::raw::c_int, - pub all_event_masks: ::std::os::raw::c_long, - pub your_event_mask: ::std::os::raw::c_long, - pub do_not_propagate_mask: ::std::os::raw::c_long, - pub override_redirect: ::std::os::raw::c_int, - pub screen: *mut Screen, -} -#[test] -fn bindgen_test_layout_XWindowAttributes() { - assert_eq!( - ::std::mem::size_of::(), - 136usize, - concat!("Size of: ", stringify!(XWindowAttributes)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XWindowAttributes)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).border_width as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(border_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).visual as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(visual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).class as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(class) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bit_gravity as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(bit_gravity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).win_gravity as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(win_gravity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).backing_store as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(backing_store) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).backing_planes as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(backing_planes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).backing_pixel as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(backing_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).save_under as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(save_under) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).colormap as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(colormap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).map_installed as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(map_installed) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).map_state as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(map_state) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).all_event_masks as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(all_event_masks) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).your_event_mask as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(your_event_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).do_not_propagate_mask as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(do_not_propagate_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).override_redirect as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(override_redirect) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).screen as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(XWindowAttributes), - "::", - stringify!(screen) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XHostAddress { - pub family: ::std::os::raw::c_int, - pub length: ::std::os::raw::c_int, - pub address: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XHostAddress() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XHostAddress)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XHostAddress)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).family as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XHostAddress), - "::", - stringify!(family) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XHostAddress), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).address as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XHostAddress), - "::", - stringify!(address) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XServerInterpretedAddress { - pub typelength: ::std::os::raw::c_int, - pub valuelength: ::std::os::raw::c_int, - pub type_: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XServerInterpretedAddress() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(XServerInterpretedAddress)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XServerInterpretedAddress)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).typelength as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XServerInterpretedAddress), - "::", - stringify!(typelength) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).valuelength as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XServerInterpretedAddress), - "::", - stringify!(valuelength) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XServerInterpretedAddress), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XServerInterpretedAddress), - "::", - stringify!(value) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XImage { - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub xoffset: ::std::os::raw::c_int, - pub format: ::std::os::raw::c_int, - pub data: *mut ::std::os::raw::c_char, - pub byte_order: ::std::os::raw::c_int, - pub bitmap_unit: ::std::os::raw::c_int, - pub bitmap_bit_order: ::std::os::raw::c_int, - pub bitmap_pad: ::std::os::raw::c_int, - pub depth: ::std::os::raw::c_int, - pub bytes_per_line: ::std::os::raw::c_int, - pub bits_per_pixel: ::std::os::raw::c_int, - pub red_mask: ::std::os::raw::c_ulong, - pub green_mask: ::std::os::raw::c_ulong, - pub blue_mask: ::std::os::raw::c_ulong, - pub obdata: XPointer, - pub f: _XImage_funcs, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XImage_funcs { - pub create_image: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut _XDisplay, - arg2: *mut Visual, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_char, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_uint, - arg9: ::std::os::raw::c_int, - arg10: ::std::os::raw::c_int, - ) -> *mut _XImage, - >, - pub destroy_image: - ::std::option::Option ::std::os::raw::c_int>, - pub get_pixel: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut _XImage, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong, - >, - pub put_pixel: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut _XImage, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int, - >, - pub sub_image: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut _XImage, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - ) -> *mut _XImage, - >, - pub add_pixel: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut _XImage, arg2: ::std::os::raw::c_long) - -> ::std::os::raw::c_int, - >, -} -#[test] -fn bindgen_test_layout__XImage_funcs() { - assert_eq!( - ::std::mem::size_of::<_XImage_funcs>(), - 48usize, - concat!("Size of: ", stringify!(_XImage_funcs)) - ); - assert_eq!( - ::std::mem::align_of::<_XImage_funcs>(), - 8usize, - concat!("Alignment of ", stringify!(_XImage_funcs)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage_funcs>())).create_image as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XImage_funcs), - "::", - stringify!(create_image) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage_funcs>())).destroy_image as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XImage_funcs), - "::", - stringify!(destroy_image) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage_funcs>())).get_pixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XImage_funcs), - "::", - stringify!(get_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage_funcs>())).put_pixel as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XImage_funcs), - "::", - stringify!(put_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage_funcs>())).sub_image as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_XImage_funcs), - "::", - stringify!(sub_image) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage_funcs>())).add_pixel as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_XImage_funcs), - "::", - stringify!(add_pixel) - ) - ); -} -#[test] -fn bindgen_test_layout__XImage() { - assert_eq!( - ::std::mem::size_of::<_XImage>(), - 136usize, - concat!("Size of: ", stringify!(_XImage)) - ); - assert_eq!( - ::std::mem::align_of::<_XImage>(), - 8usize, - concat!("Alignment of ", stringify!(_XImage)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).height as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).xoffset as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(xoffset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).format as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).data as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).byte_order as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(byte_order) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).bitmap_unit as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(bitmap_unit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).bitmap_bit_order as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(bitmap_bit_order) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).bitmap_pad as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(bitmap_pad) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).depth as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).bytes_per_line as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(bytes_per_line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).bits_per_pixel as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(bits_per_pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).red_mask as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(red_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).green_mask as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(green_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).blue_mask as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(blue_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).obdata as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(obdata) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XImage>())).f as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_XImage), - "::", - stringify!(f) - ) - ); -} -pub type XImage = _XImage; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XWindowChanges { - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub border_width: ::std::os::raw::c_int, - pub sibling: Window, - pub stack_mode: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XWindowChanges() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(XWindowChanges)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XWindowChanges)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).border_width as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(border_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sibling as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(sibling) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stack_mode as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XWindowChanges), - "::", - stringify!(stack_mode) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XColor { - pub pixel: ::std::os::raw::c_ulong, - pub red: ::std::os::raw::c_ushort, - pub green: ::std::os::raw::c_ushort, - pub blue: ::std::os::raw::c_ushort, - pub flags: ::std::os::raw::c_char, - pub pad: ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XColor() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XColor)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XColor)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XColor), - "::", - stringify!(pixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).red as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XColor), - "::", - stringify!(red) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).green as *const _ as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(XColor), - "::", - stringify!(green) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blue as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XColor), - "::", - stringify!(blue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(XColor), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(XColor), - "::", - stringify!(pad) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XSegment { - pub x1: ::std::os::raw::c_short, - pub y1: ::std::os::raw::c_short, - pub x2: ::std::os::raw::c_short, - pub y2: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_XSegment() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(XSegment)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(XSegment)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XSegment), - "::", - stringify!(x1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y1 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(XSegment), - "::", - stringify!(y1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XSegment), - "::", - stringify!(x2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y2 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(XSegment), - "::", - stringify!(y2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XPoint { - pub x: ::std::os::raw::c_short, - pub y: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_XPoint() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(XPoint)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(XPoint)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(XPoint), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 2usize, - concat!("Offset of field: ", stringify!(XPoint), "::", stringify!(y)) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XRectangle { - pub x: ::std::os::raw::c_short, - pub y: ::std::os::raw::c_short, - pub width: ::std::os::raw::c_ushort, - pub height: ::std::os::raw::c_ushort, -} -#[test] -fn bindgen_test_layout_XRectangle() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(XRectangle)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(XRectangle)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XRectangle), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(XRectangle), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XRectangle), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(XRectangle), - "::", - stringify!(height) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XArc { - pub x: ::std::os::raw::c_short, - pub y: ::std::os::raw::c_short, - pub width: ::std::os::raw::c_ushort, - pub height: ::std::os::raw::c_ushort, - pub angle1: ::std::os::raw::c_short, - pub angle2: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_XArc() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(XArc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(XArc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(XArc), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 2usize, - concat!("Offset of field: ", stringify!(XArc), "::", stringify!(y)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XArc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(XArc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).angle1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XArc), - "::", - stringify!(angle1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).angle2 as *const _ as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(XArc), - "::", - stringify!(angle2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XKeyboardControl { - pub key_click_percent: ::std::os::raw::c_int, - pub bell_percent: ::std::os::raw::c_int, - pub bell_pitch: ::std::os::raw::c_int, - pub bell_duration: ::std::os::raw::c_int, - pub led: ::std::os::raw::c_int, - pub led_mode: ::std::os::raw::c_int, - pub key: ::std::os::raw::c_int, - pub auto_repeat_mode: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XKeyboardControl() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(XKeyboardControl)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(XKeyboardControl)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).key_click_percent as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(key_click_percent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bell_percent as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(bell_percent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bell_pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(bell_pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bell_duration as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(bell_duration) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).led as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(led) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).led_mode as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(led_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).auto_repeat_mode as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardControl), - "::", - stringify!(auto_repeat_mode) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XKeyboardState { - pub key_click_percent: ::std::os::raw::c_int, - pub bell_percent: ::std::os::raw::c_int, - pub bell_pitch: ::std::os::raw::c_uint, - pub bell_duration: ::std::os::raw::c_uint, - pub led_mask: ::std::os::raw::c_ulong, - pub global_auto_repeat: ::std::os::raw::c_int, - pub auto_repeats: [::std::os::raw::c_char; 32usize], -} -#[test] -fn bindgen_test_layout_XKeyboardState() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(XKeyboardState)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XKeyboardState)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).key_click_percent as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(key_click_percent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bell_percent as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(bell_percent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bell_pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(bell_pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bell_duration as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(bell_duration) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).led_mask as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(led_mask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).global_auto_repeat as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(global_auto_repeat) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).auto_repeats as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(XKeyboardState), - "::", - stringify!(auto_repeats) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XTimeCoord { - pub time: Time, - pub x: ::std::os::raw::c_short, - pub y: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_XTimeCoord() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XTimeCoord)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XTimeCoord)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XTimeCoord), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XTimeCoord), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(XTimeCoord), - "::", - stringify!(y) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XModifierKeymap { - pub max_keypermod: ::std::os::raw::c_int, - pub modifiermap: *mut KeyCode, -} -#[test] -fn bindgen_test_layout_XModifierKeymap() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XModifierKeymap)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XModifierKeymap)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_keypermod as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XModifierKeymap), - "::", - stringify!(max_keypermod) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).modifiermap as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XModifierKeymap), - "::", - stringify!(modifiermap) - ) - ); -} -pub type Display = _XDisplay; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XPrivate { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XrmHashBucketRec { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _bindgen_ty_1 { - pub ext_data: *mut XExtData, - pub private1: *mut _XPrivate, - pub fd: ::std::os::raw::c_int, - pub private2: ::std::os::raw::c_int, - pub proto_major_version: ::std::os::raw::c_int, - pub proto_minor_version: ::std::os::raw::c_int, - pub vendor: *mut ::std::os::raw::c_char, - pub private3: XID, - pub private4: XID, - pub private5: XID, - pub private6: ::std::os::raw::c_int, - pub resource_alloc: ::std::option::Option XID>, - pub byte_order: ::std::os::raw::c_int, - pub bitmap_unit: ::std::os::raw::c_int, - pub bitmap_pad: ::std::os::raw::c_int, - pub bitmap_bit_order: ::std::os::raw::c_int, - pub nformats: ::std::os::raw::c_int, - pub pixmap_format: *mut ScreenFormat, - pub private8: ::std::os::raw::c_int, - pub release: ::std::os::raw::c_int, - pub private9: *mut _XPrivate, - pub private10: *mut _XPrivate, - pub qlen: ::std::os::raw::c_int, - pub last_request_read: ::std::os::raw::c_ulong, - pub request: ::std::os::raw::c_ulong, - pub private11: XPointer, - pub private12: XPointer, - pub private13: XPointer, - pub private14: XPointer, - pub max_request_size: ::std::os::raw::c_uint, - pub db: *mut _XrmHashBucketRec, - pub private15: - ::std::option::Option ::std::os::raw::c_int>, - pub display_name: *mut ::std::os::raw::c_char, - pub default_screen: ::std::os::raw::c_int, - pub nscreens: ::std::os::raw::c_int, - pub screens: *mut Screen, - pub motion_buffer: ::std::os::raw::c_ulong, - pub private16: ::std::os::raw::c_ulong, - pub min_keycode: ::std::os::raw::c_int, - pub max_keycode: ::std::os::raw::c_int, - pub private17: XPointer, - pub private18: XPointer, - pub private19: ::std::os::raw::c_int, - pub xdefaults: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<_bindgen_ty_1>(), - 296usize, - concat!("Size of: ", stringify!(_bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).ext_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(ext_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).fd as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private2 as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_bindgen_ty_1>())).proto_major_version as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(proto_major_version) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_bindgen_ty_1>())).proto_minor_version as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(proto_minor_version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).vendor as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(vendor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private3 as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private4 as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private5 as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private6 as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private6) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).resource_alloc as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(resource_alloc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).byte_order as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(byte_order) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).bitmap_unit as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(bitmap_unit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).bitmap_pad as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(bitmap_pad) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).bitmap_bit_order as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(bitmap_bit_order) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).nformats as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(nformats) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).pixmap_format as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(pixmap_format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private8 as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private8) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).release as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(release) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private9 as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private9) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private10 as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private10) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).qlen as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(qlen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).last_request_read as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(last_request_read) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).request as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(request) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private11 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private11) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private12 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private12) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private13 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private13) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private14 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private14) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).max_request_size as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(max_request_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).db as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(db) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private15 as *const _ as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private15) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).display_name as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(display_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).default_screen as *const _ as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(default_screen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).nscreens as *const _ as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(nscreens) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).screens as *const _ as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(screens) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).motion_buffer as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(motion_buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private16 as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private16) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).min_keycode as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(min_keycode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).max_keycode as *const _ as usize }, - 260usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(max_keycode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private17 as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private17) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private18 as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private18) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).private19 as *const _ as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(private19) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bindgen_ty_1>())).xdefaults as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(_bindgen_ty_1), - "::", - stringify!(xdefaults) - ) - ); -} -pub type _XPrivDisplay = *mut _bindgen_ty_1; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XKeyEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub root: Window, - pub subwindow: Window, - pub time: Time, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub x_root: ::std::os::raw::c_int, - pub y_root: ::std::os::raw::c_int, - pub state: ::std::os::raw::c_uint, - pub keycode: ::std::os::raw::c_uint, - pub same_screen: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XKeyEvent() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(XKeyEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XKeyEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subwindow as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(subwindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_root as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(x_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_root as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(y_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keycode as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(keycode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).same_screen as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XKeyEvent), - "::", - stringify!(same_screen) - ) - ); -} -pub type XKeyPressedEvent = XKeyEvent; -pub type XKeyReleasedEvent = XKeyEvent; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XButtonEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub root: Window, - pub subwindow: Window, - pub time: Time, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub x_root: ::std::os::raw::c_int, - pub y_root: ::std::os::raw::c_int, - pub state: ::std::os::raw::c_uint, - pub button: ::std::os::raw::c_uint, - pub same_screen: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XButtonEvent() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(XButtonEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XButtonEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subwindow as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(subwindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_root as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(x_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_root as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(y_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).button as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(button) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).same_screen as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XButtonEvent), - "::", - stringify!(same_screen) - ) - ); -} -pub type XButtonPressedEvent = XButtonEvent; -pub type XButtonReleasedEvent = XButtonEvent; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XMotionEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub root: Window, - pub subwindow: Window, - pub time: Time, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub x_root: ::std::os::raw::c_int, - pub y_root: ::std::os::raw::c_int, - pub state: ::std::os::raw::c_uint, - pub is_hint: ::std::os::raw::c_char, - pub same_screen: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XMotionEvent() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(XMotionEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XMotionEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subwindow as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(subwindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_root as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(x_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_root as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(y_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).is_hint as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(is_hint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).same_screen as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XMotionEvent), - "::", - stringify!(same_screen) - ) - ); -} -pub type XPointerMovedEvent = XMotionEvent; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XCrossingEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub root: Window, - pub subwindow: Window, - pub time: Time, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub x_root: ::std::os::raw::c_int, - pub y_root: ::std::os::raw::c_int, - pub mode: ::std::os::raw::c_int, - pub detail: ::std::os::raw::c_int, - pub same_screen: ::std::os::raw::c_int, - pub focus: ::std::os::raw::c_int, - pub state: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_XCrossingEvent() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(XCrossingEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XCrossingEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subwindow as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(subwindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_root as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(x_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_root as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(y_root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).detail as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(detail) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).same_screen as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(same_screen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).focus as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(focus) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(XCrossingEvent), - "::", - stringify!(state) - ) - ); -} -pub type XEnterWindowEvent = XCrossingEvent; -pub type XLeaveWindowEvent = XCrossingEvent; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XFocusChangeEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub mode: ::std::os::raw::c_int, - pub detail: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XFocusChangeEvent() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(XFocusChangeEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XFocusChangeEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).detail as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XFocusChangeEvent), - "::", - stringify!(detail) - ) - ); -} -pub type XFocusInEvent = XFocusChangeEvent; -pub type XFocusOutEvent = XFocusChangeEvent; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XKeymapEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub key_vector: [::std::os::raw::c_char; 32usize], -} -#[test] -fn bindgen_test_layout_XKeymapEvent() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(XKeymapEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XKeymapEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XKeymapEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XKeymapEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XKeymapEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XKeymapEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XKeymapEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key_vector as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XKeymapEvent), - "::", - stringify!(key_vector) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XExposeEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub count: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XExposeEvent() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(XExposeEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XExposeEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XExposeEvent), - "::", - stringify!(count) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XGraphicsExposeEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub drawable: Drawable, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub count: ::std::os::raw::c_int, - pub major_code: ::std::os::raw::c_int, - pub minor_code: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XGraphicsExposeEvent() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(XGraphicsExposeEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XGraphicsExposeEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).drawable as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(drawable) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major_code as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(major_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor_code as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XGraphicsExposeEvent), - "::", - stringify!(minor_code) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XNoExposeEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub drawable: Drawable, - pub major_code: ::std::os::raw::c_int, - pub minor_code: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XNoExposeEvent() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(XNoExposeEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XNoExposeEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).drawable as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(drawable) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major_code as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(major_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor_code as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XNoExposeEvent), - "::", - stringify!(minor_code) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XVisibilityEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub state: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XVisibilityEvent() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(XVisibilityEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XVisibilityEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XVisibilityEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XVisibilityEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XVisibilityEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XVisibilityEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XVisibilityEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XVisibilityEvent), - "::", - stringify!(state) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XCreateWindowEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub parent: Window, - pub window: Window, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub border_width: ::std::os::raw::c_int, - pub override_redirect: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XCreateWindowEvent() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(XCreateWindowEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XCreateWindowEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).border_width as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(border_width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).override_redirect as *const _ as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(XCreateWindowEvent), - "::", - stringify!(override_redirect) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XDestroyWindowEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, -} -#[test] -fn bindgen_test_layout_XDestroyWindowEvent() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(XDestroyWindowEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XDestroyWindowEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XDestroyWindowEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XDestroyWindowEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XDestroyWindowEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XDestroyWindowEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XDestroyWindowEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XDestroyWindowEvent), - "::", - stringify!(window) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XUnmapEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, - pub from_configure: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XUnmapEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XUnmapEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XUnmapEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).from_configure as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XUnmapEvent), - "::", - stringify!(from_configure) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XMapEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, - pub override_redirect: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XMapEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XMapEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XMapEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).override_redirect as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XMapEvent), - "::", - stringify!(override_redirect) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XMapRequestEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub parent: Window, - pub window: Window, -} -#[test] -fn bindgen_test_layout_XMapRequestEvent() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(XMapRequestEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XMapRequestEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XMapRequestEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XMapRequestEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XMapRequestEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XMapRequestEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XMapRequestEvent), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XMapRequestEvent), - "::", - stringify!(window) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XReparentEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, - pub parent: Window, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub override_redirect: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XReparentEvent() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(XReparentEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XReparentEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).override_redirect as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XReparentEvent), - "::", - stringify!(override_redirect) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XConfigureEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub border_width: ::std::os::raw::c_int, - pub above: Window, - pub override_redirect: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XConfigureEvent() { - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(XConfigureEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XConfigureEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).border_width as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(border_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).above as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(above) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).override_redirect as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XConfigureEvent), - "::", - stringify!(override_redirect) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XGravityEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XGravityEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XGravityEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XGravityEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XGravityEvent), - "::", - stringify!(y) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XResizeRequestEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XResizeRequestEvent() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(XResizeRequestEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XResizeRequestEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XResizeRequestEvent), - "::", - stringify!(height) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XConfigureRequestEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub parent: Window, - pub window: Window, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub width: ::std::os::raw::c_int, - pub height: ::std::os::raw::c_int, - pub border_width: ::std::os::raw::c_int, - pub above: Window, - pub detail: ::std::os::raw::c_int, - pub value_mask: ::std::os::raw::c_ulong, -} -#[test] -fn bindgen_test_layout_XConfigureRequestEvent() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(XConfigureRequestEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XConfigureRequestEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).send_event as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).border_width as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(border_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).above as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(above) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).detail as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(detail) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value_mask as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XConfigureRequestEvent), - "::", - stringify!(value_mask) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XCirculateEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub event: Window, - pub window: Window, - pub place: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XCirculateEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XCirculateEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XCirculateEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).event as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).place as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XCirculateEvent), - "::", - stringify!(place) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XCirculateRequestEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub parent: Window, - pub window: Window, - pub place: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XCirculateRequestEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XCirculateRequestEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XCirculateRequestEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).send_event as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).place as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XCirculateRequestEvent), - "::", - stringify!(place) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XPropertyEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub atom: Atom, - pub time: Time, - pub state: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XPropertyEvent() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(XPropertyEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XPropertyEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).atom as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(atom) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XPropertyEvent), - "::", - stringify!(state) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XSelectionClearEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub selection: Atom, - pub time: Time, -} -#[test] -fn bindgen_test_layout_XSelectionClearEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XSelectionClearEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XSelectionClearEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).selection as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(selection) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XSelectionClearEvent), - "::", - stringify!(time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XSelectionRequestEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub owner: Window, - pub requestor: Window, - pub selection: Atom, - pub target: Atom, - pub property: Atom, - pub time: Time, -} -#[test] -fn bindgen_test_layout_XSelectionRequestEvent() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(XSelectionRequestEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XSelectionRequestEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).send_event as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).owner as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(owner) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).requestor as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(requestor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).selection as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(selection) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).property as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(property) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(XSelectionRequestEvent), - "::", - stringify!(time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XSelectionEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub requestor: Window, - pub selection: Atom, - pub target: Atom, - pub property: Atom, - pub time: Time, -} -#[test] -fn bindgen_test_layout_XSelectionEvent() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(XSelectionEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XSelectionEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).requestor as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(requestor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).selection as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(selection) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).property as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(property) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(XSelectionEvent), - "::", - stringify!(time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XColormapEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub colormap: Colormap, - pub new: ::std::os::raw::c_int, - pub state: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XColormapEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XColormapEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XColormapEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).colormap as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(colormap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).new as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(new) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(XColormapEvent), - "::", - stringify!(state) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct XClientMessageEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub message_type: Atom, - pub format: ::std::os::raw::c_int, - pub data: XClientMessageEvent__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union XClientMessageEvent__bindgen_ty_1 { - pub b: [::std::os::raw::c_char; 20usize], - pub s: [::std::os::raw::c_short; 10usize], - pub l: [::std::os::raw::c_long; 5usize], - _bindgen_union_align: [u64; 5usize], -} -#[test] -fn bindgen_test_layout_XClientMessageEvent__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(XClientMessageEvent__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(XClientMessageEvent__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).b as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent__bindgen_ty_1), - "::", - stringify!(b) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).s as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent__bindgen_ty_1), - "::", - stringify!(s) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).l as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent__bindgen_ty_1), - "::", - stringify!(l) - ) - ); -} -#[test] -fn bindgen_test_layout_XClientMessageEvent() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(XClientMessageEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XClientMessageEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).message_type as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(message_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XClientMessageEvent), - "::", - stringify!(data) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XMappingEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, - pub request: ::std::os::raw::c_int, - pub first_keycode: ::std::os::raw::c_int, - pub count: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XMappingEvent() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XMappingEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XMappingEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(window) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).request as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(request) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).first_keycode as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(first_keycode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XMappingEvent), - "::", - stringify!(count) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XErrorEvent { - pub type_: ::std::os::raw::c_int, - pub display: *mut Display, - pub resourceid: XID, - pub serial: ::std::os::raw::c_ulong, - pub error_code: ::std::os::raw::c_uchar, - pub request_code: ::std::os::raw::c_uchar, - pub minor_code: ::std::os::raw::c_uchar, -} -#[test] -fn bindgen_test_layout_XErrorEvent() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(XErrorEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XErrorEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).resourceid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(resourceid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).error_code as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(error_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).request_code as *const _ as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(request_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor_code as *const _ as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(XErrorEvent), - "::", - stringify!(minor_code) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XAnyEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub window: Window, -} -#[test] -fn bindgen_test_layout_XAnyEvent() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(XAnyEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XAnyEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XAnyEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XAnyEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XAnyEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XAnyEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).window as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XAnyEvent), - "::", - stringify!(window) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XGenericEvent { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub extension: ::std::os::raw::c_int, - pub evtype: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XGenericEvent() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(XGenericEvent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XGenericEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XGenericEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XGenericEvent), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XGenericEvent), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XGenericEvent), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extension as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XGenericEvent), - "::", - stringify!(extension) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).evtype as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(XGenericEvent), - "::", - stringify!(evtype) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XGenericEventCookie { - pub type_: ::std::os::raw::c_int, - pub serial: ::std::os::raw::c_ulong, - pub send_event: ::std::os::raw::c_int, - pub display: *mut Display, - pub extension: ::std::os::raw::c_int, - pub evtype: ::std::os::raw::c_int, - pub cookie: ::std::os::raw::c_uint, - pub data: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_XGenericEventCookie() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(XGenericEventCookie)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XGenericEventCookie)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).serial as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(serial) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).send_event as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(send_event) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extension as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(extension) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).evtype as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(evtype) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cookie as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(cookie) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XGenericEventCookie), - "::", - stringify!(data) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _XEvent { - pub type_: ::std::os::raw::c_int, - pub xany: XAnyEvent, - pub xkey: XKeyEvent, - pub xbutton: XButtonEvent, - pub xmotion: XMotionEvent, - pub xcrossing: XCrossingEvent, - pub xfocus: XFocusChangeEvent, - pub xexpose: XExposeEvent, - pub xgraphicsexpose: XGraphicsExposeEvent, - pub xnoexpose: XNoExposeEvent, - pub xvisibility: XVisibilityEvent, - pub xcreatewindow: XCreateWindowEvent, - pub xdestroywindow: XDestroyWindowEvent, - pub xunmap: XUnmapEvent, - pub xmap: XMapEvent, - pub xmaprequest: XMapRequestEvent, - pub xreparent: XReparentEvent, - pub xconfigure: XConfigureEvent, - pub xgravity: XGravityEvent, - pub xresizerequest: XResizeRequestEvent, - pub xconfigurerequest: XConfigureRequestEvent, - pub xcirculate: XCirculateEvent, - pub xcirculaterequest: XCirculateRequestEvent, - pub xproperty: XPropertyEvent, - pub xselectionclear: XSelectionClearEvent, - pub xselectionrequest: XSelectionRequestEvent, - pub xselection: XSelectionEvent, - pub xcolormap: XColormapEvent, - pub xclient: XClientMessageEvent, - pub xmapping: XMappingEvent, - pub xerror: XErrorEvent, - pub xkeymap: XKeymapEvent, - pub xgeneric: XGenericEvent, - pub xcookie: XGenericEventCookie, - pub pad: [::std::os::raw::c_long; 24usize], - _bindgen_union_align: [u64; 24usize], -} -#[test] -fn bindgen_test_layout__XEvent() { - assert_eq!( - ::std::mem::size_of::<_XEvent>(), - 192usize, - concat!("Size of: ", stringify!(_XEvent)) - ); - assert_eq!( - ::std::mem::align_of::<_XEvent>(), - 8usize, - concat!("Alignment of ", stringify!(_XEvent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xany as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xany) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xkey as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xkey) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xbutton as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xbutton) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xmotion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xmotion) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xcrossing as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xcrossing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xfocus as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xfocus) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xexpose as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xexpose) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xgraphicsexpose as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xgraphicsexpose) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xnoexpose as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xnoexpose) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xvisibility as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xvisibility) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xcreatewindow as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xcreatewindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xdestroywindow as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xdestroywindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xunmap as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xunmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xmap as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xmaprequest as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xmaprequest) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xreparent as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xreparent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xconfigure as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xconfigure) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xgravity as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xgravity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xresizerequest as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xresizerequest) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xconfigurerequest as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xconfigurerequest) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xcirculate as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xcirculate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xcirculaterequest as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xcirculaterequest) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xproperty as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xproperty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xselectionclear as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xselectionclear) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xselectionrequest as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xselectionrequest) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xselection as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xselection) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xcolormap as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xcolormap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xclient as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xclient) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xmapping as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xmapping) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xerror as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xerror) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xkeymap as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xkeymap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xgeneric as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xgeneric) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).xcookie as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(xcookie) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XEvent>())).pad as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XEvent), - "::", - stringify!(pad) - ) - ); -} -pub type XEvent = _XEvent; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XCharStruct { - pub lbearing: ::std::os::raw::c_short, - pub rbearing: ::std::os::raw::c_short, - pub width: ::std::os::raw::c_short, - pub ascent: ::std::os::raw::c_short, - pub descent: ::std::os::raw::c_short, - pub attributes: ::std::os::raw::c_ushort, -} -#[test] -fn bindgen_test_layout_XCharStruct() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(XCharStruct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(XCharStruct)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lbearing as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XCharStruct), - "::", - stringify!(lbearing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rbearing as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(XCharStruct), - "::", - stringify!(rbearing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(XCharStruct), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascent as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(XCharStruct), - "::", - stringify!(ascent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descent as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XCharStruct), - "::", - stringify!(descent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).attributes as *const _ as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(XCharStruct), - "::", - stringify!(attributes) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XFontProp { - pub name: Atom, - pub card32: ::std::os::raw::c_ulong, -} -#[test] -fn bindgen_test_layout_XFontProp() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XFontProp)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XFontProp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XFontProp), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).card32 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XFontProp), - "::", - stringify!(card32) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XFontStruct { - pub ext_data: *mut XExtData, - pub fid: Font, - pub direction: ::std::os::raw::c_uint, - pub min_char_or_byte2: ::std::os::raw::c_uint, - pub max_char_or_byte2: ::std::os::raw::c_uint, - pub min_byte1: ::std::os::raw::c_uint, - pub max_byte1: ::std::os::raw::c_uint, - pub all_chars_exist: ::std::os::raw::c_int, - pub default_char: ::std::os::raw::c_uint, - pub n_properties: ::std::os::raw::c_int, - pub properties: *mut XFontProp, - pub min_bounds: XCharStruct, - pub max_bounds: XCharStruct, - pub per_char: *mut XCharStruct, - pub ascent: ::std::os::raw::c_int, - pub descent: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_XFontStruct() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(XFontStruct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XFontStruct)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ext_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(ext_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fid as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(fid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).direction as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(direction) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_char_or_byte2 as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(min_char_or_byte2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_char_or_byte2 as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(max_char_or_byte2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_byte1 as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(min_byte1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_byte1 as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(max_byte1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).all_chars_exist as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(all_chars_exist) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).default_char as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(default_char) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_properties as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(n_properties) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).properties as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(properties) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_bounds as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(min_bounds) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_bounds as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(max_bounds) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).per_char as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(per_char) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascent as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(ascent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descent as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(XFontStruct), - "::", - stringify!(descent) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XTextItem { - pub chars: *mut ::std::os::raw::c_char, - pub nchars: ::std::os::raw::c_int, - pub delta: ::std::os::raw::c_int, - pub font: Font, -} -#[test] -fn bindgen_test_layout_XTextItem() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(XTextItem)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XTextItem)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).chars as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XTextItem), - "::", - stringify!(chars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nchars as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XTextItem), - "::", - stringify!(nchars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).delta as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XTextItem), - "::", - stringify!(delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XTextItem), - "::", - stringify!(font) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XChar2b { - pub byte1: ::std::os::raw::c_uchar, - pub byte2: ::std::os::raw::c_uchar, -} -#[test] -fn bindgen_test_layout_XChar2b() { - assert_eq!( - ::std::mem::size_of::(), - 2usize, - concat!("Size of: ", stringify!(XChar2b)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(XChar2b)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).byte1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XChar2b), - "::", - stringify!(byte1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).byte2 as *const _ as usize }, - 1usize, - concat!( - "Offset of field: ", - stringify!(XChar2b), - "::", - stringify!(byte2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XTextItem16 { - pub chars: *mut XChar2b, - pub nchars: ::std::os::raw::c_int, - pub delta: ::std::os::raw::c_int, - pub font: Font, -} -#[test] -fn bindgen_test_layout_XTextItem16() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(XTextItem16)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XTextItem16)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).chars as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XTextItem16), - "::", - stringify!(chars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nchars as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XTextItem16), - "::", - stringify!(nchars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).delta as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XTextItem16), - "::", - stringify!(delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XTextItem16), - "::", - stringify!(font) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union XEDataObject { - pub display: *mut Display, - pub gc: GC, - pub visual: *mut Visual, - pub screen: *mut Screen, - pub pixmap_format: *mut ScreenFormat, - pub font: *mut XFontStruct, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_XEDataObject() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(XEDataObject)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XEDataObject)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).display as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XEDataObject), - "::", - stringify!(display) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gc as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XEDataObject), - "::", - stringify!(gc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).visual as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XEDataObject), - "::", - stringify!(visual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).screen as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XEDataObject), - "::", - stringify!(screen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixmap_format as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XEDataObject), - "::", - stringify!(pixmap_format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XEDataObject), - "::", - stringify!(font) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XFontSetExtents { - pub max_ink_extent: XRectangle, - pub max_logical_extent: XRectangle, -} -#[test] -fn bindgen_test_layout_XFontSetExtents() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XFontSetExtents)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(XFontSetExtents)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_ink_extent as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XFontSetExtents), - "::", - stringify!(max_ink_extent) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_logical_extent as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XFontSetExtents), - "::", - stringify!(max_logical_extent) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XOM { - _unused: [u8; 0], -} -pub type XOM = *mut _XOM; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XOC { - _unused: [u8; 0], -} -pub type XOC = *mut _XOC; -pub type XFontSet = *mut _XOC; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XmbTextItem { - pub chars: *mut ::std::os::raw::c_char, - pub nchars: ::std::os::raw::c_int, - pub delta: ::std::os::raw::c_int, - pub font_set: XFontSet, -} -#[test] -fn bindgen_test_layout_XmbTextItem() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(XmbTextItem)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XmbTextItem)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).chars as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XmbTextItem), - "::", - stringify!(chars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nchars as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XmbTextItem), - "::", - stringify!(nchars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).delta as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XmbTextItem), - "::", - stringify!(delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font_set as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XmbTextItem), - "::", - stringify!(font_set) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XwcTextItem { - pub chars: *mut wchar_t, - pub nchars: ::std::os::raw::c_int, - pub delta: ::std::os::raw::c_int, - pub font_set: XFontSet, -} -#[test] -fn bindgen_test_layout_XwcTextItem() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(XwcTextItem)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XwcTextItem)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).chars as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XwcTextItem), - "::", - stringify!(chars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nchars as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XwcTextItem), - "::", - stringify!(nchars) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).delta as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(XwcTextItem), - "::", - stringify!(delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font_set as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XwcTextItem), - "::", - stringify!(font_set) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XOMCharSetList { - pub charset_count: ::std::os::raw::c_int, - pub charset_list: *mut *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XOMCharSetList() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XOMCharSetList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XOMCharSetList)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charset_count as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XOMCharSetList), - "::", - stringify!(charset_count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charset_list as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XOMCharSetList), - "::", - stringify!(charset_list) - ) - ); -} -pub const XOrientation_XOMOrientation_LTR_TTB: XOrientation = 0; -pub const XOrientation_XOMOrientation_RTL_TTB: XOrientation = 1; -pub const XOrientation_XOMOrientation_TTB_LTR: XOrientation = 2; -pub const XOrientation_XOMOrientation_TTB_RTL: XOrientation = 3; -pub const XOrientation_XOMOrientation_Context: XOrientation = 4; -pub type XOrientation = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XOMOrientation { - pub num_orientation: ::std::os::raw::c_int, - pub orientation: *mut XOrientation, -} -#[test] -fn bindgen_test_layout_XOMOrientation() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XOMOrientation)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XOMOrientation)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_orientation as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XOMOrientation), - "::", - stringify!(num_orientation) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).orientation as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XOMOrientation), - "::", - stringify!(orientation) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XOMFontInfo { - pub num_font: ::std::os::raw::c_int, - pub font_struct_list: *mut *mut XFontStruct, - pub font_name_list: *mut *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XOMFontInfo() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(XOMFontInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XOMFontInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_font as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XOMFontInfo), - "::", - stringify!(num_font) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font_struct_list as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XOMFontInfo), - "::", - stringify!(font_struct_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font_name_list as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(XOMFontInfo), - "::", - stringify!(font_name_list) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIM { - _unused: [u8; 0], -} -pub type XIM = *mut _XIM; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIC { - _unused: [u8; 0], -} -pub type XIC = *mut _XIC; -pub type XIMProc = - ::std::option::Option; -pub type XICProc = ::std::option::Option< - unsafe extern "C" fn(arg1: XIC, arg2: XPointer, arg3: XPointer) -> ::std::os::raw::c_int, ->; -pub type XIDProc = - ::std::option::Option; -pub type XIMStyle = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XIMStyles { - pub count_styles: ::std::os::raw::c_ushort, - pub supported_styles: *mut XIMStyle, -} -#[test] -fn bindgen_test_layout_XIMStyles() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XIMStyles)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XIMStyles)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count_styles as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XIMStyles), - "::", - stringify!(count_styles) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).supported_styles as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XIMStyles), - "::", - stringify!(supported_styles) - ) - ); -} -pub type XVaNestedList = *mut ::std::os::raw::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XIMCallback { - pub client_data: XPointer, - pub callback: XIMProc, -} -#[test] -fn bindgen_test_layout_XIMCallback() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XIMCallback)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XIMCallback)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).client_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XIMCallback), - "::", - stringify!(client_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).callback as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XIMCallback), - "::", - stringify!(callback) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XICCallback { - pub client_data: XPointer, - pub callback: XICProc, -} -#[test] -fn bindgen_test_layout_XICCallback() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XICCallback)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XICCallback)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).client_data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XICCallback), - "::", - stringify!(client_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).callback as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XICCallback), - "::", - stringify!(callback) - ) - ); -} -pub type XIMFeedback = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _XIMText { - pub length: ::std::os::raw::c_ushort, - pub feedback: *mut XIMFeedback, - pub encoding_is_wchar: ::std::os::raw::c_int, - pub string: _XIMText__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _XIMText__bindgen_ty_1 { - pub multi_byte: *mut ::std::os::raw::c_char, - pub wide_char: *mut wchar_t, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout__XIMText__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<_XIMText__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_XIMText__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMText__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMText__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMText__bindgen_ty_1>())).multi_byte as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMText__bindgen_ty_1), - "::", - stringify!(multi_byte) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMText__bindgen_ty_1>())).wide_char as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMText__bindgen_ty_1), - "::", - stringify!(wide_char) - ) - ); -} -#[test] -fn bindgen_test_layout__XIMText() { - assert_eq!( - ::std::mem::size_of::<_XIMText>(), - 32usize, - concat!("Size of: ", stringify!(_XIMText)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMText>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMText)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMText>())).length as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMText), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMText>())).feedback as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMText), - "::", - stringify!(feedback) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMText>())).encoding_is_wchar as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XIMText), - "::", - stringify!(encoding_is_wchar) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMText>())).string as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XIMText), - "::", - stringify!(string) - ) - ); -} -pub type XIMText = _XIMText; -pub type XIMPreeditState = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIMPreeditStateNotifyCallbackStruct { - pub state: XIMPreeditState, -} -#[test] -fn bindgen_test_layout__XIMPreeditStateNotifyCallbackStruct() { - assert_eq!( - ::std::mem::size_of::<_XIMPreeditStateNotifyCallbackStruct>(), - 8usize, - concat!( - "Size of: ", - stringify!(_XIMPreeditStateNotifyCallbackStruct) - ) - ); - assert_eq!( - ::std::mem::align_of::<_XIMPreeditStateNotifyCallbackStruct>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_XIMPreeditStateNotifyCallbackStruct) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditStateNotifyCallbackStruct>())).state as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditStateNotifyCallbackStruct), - "::", - stringify!(state) - ) - ); -} -pub type XIMPreeditStateNotifyCallbackStruct = _XIMPreeditStateNotifyCallbackStruct; -pub type XIMResetState = ::std::os::raw::c_ulong; -pub type XIMStringConversionFeedback = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _XIMStringConversionText { - pub length: ::std::os::raw::c_ushort, - pub feedback: *mut XIMStringConversionFeedback, - pub encoding_is_wchar: ::std::os::raw::c_int, - pub string: _XIMStringConversionText__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _XIMStringConversionText__bindgen_ty_1 { - pub mbs: *mut ::std::os::raw::c_char, - pub wcs: *mut wchar_t, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout__XIMStringConversionText__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<_XIMStringConversionText__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_XIMStringConversionText__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<_XIMStringConversionText__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_XIMStringConversionText__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionText__bindgen_ty_1>())).mbs as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionText__bindgen_ty_1), - "::", - stringify!(mbs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionText__bindgen_ty_1>())).wcs as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionText__bindgen_ty_1), - "::", - stringify!(wcs) - ) - ); -} -#[test] -fn bindgen_test_layout__XIMStringConversionText() { - assert_eq!( - ::std::mem::size_of::<_XIMStringConversionText>(), - 32usize, - concat!("Size of: ", stringify!(_XIMStringConversionText)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMStringConversionText>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMStringConversionText)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMStringConversionText>())).length as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionText), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionText>())).feedback as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionText), - "::", - stringify!(feedback) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionText>())).encoding_is_wchar as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionText), - "::", - stringify!(encoding_is_wchar) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMStringConversionText>())).string as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionText), - "::", - stringify!(string) - ) - ); -} -pub type XIMStringConversionText = _XIMStringConversionText; -pub type XIMStringConversionPosition = ::std::os::raw::c_ushort; -pub type XIMStringConversionType = ::std::os::raw::c_ushort; -pub type XIMStringConversionOperation = ::std::os::raw::c_ushort; -pub const XIMCaretDirection_XIMForwardChar: XIMCaretDirection = 0; -pub const XIMCaretDirection_XIMBackwardChar: XIMCaretDirection = 1; -pub const XIMCaretDirection_XIMForwardWord: XIMCaretDirection = 2; -pub const XIMCaretDirection_XIMBackwardWord: XIMCaretDirection = 3; -pub const XIMCaretDirection_XIMCaretUp: XIMCaretDirection = 4; -pub const XIMCaretDirection_XIMCaretDown: XIMCaretDirection = 5; -pub const XIMCaretDirection_XIMNextLine: XIMCaretDirection = 6; -pub const XIMCaretDirection_XIMPreviousLine: XIMCaretDirection = 7; -pub const XIMCaretDirection_XIMLineStart: XIMCaretDirection = 8; -pub const XIMCaretDirection_XIMLineEnd: XIMCaretDirection = 9; -pub const XIMCaretDirection_XIMAbsolutePosition: XIMCaretDirection = 10; -pub const XIMCaretDirection_XIMDontChange: XIMCaretDirection = 11; -pub type XIMCaretDirection = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIMStringConversionCallbackStruct { - pub position: XIMStringConversionPosition, - pub direction: XIMCaretDirection, - pub operation: XIMStringConversionOperation, - pub factor: ::std::os::raw::c_ushort, - pub text: *mut XIMStringConversionText, -} -#[test] -fn bindgen_test_layout__XIMStringConversionCallbackStruct() { - assert_eq!( - ::std::mem::size_of::<_XIMStringConversionCallbackStruct>(), - 24usize, - concat!("Size of: ", stringify!(_XIMStringConversionCallbackStruct)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMStringConversionCallbackStruct>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_XIMStringConversionCallbackStruct) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionCallbackStruct>())).position as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionCallbackStruct), - "::", - stringify!(position) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionCallbackStruct>())).direction as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionCallbackStruct), - "::", - stringify!(direction) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionCallbackStruct>())).operation as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionCallbackStruct), - "::", - stringify!(operation) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionCallbackStruct>())).factor as *const _ - as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionCallbackStruct), - "::", - stringify!(factor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStringConversionCallbackStruct>())).text as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XIMStringConversionCallbackStruct), - "::", - stringify!(text) - ) - ); -} -pub type XIMStringConversionCallbackStruct = _XIMStringConversionCallbackStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIMPreeditDrawCallbackStruct { - pub caret: ::std::os::raw::c_int, - pub chg_first: ::std::os::raw::c_int, - pub chg_length: ::std::os::raw::c_int, - pub text: *mut XIMText, -} -#[test] -fn bindgen_test_layout__XIMPreeditDrawCallbackStruct() { - assert_eq!( - ::std::mem::size_of::<_XIMPreeditDrawCallbackStruct>(), - 24usize, - concat!("Size of: ", stringify!(_XIMPreeditDrawCallbackStruct)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMPreeditDrawCallbackStruct>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMPreeditDrawCallbackStruct)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditDrawCallbackStruct>())).caret as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditDrawCallbackStruct), - "::", - stringify!(caret) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditDrawCallbackStruct>())).chg_first as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditDrawCallbackStruct), - "::", - stringify!(chg_first) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditDrawCallbackStruct>())).chg_length as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditDrawCallbackStruct), - "::", - stringify!(chg_length) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditDrawCallbackStruct>())).text as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditDrawCallbackStruct), - "::", - stringify!(text) - ) - ); -} -pub type XIMPreeditDrawCallbackStruct = _XIMPreeditDrawCallbackStruct; -pub const XIMCaretStyle_XIMIsInvisible: XIMCaretStyle = 0; -pub const XIMCaretStyle_XIMIsPrimary: XIMCaretStyle = 1; -pub const XIMCaretStyle_XIMIsSecondary: XIMCaretStyle = 2; -pub type XIMCaretStyle = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIMPreeditCaretCallbackStruct { - pub position: ::std::os::raw::c_int, - pub direction: XIMCaretDirection, - pub style: XIMCaretStyle, -} -#[test] -fn bindgen_test_layout__XIMPreeditCaretCallbackStruct() { - assert_eq!( - ::std::mem::size_of::<_XIMPreeditCaretCallbackStruct>(), - 12usize, - concat!("Size of: ", stringify!(_XIMPreeditCaretCallbackStruct)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMPreeditCaretCallbackStruct>(), - 4usize, - concat!("Alignment of ", stringify!(_XIMPreeditCaretCallbackStruct)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditCaretCallbackStruct>())).position as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditCaretCallbackStruct), - "::", - stringify!(position) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditCaretCallbackStruct>())).direction as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditCaretCallbackStruct), - "::", - stringify!(direction) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMPreeditCaretCallbackStruct>())).style as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMPreeditCaretCallbackStruct), - "::", - stringify!(style) - ) - ); -} -pub type XIMPreeditCaretCallbackStruct = _XIMPreeditCaretCallbackStruct; -pub const XIMStatusDataType_XIMTextType: XIMStatusDataType = 0; -pub const XIMStatusDataType_XIMBitmapType: XIMStatusDataType = 1; -pub type XIMStatusDataType = u32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _XIMStatusDrawCallbackStruct { - pub type_: XIMStatusDataType, - pub data: _XIMStatusDrawCallbackStruct__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _XIMStatusDrawCallbackStruct__bindgen_ty_1 { - pub text: *mut XIMText, - pub bitmap: Pixmap, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout__XIMStatusDrawCallbackStruct__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<_XIMStatusDrawCallbackStruct__bindgen_ty_1>(), - 8usize, - concat!( - "Size of: ", - stringify!(_XIMStatusDrawCallbackStruct__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::<_XIMStatusDrawCallbackStruct__bindgen_ty_1>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_XIMStatusDrawCallbackStruct__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStatusDrawCallbackStruct__bindgen_ty_1>())).text as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStatusDrawCallbackStruct__bindgen_ty_1), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStatusDrawCallbackStruct__bindgen_ty_1>())).bitmap - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStatusDrawCallbackStruct__bindgen_ty_1), - "::", - stringify!(bitmap) - ) - ); -} -#[test] -fn bindgen_test_layout__XIMStatusDrawCallbackStruct() { - assert_eq!( - ::std::mem::size_of::<_XIMStatusDrawCallbackStruct>(), - 16usize, - concat!("Size of: ", stringify!(_XIMStatusDrawCallbackStruct)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMStatusDrawCallbackStruct>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMStatusDrawCallbackStruct)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStatusDrawCallbackStruct>())).type_ as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMStatusDrawCallbackStruct), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_XIMStatusDrawCallbackStruct>())).data as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMStatusDrawCallbackStruct), - "::", - stringify!(data) - ) - ); -} -pub type XIMStatusDrawCallbackStruct = _XIMStatusDrawCallbackStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIMHotKeyTrigger { - pub keysym: KeySym, - pub modifier: ::std::os::raw::c_int, - pub modifier_mask: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__XIMHotKeyTrigger() { - assert_eq!( - ::std::mem::size_of::<_XIMHotKeyTrigger>(), - 16usize, - concat!("Size of: ", stringify!(_XIMHotKeyTrigger)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMHotKeyTrigger>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMHotKeyTrigger)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMHotKeyTrigger>())).keysym as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMHotKeyTrigger), - "::", - stringify!(keysym) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMHotKeyTrigger>())).modifier as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMHotKeyTrigger), - "::", - stringify!(modifier) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMHotKeyTrigger>())).modifier_mask as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_XIMHotKeyTrigger), - "::", - stringify!(modifier_mask) - ) - ); -} -pub type XIMHotKeyTrigger = _XIMHotKeyTrigger; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _XIMHotKeyTriggers { - pub num_hot_key: ::std::os::raw::c_int, - pub key: *mut XIMHotKeyTrigger, -} -#[test] -fn bindgen_test_layout__XIMHotKeyTriggers() { - assert_eq!( - ::std::mem::size_of::<_XIMHotKeyTriggers>(), - 16usize, - concat!("Size of: ", stringify!(_XIMHotKeyTriggers)) - ); - assert_eq!( - ::std::mem::align_of::<_XIMHotKeyTriggers>(), - 8usize, - concat!("Alignment of ", stringify!(_XIMHotKeyTriggers)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMHotKeyTriggers>())).num_hot_key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_XIMHotKeyTriggers), - "::", - stringify!(num_hot_key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_XIMHotKeyTriggers>())).key as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_XIMHotKeyTriggers), - "::", - stringify!(key) - ) - ); -} -pub type XIMHotKeyTriggers = _XIMHotKeyTriggers; -pub type XIMHotKeyState = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct XIMValuesList { - pub count_values: ::std::os::raw::c_ushort, - pub supported_values: *mut *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_XIMValuesList() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(XIMValuesList)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(XIMValuesList)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count_values as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(XIMValuesList), - "::", - stringify!(count_values) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).supported_values as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(XIMValuesList), - "::", - stringify!(supported_values) - ) - ); -} -extern "C" { - #[link_name = "\u{1}_Xdebug"] - pub static mut _Xdebug: ::std::os::raw::c_int; -} -extern "C" { - pub fn XLoadQueryFont( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - ) -> *mut XFontStruct; -} -extern "C" { - pub fn XQueryFont(arg1: *mut Display, arg2: XID) -> *mut XFontStruct; -} -extern "C" { - pub fn XGetMotionEvents( - arg1: *mut Display, - arg2: Window, - arg3: Time, - arg4: Time, - arg5: *mut ::std::os::raw::c_int, - ) -> *mut XTimeCoord; -} -extern "C" { - pub fn XDeleteModifiermapEntry( - arg1: *mut XModifierKeymap, - arg2: KeyCode, - arg3: ::std::os::raw::c_int, - ) -> *mut XModifierKeymap; -} -extern "C" { - pub fn XGetModifierMapping(arg1: *mut Display) -> *mut XModifierKeymap; -} -extern "C" { - pub fn XInsertModifiermapEntry( - arg1: *mut XModifierKeymap, - arg2: KeyCode, - arg3: ::std::os::raw::c_int, - ) -> *mut XModifierKeymap; -} -extern "C" { - pub fn XNewModifiermap(arg1: ::std::os::raw::c_int) -> *mut XModifierKeymap; -} -extern "C" { - pub fn XCreateImage( - arg1: *mut Display, - arg2: *mut Visual, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_char, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_uint, - arg9: ::std::os::raw::c_int, - arg10: ::std::os::raw::c_int, - ) -> *mut XImage; -} -extern "C" { - pub fn XInitImage(arg1: *mut XImage) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetImage( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_ulong, - arg8: ::std::os::raw::c_int, - ) -> *mut XImage; -} -extern "C" { - pub fn XGetSubImage( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_ulong, - arg8: ::std::os::raw::c_int, - arg9: *mut XImage, - arg10: ::std::os::raw::c_int, - arg11: ::std::os::raw::c_int, - ) -> *mut XImage; -} -extern "C" { - pub fn XOpenDisplay(arg1: *const ::std::os::raw::c_char) -> *mut Display; -} -extern "C" { - pub fn XrmInitialize(); -} -extern "C" { - pub fn XFetchBytes( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XFetchBuffer( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XGetAtomName(arg1: *mut Display, arg2: Atom) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XGetAtomNames( - arg1: *mut Display, - arg2: *mut Atom, - arg3: ::std::os::raw::c_int, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetDefault( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XDisplayName(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XKeysymToString(arg1: KeySym) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XSynchronize( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - ) -> ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display, arg2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int, - >; -} -extern "C" { - pub fn XSetAfterFunction( - arg1: *mut Display, - arg2: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display) -> ::std::os::raw::c_int, - >, - ) -> ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Display, - arg2: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >; -} -extern "C" { - pub fn XInternAtom( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> Atom; -} -extern "C" { - pub fn XInternAtoms( - arg1: *mut Display, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: *mut Atom, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCopyColormapAndFree(arg1: *mut Display, arg2: Colormap) -> Colormap; -} -extern "C" { - pub fn XCreateColormap( - arg1: *mut Display, - arg2: Window, - arg3: *mut Visual, - arg4: ::std::os::raw::c_int, - ) -> Colormap; -} -extern "C" { - pub fn XCreatePixmapCursor( - arg1: *mut Display, - arg2: Pixmap, - arg3: Pixmap, - arg4: *mut XColor, - arg5: *mut XColor, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - ) -> Cursor; -} -extern "C" { - pub fn XCreateGlyphCursor( - arg1: *mut Display, - arg2: Font, - arg3: Font, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - arg6: *const XColor, - arg7: *const XColor, - ) -> Cursor; -} -extern "C" { - pub fn XCreateFontCursor(arg1: *mut Display, arg2: ::std::os::raw::c_uint) -> Cursor; -} -extern "C" { - pub fn XLoadFont(arg1: *mut Display, arg2: *const ::std::os::raw::c_char) -> Font; -} -extern "C" { - pub fn XCreateGC( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_ulong, - arg4: *mut XGCValues, - ) -> GC; -} -extern "C" { - pub fn XGContextFromGC(arg1: GC) -> GContext; -} -extern "C" { - pub fn XFlushGC(arg1: *mut Display, arg2: GC); -} -extern "C" { - pub fn XCreatePixmap( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - ) -> Pixmap; -} -extern "C" { - pub fn XCreateBitmapFromData( - arg1: *mut Display, - arg2: Drawable, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - ) -> Pixmap; -} -extern "C" { - pub fn XCreatePixmapFromBitmapData( - arg1: *mut Display, - arg2: Drawable, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_ulong, - arg7: ::std::os::raw::c_ulong, - arg8: ::std::os::raw::c_uint, - ) -> Pixmap; -} -extern "C" { - pub fn XCreateSimpleWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_ulong, - arg9: ::std::os::raw::c_ulong, - ) -> Window; -} -extern "C" { - pub fn XGetSelectionOwner(arg1: *mut Display, arg2: Atom) -> Window; -} -extern "C" { - pub fn XCreateWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_int, - arg9: ::std::os::raw::c_uint, - arg10: *mut Visual, - arg11: ::std::os::raw::c_ulong, - arg12: *mut XSetWindowAttributes, - ) -> Window; -} -extern "C" { - pub fn XListInstalledColormaps( - arg1: *mut Display, - arg2: Window, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut Colormap; -} -extern "C" { - pub fn XListFonts( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XListFontsWithInfo( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut *mut XFontStruct, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XGetFontPath( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XListExtensions( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XListProperties( - arg1: *mut Display, - arg2: Window, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut Atom; -} -extern "C" { - pub fn XListHosts( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut XHostAddress; -} -extern "C" { - pub fn XKeycodeToKeysym( - arg1: *mut Display, - arg2: KeyCode, - arg3: ::std::os::raw::c_int, - ) -> KeySym; -} -extern "C" { - pub fn XLookupKeysym(arg1: *mut XKeyEvent, arg2: ::std::os::raw::c_int) -> KeySym; -} -extern "C" { - pub fn XGetKeyboardMapping( - arg1: *mut Display, - arg2: KeyCode, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut KeySym; -} -extern "C" { - pub fn XStringToKeysym(arg1: *const ::std::os::raw::c_char) -> KeySym; -} -extern "C" { - pub fn XMaxRequestSize(arg1: *mut Display) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn XExtendedMaxRequestSize(arg1: *mut Display) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn XResourceManagerString(arg1: *mut Display) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XScreenResourceString(arg1: *mut Screen) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XDisplayMotionBufferSize(arg1: *mut Display) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XVisualIDFromVisual(arg1: *mut Visual) -> VisualID; -} -extern "C" { - pub fn XInitThreads() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XLockDisplay(arg1: *mut Display); -} -extern "C" { - pub fn XUnlockDisplay(arg1: *mut Display); -} -extern "C" { - pub fn XInitExtension( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - ) -> *mut XExtCodes; -} -extern "C" { - pub fn XAddExtension(arg1: *mut Display) -> *mut XExtCodes; -} -extern "C" { - pub fn XFindOnExtensionList( - arg1: *mut *mut XExtData, - arg2: ::std::os::raw::c_int, - ) -> *mut XExtData; -} -extern "C" { - pub fn XEHeadOfExtensionList(arg1: XEDataObject) -> *mut *mut XExtData; -} -extern "C" { - pub fn XRootWindow(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> Window; -} -extern "C" { - pub fn XDefaultRootWindow(arg1: *mut Display) -> Window; -} -extern "C" { - pub fn XRootWindowOfScreen(arg1: *mut Screen) -> Window; -} -extern "C" { - pub fn XDefaultVisual(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> *mut Visual; -} -extern "C" { - pub fn XDefaultVisualOfScreen(arg1: *mut Screen) -> *mut Visual; -} -extern "C" { - pub fn XDefaultGC(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> GC; -} -extern "C" { - pub fn XDefaultGCOfScreen(arg1: *mut Screen) -> GC; -} -extern "C" { - pub fn XBlackPixel(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XWhitePixel(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XAllPlanes() -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XBlackPixelOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XWhitePixelOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XNextRequest(arg1: *mut Display) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XLastKnownRequestProcessed(arg1: *mut Display) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn XServerVendor(arg1: *mut Display) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XDisplayString(arg1: *mut Display) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XDefaultColormap(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> Colormap; -} -extern "C" { - pub fn XDefaultColormapOfScreen(arg1: *mut Screen) -> Colormap; -} -extern "C" { - pub fn XDisplayOfScreen(arg1: *mut Screen) -> *mut Display; -} -extern "C" { - pub fn XScreenOfDisplay(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> *mut Screen; -} -extern "C" { - pub fn XDefaultScreenOfDisplay(arg1: *mut Display) -> *mut Screen; -} -extern "C" { - pub fn XEventMaskOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn XScreenNumberOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -pub type XErrorHandler = ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display, arg2: *mut XErrorEvent) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn XSetErrorHandler(arg1: XErrorHandler) -> XErrorHandler; -} -pub type XIOErrorHandler = - ::std::option::Option ::std::os::raw::c_int>; -extern "C" { - pub fn XSetIOErrorHandler(arg1: XIOErrorHandler) -> XIOErrorHandler; -} -extern "C" { - pub fn XListPixmapFormats( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut XPixmapFormatValues; -} -extern "C" { - pub fn XListDepths( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn XReconfigureWMWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_uint, - arg5: *mut XWindowChanges, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetWMProtocols( - arg1: *mut Display, - arg2: Window, - arg3: *mut *mut Atom, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWMProtocols( - arg1: *mut Display, - arg2: Window, - arg3: *mut Atom, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XIconifyWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XWithdrawWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetCommand( - arg1: *mut Display, - arg2: Window, - arg3: *mut *mut *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetWMColormapWindows( - arg1: *mut Display, - arg2: Window, - arg3: *mut *mut Window, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWMColormapWindows( - arg1: *mut Display, - arg2: Window, - arg3: *mut Window, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeStringList(arg1: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn XSetTransientForHint( - arg1: *mut Display, - arg2: Window, - arg3: Window, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XActivateScreenSaver(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAddHost(arg1: *mut Display, arg2: *mut XHostAddress) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAddHosts( - arg1: *mut Display, - arg2: *mut XHostAddress, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAddToExtensionList( - arg1: *mut *mut _XExtData, - arg2: *mut XExtData, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAddToSaveSet(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAllocColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAllocColorCells( - arg1: *mut Display, - arg2: Colormap, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_ulong, - arg5: ::std::os::raw::c_uint, - arg6: *mut ::std::os::raw::c_ulong, - arg7: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAllocColorPlanes( - arg1: *mut Display, - arg2: Colormap, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_ulong, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - arg8: ::std::os::raw::c_int, - arg9: *mut ::std::os::raw::c_ulong, - arg10: *mut ::std::os::raw::c_ulong, - arg11: *mut ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAllocNamedColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *const ::std::os::raw::c_char, - arg4: *mut XColor, - arg5: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAllowEvents( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAutoRepeatOff(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XAutoRepeatOn(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XBell(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XBitmapBitOrder(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XBitmapPad(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XBitmapUnit(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCellsOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeActivePointerGrab( - arg1: *mut Display, - arg2: ::std::os::raw::c_uint, - arg3: Cursor, - arg4: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeGC( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - arg4: *mut XGCValues, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeKeyboardControl( - arg1: *mut Display, - arg2: ::std::os::raw::c_ulong, - arg3: *mut XKeyboardControl, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeKeyboardMapping( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut KeySym, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangePointerControl( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeProperty( - arg1: *mut Display, - arg2: Window, - arg3: Atom, - arg4: Atom, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_uchar, - arg8: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeSaveSet( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XChangeWindowAttributes( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_ulong, - arg4: *mut XSetWindowAttributes, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCheckIfEvent( - arg1: *mut Display, - arg2: *mut XEvent, - arg3: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display, arg2: *mut XEvent, arg3: XPointer) - -> ::std::os::raw::c_int, - >, - arg4: XPointer, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCheckMaskEvent( - arg1: *mut Display, - arg2: ::std::os::raw::c_long, - arg3: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCheckTypedEvent( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCheckTypedWindowEvent( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCheckWindowEvent( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_long, - arg4: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCirculateSubwindows( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCirculateSubwindowsDown(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCirculateSubwindowsUp(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XClearArea( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XClearWindow(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCloseDisplay(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XConfigureWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_uint, - arg4: *mut XWindowChanges, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XConnectionNumber(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XConvertSelection( - arg1: *mut Display, - arg2: Atom, - arg3: Atom, - arg4: Atom, - arg5: Window, - arg6: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCopyArea( - arg1: *mut Display, - arg2: Drawable, - arg3: Drawable, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_uint, - arg9: ::std::os::raw::c_int, - arg10: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCopyGC( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - arg4: GC, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XCopyPlane( - arg1: *mut Display, - arg2: Drawable, - arg3: Drawable, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_uint, - arg9: ::std::os::raw::c_int, - arg10: ::std::os::raw::c_int, - arg11: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDefaultDepth(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDefaultDepthOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDefaultScreen(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDefineCursor(arg1: *mut Display, arg2: Window, arg3: Cursor) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDeleteProperty(arg1: *mut Display, arg2: Window, arg3: Atom) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDestroyWindow(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDestroySubwindows(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDoesBackingStore(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDoesSaveUnders(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisableAccessControl(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayCells(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayHeight(arg1: *mut Display, arg2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayHeightMM( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayKeycodes( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayPlanes(arg1: *mut Display, arg2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayWidth(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDisplayWidthMM( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawArc( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_int, - arg9: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawArcs( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XArc, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawImageString( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *const ::std::os::raw::c_char, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawImageString16( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *const XChar2b, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawLine( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawLines( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XPoint, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawPoint( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawPoints( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XPoint, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawRectangle( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawRectangles( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XRectangle, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawSegments( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XSegment, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawString( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *const ::std::os::raw::c_char, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawString16( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *const XChar2b, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawText( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut XTextItem, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDrawText16( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut XTextItem16, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XEnableAccessControl(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XEventsQueued(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFetchName( - arg1: *mut Display, - arg2: Window, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFillArc( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_int, - arg9: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFillArcs( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XArc, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFillPolygon( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XPoint, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFillRectangle( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFillRectangles( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XRectangle, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFlush(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XForceScreenSaver( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFree(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeColormap(arg1: *mut Display, arg2: Colormap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeColors( - arg1: *mut Display, - arg2: Colormap, - arg3: *mut ::std::os::raw::c_ulong, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeCursor(arg1: *mut Display, arg2: Cursor) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeExtensionList(arg1: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeFont(arg1: *mut Display, arg2: *mut XFontStruct) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeFontInfo( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut XFontStruct, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeFontNames(arg1: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeFontPath(arg1: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeGC(arg1: *mut Display, arg2: GC) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeModifiermap(arg1: *mut XModifierKeymap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreePixmap(arg1: *mut Display, arg2: Pixmap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGeometry( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_int, - arg9: ::std::os::raw::c_int, - arg10: *mut ::std::os::raw::c_int, - arg11: *mut ::std::os::raw::c_int, - arg12: *mut ::std::os::raw::c_int, - arg13: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetErrorDatabaseText( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - arg5: *mut ::std::os::raw::c_char, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetErrorText( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetFontProperty( - arg1: *mut XFontStruct, - arg2: Atom, - arg3: *mut ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetGCValues( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - arg4: *mut XGCValues, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetGeometry( - arg1: *mut Display, - arg2: Drawable, - arg3: *mut Window, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_uint, - arg7: *mut ::std::os::raw::c_uint, - arg8: *mut ::std::os::raw::c_uint, - arg9: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetIconName( - arg1: *mut Display, - arg2: Window, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetInputFocus( - arg1: *mut Display, - arg2: *mut Window, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetKeyboardControl( - arg1: *mut Display, - arg2: *mut XKeyboardState, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetPointerControl( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetPointerMapping( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_uchar, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetScreenSaver( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetTransientForHint( - arg1: *mut Display, - arg2: Window, - arg3: *mut Window, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetWindowProperty( - arg1: *mut Display, - arg2: Window, - arg3: Atom, - arg4: ::std::os::raw::c_long, - arg5: ::std::os::raw::c_long, - arg6: ::std::os::raw::c_int, - arg7: Atom, - arg8: *mut Atom, - arg9: *mut ::std::os::raw::c_int, - arg10: *mut ::std::os::raw::c_ulong, - arg11: *mut ::std::os::raw::c_ulong, - arg12: *mut *mut ::std::os::raw::c_uchar, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetWindowAttributes( - arg1: *mut Display, - arg2: Window, - arg3: *mut XWindowAttributes, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGrabButton( - arg1: *mut Display, - arg2: ::std::os::raw::c_uint, - arg3: ::std::os::raw::c_uint, - arg4: Window, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_int, - arg8: ::std::os::raw::c_int, - arg9: Window, - arg10: Cursor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGrabKey( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_uint, - arg4: Window, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGrabKeyboard( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGrabPointer( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: Window, - arg8: Cursor, - arg9: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGrabServer(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XHeightMMOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XHeightOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XIfEvent( - arg1: *mut Display, - arg2: *mut XEvent, - arg3: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display, arg2: *mut XEvent, arg3: XPointer) - -> ::std::os::raw::c_int, - >, - arg4: XPointer, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XImageByteOrder(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XInstallColormap(arg1: *mut Display, arg2: Colormap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XKeysymToKeycode(arg1: *mut Display, arg2: KeySym) -> KeyCode; -} -extern "C" { - pub fn XKillClient(arg1: *mut Display, arg2: XID) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XLookupColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *const ::std::os::raw::c_char, - arg4: *mut XColor, - arg5: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XLowerWindow(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMapRaised(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMapSubwindows(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMapWindow(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMaskEvent( - arg1: *mut Display, - arg2: ::std::os::raw::c_long, - arg3: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMaxCmapsOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMinCmapsOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMoveResizeWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XMoveWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XNextEvent(arg1: *mut Display, arg2: *mut XEvent) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XNoOp(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XParseColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *const ::std::os::raw::c_char, - arg4: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XParseGeometry( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_uint, - arg5: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XPeekEvent(arg1: *mut Display, arg2: *mut XEvent) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XPeekIfEvent( - arg1: *mut Display, - arg2: *mut XEvent, - arg3: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Display, arg2: *mut XEvent, arg3: XPointer) - -> ::std::os::raw::c_int, - >, - arg4: XPointer, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XPending(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XPlanesOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XProtocolRevision(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XProtocolVersion(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XPutBackEvent(arg1: *mut Display, arg2: *mut XEvent) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XPutImage( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: *mut XImage, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - arg8: ::std::os::raw::c_int, - arg9: ::std::os::raw::c_uint, - arg10: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQLength(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryBestCursor( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - arg5: *mut ::std::os::raw::c_uint, - arg6: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryBestSize( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: Drawable, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - arg6: *mut ::std::os::raw::c_uint, - arg7: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryBestStipple( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - arg5: *mut ::std::os::raw::c_uint, - arg6: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryBestTile( - arg1: *mut Display, - arg2: Drawable, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - arg5: *mut ::std::os::raw::c_uint, - arg6: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryColors( - arg1: *mut Display, - arg2: Colormap, - arg3: *mut XColor, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryExtension( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryKeymap( - arg1: *mut Display, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryPointer( - arg1: *mut Display, - arg2: Window, - arg3: *mut Window, - arg4: *mut Window, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut ::std::os::raw::c_int, - arg9: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryTextExtents( - arg1: *mut Display, - arg2: XID, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut XCharStruct, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryTextExtents16( - arg1: *mut Display, - arg2: XID, - arg3: *const XChar2b, - arg4: ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut XCharStruct, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XQueryTree( - arg1: *mut Display, - arg2: Window, - arg3: *mut Window, - arg4: *mut Window, - arg5: *mut *mut Window, - arg6: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRaiseWindow(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XReadBitmapFile( - arg1: *mut Display, - arg2: Drawable, - arg3: *const ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_uint, - arg5: *mut ::std::os::raw::c_uint, - arg6: *mut Pixmap, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XReadBitmapFileData( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_uint, - arg3: *mut ::std::os::raw::c_uint, - arg4: *mut *mut ::std::os::raw::c_uchar, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRebindKeysym( - arg1: *mut Display, - arg2: KeySym, - arg3: *mut KeySym, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_uchar, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRecolorCursor( - arg1: *mut Display, - arg2: Cursor, - arg3: *mut XColor, - arg4: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRefreshKeyboardMapping(arg1: *mut XMappingEvent) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRemoveFromSaveSet(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRemoveHost(arg1: *mut Display, arg2: *mut XHostAddress) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRemoveHosts( - arg1: *mut Display, - arg2: *mut XHostAddress, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XReparentWindow( - arg1: *mut Display, - arg2: Window, - arg3: Window, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XResetScreenSaver(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XResizeWindow( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRestackWindows( - arg1: *mut Display, - arg2: *mut Window, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRotateBuffers(arg1: *mut Display, arg2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRotateWindowProperties( - arg1: *mut Display, - arg2: Window, - arg3: *mut Atom, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XScreenCount(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSelectInput( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSendEvent( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_long, - arg5: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetAccessControl( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetArcMode( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetBackground( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetClipMask(arg1: *mut Display, arg2: GC, arg3: Pixmap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetClipOrigin( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetClipRectangles( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: *mut XRectangle, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetCloseDownMode( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetCommand( - arg1: *mut Display, - arg2: Window, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetDashes( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - arg4: *const ::std::os::raw::c_char, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetFillRule( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetFillStyle( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetFont(arg1: *mut Display, arg2: GC, arg3: Font) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetFontPath( - arg1: *mut Display, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetForeground( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetFunction( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetGraphicsExposures( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetIconName( - arg1: *mut Display, - arg2: Window, - arg3: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetInputFocus( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_int, - arg4: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetLineAttributes( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetModifierMapping( - arg1: *mut Display, - arg2: *mut XModifierKeymap, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetPlaneMask( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetPointerMapping( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_uchar, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetScreenSaver( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetSelectionOwner( - arg1: *mut Display, - arg2: Atom, - arg3: Window, - arg4: Time, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetState( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_ulong, - arg4: ::std::os::raw::c_ulong, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetStipple(arg1: *mut Display, arg2: GC, arg3: Pixmap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetSubwindowMode( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetTSOrigin( - arg1: *mut Display, - arg2: GC, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetTile(arg1: *mut Display, arg2: GC, arg3: Pixmap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWindowBackground( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWindowBackgroundPixmap( - arg1: *mut Display, - arg2: Window, - arg3: Pixmap, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWindowBorder( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWindowBorderPixmap( - arg1: *mut Display, - arg2: Window, - arg3: Pixmap, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWindowBorderWidth( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetWindowColormap( - arg1: *mut Display, - arg2: Window, - arg3: Colormap, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XStoreBuffer( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XStoreBytes( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XStoreColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *mut XColor, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XStoreColors( - arg1: *mut Display, - arg2: Colormap, - arg3: *mut XColor, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XStoreName( - arg1: *mut Display, - arg2: Window, - arg3: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XStoreNamedColor( - arg1: *mut Display, - arg2: Colormap, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_ulong, - arg5: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSync(arg1: *mut Display, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XTextExtents( - arg1: *mut XFontStruct, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut XCharStruct, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XTextExtents16( - arg1: *mut XFontStruct, - arg2: *const XChar2b, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut XCharStruct, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XTextWidth( - arg1: *mut XFontStruct, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XTextWidth16( - arg1: *mut XFontStruct, - arg2: *const XChar2b, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XTranslateCoordinates( - arg1: *mut Display, - arg2: Window, - arg3: Window, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut Window, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUndefineCursor(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUngrabButton( - arg1: *mut Display, - arg2: ::std::os::raw::c_uint, - arg3: ::std::os::raw::c_uint, - arg4: Window, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUngrabKey( - arg1: *mut Display, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_uint, - arg4: Window, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUngrabKeyboard(arg1: *mut Display, arg2: Time) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUngrabPointer(arg1: *mut Display, arg2: Time) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUngrabServer(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUninstallColormap(arg1: *mut Display, arg2: Colormap) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUnloadFont(arg1: *mut Display, arg2: Font) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUnmapSubwindows(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUnmapWindow(arg1: *mut Display, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XVendorRelease(arg1: *mut Display) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XWarpPointer( - arg1: *mut Display, - arg2: Window, - arg3: Window, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_uint, - arg7: ::std::os::raw::c_uint, - arg8: ::std::os::raw::c_int, - arg9: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XWidthMMOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XWidthOfScreen(arg1: *mut Screen) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XWindowEvent( - arg1: *mut Display, - arg2: Window, - arg3: ::std::os::raw::c_long, - arg4: *mut XEvent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XWriteBitmapFile( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: Pixmap, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - arg6: ::std::os::raw::c_int, - arg7: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSupportsLocale() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetLocaleModifiers(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XOpenOM( - arg1: *mut Display, - arg2: *mut _XrmHashBucketRec, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - ) -> XOM; -} -extern "C" { - pub fn XCloseOM(arg1: XOM) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XSetOMValues(arg1: XOM, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XGetOMValues(arg1: XOM, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XDisplayOfOM(arg1: XOM) -> *mut Display; -} -extern "C" { - pub fn XLocaleOfOM(arg1: XOM) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XCreateOC(arg1: XOM, ...) -> XOC; -} -extern "C" { - pub fn XDestroyOC(arg1: XOC); -} -extern "C" { - pub fn XOMOfOC(arg1: XOC) -> XOM; -} -extern "C" { - pub fn XSetOCValues(arg1: XOC, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XGetOCValues(arg1: XOC, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XCreateFontSet( - arg1: *mut Display, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut *mut ::std::os::raw::c_char, - ) -> XFontSet; -} -extern "C" { - pub fn XFreeFontSet(arg1: *mut Display, arg2: XFontSet); -} -extern "C" { - pub fn XFontsOfFontSet( - arg1: XFontSet, - arg2: *mut *mut *mut XFontStruct, - arg3: *mut *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XBaseFontNameListOfFontSet(arg1: XFontSet) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XLocaleOfFontSet(arg1: XFontSet) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XContextDependentDrawing(arg1: XFontSet) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XDirectionalDependentDrawing(arg1: XFontSet) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XContextualDrawing(arg1: XFontSet) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XExtentsOfFontSet(arg1: XFontSet) -> *mut XFontSetExtents; -} -extern "C" { - pub fn XmbTextEscapement( - arg1: XFontSet, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XwcTextEscapement( - arg1: XFontSet, - arg2: *const wchar_t, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn Xutf8TextEscapement( - arg1: XFontSet, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XmbTextExtents( - arg1: XFontSet, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut XRectangle, - arg5: *mut XRectangle, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XwcTextExtents( - arg1: XFontSet, - arg2: *const wchar_t, - arg3: ::std::os::raw::c_int, - arg4: *mut XRectangle, - arg5: *mut XRectangle, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn Xutf8TextExtents( - arg1: XFontSet, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut XRectangle, - arg5: *mut XRectangle, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XmbTextPerCharExtents( - arg1: XFontSet, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut XRectangle, - arg5: *mut XRectangle, - arg6: ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut XRectangle, - arg9: *mut XRectangle, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XwcTextPerCharExtents( - arg1: XFontSet, - arg2: *const wchar_t, - arg3: ::std::os::raw::c_int, - arg4: *mut XRectangle, - arg5: *mut XRectangle, - arg6: ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut XRectangle, - arg9: *mut XRectangle, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn Xutf8TextPerCharExtents( - arg1: XFontSet, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut XRectangle, - arg5: *mut XRectangle, - arg6: ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - arg8: *mut XRectangle, - arg9: *mut XRectangle, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XmbDrawText( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut XmbTextItem, - arg7: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn XwcDrawText( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut XwcTextItem, - arg7: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn Xutf8DrawText( - arg1: *mut Display, - arg2: Drawable, - arg3: GC, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut XmbTextItem, - arg7: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn XmbDrawString( - arg1: *mut Display, - arg2: Drawable, - arg3: XFontSet, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, - arg8: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn XwcDrawString( - arg1: *mut Display, - arg2: Drawable, - arg3: XFontSet, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const wchar_t, - arg8: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn Xutf8DrawString( - arg1: *mut Display, - arg2: Drawable, - arg3: XFontSet, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, - arg8: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn XmbDrawImageString( - arg1: *mut Display, - arg2: Drawable, - arg3: XFontSet, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, - arg8: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn XwcDrawImageString( - arg1: *mut Display, - arg2: Drawable, - arg3: XFontSet, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const wchar_t, - arg8: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn Xutf8DrawImageString( - arg1: *mut Display, - arg2: Drawable, - arg3: XFontSet, - arg4: GC, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, - arg8: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn XOpenIM( - arg1: *mut Display, - arg2: *mut _XrmHashBucketRec, - arg3: *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_char, - ) -> XIM; -} -extern "C" { - pub fn XCloseIM(arg1: XIM) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetIMValues(arg1: XIM, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XSetIMValues(arg1: XIM, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XDisplayOfIM(arg1: XIM) -> *mut Display; -} -extern "C" { - pub fn XLocaleOfIM(arg1: XIM) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XCreateIC(arg1: XIM, ...) -> XIC; -} -extern "C" { - pub fn XDestroyIC(arg1: XIC); -} -extern "C" { - pub fn XSetICFocus(arg1: XIC); -} -extern "C" { - pub fn XUnsetICFocus(arg1: XIC); -} -extern "C" { - pub fn XwcResetIC(arg1: XIC) -> *mut wchar_t; -} -extern "C" { - pub fn XmbResetIC(arg1: XIC) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn Xutf8ResetIC(arg1: XIC) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XSetICValues(arg1: XIC, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XGetICValues(arg1: XIC, ...) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn XIMOfIC(arg1: XIC) -> XIM; -} -extern "C" { - pub fn XFilterEvent(arg1: *mut XEvent, arg2: Window) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XmbLookupString( - arg1: XIC, - arg2: *mut XKeyPressedEvent, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: *mut KeySym, - arg6: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XwcLookupString( - arg1: XIC, - arg2: *mut XKeyPressedEvent, - arg3: *mut wchar_t, - arg4: ::std::os::raw::c_int, - arg5: *mut KeySym, - arg6: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn Xutf8LookupString( - arg1: XIC, - arg2: *mut XKeyPressedEvent, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: *mut KeySym, - arg6: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XVaCreateNestedList(arg1: ::std::os::raw::c_int, ...) -> XVaNestedList; -} -extern "C" { - pub fn XRegisterIMInstantiateCallback( - arg1: *mut Display, - arg2: *mut _XrmHashBucketRec, - arg3: *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_char, - arg5: XIDProc, - arg6: XPointer, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XUnregisterIMInstantiateCallback( - arg1: *mut Display, - arg2: *mut _XrmHashBucketRec, - arg3: *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_char, - arg5: XIDProc, - arg6: XPointer, - ) -> ::std::os::raw::c_int; -} -pub type XConnectionWatchProc = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Display, - arg2: XPointer, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: *mut XPointer, - ), ->; -extern "C" { - pub fn XInternalConnectionNumbers( - arg1: *mut Display, - arg2: *mut *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XProcessInternalConnection(arg1: *mut Display, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn XAddConnectionWatch( - arg1: *mut Display, - arg2: XConnectionWatchProc, - arg3: XPointer, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XRemoveConnectionWatch(arg1: *mut Display, arg2: XConnectionWatchProc, arg3: XPointer); -} -extern "C" { - pub fn XSetAuthorization( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn _Xmbtowc( - arg1: *mut wchar_t, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _Xwctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XGetEventData( - arg1: *mut Display, - arg2: *mut XGenericEventCookie, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn XFreeEventData(arg1: *mut Display, arg2: *mut XGenericEventCookie); -} -pub type Imlib_Context = *mut ::std::os::raw::c_void; -pub type Imlib_Image = *mut ::std::os::raw::c_void; -pub type Imlib_Color_Modifier = *mut ::std::os::raw::c_void; -pub type Imlib_Updates = *mut ::std::os::raw::c_void; -pub type Imlib_Font = *mut ::std::os::raw::c_void; -pub type Imlib_Color_Range = *mut ::std::os::raw::c_void; -pub type Imlib_Filter = *mut ::std::os::raw::c_void; -pub type Imlib_Border = _imlib_border; -pub type Imlib_Color = _imlib_color; -pub type ImlibPolygon = *mut ::std::os::raw::c_void; -pub const _imlib_operation_IMLIB_OP_COPY: _imlib_operation = 0; -pub const _imlib_operation_IMLIB_OP_ADD: _imlib_operation = 1; -pub const _imlib_operation_IMLIB_OP_SUBTRACT: _imlib_operation = 2; -pub const _imlib_operation_IMLIB_OP_RESHADE: _imlib_operation = 3; -pub type _imlib_operation = u32; -pub const _imlib_text_direction_IMLIB_TEXT_TO_RIGHT: _imlib_text_direction = 0; -pub const _imlib_text_direction_IMLIB_TEXT_TO_LEFT: _imlib_text_direction = 1; -pub const _imlib_text_direction_IMLIB_TEXT_TO_DOWN: _imlib_text_direction = 2; -pub const _imlib_text_direction_IMLIB_TEXT_TO_UP: _imlib_text_direction = 3; -pub const _imlib_text_direction_IMLIB_TEXT_TO_ANGLE: _imlib_text_direction = 4; -pub type _imlib_text_direction = u32; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_NONE: _imlib_load_error = 0; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_FILE_DOES_NOT_EXIST: _imlib_load_error = 1; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_FILE_IS_DIRECTORY: _imlib_load_error = 2; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_READ: _imlib_load_error = 3; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_NO_LOADER_FOR_FILE_FORMAT: _imlib_load_error = 4; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_PATH_TOO_LONG: _imlib_load_error = 5; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_PATH_COMPONENT_NON_EXISTANT: _imlib_load_error = 6; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY: _imlib_load_error = 7; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE: _imlib_load_error = - 8; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS: _imlib_load_error = 9; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_OUT_OF_MEMORY: _imlib_load_error = 10; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS: _imlib_load_error = 11; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_WRITE: _imlib_load_error = 12; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_OUT_OF_DISK_SPACE: _imlib_load_error = 13; -pub const _imlib_load_error_IMLIB_LOAD_ERROR_UNKNOWN: _imlib_load_error = 14; -pub type _imlib_load_error = u32; -pub const _imlib_TTF_encoding_IMLIB_TTF_ENCODING_ISO_8859_1: _imlib_TTF_encoding = 0; -pub const _imlib_TTF_encoding_IMLIB_TTF_ENCODING_ISO_8859_2: _imlib_TTF_encoding = 1; -pub const _imlib_TTF_encoding_IMLIB_TTF_ENCODING_ISO_8859_3: _imlib_TTF_encoding = 2; -pub const _imlib_TTF_encoding_IMLIB_TTF_ENCODING_ISO_8859_4: _imlib_TTF_encoding = 3; -pub const _imlib_TTF_encoding_IMLIB_TTF_ENCODING_ISO_8859_5: _imlib_TTF_encoding = 4; -pub type _imlib_TTF_encoding = u32; -pub use self::_imlib_TTF_encoding as Imlib_TTF_Encoding; -pub use self::_imlib_load_error as Imlib_Load_Error; -pub use self::_imlib_operation as Imlib_Operation; -pub use self::_imlib_text_direction as Imlib_Text_Direction; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _imlib_border { - pub left: ::std::os::raw::c_int, - pub right: ::std::os::raw::c_int, - pub top: ::std::os::raw::c_int, - pub bottom: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__imlib_border() { - assert_eq!( - ::std::mem::size_of::<_imlib_border>(), - 16usize, - concat!("Size of: ", stringify!(_imlib_border)) - ); - assert_eq!( - ::std::mem::align_of::<_imlib_border>(), - 4usize, - concat!("Alignment of ", stringify!(_imlib_border)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_border>())).left as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_imlib_border), - "::", - stringify!(left) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_border>())).right as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_imlib_border), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_border>())).top as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_imlib_border), - "::", - stringify!(top) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_border>())).bottom as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_imlib_border), - "::", - stringify!(bottom) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _imlib_color { - pub alpha: ::std::os::raw::c_int, - pub red: ::std::os::raw::c_int, - pub green: ::std::os::raw::c_int, - pub blue: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__imlib_color() { - assert_eq!( - ::std::mem::size_of::<_imlib_color>(), - 16usize, - concat!("Size of: ", stringify!(_imlib_color)) - ); - assert_eq!( - ::std::mem::align_of::<_imlib_color>(), - 4usize, - concat!("Alignment of ", stringify!(_imlib_color)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_color>())).alpha as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_imlib_color), - "::", - stringify!(alpha) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_color>())).red as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_imlib_color), - "::", - stringify!(red) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_color>())).green as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_imlib_color), - "::", - stringify!(green) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_imlib_color>())).blue as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_imlib_color), - "::", - stringify!(blue) - ) - ); -} -pub type Imlib_Progress_Function = ::std::option::Option< - unsafe extern "C" fn( - im: Imlib_Image, - percent: ::std::os::raw::c_char, - update_x: ::std::os::raw::c_int, - update_y: ::std::os::raw::c_int, - update_w: ::std::os::raw::c_int, - update_h: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type Imlib_Data_Destructor_Function = - ::std::option::Option; -extern "C" { - pub fn imlib_context_new() -> Imlib_Context; -} -extern "C" { - pub fn imlib_context_free(context: Imlib_Context); -} -extern "C" { - pub fn imlib_context_push(context: Imlib_Context); -} -extern "C" { - pub fn imlib_context_pop(); -} -extern "C" { - pub fn imlib_context_get() -> Imlib_Context; -} -extern "C" { - pub fn imlib_context_set_display(display: *mut Display); -} -extern "C" { - pub fn imlib_context_disconnect_display(); -} -extern "C" { - pub fn imlib_context_set_visual(visual: *mut Visual); -} -extern "C" { - pub fn imlib_context_set_colormap(colormap: Colormap); -} -extern "C" { - pub fn imlib_context_set_drawable(drawable: Drawable); -} -extern "C" { - pub fn imlib_context_set_mask(mask: Pixmap); -} -extern "C" { - pub fn imlib_context_set_dither_mask(dither_mask: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_context_set_mask_alpha_threshold(mask_alpha_threshold: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_context_set_anti_alias(anti_alias: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_context_set_dither(dither: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_context_set_blend(blend: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_context_set_color_modifier(color_modifier: Imlib_Color_Modifier); -} -extern "C" { - pub fn imlib_context_set_operation(operation: Imlib_Operation); -} -extern "C" { - pub fn imlib_context_set_font(font: Imlib_Font); -} -extern "C" { - pub fn imlib_context_set_direction(direction: Imlib_Text_Direction); -} -extern "C" { - pub fn imlib_context_set_angle(angle: f64); -} -extern "C" { - pub fn imlib_context_set_color( - red: ::std::os::raw::c_int, - green: ::std::os::raw::c_int, - blue: ::std::os::raw::c_int, - alpha: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_set_color_hsva( - hue: f32, - saturation: f32, - value: f32, - alpha: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_set_color_hlsa( - hue: f32, - lightness: f32, - saturation: f32, - alpha: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_set_color_cmya( - cyan: ::std::os::raw::c_int, - magenta: ::std::os::raw::c_int, - yellow: ::std::os::raw::c_int, - alpha: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_set_color_range(color_range: Imlib_Color_Range); -} -extern "C" { - pub fn imlib_context_set_progress_function(progress_function: Imlib_Progress_Function); -} -extern "C" { - pub fn imlib_context_set_progress_granularity(progress_granularity: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_context_set_image(image: Imlib_Image); -} -extern "C" { - pub fn imlib_context_set_cliprect( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - w: ::std::os::raw::c_int, - h: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_set_TTF_encoding(encoding: Imlib_TTF_Encoding); -} -extern "C" { - pub fn imlib_context_get_display() -> *mut Display; -} -extern "C" { - pub fn imlib_context_get_visual() -> *mut Visual; -} -extern "C" { - pub fn imlib_context_get_colormap() -> Colormap; -} -extern "C" { - pub fn imlib_context_get_drawable() -> Drawable; -} -extern "C" { - pub fn imlib_context_get_mask() -> Pixmap; -} -extern "C" { - pub fn imlib_context_get_dither_mask() -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_context_get_anti_alias() -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_context_get_mask_alpha_threshold() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_context_get_dither() -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_context_get_blend() -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_context_get_color_modifier() -> Imlib_Color_Modifier; -} -extern "C" { - pub fn imlib_context_get_operation() -> Imlib_Operation; -} -extern "C" { - pub fn imlib_context_get_font() -> Imlib_Font; -} -extern "C" { - pub fn imlib_context_get_angle() -> f64; -} -extern "C" { - pub fn imlib_context_get_direction() -> Imlib_Text_Direction; -} -extern "C" { - pub fn imlib_context_get_color( - red: *mut ::std::os::raw::c_int, - green: *mut ::std::os::raw::c_int, - blue: *mut ::std::os::raw::c_int, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_get_color_hsva( - hue: *mut f32, - saturation: *mut f32, - value: *mut f32, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_get_color_hlsa( - hue: *mut f32, - lightness: *mut f32, - saturation: *mut f32, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_get_color_cmya( - cyan: *mut ::std::os::raw::c_int, - magenta: *mut ::std::os::raw::c_int, - yellow: *mut ::std::os::raw::c_int, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_get_imlib_color() -> *mut Imlib_Color; -} -extern "C" { - pub fn imlib_context_get_color_range() -> Imlib_Color_Range; -} -extern "C" { - pub fn imlib_context_get_progress_function() -> Imlib_Progress_Function; -} -extern "C" { - pub fn imlib_context_get_progress_granularity() -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_context_get_image() -> Imlib_Image; -} -extern "C" { - pub fn imlib_context_get_cliprect( - x: *mut ::std::os::raw::c_int, - y: *mut ::std::os::raw::c_int, - w: *mut ::std::os::raw::c_int, - h: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_context_get_TTF_encoding() -> Imlib_TTF_Encoding; -} -extern "C" { - pub fn imlib_get_cache_used() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_cache_size() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_set_cache_size(bytes: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_get_color_usage() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_set_color_usage(max: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_flush_loaders(); -} -extern "C" { - pub fn imlib_get_visual_depth( - display: *mut Display, - visual: *mut Visual, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_best_visual( - display: *mut Display, - screen: ::std::os::raw::c_int, - depth_return: *mut ::std::os::raw::c_int, - ) -> *mut Visual; -} -extern "C" { - pub fn imlib_load_image(file: *const ::std::os::raw::c_char) -> Imlib_Image; -} -extern "C" { - pub fn imlib_load_image_immediately(file: *const ::std::os::raw::c_char) -> Imlib_Image; -} -extern "C" { - pub fn imlib_load_image_without_cache(file: *const ::std::os::raw::c_char) -> Imlib_Image; -} -extern "C" { - pub fn imlib_load_image_immediately_without_cache( - file: *const ::std::os::raw::c_char, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_load_image_with_error_return( - file: *const ::std::os::raw::c_char, - error_return: *mut Imlib_Load_Error, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_free_image(); -} -extern "C" { - pub fn imlib_free_image_and_decache(); -} -extern "C" { - pub fn imlib_image_get_width() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_image_get_height() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_image_get_filename() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_image_get_data() -> *mut ::std::os::raw::c_uint; -} -extern "C" { - pub fn imlib_image_get_data_for_reading_only() -> *mut ::std::os::raw::c_uint; -} -extern "C" { - pub fn imlib_image_put_back_data(data: *mut ::std::os::raw::c_uint); -} -extern "C" { - pub fn imlib_image_has_alpha() -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_image_set_changes_on_disk(); -} -extern "C" { - pub fn imlib_image_get_border(border: *mut Imlib_Border); -} -extern "C" { - pub fn imlib_image_set_border(border: *mut Imlib_Border); -} -extern "C" { - pub fn imlib_image_set_format(format: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_image_set_irrelevant_format(irrelevant: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_image_set_irrelevant_border(irrelevant: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_image_set_irrelevant_alpha(irrelevant: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_image_format() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_image_set_has_alpha(has_alpha: ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_image_query_pixel( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - color_return: *mut Imlib_Color, - ); -} -extern "C" { - pub fn imlib_image_query_pixel_hsva( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - hue: *mut f32, - saturation: *mut f32, - value: *mut f32, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_query_pixel_hlsa( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - hue: *mut f32, - lightness: *mut f32, - saturation: *mut f32, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_query_pixel_cmya( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - cyan: *mut ::std::os::raw::c_int, - magenta: *mut ::std::os::raw::c_int, - yellow: *mut ::std::os::raw::c_int, - alpha: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_render_pixmaps_for_whole_image( - pixmap_return: *mut Pixmap, - mask_return: *mut Pixmap, - ); -} -extern "C" { - pub fn imlib_render_pixmaps_for_whole_image_at_size( - pixmap_return: *mut Pixmap, - mask_return: *mut Pixmap, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_free_pixmap_and_mask(pixmap: Pixmap); -} -extern "C" { - pub fn imlib_render_image_on_drawable(x: ::std::os::raw::c_int, y: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_render_image_on_drawable_at_size( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_render_image_part_on_drawable_at_size( - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_render_get_pixel_color() -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn imlib_blend_image_onto_image( - source_image: Imlib_Image, - merge_alpha: ::std::os::raw::c_char, - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - destination_width: ::std::os::raw::c_int, - destination_height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_create_image( - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_image_using_data( - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - data: *mut ::std::os::raw::c_uint, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_image_using_copied_data( - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - data: *mut ::std::os::raw::c_uint, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_image_from_drawable( - mask: Pixmap, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - need_to_grab_x: ::std::os::raw::c_char, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_image_from_ximage( - image: *mut XImage, - mask: *mut XImage, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - need_to_grab_x: ::std::os::raw::c_char, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_scaled_image_from_drawable( - mask: Pixmap, - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_width: ::std::os::raw::c_int, - destination_height: ::std::os::raw::c_int, - need_to_grab_x: ::std::os::raw::c_char, - get_mask_from_shape: ::std::os::raw::c_char, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_copy_drawable_to_image( - mask: Pixmap, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - need_to_grab_x: ::std::os::raw::c_char, - ) -> ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_get_ximage_cache_count_used() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_ximage_cache_count_max() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_set_ximage_cache_count_max(count: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_get_ximage_cache_size_used() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_ximage_cache_size_max() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_set_ximage_cache_size_max(bytes: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_clone_image() -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_cropped_image( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_create_cropped_scaled_image( - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_width: ::std::os::raw::c_int, - destination_height: ::std::os::raw::c_int, - ) -> Imlib_Image; -} -extern "C" { - pub fn imlib_updates_clone(updates: Imlib_Updates) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_update_append_rect( - updates: Imlib_Updates, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - w: ::std::os::raw::c_int, - h: ::std::os::raw::c_int, - ) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_updates_merge( - updates: Imlib_Updates, - w: ::std::os::raw::c_int, - h: ::std::os::raw::c_int, - ) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_updates_merge_for_rendering( - updates: Imlib_Updates, - w: ::std::os::raw::c_int, - h: ::std::os::raw::c_int, - ) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_updates_free(updates: Imlib_Updates); -} -extern "C" { - pub fn imlib_updates_get_next(updates: Imlib_Updates) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_updates_get_coordinates( - updates: Imlib_Updates, - x_return: *mut ::std::os::raw::c_int, - y_return: *mut ::std::os::raw::c_int, - width_return: *mut ::std::os::raw::c_int, - height_return: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_updates_set_coordinates( - updates: Imlib_Updates, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_render_image_updates_on_drawable( - updates: Imlib_Updates, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_updates_init() -> Imlib_Updates; -} -extern "C" { - pub fn imlib_updates_append_updates( - updates: Imlib_Updates, - appended_updates: Imlib_Updates, - ) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_image_flip_horizontal(); -} -extern "C" { - pub fn imlib_image_flip_vertical(); -} -extern "C" { - pub fn imlib_image_flip_diagonal(); -} -extern "C" { - pub fn imlib_image_orientate(orientation: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_image_blur(radius: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_image_sharpen(radius: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_image_tile_horizontal(); -} -extern "C" { - pub fn imlib_image_tile_vertical(); -} -extern "C" { - pub fn imlib_image_tile(); -} -extern "C" { - pub fn imlib_load_font(font_name: *const ::std::os::raw::c_char) -> Imlib_Font; -} -extern "C" { - pub fn imlib_free_font(); -} -extern "C" { - pub fn imlib_insert_font_into_fallback_chain( - font: Imlib_Font, - fallback_font: Imlib_Font, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_remove_font_from_fallback_chain(fallback_font: Imlib_Font); -} -extern "C" { - pub fn imlib_get_prev_font_in_fallback_chain(fn_: Imlib_Font) -> Imlib_Font; -} -extern "C" { - pub fn imlib_get_next_font_in_fallback_chain(fn_: Imlib_Font) -> Imlib_Font; -} -extern "C" { - pub fn imlib_text_draw( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - text: *const ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn imlib_text_draw_with_return_metrics( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - text: *const ::std::os::raw::c_char, - width_return: *mut ::std::os::raw::c_int, - height_return: *mut ::std::os::raw::c_int, - horizontal_advance_return: *mut ::std::os::raw::c_int, - vertical_advance_return: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_get_text_size( - text: *const ::std::os::raw::c_char, - width_return: *mut ::std::os::raw::c_int, - height_return: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_get_text_advance( - text: *const ::std::os::raw::c_char, - horizontal_advance_return: *mut ::std::os::raw::c_int, - vertical_advance_return: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_get_text_inset(text: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_add_path_to_font_path(path: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_remove_path_from_font_path(path: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_list_font_path( - number_return: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_text_get_index_and_location( - text: *const ::std::os::raw::c_char, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - char_x_return: *mut ::std::os::raw::c_int, - char_y_return: *mut ::std::os::raw::c_int, - char_width_return: *mut ::std::os::raw::c_int, - char_height_return: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_text_get_location_at_index( - text: *const ::std::os::raw::c_char, - index: ::std::os::raw::c_int, - char_x_return: *mut ::std::os::raw::c_int, - char_y_return: *mut ::std::os::raw::c_int, - char_width_return: *mut ::std::os::raw::c_int, - char_height_return: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_list_fonts( - number_return: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn imlib_free_font_list( - font_list: *mut *mut ::std::os::raw::c_char, - number: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_get_font_cache_size() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_set_font_cache_size(bytes: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_flush_font_cache(); -} -extern "C" { - pub fn imlib_get_font_ascent() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_font_descent() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_maximum_font_ascent() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_get_maximum_font_descent() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_create_color_modifier() -> Imlib_Color_Modifier; -} -extern "C" { - pub fn imlib_free_color_modifier(); -} -extern "C" { - pub fn imlib_modify_color_modifier_gamma(gamma_value: f64); -} -extern "C" { - pub fn imlib_modify_color_modifier_brightness(brightness_value: f64); -} -extern "C" { - pub fn imlib_modify_color_modifier_contrast(contrast_value: f64); -} -extern "C" { - pub fn imlib_set_color_modifier_tables( - red_table: *mut ::std::os::raw::c_uchar, - green_table: *mut ::std::os::raw::c_uchar, - blue_table: *mut ::std::os::raw::c_uchar, - alpha_table: *mut ::std::os::raw::c_uchar, - ); -} -extern "C" { - pub fn imlib_get_color_modifier_tables( - red_table: *mut ::std::os::raw::c_uchar, - green_table: *mut ::std::os::raw::c_uchar, - blue_table: *mut ::std::os::raw::c_uchar, - alpha_table: *mut ::std::os::raw::c_uchar, - ); -} -extern "C" { - pub fn imlib_reset_color_modifier(); -} -extern "C" { - pub fn imlib_apply_color_modifier(); -} -extern "C" { - pub fn imlib_apply_color_modifier_to_rectangle( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_draw_pixel( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - make_updates: ::std::os::raw::c_char, - ) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_image_draw_line( - x1: ::std::os::raw::c_int, - y1: ::std::os::raw::c_int, - x2: ::std::os::raw::c_int, - y2: ::std::os::raw::c_int, - make_updates: ::std::os::raw::c_char, - ) -> Imlib_Updates; -} -extern "C" { - pub fn imlib_image_draw_rectangle( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_fill_rectangle( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_copy_alpha_to_image( - image_source: Imlib_Image, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_copy_alpha_rectangle_to_image( - image_source: Imlib_Image, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_scroll_rect( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - delta_x: ::std::os::raw::c_int, - delta_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_copy_rect( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - new_x: ::std::os::raw::c_int, - new_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_polygon_new() -> ImlibPolygon; -} -extern "C" { - pub fn imlib_polygon_free(poly: ImlibPolygon); -} -extern "C" { - pub fn imlib_polygon_add_point( - poly: ImlibPolygon, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_draw_polygon(poly: ImlibPolygon, closed: ::std::os::raw::c_uchar); -} -extern "C" { - pub fn imlib_image_fill_polygon(poly: ImlibPolygon); -} -extern "C" { - pub fn imlib_polygon_get_bounds( - poly: ImlibPolygon, - px1: *mut ::std::os::raw::c_int, - py1: *mut ::std::os::raw::c_int, - px2: *mut ::std::os::raw::c_int, - py2: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_polygon_contains_point( - poly: ImlibPolygon, - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_uchar; -} -extern "C" { - pub fn imlib_image_draw_ellipse( - xc: ::std::os::raw::c_int, - yc: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_fill_ellipse( - xc: ::std::os::raw::c_int, - yc: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_create_color_range() -> Imlib_Color_Range; -} -extern "C" { - pub fn imlib_free_color_range(); -} -extern "C" { - pub fn imlib_add_color_to_color_range(distance_away: ::std::os::raw::c_int); -} -extern "C" { - pub fn imlib_image_fill_color_range_rectangle( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - angle: f64, - ); -} -extern "C" { - pub fn imlib_image_fill_hsva_color_range_rectangle( - x: ::std::os::raw::c_int, - y: ::std::os::raw::c_int, - width: ::std::os::raw::c_int, - height: ::std::os::raw::c_int, - angle: f64, - ); -} -extern "C" { - pub fn imlib_image_attach_data_value( - key: *const ::std::os::raw::c_char, - data: *mut ::std::os::raw::c_void, - value: ::std::os::raw::c_int, - destructor_function: Imlib_Data_Destructor_Function, - ); -} -extern "C" { - pub fn imlib_image_get_attached_data( - key: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn imlib_image_get_attached_value( - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn imlib_image_remove_attached_data_value(key: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_image_remove_and_free_attached_data_value(key: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_save_image(filename: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn imlib_save_image_with_error_return( - filename: *const ::std::os::raw::c_char, - error_return: *mut Imlib_Load_Error, - ); -} -extern "C" { - pub fn imlib_create_rotated_image(angle: f64) -> Imlib_Image; -} -extern "C" { - pub fn imlib_rotate_image_from_buffer(angle: f64, source_image: Imlib_Image); -} -extern "C" { - pub fn imlib_blend_image_onto_image_at_angle( - source_image: Imlib_Image, - merge_alpha: ::std::os::raw::c_char, - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - angle_x: ::std::os::raw::c_int, - angle_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_blend_image_onto_image_skewed( - source_image: Imlib_Image, - merge_alpha: ::std::os::raw::c_char, - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - h_angle_x: ::std::os::raw::c_int, - h_angle_y: ::std::os::raw::c_int, - v_angle_x: ::std::os::raw::c_int, - v_angle_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_render_image_on_drawable_skewed( - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - h_angle_x: ::std::os::raw::c_int, - h_angle_y: ::std::os::raw::c_int, - v_angle_x: ::std::os::raw::c_int, - v_angle_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_render_image_on_drawable_at_angle( - source_x: ::std::os::raw::c_int, - source_y: ::std::os::raw::c_int, - source_width: ::std::os::raw::c_int, - source_height: ::std::os::raw::c_int, - destination_x: ::std::os::raw::c_int, - destination_y: ::std::os::raw::c_int, - angle_x: ::std::os::raw::c_int, - angle_y: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_image_filter(); -} -extern "C" { - pub fn imlib_create_filter(initsize: ::std::os::raw::c_int) -> Imlib_Filter; -} -extern "C" { - pub fn imlib_context_set_filter(filter: Imlib_Filter); -} -extern "C" { - pub fn imlib_context_get_filter() -> Imlib_Filter; -} -extern "C" { - pub fn imlib_free_filter(); -} -extern "C" { - pub fn imlib_filter_set( - xoff: ::std::os::raw::c_int, - yoff: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_filter_set_alpha( - xoff: ::std::os::raw::c_int, - yoff: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_filter_set_red( - xoff: ::std::os::raw::c_int, - yoff: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_filter_set_green( - xoff: ::std::os::raw::c_int, - yoff: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_filter_set_blue( - xoff: ::std::os::raw::c_int, - yoff: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_filter_constants( - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_filter_divisors( - a: ::std::os::raw::c_int, - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn imlib_apply_filter(script: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn imlib_image_clear(); -} -extern "C" { - pub fn imlib_image_clear_color( - r: ::std::os::raw::c_int, - g: ::std::os::raw::c_int, - b: ::std::os::raw::c_int, - a: ::std::os::raw::c_int, - ); -} diff --git a/imlib2/Cargo.toml b/imlib2/Cargo.toml new file mode 100644 index 0000000..eba82c7 --- /dev/null +++ b/imlib2/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "imlib2" +version = "0.1.0" +authors = ["Michael Zhang "] + +[dependencies] +failure = "0.1" +imlib2-sys = { path = "imlib2-sys" } +xlib = { path = "../xlib" } diff --git a/imlib2-sys/Cargo.toml b/imlib2/imlib2-sys/Cargo.toml similarity index 90% rename from imlib2-sys/Cargo.toml rename to imlib2/imlib2-sys/Cargo.toml index fea7461..4c61d68 100644 --- a/imlib2-sys/Cargo.toml +++ b/imlib2/imlib2-sys/Cargo.toml @@ -8,3 +8,4 @@ build = "build.rs" path = "lib.rs" [build-dependencies] +bindgen = "0.40" diff --git a/imlib2/imlib2-sys/build.rs b/imlib2/imlib2-sys/build.rs new file mode 100644 index 0000000..3e62340 --- /dev/null +++ b/imlib2/imlib2-sys/build.rs @@ -0,0 +1,20 @@ +// bindgen build script by remexre + +extern crate bindgen; + +use std::env; +use std::path::PathBuf; + +use bindgen::Builder; + +fn main() { + println!("cargo:rustc-link-lib=Imlib2"); + let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + Builder::default() + .header("wrapper.h") + .blacklist_type("max_align_t") + .generate() + .expect("Unable to generate bindings") + .write_to_file(out_path.join("bindings.rs")) + .expect("Unable to write bindings"); +} diff --git a/imlib2/imlib2-sys/lib.rs b/imlib2/imlib2-sys/lib.rs new file mode 100644 index 0000000..a38a13a --- /dev/null +++ b/imlib2/imlib2-sys/lib.rs @@ -0,0 +1,5 @@ +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] + +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/imlib2/imlib2-sys/wrapper.h b/imlib2/imlib2-sys/wrapper.h new file mode 100644 index 0000000..4cedea3 --- /dev/null +++ b/imlib2/imlib2-sys/wrapper.h @@ -0,0 +1 @@ +#include "Imlib2.h" diff --git a/src/imlib2/errors.rs b/imlib2/src/errors.rs similarity index 100% rename from src/imlib2/errors.rs rename to imlib2/src/errors.rs diff --git a/src/imlib2/image.rs b/imlib2/src/image.rs similarity index 85% rename from src/imlib2/image.rs rename to imlib2/src/image.rs index e4e9031..febbc96 100644 --- a/src/imlib2/image.rs +++ b/imlib2/src/image.rs @@ -3,7 +3,7 @@ use std::path::Path; use imlib2_sys as im; -use imlib2::Error; +use Error; use xlib::Drawable; /// A simple wrapper around Imlib_Image @@ -44,10 +44,18 @@ impl Image { unsafe { im::imlib_save_image_with_error_return(path.as_ptr(), &mut error) }; Ok(()) } + + /// Get raw image + pub fn as_raw(&self) -> im::Imlib_Image { + self.inner + } } impl Drop for Image { fn drop(&mut self) { - unsafe { im::imlib_free_image() }; + unsafe { + im::imlib_context_set_image(self.inner); + im::imlib_free_image(); + } } } diff --git a/src/imlib2/mod.rs b/imlib2/src/lib.rs similarity index 53% rename from src/imlib2/mod.rs rename to imlib2/src/lib.rs index 577a825..784aa88 100644 --- a/src/imlib2/mod.rs +++ b/imlib2/src/lib.rs @@ -1,12 +1,15 @@ //! Safe-ish bindings to imlib2 (at least the only parts I need). +#[macro_use] +extern crate failure; +extern crate imlib2_sys; +extern crate xlib; + mod errors; mod image; -use imlib2_sys; - -pub use self::errors::Error; -pub use self::image::Image; +pub use errors::Error; +pub use image::Image; pub use imlib2_sys::{Drawable, Pixmap}; use xlib::{Display, Visual}; @@ -22,3 +25,13 @@ pub fn context_set_display(display: &Display) { pub fn context_set_visual(visual: &Visual) { unsafe { imlib2_sys::imlib_context_set_visual(visual.as_raw() as *mut imlib2_sys::Visual) }; } + +/// Set the visual for the imlib context. +pub fn context_set_image(image: &Image) { + unsafe { imlib2_sys::imlib_context_set_image(image.as_raw() as imlib2_sys::Imlib_Image) }; +} + +/// Get a pointer to the raw image data for the current image. +pub fn image_get_data() -> *mut u32 { + unsafe { imlib2_sys::imlib_image_get_data_for_reading_only() } +} diff --git a/src/capture.rs b/src/capture.rs index cd98fa4..662e77f 100644 --- a/src/capture.rs +++ b/src/capture.rs @@ -12,6 +12,7 @@ pub fn capture(opt: &Options) -> Result<(), ScreenshotError> { _ => gui.display.get_default_root_window()?, }; + println!("{}", window_to_capture.as_raw()); let capture = gui.capture_window(&opt, window_to_capture)?; capture.save_image(&opt.outfile)?; diff --git a/src/gui.rs b/src/gui.rs index d02bbd8..a2e96b2 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -1,11 +1,10 @@ use imlib2::{self, Image as Image2}; -use xlib::{Display, EventKind, Visual, Window}; +use xlib::{Display, Visual, Window}; use errors::ScreenshotError; use Options; use Rectangle; use Region; -use SelectWindow; pub struct GUI { pub(crate) display: Display, @@ -22,7 +21,7 @@ impl GUI { let attr = window.get_attributes()?; let mut width = attr.get_width(); let mut height = attr.get_height(); - let root = self.display.get_default_root_window()?; + let root = attr.get_root(); let (mut x, mut y, _) = self.display.translate_coordinates(window, 0, 0, root)?; imlib2::context_set_display(&self.display); @@ -31,7 +30,7 @@ impl GUI { match opt.region { Region::Selection => { - let region = self.interactive_select()?; + let region = self.interactive_select(window)?; x = region.x; y = region.y; width = region.width; @@ -53,29 +52,243 @@ impl GUI { } /// Brings up an interactive selection GUI. - pub fn interactive_select(&self) -> Result { - let window = SelectWindow::new(&self.display); - let root = self.display.get_default_root_window()?; + pub fn interactive_select(&self, window: Window) -> Result { + // let window = SelectWindow::new(&self.display); + // let root = self.display.get_default_root_window()?; - let root_im = root.get_image(); + // let root_im = root.get_image(); - let mut done = 0; - let mut button_press = false; - while done == 0 && self.display.pending()? > 0 { - let ev = self.display.next_event()?; - match ev.kind() { - EventKind::ButtonPress => { - button_press = true; - } - EventKind::ButtonRelease => { - if button_press { - done = 1; - } - button_press = false; - } - _ => (), - } + // let mut done = 0; + // let mut button_press = false; + // while done == 0 && self.display.pending()? > 0 { + // let ev = self.display.next_event()?; + // match ev.kind() { + // EventKind::ButtonPress => { + // button_press = true; + // } + // EventKind::ButtonRelease => { + // if button_press { + // done = 1; + // } + // button_press = false; + // } + // _ => (), + // } + // } + + use gl; + use glutin::{ + dpi::LogicalSize, ElementState, Event, EventsLoop, GlContext, GlWindow, KeyboardInput, + MouseButton, VirtualKeyCode, WindowBuilder, WindowEvent, + }; + use nanovg::{Color, Image, ImagePattern, PathOptions, StrokeOptions}; + use std::{f32::consts, slice}; + + let attr = window.get_attributes()?; + let width = attr.get_width(); + let height = attr.get_height(); + let root = attr.get_root(); + println!("{} {}", width, height); + let (x, y, _) = self.display.translate_coordinates(window, 0, 0, root)?; + + let mut evl = EventsLoop::new(); + let mon = evl.get_primary_monitor(); + + // TODO: handle error + let wb = WindowBuilder::new() + .with_decorations(false) + .with_always_on_top(true) + .with_dimensions(LogicalSize::new(width.into(), height.into())) + .with_fullscreen(Some(mon)); + let ctx = glutin::ContextBuilder::new() + .with_vsync(false) + .with_multisampling(4) + .with_srgb(true); + let win = GlWindow::new(wb, ctx, &evl).expect("couldn't make window"); + let f = win.get_hidpi_factor() as f64; + unsafe { + win.make_current().expect("couldn't make window"); + gl::load_with(|sym| win.get_proc_address(sym) as *const _); + } + // win.set_inner_size((width, height).into()); + // println!("size={:?} pos={:?} outer={:?}", win.get_inner_size(), win.get_inner_position(), win.get_outer_size()); + // println!("{:?}", win.get_hidpi_factor()); + + imlib2::context_set_display(&self.display); + let visual = Visual::default(&self.display, 0); + imlib2::context_set_visual(&visual); + + let img = Image2::create_from_drawable(window, 0, x, y, width as i32, height as i32, true)?; + imlib2::context_set_image(&img); + let len = (width * height) as usize; + let raw_data = unsafe { slice::from_raw_parts(imlib2::image_get_data(), len) }; + + // convert ARGB to RGBA + let mut data = vec![0u32; raw_data.len()]; + data.copy_from_slice(raw_data); + for i in &mut data { + // fix the colors + *i = (*i & 0xff00ff00) | ((*i & 0xff) << 16) | ((*i >> 16) & 0xff); + } + + let ctx = nanovg::ContextBuilder::new() + .build() + .expect("couldn't init nanovg"); + + let image = Image::new(&ctx) + .build_from_rgba(width as usize, height as usize, data.as_slice()) + .expect("couldn't create image"); + + let mut running = true; + let mut down = false; + // drag start + let mut dx = -1.0f64; + let mut dy = -1.0f64; + // curr mouse + let mut mx = -1.0f64; + let mut my = -1.0f64; + // rect + let mut rectw = 0.0f64; + let mut recth = 0.0f64; + let mut delayed_down = false; + while running { + let mut redraw = true; + evl.poll_events(|event| match event { + Event::WindowEvent { event, .. } => match event { + WindowEvent::CloseRequested | WindowEvent::Destroyed => running = false, + WindowEvent::KeyboardInput { + input: + KeyboardInput { + virtual_keycode, + state, + .. + }, + .. + } => match (virtual_keycode, state) { + (Some(VirtualKeyCode::Escape), ElementState::Released) => { + if down { + down = false; + } else { + running = false; + } + } + _ => (), + }, + WindowEvent::CursorMoved { position, .. } => { + mx = position.x; + my = position.y; + if down { + if delayed_down { + dx = mx; + dy = my; + delayed_down = false; + } else { + redraw = true; + } + rectw = mx - dx; + recth = my - dy; + } + } + WindowEvent::MouseInput { button, state, .. } => match button { + MouseButton::Left => { + down = match state { + ElementState::Pressed => { + delayed_down = true; + if mx < 0.0 || my < 0.0 { + } else { + dx = mx; + dy = my; + } + true + } + ElementState::Released => { + if down && rectw.abs() > 0.0 && recth.abs() > 0.0 { + running = false; + } + false + } + }; + } + _ => (), + }, + _ => (), + }, + _ => (), + }); + + if !redraw { + // don't do anything if it's not moved + continue; + } + + // let size = win.get_inner_size().unwrap(); + // let (width, height) = (size.width as i32, size.height as i32); + + unsafe { + gl::Viewport(0, 0, width as i32, height as i32); + gl::ClearColor(0.3, 0.3, 0.32, 1.0); + gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT | gl::STENCIL_BUFFER_BIT); + } + + let (width, height) = (width as f64, height as f64); + ctx.frame((width as f32, height as f32), f as f32, |frame| { + let path_opts = PathOptions::default(); + frame.path( + |path| { + path.rect((0.0, 0.0), ((width * f) as f32, (height * f) as f32)); + // path.fill(Color::from_rgba(200, 200, 200, 255), Default::default()); + path.fill( + ImagePattern { + image: &image, + origin: (0.0, 0.0), + size: (width as f32, height as f32), + angle: 0.0 / 180.0 * consts::PI, + alpha: 1.0, + }, + Default::default(), + ) + }, + path_opts, + ); + if down && rectw.abs() > 0.0 && recth.abs() > 0.0 { + frame.path( + |path| { + path.rect( + ((dx * f) as f32, (dy * f) as f32), + ((rectw * f) as f32, (recth * f) as f32), + ); + path.stroke( + Color::from_rgba(0, 0, 0, 255), + StrokeOptions { + width: 2.0, + ..Default::default() + }, + ); + }, + path_opts, + ); + } + }); + + win.swap_buffers().expect("couldn't swap buffers"); + } + if rectw.abs() > 0.0 && recth.abs() > 0.0 { + let mut x = dx; + let mut y = dy; + if rectw < 0.0 { + x += rectw; + } + if recth < 0.0 { + y += recth; + } + Ok(Rectangle::new( + (x * f) as i32, + (y * f) as i32, + (rectw.abs() * f) as u32, + (recth.abs() * f) as u32, + )) + } else { + Err(ScreenshotError::Error) } - Err(ScreenshotError::Error) } } diff --git a/src/lib.rs b/src/lib.rs index 9e96c3e..53e1c8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,22 +4,20 @@ #[macro_use] extern crate failure; -extern crate imlib2_sys; -extern crate libc; +extern crate gl; +extern crate glutin; +extern crate imlib2; +extern crate nanovg; extern crate png; #[macro_use] extern crate structopt; extern crate time; -extern crate x11; +extern crate xlib; mod capture; mod errors; mod gui; mod options; -mod window; - -pub mod imlib2; -pub mod xlib; use errors::ScreenshotError; use structopt::StructOpt; @@ -27,4 +25,11 @@ use xlib::Rectangle; pub use capture::capture; pub use options::{Options, Region}; -pub use window::SelectWindow; + +use failure::Error; + +#[allow(missing_docs)] +pub fn main() -> Result<(), Error> { + let opt = Options::from_args(); + capture(&opt).map(|_| ()).map_err(|err| err.into()) +} diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 9a29d50..0000000 --- a/src/main.rs +++ /dev/null @@ -1,12 +0,0 @@ -extern crate failure; -extern crate screenshot; -extern crate structopt; - -use failure::Error; -use screenshot::{capture, Options}; -use structopt::StructOpt; - -pub fn main() -> Result<(), Error> { - let opt = Options::from_args(); - capture(&opt).map(|_| ()).map_err(|err| err.into()) -} diff --git a/src/window.rs b/src/window.rs deleted file mode 100644 index da21997..0000000 --- a/src/window.rs +++ /dev/null @@ -1,17 +0,0 @@ -use xlib::{Display, Rectangle, Window}; - -use errors::ScreenshotError; - -/// A window that's opened for the user to select a region -pub struct SelectWindow { - inner: Window, -} - -impl SelectWindow { - /// Creates a new SelectWindow - pub fn new(display: &Display) -> Result { - // TODO: unhardcode - let window = Window::create(display, None, Rectangle::new(0, 0, 1920, 1080))?; - Ok(SelectWindow { inner: window }) - } -} diff --git a/src/xlib/gc.rs b/src/xlib/gc.rs deleted file mode 100644 index 5588ec5..0000000 --- a/src/xlib/gc.rs +++ /dev/null @@ -1,2 +0,0 @@ -/// Graphics context -pub struct GC {} diff --git a/src/xlib/mod.rs b/src/xlib/mod.rs deleted file mode 100644 index b15d01d..0000000 --- a/src/xlib/mod.rs +++ /dev/null @@ -1,30 +0,0 @@ -//! Safe-ish bindings to parts of x11's xlib module. -//! -//! I need this for my project. - -mod cursor; -mod display; -mod drawable; -mod errors; -mod event; -mod gc; -mod image; -mod rect; -mod visual; -mod window; - -#[allow(non_upper_case_globals)] -#[allow(missing_docs)] -mod cursorfont; - -pub use self::cursor::Cursor; -pub use self::cursorfont::*; -pub use self::display::{Display, GetDisplay}; -pub use self::drawable::Drawable; -pub use self::errors::X11Error; -pub use self::event::{Event, EventKind}; -pub use self::gc::GC; -pub use self::image::{Image, ImageByteOrder, PixBuffer}; -pub use self::rect::Rectangle; -pub use self::visual::Visual; -pub use self::window::{Window, WindowAttributes}; diff --git a/xlib/Cargo.toml b/xlib/Cargo.toml new file mode 100644 index 0000000..f5f4469 --- /dev/null +++ b/xlib/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "xlib" +version = "0.1.0" +authors = ["Michael Zhang "] + +[dependencies] +failure = "0.1" +libc = "0.2" +x11 = { version = "2.18", features = ["xlib"] } diff --git a/src/xlib/cursor.rs b/xlib/src/cursor.rs similarity index 100% rename from src/xlib/cursor.rs rename to xlib/src/cursor.rs diff --git a/src/xlib/cursorfont.rs b/xlib/src/cursorfont.rs similarity index 100% rename from src/xlib/cursorfont.rs rename to xlib/src/cursorfont.rs diff --git a/src/xlib/display.rs b/xlib/src/display.rs similarity index 98% rename from src/xlib/display.rs rename to xlib/src/display.rs index 60172db..d47896d 100644 --- a/src/xlib/display.rs +++ b/xlib/src/display.rs @@ -3,7 +3,7 @@ use std::ffi::CString; use libc; use x11::xlib as x; -use xlib::{Cursor, Event, Visual, Window, X11Error}; +use {Cursor, Event, Visual, Window, X11Error}; /// A connection to an X server. pub struct Display { diff --git a/src/xlib/drawable.rs b/xlib/src/drawable.rs similarity index 92% rename from src/xlib/drawable.rs rename to xlib/src/drawable.rs index e768730..6becc50 100644 --- a/src/xlib/drawable.rs +++ b/xlib/src/drawable.rs @@ -1,6 +1,6 @@ use x11::xlib as x; -use xlib::{GetDisplay, Image, Rectangle, X11Error}; +use {GetDisplay, Image, Rectangle, X11Error}; /// Anything that's drawable pub trait Drawable: GetDisplay { diff --git a/src/xlib/errors.rs b/xlib/src/errors.rs similarity index 100% rename from src/xlib/errors.rs rename to xlib/src/errors.rs diff --git a/src/xlib/event.rs b/xlib/src/event.rs similarity index 97% rename from src/xlib/event.rs rename to xlib/src/event.rs index 9ed9a22..1c382a8 100644 --- a/src/xlib/event.rs +++ b/xlib/src/event.rs @@ -1,7 +1,7 @@ use libc; use x11::xlib as x; -use xlib::X11Error; +use X11Error; /// An x11 Event pub struct Event { diff --git a/src/xlib/image.rs b/xlib/src/image.rs similarity index 93% rename from src/xlib/image.rs rename to xlib/src/image.rs index 2f048a7..e84c542 100644 --- a/src/xlib/image.rs +++ b/xlib/src/image.rs @@ -1,6 +1,6 @@ use x11::xlib as x; -use xlib::X11Error; +use X11Error; /// A handle to an XImage. pub struct Image { @@ -17,8 +17,10 @@ pub enum ImageByteOrder { /// The buffer pointed to by an XImage. pub struct PixBuffer { - pub(self) buf: *mut u8, - pub(self) size: usize, + /// The raw pointer to the buffer + pub buf: *mut u8, + /// The size of the buffer + pub size: usize, } impl Image { diff --git a/xlib/src/lib.rs b/xlib/src/lib.rs new file mode 100644 index 0000000..dd1ad5c --- /dev/null +++ b/xlib/src/lib.rs @@ -0,0 +1,33 @@ +//! Safe-ish bindings to parts of x11's xlib module. +//! +//! I need this for my project. + +#[macro_use] +extern crate failure; +extern crate libc; +extern crate x11; + +mod cursor; +mod display; +mod drawable; +mod errors; +mod event; +mod image; +mod rect; +mod visual; +mod window; + +#[allow(non_upper_case_globals)] +#[allow(missing_docs)] +mod cursorfont; + +pub use cursor::Cursor; +pub use cursorfont::*; +pub use display::{Display, GetDisplay}; +pub use drawable::Drawable; +pub use errors::X11Error; +pub use event::{Event, EventKind}; +pub use image::{Image, ImageByteOrder, PixBuffer}; +pub use rect::Rectangle; +pub use visual::Visual; +pub use window::{Window, WindowAttributes}; diff --git a/src/xlib/rect.rs b/xlib/src/rect.rs similarity index 100% rename from src/xlib/rect.rs rename to xlib/src/rect.rs diff --git a/src/xlib/visual.rs b/xlib/src/visual.rs similarity index 95% rename from src/xlib/visual.rs rename to xlib/src/visual.rs index 601dcdb..264d5e8 100644 --- a/src/xlib/visual.rs +++ b/xlib/src/visual.rs @@ -1,6 +1,6 @@ use x11::xlib as x; -use xlib::Display; +use Display; /// A wrapper around a Visual pub struct Visual { diff --git a/src/xlib/window.rs b/xlib/src/window.rs similarity index 87% rename from src/xlib/window.rs rename to xlib/src/window.rs index 97e53e3..6da1e4b 100644 --- a/src/xlib/window.rs +++ b/xlib/src/window.rs @@ -4,7 +4,7 @@ use std::mem; use libc; use x11::xlib as x; -use xlib::{Display, Drawable, GetDisplay, Image, Rectangle, X11Error}; +use {Display, Drawable, GetDisplay, Image, Rectangle, X11Error}; /// A wrapper around a window handle. #[derive(Copy, Clone, PartialEq, Eq)] @@ -15,6 +15,7 @@ pub struct Window { /// Window Attributes pub struct WindowAttributes { + pub(super) display: *mut x::Display, pub(self) inner: *mut x::XWindowAttributes, } @@ -60,7 +61,10 @@ impl Window { let result = unsafe { x::XGetWindowAttributes(self.display, self.inner, attr) }; match result { 0 => Err(X11Error::GetAttributesError), - _ => Ok(WindowAttributes { inner: attr }), + _ => Ok(WindowAttributes { + display: self.display, + inner: attr, + }), } } @@ -122,6 +126,14 @@ impl WindowAttributes { pub fn get_height(&self) -> u32 { unsafe { (*self.inner).height as u32 } } + + /// Get the root window of this window + pub fn get_root(&self) -> Window { + Window { + display: self.display, + inner: unsafe { (*self.inner).root }, + } + } } impl Drop for WindowAttributes {